[][src]Module tink_aead::subtle

Provides subtle implementations of the tink_core::Aead primitive.

Structs

AesCtr

AesCtr is an implementation of AEAD interface.

AesGcm

AesGcm is an implementation of the tink_core::Aead trait.

AesGcmSiv

AesGcmSiv is an implementation of the tink_core::Aead trait.

ChaCha20Poly1305

ChaCha20Poly1305 is an implementation of the tink_core::Aead trait.

EncryptThenAuthenticate

EncryptThenAuthenticate performs an encrypt-then-MAC operation on plaintext and additional authenticated data (aad). The MAC is computed over (aad || ciphertext || size of aad). This implementation is based on http://tools.ietf.org/html/draft-mcgrew-aead-aes-cbc-hmac-sha2-05.

XChaCha20Poly1305

XChaCha20Poly1305 is an implementation of the tink_core::Aead trait.

Constants

AES_BLOCK_SIZE_IN_BYTES
AES_CTR_MIN_IV_SIZE

The minimum IV size that this implementation supports.

AES_GCM_IV_SIZE

The only IV size that this implementation supports.

AES_GCM_SIV_NONCE_SIZE

The only IV size that this implementation supports.

AES_GCM_SIV_TAG_SIZE

The only tag size that this implementation supports.

AES_GCM_TAG_SIZE

The only tag size that this implementation supports.

CHA_CHA20_KEY_SIZE

Size of a ChaCh20 key in bytes.

CHA_CHA20_NONCE_SIZE

Size of a ChaCh20 nonce in bytes.

X_CHA_CHA20_KEY_SIZE

Size of an XChaCh20 key in bytes.

X_CHA_CHA20_NONCE_SIZE

Size of an XChaCh20 nonce in bytes.

Traits

IndCpaCipher
IndCpaCipherBoxClone

Trait bound to indicate that primitive trait objects should support cloning themselves as trait objects.

Functions

validate_aes_key_size

Check if the given key size is a valid AES key size.