#[repr(transparent)]pub struct Cryptcfg(pub u32);Expand description
Crypto settings for AES and Salsa and ChaCha
Tuple Fields§
§0: u32Implementations§
Source§impl Cryptcfg
impl Cryptcfg
Sourcepub const fn msw1st_out(&self) -> bool
pub const fn msw1st_out(&self) -> bool
If 1, OUTDATA0 will be read Most significant word 1st for AES. Else it will be read in normal little endian - Least significant word 1st. Note: only if allowed by configuration.
Sourcepub const fn set_msw1st_out(&mut self, val: bool)
pub const fn set_msw1st_out(&mut self, val: bool)
If 1, OUTDATA0 will be read Most significant word 1st for AES. Else it will be read in normal little endian - Least significant word 1st. Note: only if allowed by configuration.
Sourcepub const fn set_swapkey(&mut self, val: bool)
pub const fn set_swapkey(&mut self, val: bool)
If 1, will Swap the key input (bytes in each word).
Sourcepub const fn swapdat(&self) -> bool
pub const fn swapdat(&self) -> bool
If 1, will SWAP the data and IV inputs (bytes in each word).
Sourcepub const fn set_swapdat(&mut self, val: bool)
pub const fn set_swapdat(&mut self, val: bool)
If 1, will SWAP the data and IV inputs (bytes in each word).
Sourcepub const fn msw1st(&self) -> bool
pub const fn msw1st(&self) -> bool
If 1, load of key, IV, and data is MSW 1st for AES. Else, the words are little endian. Note: only if allowed by configuration.
Sourcepub const fn set_msw1st(&mut self, val: bool)
pub const fn set_msw1st(&mut self, val: bool)
If 1, load of key, IV, and data is MSW 1st for AES. Else, the words are little endian. Note: only if allowed by configuration.
Sourcepub const fn set_aesmode(&mut self, val: Aesmode)
pub const fn set_aesmode(&mut self, val: Aesmode)
AES Cipher mode to use if plain AES
Sourcepub const fn aesdecrypt(&self) -> Aesdecrypt
pub const fn aesdecrypt(&self) -> Aesdecrypt
AES ECB direction. Only encryption used if CTR mode or manual modes such as CFB
Sourcepub const fn set_aesdecrypt(&mut self, val: Aesdecrypt)
pub const fn set_aesdecrypt(&mut self, val: Aesdecrypt)
AES ECB direction. Only encryption used if CTR mode or manual modes such as CFB
Sourcepub const fn aessecret(&self) -> Aessecret
pub const fn aessecret(&self) -> Aessecret
Selects the Hidden Secret key vs. User key, if provided. If security levels are used, only the highest level is permitted to select this.
Sourcepub const fn set_aessecret(&mut self, val: Aessecret)
pub const fn set_aessecret(&mut self, val: Aessecret)
Selects the Hidden Secret key vs. User key, if provided. If security levels are used, only the highest level is permitted to select this.
Sourcepub const fn set_aeskeysz(&mut self, val: Aeskeysz)
pub const fn set_aeskeysz(&mut self, val: Aeskeysz)
Sets the AES key size
Sourcepub const fn aesctrpos(&self) -> u8
pub const fn aesctrpos(&self) -> u8
Halfword position of 16b counter in IV if AESMODE is CTR (position is fixed for Salsa and ChaCha). Only supports 16b counter, so application must control any additional bytes if using more. The 16-bit counter is read from the IV and incremented by 1 each time. Any other use CTR should use ECB directly and do its own XOR and so on.
Sourcepub const fn set_aesctrpos(&mut self, val: u8)
pub const fn set_aesctrpos(&mut self, val: u8)
Halfword position of 16b counter in IV if AESMODE is CTR (position is fixed for Salsa and ChaCha). Only supports 16b counter, so application must control any additional bytes if using more. The 16-bit counter is read from the IV and incremented by 1 each time. Any other use CTR should use ECB directly and do its own XOR and so on.
Sourcepub const fn streamlast(&self) -> bool
pub const fn streamlast(&self) -> bool
Is 1 if last stream block. If not 1, then the engine will compute the next “hash”.
Sourcepub const fn set_streamlast(&mut self, val: bool)
pub const fn set_streamlast(&mut self, val: bool)
Is 1 if last stream block. If not 1, then the engine will compute the next “hash”.
Sourcepub const fn icbsz(&self) -> Icbsz
pub const fn icbsz(&self) -> Icbsz
This sets the ICB size between 32 and 128 bits, using the following rules. Note that the counter is assumed to occupy the low order bits of the IV.
Sourcepub const fn set_icbsz(&mut self, val: Icbsz)
pub const fn set_icbsz(&mut self, val: Icbsz)
This sets the ICB size between 32 and 128 bits, using the following rules. Note that the counter is assumed to occupy the low order bits of the IV.
Sourcepub const fn icbstrm(&self) -> Icbstrm
pub const fn icbstrm(&self) -> Icbstrm
The size of the ICB-AES stream that can be pushed before needing to compute a new IV/ctr (counter start). This optimizes the performance of the stream of blocks after the 1st.
Sourcepub const fn set_icbstrm(&mut self, val: Icbstrm)
pub const fn set_icbstrm(&mut self, val: Icbstrm)
The size of the ICB-AES stream that can be pushed before needing to compute a new IV/ctr (counter start). This optimizes the performance of the stream of blocks after the 1st.