Type Alias AESCCMCLIENT

Source
type AESCCMCLIENT = VirtualAES128CCM<'static, Aes<'static>>;

Aliased Type§

struct AESCCMCLIENT { /* private fields */ }

Implementations

Source§

impl<'a, A> VirtualAES128CCM<'a, A>
where A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB,

Source

pub fn new( mux: &'a MuxAES128CCM<'a, A>, crypt_buf: &'static mut [u8], ) -> VirtualAES128CCM<'a, A>

Source

pub fn setup(&'a self)

bind itself to self.mux, should be called after static_init!

Trait Implementations

Source§

impl<'a, A> AES128<'a> for VirtualAES128CCM<'a, A>
where A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB,

Source§

fn enable(&self)

Enable the AES hardware. Must be called before any other methods
Source§

fn disable(&self)

Disable the AES hardware
Source§

fn set_client(&'a self, client: &'a dyn Client<'a>)

Set the client instance which will receive crypt_done() callbacks
Source§

fn set_key(&self, key: &[u8]) -> Result<(), ErrorCode>

Set the encryption key. Returns INVAL if length is not AES128_KEY_SIZE
Source§

fn set_iv(&self, iv: &[u8]) -> Result<(), ErrorCode>

Set the IV (or initial counter). Returns INVAL if length is not AES128_BLOCK_SIZE
Source§

fn start_message(&self)

Begin a new message (with the configured IV) when crypt() is next called. Multiple calls to crypt() may be made between calls to start_message(), allowing the encryption context to extend over non-contiguous extents of data. Read more
Source§

fn crypt( &self, source: Option<&'static mut [u8]>, dest: &'static mut [u8], start_index: usize, stop_index: usize, ) -> Option<(Result<(), ErrorCode>, Option<&'static mut [u8]>, &'static mut [u8])>

Request an encryption/decryption Read more
Source§

impl<'a, A> AES128CBC for VirtualAES128CCM<'a, A>
where A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB,

Source§

fn set_mode_aes128cbc(&self, encrypting: bool) -> Result<(), ErrorCode>

Call before AES128::crypt() to perform AES128CBC
Source§

impl<'a, A> AES128CCM<'a> for VirtualAES128CCM<'a, A>
where A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB,

Source§

fn crypt( &self, buf: &'static mut [u8], a_off: usize, m_off: usize, m_len: usize, mic_len: usize, confidential: bool, encrypting: bool, ) -> Result<(), (ErrorCode, &'static mut [u8])>

Try to begin the encryption/decryption process

Source§

fn set_client(&self, client: &'a dyn CCMClient)

Set the client instance which will receive crypt_done() callbacks
Source§

fn set_key(&self, key: &[u8]) -> Result<(), ErrorCode>

Set the key to be used for CCM encryption
Source§

fn set_nonce(&self, nonce: &[u8]) -> Result<(), ErrorCode>

Set the nonce (length NONCE_LENGTH) to be used for CCM encryption
Source§

impl<'a, A> AES128Ctr for VirtualAES128CCM<'a, A>
where A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB,

Source§

fn set_mode_aes128ctr(&self, encrypting: bool) -> Result<(), ErrorCode>

Call before AES128::crypt() to perform AES128Ctr
Source§

impl<'a, A> AES128ECB for VirtualAES128CCM<'a, A>
where A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB,

Source§

fn set_mode_aes128ecb(&self, encrypting: bool) -> Result<(), ErrorCode>

Call before AES128::crypt() to perform AES128ECB
Source§

impl<'a, A> Client<'a> for VirtualAES128CCM<'a, A>
where A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB,

Source§

fn crypt_done(&self, _: Option<&'static mut [u8]>, crypt_buf: &'static mut [u8])

Source§

impl<'a, A> ListNode<'a, VirtualAES128CCM<'a, A>> for VirtualAES128CCM<'a, A>
where A: AES128<'a> + AES128Ctr + AES128CBC + AES128ECB,

Source§

fn next(&'a self) -> &'a ListLink<'a, VirtualAES128CCM<'a, A>>