reunion: github.com/katzenpost/reunion/client Index | Files

package client

import "github.com/katzenpost/reunion/client"

Package client provides the Reunion protocol client.

Package client provides the Reunion protocol client.

Index

Package Files

exchange.go state.go

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")
)

type Exchange Uses

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 Uses

func NewExchange(
    payload []byte,
    log *logging.Logger,
    db server.ReunionDatabase,
    contactID uint64,
    passphrase []byte,
    sharedRandomValue []byte,
    epoch uint64,
    updateChan chan ReunionUpdate) (*Exchange, error)

NewExchange creates a new Exchange struct type.

func NewExchangeFromSnapshot Uses

func NewExchangeFromSnapshot(
    serialized []byte,
    log *logging.Logger,
    db server.ReunionDatabase,
    updateChan chan ReunionUpdate) (*Exchange, error)

NewExchangeFromSnapshot creates a new Exchange given a snapshot blob.

func (*Exchange) Marshal Uses

func (e *Exchange) Marshal() ([]byte, error)

Marshal returns a serialization of the Exchange or an error. XXX fix me; added many more fields since this was written...

func (*Exchange) Run Uses

func (e *Exchange) Run()

Run performs the Reunion exchange and expresses a simple FSM which uses the updateChan to save it's state after each state transition. This method is meant to run in it's own goroutine.

func (*Exchange) Unmarshal Uses

func (e *Exchange) Unmarshal(data []byte) error

Unmarshal returns an error if the given data fails to be deserialized.

type ExchangeHash Uses

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 Uses

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.

Package client imports 11 packages (graph) and is imported by 1 packages. Updated 2020-11-27. Refresh now. Tools for package owners.