Struct capsules::aes_ccm::AES128CCM [] [src]

pub struct AES128CCM<'a, A: AES128<'a> + AES128Ctr + AES128CBC + 'a> {
    aes: &'a A,
    crypt_buf: TakeCell<'a, [u8]>,
    crypt_auth_len: Cell<usize>,
    crypt_enc_len: Cell<usize>,
    crypt_client: Cell<Option<&'a CCMClient>>,
    state: Cell<CCMState>,
    confidential: Cell<bool>,
    encrypting: Cell<bool>,
    buf: TakeCell<'static, [u8]>,
    pos: Cell<(usize, usize, usize, usize)>,
    key: Cell<[u8; 16]>,
    nonce: Cell<[u8; 13]>,
    saved_tag: Cell<[u8; 16]>,
}

Fields

Methods

impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + 'a> AES128CCM<'a, A>
[src]

[src]

[src]

Prepares crypt_buf with the input for the CCM* authentication and encryption/decryption transformations. Returns ENOMEM if crypt_buf is not present or if it is not long enough.

[src]

This function encudes AuthData (a_data) and PData/CData (m_data) into a buffer, along with the prerequisite metadata/padding bytes. On success, auth_len (the length of the AuthData field) and enc_len (the combined length of AuthData and PData/CData) are returned. auth_len is guaranteed to be >= AES128_BLOCK_SIZE

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Trait Implementations

impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC + 'a> AES128CCM<'a> for AES128CCM<'a, A>
[src]

[src]

Set the client instance which will receive crypt_done() callbacks

[src]

Set the key to be used for CCM encryption

[src]

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

[src]

Try to begin the encryption/decryption process

impl<'a, A: AES128<'a> + AES128Ctr + AES128CBC> Client<'a> for AES128CCM<'a, A>
[src]

[src]