Documentation ¶
Index ¶
- Constants
- Variables
- func New(kv *versioned.KV, myID *id.ID, privKey *cyclic.Int, grp *cyclic.Group) error
- type Ratchet
- func (r *Ratchet) AddPartner(partnerID *id.ID, partnerPubKey, myPrivKey *cyclic.Int, ...) (partner.Manager, error)
- func (r *Ratchet) AddService(tag string, processor message.Processor) error
- func (r *Ratchet) DeletePartner(partnerID *id.ID) error
- func (r *Ratchet) GetAllPartnerIDs() []*id.ID
- func (r *Ratchet) GetDHPrivateKey() *cyclic.Int
- func (r *Ratchet) GetDHPublicKey() *cyclic.Int
- func (r *Ratchet) GetPartner(partnerID *id.ID) (partner.Manager, error)
- func (r *Ratchet) RemoveService(tag string) error
- type Services
Constants ¶
View Source
const E2e = "e2e"
View Source
const Silent = "silent"
Variables ¶
View Source
var NoPartnerErrorStr = "No relationship with partner found"
Functions ¶
Types ¶
type Ratchet ¶
type Ratchet struct {
// contains filtered or unexported fields
}
func Load ¶
func Load(kv *versioned.KV, myID *id.ID, grp *cyclic.Group, cyHandler session.CypherHandler, services Services, rng *fastRNG.StreamGenerator) ( *Ratchet, error)
Load loads an extant ratchet from disk
func (*Ratchet) AddPartner ¶
func (r *Ratchet) AddPartner(partnerID *id.ID, partnerPubKey, myPrivKey *cyclic.Int, partnerSIDHPubKey *sidh.PublicKey, mySIDHPrivKey *sidh.PrivateKey, sendParams, receiveParams session.Params) (partner.Manager, error)
AddPartner adds a partner. Automatically creates both send and receive sessions using the passed cryptographic data and per the parameters sent
func (*Ratchet) AddService ¶
func (*Ratchet) DeletePartner ¶
DeletePartner removes the associated contact from the E2E store
func (*Ratchet) GetAllPartnerIDs ¶
GetAllPartnerIDs returns a list of all partner IDs that the user has an E2E relationship with.
func (*Ratchet) GetDHPrivateKey ¶
GetDHPrivateKey returns the diffie hellman private key used to initially establish the ratchet.
func (*Ratchet) GetDHPublicKey ¶
GetDHPublicKey returns the diffie hellman public key used to initially establish the ratchet.
func (*Ratchet) GetPartner ¶
GetPartner returns the partner per its ID, if it exists
func (*Ratchet) RemoveService ¶
Click to show internal directories.
Click to hide internal directories.