# RegisterBlock in k210_pac::aes - Rust
Register block
Keywords: rust, rustlang, rust-lang, RegisterBlock

# Struct k210_pac::aes::RegisterBlock

source · [−]

    #[repr(C)]pub struct RegisterBlock {Show 21 fields
        pub key: [KEY; 4],
        pub encrypt_sel: ENCRYPT_SEL,
        pub mode_ctl: MODE_CTL,
        pub iv: [IV; 4],
        pub endian: ENDIAN,
        pub finish: FINISH,
        pub dma_sel: DMA_SEL,
        pub aad_num: AAD_NUM,
        pub pc_num: PC_NUM,
        pub text_data: TEXT_DATA,
        pub aad_data: AAD_DATA,
        pub tag_chk: TAG_CHK,
        pub data_in_flag: DATA_IN_FLAG,
        pub gcm_in_tag: [GCM_IN_TAG; 4],
        pub out_data: OUT_DATA,
        pub en: EN,
        pub data_out_flag: DATA_OUT_FLAG,
        pub tag_in_flag: TAG_IN_FLAG,
        pub tag_clear: TAG_CLEAR,
        pub gcm_out_tag: [GCM_OUT_TAG; 4],
        pub key_ext: [KEY_EXT; 4],
        /* private fields */
    }

Expand description

Register block

## Fields

`key: [KEY; 4]`

0x00 - 1st-4th word of key

`encrypt_sel: ENCRYPT_SEL`

0x10 - Encryption or decryption select

`mode_ctl: MODE_CTL`

0x14 - AES mode register

`iv: [IV; 4]`

0x18 - Initialisation Vector (96 bit for GCM, 128 bit for CBC)

`endian: ENDIAN`

0x28 - Endian control

`finish: FINISH`

0x2c - Finished status

`dma_sel: DMA_SEL`

0x30 - DMA select

`aad_num: AAD_NUM`

0x34 - GCM additional authenticated data count in bytes, minus one

`pc_num: PC_NUM`

0x3c - Plaintext/ciphertext input data count in bytes, minus one

`text_data: TEXT_DATA`

0x40 - Plaintext/ciphertext input data

`aad_data: AAD_DATA`

0x44 - Additional authenticated data

`tag_chk: TAG_CHK`

0x48 - Tag check status

`data_in_flag: DATA_IN_FLAG`

0x4c - Data can input flag

`gcm_in_tag: [GCM_IN_TAG; 4]`

0x50 - GCM input tag for comparison with the calculated tag

`out_data: OUT_DATA`

0x60 - Plaintext/ciphertext output data

`en: EN`

0x64 - AES module enable

`data_out_flag: DATA_OUT_FLAG`

0x68 - Data can output flag

`tag_in_flag: TAG_IN_FLAG`

0x6c - Can input tag (when using GCM)

`tag_clear: TAG_CLEAR`

0x70 - Tag clear (a write to this register clears the tag_chk status)

`gcm_out_tag: [GCM_OUT_TAG; 4]`

0x74 - Computed GCM output tag

`key_ext: [KEY_EXT; 4]`

0x84 - 5th-8th word of key

## Auto Trait Implementations

### impl !RefUnwindSafe for RegisterBlock

### impl Send for RegisterBlock

### impl !Sync for RegisterBlock

### impl Unpin for RegisterBlock

### impl UnwindSafe for RegisterBlock

## Blanket Implementations

source

### impl<T> Any for T where
T: 'static + ?Sized,

source

#### fn type_id(&self) -> TypeId

Gets the `TypeId` of `self`. Read more

source

### impl<T> Borrow<T> for T where
T: ?Sized,

const: unstable · source

#### fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more

source

### impl<T> BorrowMut<T> for T where
T: ?Sized,

const: unstable · source

#### fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more

source

### impl<T> From<T> for T

const: unstable · source

#### fn from(t: T) -> T

Returns the argument unchanged.

source

### impl<T, U> Into<U> for T where
U: From<T>,

const: unstable · source

#### fn into(self) -> U

Calls `U::from(self)`.

That is, this conversion is whatever the implementation of `From<T> for U` chooses to do.

source

### impl<T, U> TryFrom<U> for T where
U: Into<T>,

#### type Error = Infallible

The type returned in the event of a conversion error.

const: unstable · source

#### fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.

source

### impl<T, U> TryInto<U> for T where
U: TryFrom<T>,

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

The type returned in the event of a conversion error.

const: unstable · source

#### fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.