#[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_SEL0x10 - Encryption or decryption select
mode_ctl: MODE_CTL0x14 - AES mode register
iv: [IV; 4]0x18 - Initialisation Vector (96 bit for GCM, 128 bit for CBC)
endian: ENDIAN0x28 - Endian control
finish: FINISH0x2c - Finished status
dma_sel: DMA_SEL0x30 - DMA select
aad_num: AAD_NUM0x34 - GCM additional authenticated data count in bytes, minus one
pc_num: PC_NUM0x3c - Plaintext/ciphertext input data count in bytes, minus one
text_data: TEXT_DATA0x40 - Plaintext/ciphertext input data
aad_data: AAD_DATA0x44 - Additional authenticated data
tag_chk: TAG_CHK0x48 - Tag check status
data_in_flag: DATA_IN_FLAG0x4c - Data can input flag
gcm_in_tag: [GCM_IN_TAG; 4]0x50 - GCM input tag for comparison with the calculated tag
out_data: OUT_DATA0x60 - Plaintext/ciphertext output data
en: EN0x64 - AES module enable
data_out_flag: DATA_OUT_FLAG0x68 - Data can output flag
tag_in_flag: TAG_IN_FLAG0x6c - Can input tag (when using GCM)
tag_clear: TAG_CLEAR0x70 - 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