Home | History | Annotate | Download | only in tls

Lines Matching refs:aead

75 	aead   func(key, fixedNonce []byte) cipher.AEAD
152 type aead interface {
153 cipher.AEAD
161 // fixedNonceAEAD wraps an AEAD and prefixes a fixed portion of the nonce to
166 aead cipher.AEAD
170 func (f *fixedNonceAEAD) Overhead() int { return f.aead.Overhead() }
175 return f.aead.Seal(out, f.nonce[:], plaintext, additionalData)
180 return f.aead.Open(out, f.nonce[:], plaintext, additionalData)
183 // xoredNonceAEAD wraps an AEAD by XORing in a fixed pattern to the nonce
187 aead cipher.AEAD
191 func (f *xorNonceAEAD) Overhead() int { return f.aead.Overhead() }
198 result := f.aead.Seal(out, f.nonceMask[:], plaintext, additionalData)
210 result, err := f.aead.Open(out, f.nonceMask[:], plaintext, additionalData)
218 func aeadAESGCM(key, fixedNonce []byte) cipher.AEAD {
223 aead, err := cipher.NewGCM(aes)
228 ret := &fixedNonceAEAD{aead: aead}
233 func aeadChaCha20Poly1305(key, fixedNonce []byte) cipher.AEAD {
234 aead, err := chacha20poly1305.New(key)
239 ret := &xorNonceAEAD{aead: aead}