Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SharedSecret ¶
type SharedSecret struct {
// contains filtered or unexported fields
}
SharedSecret generates and manages negotiated secrets. Identities (public keys) stored by SharedSecret are compressed. TODO: make compression of public keys a responsibility of sqlitePersistence instead of SharedSecret.
func (*SharedSecret) Agreed ¶
func (s *SharedSecret) Agreed(myPrivateKey *ecdsa.PrivateKey, myInstallationID string, theirPublicKey *ecdsa.PublicKey, theirInstallationIDs []string) (*Secret, bool, error)
Agreed returns true if a secret has been acknowledged by all the installationIDs.
func (*SharedSecret) All ¶
func (s *SharedSecret) All() ([]*Secret, error)
func (*SharedSecret) Generate ¶
func (s *SharedSecret) Generate(myPrivateKey *ecdsa.PrivateKey, theirPublicKey *ecdsa.PublicKey, installationID string) (*Secret, error)
Generate will generate a shared secret for a given identity, and return it.
Click to show internal directories.
Click to hide internal directories.