Documentation ¶
Overview ¶
Package cipher implments the Noise Protocol Framework cipher function abstract interface and standard cipher functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cipher ¶
type Cipher interface { fmt.Stringer // New constructs a new keyed `cipher.AEAD` instance, with the provided // key. New(key []byte) (cipher.AEAD, error) // EncodeNonce encodes a Noise nonce to a nonce suitable for use with // the `cipher.AEAD` instances created by `Cipher.New`. EncodeNonce(nonce uint64) []byte }
Cipher is an AEAD algorithm factory.
var AESGCM Cipher = &cipherAesGcm{}
AESGCM is the AESGCM cipher functions.
Note: This Cipher implementation is always constant time, even on systems where the Go runtime library's is not.
var ChaChaPoly Cipher = &cipherChaChaPoly{}
ChaChaPoly is the ChaChaPoly cipher functions.
var DeoxysII Cipher = &cipherDeoxysII{}
DeoxysII is the DeoxysII cipher functions.
Warning: This cipher is non-standard.
func FromString ¶
FromString returns a Cipher by algorithm name, or nil.
Click to show internal directories.
Click to hide internal directories.