Documentation ¶
Index ¶
Constants ¶
const (
// BlockSize is the size in bytes of an OCB3 block.
BlockSize = 16
)
Variables ¶
This section is empty.
Functions ¶
func New ¶
New creates an OCB3 AEAD from a secure block cipher.
The AEAD uses a 96-bit nonce and 128-bit tag.
Nonces can either be random or a counter. Like many AEAD modes, they need not be secret.
Like many AEAD modes, (nonce, key) pairs must never be used to encrypt multiple messages (multiple calls to Seal). Doing so is catastrophic for both confidentiality and authenticity. It cannot be stressed enough: never allow (nonce, key) pairs to repeat while encrypting. It is a fatal error.
OCB3's confidentiality and authenticity claims degrade as the number of blocks, s, approaches s^2 / 2^128. Therefore, it is recommended that each key generate no more than 2^48 ciphertext blocks (about 4 PB), including associated data.
It is an error if the cipher's block size is not exactly BlockSize.
func NewWithNonceAndTagSize ¶
func NewWithNonceSize ¶
Types ¶
This section is empty.