acd

package
v0.0.0-...-7579eda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package acd implements the double ratchet protocol specified by Joël Alwen, Sandro Coretti and Yevgeniy Dodis in their paper The Double Ratchet: Security Notions, Proofs, and Modularization for the Signal Protocol (https://eprint.iacr.org/2018/1037.pdf). The scheme relies on novel cryptographic primitives like a forward-secure authenticated encryption scheme with associated data (FS-AEAD), a continuous key-agreement protocol (CKA) and a PRF-PRNG construction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DoubleRatchet

type DoubleRatchet struct {
	// contains filtered or unexported fields
}

DoubleRatchet designates the the secure channel protocol defined by a FS-AEAD scheme, a CKA construction and a PRF-PRNG algorithm.

func NewDoubleRatchet

NewDoubleRatchet returns a fresh double ratchet instance for a given AEAD scheme.

func (DoubleRatchet) Init

func (d DoubleRatchet) Init() (alice, bob *User, err error)

Init intializes the double ratchet protocol and returns two user states.

func (DoubleRatchet) Receive

func (d DoubleRatchet) Receive(user *User, ct []byte) ([]byte, error)

Receive calls the double ratchet receive routine for a given user and ciphertext.

func (DoubleRatchet) Send

func (d DoubleRatchet) Send(user *User, msg []byte) ([]byte, error)

Send calls the double ratchet send routine for a given user and message.

type User

type User struct {
	Gamma []byte // Gamma is CKA state.
	T     []byte // T is the current CKA message.
	I     int    // I is the current user epoch.
	Root  []byte // Root is the current PRF-PRNG key.

	V map[int][]byte // V contains all FS-AEAD (send, receive) states.
	// contains filtered or unexported fields
}

User designates a participant in the protocol that can both send and receive messages. It has to be passed as an argument to both the send and receive routines.

func (User) Size

func (u User) Size() int

Size returns the size (in bytes) of a user state.

Directories

Path Synopsis
Runtime, message size and state size benchmarks for the acd protocol.
Runtime, message size and state size benchmarks for the acd protocol.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL