Struct lpc55_hal::drivers::aes::Aes[][src]

pub struct Aes<'a, Size: KeySize> { /* fields omitted */ }

Implementations

impl<'a, Size: KeySize> Aes<'a, Size>[src]

pub fn new(
    hashcrypt: &'a mut Hashcrypt<Enabled>,
    key: Key<Size>,
    mode: Mode
) -> Self
[src]

New AES struct implementing block-cipher.

pub fn new_decrypt(
    hashcrypt: &'a mut Hashcrypt<Enabled>,
    key: Key<Size>
) -> Self
[src]

New AES starting in decryption mode

pub fn new_encrypt(
    hashcrypt: &'a mut Hashcrypt<Enabled>,
    key: Key<Size>
) -> Self
[src]

New AES starting in encryption mode

pub fn prime_for_decryption(&self)[src]

Optionally, configure peripheral for decryption ahead of time.

pub fn prime_for_encryption(&self)[src]

Optionally, configure peripheral for encryption ahead of time.

Methods from Deref<Target = Hashcrypt<Enabled>>

pub fn sha1<'a>(&'a mut self) -> Sha1<'a>[src]

SHA-1, as in RustCrypto digest trait

pub fn sha256<'a>(&'a mut self) -> Sha256<'a>[src]

SHA-256, as in RustCrypto digest trait

pub fn aes128<'a>(&'a mut self, key: &[u8; 16]) -> Aes128<'a>[src]

AES-128 “ECB”, as in RustCrypto block-cipher trait

pub fn aes192<'a>(&'a mut self, key: &[u8; 24]) -> Aes192<'a>[src]

AES-192 “ECB”, as in RustCrypto block-cipher trait

pub fn aes256<'a>(&'a mut self, key: &[u8; 32]) -> Aes256<'a>[src]

AES-256 “ECB”, as in RustCrypto block-cipher trait

pub fn puf_aes<'a>(&'a mut self) -> Aes256<'a>[src]

AES “ECB” with PUF key, for use as in RustCrypto block-cipher trait

DOES NOT PROPERLY CHECK IF PUF AES KEY IS SETUP YET! TODO: have user pass in some token signaling PUF AES key is setup

Trait Implementations

impl<'a, Size: KeySize> BlockCipher for Aes<'a, Size>[src]

type BlockSize = U16

Size of the block in bytes

type ParBlocks = U1

Number of blocks which can be processed in parallel by cipher implementation Read more

impl<'a, Size: KeySize> BlockDecrypt for Aes<'a, Size>[src]

impl<'a, Size: KeySize> BlockEncrypt for Aes<'a, Size>[src]

impl<Size: KeySize> Deref for Aes<'_, Size>[src]

type Target = Hashcrypt<Enabled>

The resulting type after dereferencing.

impl<Size: KeySize> DerefMut for Aes<'_, Size>[src]

Auto Trait Implementations

impl<'a, Size> Send for Aes<'a, Size>

impl<'a, Size> !Sync for Aes<'a, Size>

impl<'a, Size> Unpin for Aes<'a, Size> where
    <Size as ArrayLength<u8>>::ArrayType: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Alg> BlockDecryptMut for Alg where
    Alg: BlockDecrypt
[src]

impl<Alg> BlockEncryptMut for Alg where
    Alg: BlockEncrypt
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.