Регистры Allwinner H616

Сокращения  |  Дерево шин  |  Карта памяти


T_D_Q_SYMM_CTRL
10.1.4. Task Descriptor Queue Symmetric Control

Криптосистема : список регистров



31 ||||||||||||||||| 16
15 ||||||||||||||||| 00

  Unused

Bits 31 : 27

  NO_MODK

Bit 26
R/W
0x0

0: have module key derivation function
1: no module key derivation function


  Unused

Bits 25 : 24

  KEY_SELECT

Bits 23 : 20
R/W
0x0

key select for AES
0000: Select input CE_KEYx (Normal Mode)
0001: Select {SSK}
0010: Select {HUK}
0011: Select {RSSK}, used for decrypt HDCP key, EK, BSSK
0100-0111: Reserved
1000-1111: Select internal Key n (n from 0 to 7)


  CFB_WIDTH

Bits 19 : 18
R/W
0x0

For AES-CFB width
00: CFB1
01: CFB8
10: CFB64
11: CFB128


  PRNG_LD

Bit 17
R/W
0x0

Load new 15bits key into lfsr for PRNG


  AES_CTS_LAST_PACKAGE_FLAG

Bit 16
R/W
0x0

When setting to 1, it means this is the last package for AES-CTS mode (the size of the last package >128bit).


  Unused

Bits 15 : 14

  XTS_LAST

Bit 13
R/W
0x0

0: not last block for XTS
1: last block for XTS


  XTS_FIRST

Bit 12
R/W
0x0

0: not first block for XTS
1: first block for XTS


  OPERATION_MODE_FOR_SYMMETRIC

Bits 11 : 8
R/W
0x0

AES/DES/3DES/RAES Modes
DES/3DES only supports ECB/CBC/CTR. RAES only supports ECB/CBC/XTS.
0000: Electronic Code Book (ECB) mode
0001: Cipher Block Chaining (CBC) mode
0010: Counter (CTR) mode
0011: CipherText Stealing (CTS) mode
0100: Output feedback (OFB)mode
0101: Cipher feedback (CFB)mode
0110: CBC-MAC mode
1001: XTS mode
Other: Reserved


  Unused

Bits 7 : 4

  CTR_WIDTH

Bits 3 : 2
R/W
0x0

Counter width for CTR mode
00: 16-bit Counter
01: 32-bit Counter
10: 64-bit Counter
11: 128-bit Counter


  AES_KEY_SIZE

Bits 1 : 0
R/W
0x0

00: 128-bit
01: 192-bit
10: 256-bit
11: Reserved



Команда U-Boot для чтения регистра

md 1904000 1
md 1904800 1



Bit fields structure

typedef union  t_d_q_symm_ctrl
{
  struct
  {
   unsigned aes_key_size : 2;
   unsigned ctr_width : 2;
   unsigned unused0 : 4;
   unsigned operation_mode_for_symmetric : 4;
   unsigned xts_first : 1;
   unsigned xts_last : 1;
   unsigned unused1 : 2;
   unsigned aes_cts_last_package_flag : 1;
   unsigned prng_ld : 1;
   unsigned cfb_width : 2;
   unsigned key_select : 4;
   unsigned unused2 : 2;
   unsigned no_modk : 1;
   unsigned unused3 : 5;
  } b;
   unsigned long w;
} T_D_Q_SYMM_CTRL
   

Allwinner H616 Manual