embassy-crypto-driver

Crates

git

Versions

default

Flavors

Skip to main content

AesOperation

Enum AesOperation 

Source
#[non_exhaustive]
pub enum AesOperation<'a> {
Show 17 variants Aes128EcbEncrypt { block: &'a mut [u8; 16], key: &'a [u8; 16], }, Aes128EcbDecrypt { block: &'a mut [u8; 16], key: &'a [u8; 16], }, Aes128Cmac { key: &'a [u8; 16], data: &'a [u8], out: &'a mut [u8; 16], }, AesCcm128Encrypt { key: &'a [u8; 16], nonce: &'a [u8], aad: &'a [u8], plaintext: &'a [u8], ciphertext: &'a mut [u8], tag: &'a mut [u8; 16], }, AesCcm128Decrypt { key: &'a [u8; 16], nonce: &'a [u8], aad: &'a [u8], ciphertext: &'a [u8], plaintext: &'a mut [u8], tag: &'a [u8; 16], }, AesCcm8_128Encrypt { key: &'a [u8; 16], nonce: &'a [u8], aad: &'a [u8], plaintext: &'a [u8], ciphertext: &'a mut [u8], tag: &'a mut [u8; 8], }, AesCcm8_128Decrypt { key: &'a [u8; 16], nonce: &'a [u8], aad: &'a [u8], ciphertext: &'a [u8], plaintext: &'a mut [u8], tag: &'a [u8; 8], }, AesGcm128Encrypt { key: &'a [u8; 16], nonce: &'a [u8], aad: &'a [u8], plaintext: &'a [u8], ciphertext: &'a mut [u8], tag: &'a mut [u8; 16], }, AesGcm128Decrypt { key: &'a [u8; 16], nonce: &'a [u8], aad: &'a [u8], ciphertext: &'a [u8], plaintext: &'a mut [u8], tag: &'a [u8; 16], }, AesGcm256Encrypt { key: &'a [u8; 32], nonce: &'a [u8], aad: &'a [u8], plaintext: &'a [u8], ciphertext: &'a mut [u8], tag: &'a mut [u8; 16], }, AesGcm256Decrypt { key: &'a [u8; 32], nonce: &'a [u8], aad: &'a [u8], ciphertext: &'a [u8], plaintext: &'a mut [u8], tag: &'a [u8; 16], }, Aes128CbcEncrypt { iv: &'a [u8; 16], buffer: &'a mut [u8], key: &'a [u8; 16], }, Aes128CbcDecrypt { iv: &'a [u8; 16], block: &'a mut [u8], key: &'a [u8; 16], }, Aes256CbcEncrypt { iv: &'a [u8; 16], block: &'a mut [u8], key: &'a [u8; 32], }, Aes256CbcDecrypt { iv: &'a [u8; 16], block: &'a mut [u8], key: &'a [u8; 32], }, AesCcm4_128Encrypt { key: &'a [u8; 16], nonce: &'a [u8], aad: &'a [u8], plaintext: &'a [u8], ciphertext: &'a mut [u8], tag: &'a mut [u8; 4], }, AesCcm4_128Decrypt { key: &'a [u8; 16], nonce: &'a [u8], aad: &'a [u8], ciphertext: &'a [u8], plaintext: &'a mut [u8], tag: &'a [u8; 4], },
}
Expand description

Discriminated union of all AES symmetric crypto operations.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Aes128EcbEncrypt

Fields

§block: &'a mut [u8; 16]
§key: &'a [u8; 16]
§

Aes128EcbDecrypt

Fields

§block: &'a mut [u8; 16]
§key: &'a [u8; 16]
§

Aes128Cmac

Fields

§key: &'a [u8; 16]
§data: &'a [u8]
§out: &'a mut [u8; 16]
§

AesCcm128Encrypt

Fields

§key: &'a [u8; 16]
§nonce: &'a [u8]
§aad: &'a [u8]
§plaintext: &'a [u8]
§ciphertext: &'a mut [u8]
§tag: &'a mut [u8; 16]
§

AesCcm128Decrypt

Fields

§key: &'a [u8; 16]
§nonce: &'a [u8]
§aad: &'a [u8]
§ciphertext: &'a [u8]
§plaintext: &'a mut [u8]
§tag: &'a [u8; 16]
§

AesCcm8_128Encrypt

Fields

§key: &'a [u8; 16]
§nonce: &'a [u8]
§aad: &'a [u8]
§plaintext: &'a [u8]
§ciphertext: &'a mut [u8]
§tag: &'a mut [u8; 8]
§

AesCcm8_128Decrypt

Fields

§key: &'a [u8; 16]
§nonce: &'a [u8]
§aad: &'a [u8]
§ciphertext: &'a [u8]
§plaintext: &'a mut [u8]
§tag: &'a [u8; 8]
§

AesGcm128Encrypt

Fields

§key: &'a [u8; 16]
§nonce: &'a [u8]
§aad: &'a [u8]
§plaintext: &'a [u8]
§ciphertext: &'a mut [u8]
§tag: &'a mut [u8; 16]
§

AesGcm128Decrypt

Fields

§key: &'a [u8; 16]
§nonce: &'a [u8]
§aad: &'a [u8]
§ciphertext: &'a [u8]
§plaintext: &'a mut [u8]
§tag: &'a [u8; 16]
§

AesGcm256Encrypt

Fields

§key: &'a [u8; 32]
§nonce: &'a [u8]
§aad: &'a [u8]
§plaintext: &'a [u8]
§ciphertext: &'a mut [u8]
§tag: &'a mut [u8; 16]
§

AesGcm256Decrypt

Fields

§key: &'a [u8; 32]
§nonce: &'a [u8]
§aad: &'a [u8]
§ciphertext: &'a [u8]
§plaintext: &'a mut [u8]
§tag: &'a [u8; 16]
§

Aes128CbcEncrypt

Fields

§iv: &'a [u8; 16]
§buffer: &'a mut [u8]
§key: &'a [u8; 16]
§

Aes128CbcDecrypt

Fields

§iv: &'a [u8; 16]
§block: &'a mut [u8]
§key: &'a [u8; 16]
§

Aes256CbcEncrypt

Fields

§iv: &'a [u8; 16]
§block: &'a mut [u8]
§key: &'a [u8; 32]
§

Aes256CbcDecrypt

Fields

§iv: &'a [u8; 16]
§block: &'a mut [u8]
§key: &'a [u8; 32]
§

AesCcm4_128Encrypt

Fields

§key: &'a [u8; 16]
§nonce: &'a [u8]
§aad: &'a [u8]
§plaintext: &'a [u8]
§ciphertext: &'a mut [u8]
§tag: &'a mut [u8; 4]
§

AesCcm4_128Decrypt

Fields

§key: &'a [u8; 16]
§nonce: &'a [u8]
§aad: &'a [u8]
§ciphertext: &'a [u8]
§plaintext: &'a mut [u8]
§tag: &'a [u8; 4]

Auto Trait Implementations§

§

impl<'a> !UnwindSafe for AesOperation<'a>

§

impl<'a> Freeze for AesOperation<'a>

§

impl<'a> RefUnwindSafe for AesOperation<'a>

§

impl<'a> Send for AesOperation<'a>

§

impl<'a> Sync for AesOperation<'a>

§

impl<'a> Unpin for AesOperation<'a>

§

impl<'a> UnsafeUnpin for AesOperation<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.