package ecdh

Import Path
	catinello.eu/ecdh25519

Descriptions ECDH implementation with curve25519. https://tools.ietf.org/html/rfc7748
Package-Level Type Names (total 4)
/* sort by: | */
Pair holds private and public key. Private PrivateKey Public PublicKey func New() (*Pair, error) func Use(private []byte) (*Pair, error)
( PrivateKey) Bytes() []byte PlainSecret provides a shared secret (32 bytes) of the given private and public keys. Public provides the PublicKey of the given PrivateKey. Secret provides a SHA3 hashed shared secret of the given private and public keys. SharedSecret size is 64 bytes hashed by SHAKE256.
( PublicKey) Bytes() []byte func PrivateKey.Public() (PublicKey, error) func PrivateKey.PlainSecret(pub PublicKey) ([]byte, error) func PrivateKey.Secret(pub PublicKey) (SharedSecret, error)
( SharedSecret) Bytes() []byte func PrivateKey.Secret(pub PublicKey) (SharedSecret, error)
Package-Level Functions (total 2)
New generates a pair of a random private and corresponding public key. Private key consists of randomly generated bytes. (rfc7748 pages 7/8) Both keys size is 32 bytes.
Use takes a []byte value of a valid PrivateKey and calculates a Pair.