Documentation ¶
Overview ¶
package aead provides an interface for Advanced Encryption with Associated Data (AEAD).
Index ¶
- func AppendOpenK256N64(out []byte, sch K256N64, key *[32]byte, nonce [8]byte, ctext, ad []byte) ([]byte, error)
- func AppendOpenSUV256(sch SUV256, out []byte, suv *[32]byte, ctext, ad []byte) ([]byte, error)
- func AppendSealK256N64(out []byte, sch K256N64, key *[32]byte, nonce [8]byte, ptext, ad []byte) []byte
- func AppendSealSUV256(sch SUV256, out []byte, suv *[32]byte, ptext, ad []byte) []byte
- func TestK256N192(t *testing.T, s K256N192)
- func TestK256N64(t *testing.T, s K256N64)
- func TestSUV256(t *testing.T, s SUV256)
- type K256N192
- type K256N64
- type SUV256
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendOpenK256N64 ¶
func AppendOpenK256N64(out []byte, sch K256N64, key *[32]byte, nonce [8]byte, ctext, ad []byte) ([]byte, error)
AppendSealK256N64 appends to out
func AppendOpenSUV256 ¶
func AppendSealK256N64 ¶
func AppendSealK256N64(out []byte, sch K256N64, key *[32]byte, nonce [8]byte, ptext, ad []byte) []byte
AppendSealK256N64 appends is like to out.
func AppendSealSUV256 ¶
func TestK256N192 ¶
func TestK256N64 ¶
func TestSUV256 ¶
Types ¶
type K256N192 ¶
type K256N192 interface { // Seal creates an confidential and authenticated ciphertext for ptext and writes it to dst SealK256N192(dst []byte, key *[32]byte, nonce *[24]byte, ptext, ad []byte) // Open authenticates and decryptes ctext and writes the result to dst or returns an error. OpenK256N192(dst []byte, key *[32]byte, nonce *[24]byte, ctext, ad []byte) error // Overhead is the ciphertext_size - plaintext_size Overhead() int }
K256N192 is an AEAD with a 256 bit key and a 192 bit nonce 192 bits is large enough to use randomly generated nonces.
type K256N64 ¶
type K256N64 interface { // Seal creates an confidential and authenticated ciphertext for ptext and writes it to dst SealK256N64(dst []byte, key *[32]byte, nonce [8]byte, ptext, ad []byte) // Open authenticates and decryptes ctext and writes the result to dst or returns an error. OpenK256N64(dst []byte, key *[32]byte, nonce [8]byte, ctext, ad []byte) error // Overhead is the ciphertext_size - plaintext_size Overhead() int }
K256N64 is an AEAD with a 256 bit key and a 64 bit nonce A 64 bit nonce is not large enough to use randomly generated nonces.
type SUV256 ¶
type SUV256 interface { // Seal creates an confidential and authenticated ciphertext for ptext and writes it to dst. SealSUV256(dst []byte, suv *[32]byte, ptext, ad []byte) // Open authenticates and decryptes ctext and writes the result to dst returns an error. OpenSUV256(dst []byte, suv *[32]byte, ctext, ad []byte) error // Overhead is the ciphertext_size - plaintext_size Overhead() int }
SUV256 is an AEAD which takes a Secret and Unique Value instead of a key and a nonce
Directories ¶
Path | Synopsis |
---|---|
package aead_xof implements an AEAD (aead.Scheme256) in terms of an XOF (xof.Scheme)
|
package aead_xof implements an AEAD (aead.Scheme256) in terms of an XOF (xof.Scheme) |
Click to show internal directories.
Click to hide internal directories.