Documentation ¶
Overview ¶
Package x25519 implements Elliptic Curve Diffie-Hellman (ECDH) function over Curve25519. Details at https://cr.yp.to/ecdh.html and https://tools.ietf.org/html/rfc7748
Index ¶
Constants ¶
View Source
const KEYSZ = 32
KEYSZ is the size of keys in bytes used in this package.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Curve ¶
type Curve struct {
// contains filtered or unexported fields
}
Curve is the type of Curve25519 secret keys.
func New ¶
New generates a secret key using entropy from random, or crypto/rand.Reader if random is nil.
func (*Curve) Private ¶
func (k *Curve) Private() *PrivateKey
Private returns the secret key as a byte array pointer.
Click to show internal directories.
Click to hide internal directories.