[][src]Type Definition lpc55s6x_pac::hashcrypt::cryptcfg::W

type W = W<u32, CRYPTCFG>;

Writer for register CRYPTCFG

Methods

impl W[src]

pub fn msw1st_out(&mut self) -> MSW1ST_OUT_W[src]

Bit 0 - 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.

pub fn swapkey(&mut self) -> SWAPKEY_W[src]

Bit 1 - If 1, will Swap the key input (bytes in each word).

pub fn swapdat(&mut self) -> SWAPDAT_W[src]

Bit 2 - If 1, will SWAP the data and IV inputs (bytes in each word).

pub fn msw1st(&mut self) -> MSW1ST_W[src]

Bit 3 - 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.

pub fn aesmode(&mut self) -> AESMODE_W[src]

Bits 4:5 - AES Cipher mode to use if plain AES

pub fn aesdecrypt(&mut self) -> AESDECRYPT_W[src]

Bit 6 - AES ECB direction. Only encryption used if CTR mode or manual modes such as CFB

pub fn aessecret(&mut self) -> AESSECRET_W[src]

Bit 7 - Selects the Hidden Secret key vs. User key, if provided. If security levels are used, only the highest level is permitted to select this.

pub fn aeskeysz(&mut self) -> AESKEYSZ_W[src]

Bits 8:9 - Sets the AES key size

pub fn aesctrpos(&mut self) -> AESCTRPOS_W[src]

Bits 10:12 - 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.

pub fn streamlast(&mut self) -> STREAMLAST_W[src]

Bit 16 - Is 1 if last stream block. If not 1, then the engine will compute the next "hash".

pub fn icbsz(&mut self) -> ICBSZ_W[src]

Bits 20:21 - 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.

pub fn icbstrm(&mut self) -> ICBSTRM_W[src]

Bits 22:23 - 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.