Documentation ¶
Overview ¶
ECDH implementation with curve25519. https://tools.ietf.org/html/rfc7748
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pair ¶
type Pair struct { Private PrivateKey Public PublicKey }
Pair holds private and public key.
type PrivateKey ¶
type PrivateKey []byte
func (PrivateKey) Bytes ¶
func (pri PrivateKey) Bytes() []byte
func (PrivateKey) PlainSecret ¶
func (pri PrivateKey) PlainSecret(pub PublicKey) ([]byte, error)
PlainSecret provides a shared secret (32 bytes) of the given private and public keys.
func (PrivateKey) Public ¶
func (pri PrivateKey) Public() (PublicKey, error)
Public provides the PublicKey of the given PrivateKey.
func (PrivateKey) Secret ¶
func (pri PrivateKey) Secret(pub PublicKey) (SharedSecret, error)
Secret provides a SHA3 hashed shared secret of the given private and public keys. SharedSecret size is 64 bytes hashed by SHAKE256.
type SharedSecret ¶
type SharedSecret []byte
func (SharedSecret) Bytes ¶
func (s SharedSecret) Bytes() []byte
Click to show internal directories.
Click to hide internal directories.