- func GenerateKey(rand io.Reader) (PublicKey, PrivateKey, error)
- type PrivateKey
- type PublicKey
const ( // PublicKeySize is the size, in bytes, of public keys as used in this package. PublicKeySize = 32 // PrivateKeySize is the size, in bytes, of private keys as used in this package. PrivateKeySize = 64 // SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032. SeedSize = 32 )
This section is empty.
type PrivateKey ¶
type PrivateKey byte
PrivateKey is the type of X25519 private key
func NewKeyFromSeed ¶
NewKeyFromSeed calculates a private key from a seed. It will return an error if len(seed) is not SeedSize. This function is provided for interoperability with RFC 7748. RFC 7748's private keys correspond to seeds in this package.
Equal reports whether priv and x have the same value.
Public returns the PublicKey corresponding to priv.