Documentation
¶
Overview ¶
Package client provides the Reunion protocol client.
Package client provides the Reunion protocol client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // InvalidResponseErr is an error used to indicate // that an invalid response from the Reunion server was received. InvalidResponseErr = errors.New("invalid response received from Reunion DB") // ErrShutdown is an error invoked during shutdown. ErrShutdown = errors.New("reunion: shutdown requested") )
Functions ¶
This section is empty.
Types ¶
type Exchange ¶
type Exchange struct { ExchangeID uint64 // contains filtered or unexported fields }
Exchange encapsulates all the client key material and protocol state transitions.
The Reunion paper states:
For the linked protocol variant: For every other t1 message, they construct and transmit a respective t2 message. For every t2 message sent in reply to their own t1, they construct and transmit a t3 message.
func NewExchange ¶
func NewExchange( payload []byte, log *logging.Logger, db server.ReunionDatabase, contactID uint64, passphrase []byte, sharedRandomValue []byte, epoch uint64, updateChan chan ReunionUpdate, shutdownChan chan struct{}) (*Exchange, error)
NewExchange creates a new Exchange struct type.
func NewExchangeFromSnapshot ¶
func NewExchangeFromSnapshot( serialized []byte, log *logging.Logger, db server.ReunionDatabase, updateChan chan ReunionUpdate, shutdownChan chan struct{}) (*Exchange, error)
NewExchangeFromSnapshot creates a new Exchange given a snapshot blob.
func (*Exchange) Marshal ¶
Marshal returns a serialization of the Exchange or an error. XXX fix me; added many more fields since this was written...
type ExchangeHash ¶
type ExchangeHash [32]byte
ExchangeHash is a 32 byte array which represents a hash of one of our cryptographic messages, t1 hash, t2 hash etc.
type ReunionUpdate ¶
type ReunionUpdate struct { // ContactID is the unique contact identity. ContactID uint64 // ExchangeID is the unique reunion exchange identity. ExchangeID uint64 // Error contains an error or nil if no error. Error error // Serialized is the serialized Exchange state. Serialized []byte // Result is the received decrypted T1 message payload. Result []byte }
ReunionUpdate represents an update to the reunion client state or to report a failure.