ALGO=B_0x0, LKEY=B_0x0, MDMAT=B_0x0, DATATYPE=B_0x0, MODE=B_0x0, DMAE=B_0x0
HASH control register
INIT | Initialize message digest calculation |
DMAE | DMA enable 0 (B_0x0): DMA transfers disabled 1 (B_0x1): DMA transfers enabled. A DMA request is sent as soon as the hash core is ready to receive data. |
DATATYPE | Data type selection 0 (B_0x0): 32-bit data. The data written into HASH_DIN are directly used by the HASH processing, without reordering. 1 (B_0x1): 16-bit data or half-word. The data written into HASH_DIN are considered as two half-words, and are swapped before being used by the HASH processing. 2 (B_0x2): 8-bit data or bytes. The data written into HASH_DIN are considered as four bytes, and are swapped before being used by the HASH processing. 3 (B_0x3): bit data or bit string. The data written into HASH_DIN are considered as 32 bits (1st bit of the string at position 0), and are swapped before being used by the HASH processing (1st bit of the string at position 31). |
MODE | Mode selection 0 (B_0x0): Hash mode selected 1 (B_0x1): HMAC mode selected. LKEY bit must be set if the key being used is longer than the algorithm block size. |
NBW | Number of words already pushed |
DINNE | DIN not empty |
MDMAT | Multiple DMA transfers 0 (B_0x0): DCAL is automatically set at the end of a DMA transfer. 1 (B_0x1): DCAL is not automatically set at the end of a DMA transfer. |
LKEY | Long key selection 0 (B_0x0): HMAC key is shorter or equal to the block size (short key). The actual key value written in HASH_DIN is used during the HMAC computation. 1 (B_0x1): HMAC key is longer than the block size (long key). The hash of the key is used instead of the real key during the HMAC computation. |
ALGO | Algorithm selection 0 (B_0x0): SHA-1 2 (B_0x2): SHA2-224 3 (B_0x3): SHA2-256 12 (B_0xC): SHA2-384 13 (B_0xD): SHA2-512/224 14 (B_0xE): SHA2-512/256 15 (B_0xF): SHA2-512 |