Type Alias Aes256GcmSiv

Source
pub type Aes256GcmSiv = AesGcmSiv<Aes256>;
Expand description

AES-GCM-SIV with a 256-bit key.

Aliased Type§

struct Aes256GcmSiv { /* private fields */ }

Trait Implementations

Source§

impl<Aes> AeadCore for AesGcmSiv<Aes>
where Aes: BlockCipher<BlockSize = U16> + BlockEncrypt + KeyInit,

Source§

type NonceSize = UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>

The length of a nonce.
Source§

type TagSize = UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>

The maximum length of the nonce.
Source§

type CiphertextOverhead = UTerm

The upper bound amount of additional space required to support a ciphertext vs. a plaintext.
Source§

fn generate_nonce( rng: impl CryptoRng + RngCore, ) -> GenericArray<u8, Self::NonceSize>
where GenericArray<u8, Self::NonceSize>: Default,

Generate a random nonce for this AEAD algorithm. Read more
Source§

impl<Aes> AeadInPlace for AesGcmSiv<Aes>
where Aes: BlockCipher<BlockSize = U16> + BlockEncrypt + KeyInit,

Source§

fn encrypt_in_place_detached( &self, nonce: &Nonce, associated_data: &[u8], buffer: &mut [u8], ) -> Result<Tag, Error>

Encrypt the data in-place, returning the authentication tag
Source§

fn decrypt_in_place_detached( &self, nonce: &Nonce, associated_data: &[u8], buffer: &mut [u8], tag: &Tag, ) -> Result<(), Error>

Decrypt the message in-place, returning an error in the event the provided authentication tag does not match the given ciphertext (i.e. ciphertext is modified/unauthentic)
Source§

fn encrypt_in_place( &self, nonce: &GenericArray<u8, Self::NonceSize>, associated_data: &[u8], buffer: &mut dyn Buffer, ) -> Result<(), Error>

Encrypt the given buffer containing a plaintext message in-place. Read more
Source§

fn decrypt_in_place( &self, nonce: &GenericArray<u8, Self::NonceSize>, associated_data: &[u8], buffer: &mut dyn Buffer, ) -> Result<(), Error>

Decrypt the message in-place, returning an error in the event the provided authentication tag does not match the given ciphertext. Read more
Source§

impl<Aes: Clone> Clone for AesGcmSiv<Aes>

Source§

fn clone(&self) -> AesGcmSiv<Aes>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Aes> From<Aes> for AesGcmSiv<Aes>
where Aes: BlockCipher<BlockSize = U16> + BlockEncrypt,

Source§

fn from(key_generating_key: Aes) -> Self

Converts to this type from the input type.
Source§

impl<Aes> KeyInit for AesGcmSiv<Aes>
where Aes: BlockCipher<BlockSize = U16> + BlockEncrypt + KeyInit,

Source§

fn new(key_bytes: &Key<Self>) -> Self

Create new value from fixed size key.
§

fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>

Create new value from variable size key.
§

fn generate_key( rng: impl CryptoRng + RngCore, ) -> GenericArray<u8, Self::KeySize>

Generate random key using the provided CryptoRng.
Source§

impl<Aes> KeySizeUser for AesGcmSiv<Aes>
where Aes: KeySizeUser,

Source§

type KeySize = <Aes as KeySizeUser>::KeySize

Key size in bytes.
§

fn key_size() -> usize

Return key size in bytes.