AS_Cryptographic co-processor (C3)
RM0082
396/844
Doc ID 018672 Rev 1
21.11.5 INIT
The HASH [MD5/SHA1/SHA2] INIT instruction is 1 word long. This instruction is used to set
the Function.
Bits ‘aa’ in the above table are used to set the algorithm to use:
Table 333.
HASH INIT Bit ‘aa’ encoding
21.11.6 APPEND
The HASH [MD5/SHA1] APPEND instruction is 2 words long. This instruction is used to set
the Source Address Register for the message and to start the computation of the digest.
The length of the message is encoded in the first instruction word, while the second word
represents the Source Address for the message.
Bits aa in the above table are used to set the algorithm to use and have the same encoding
as in the INIT instruction (
). Bits 15 to 0 in the first instruction word (cccc in
) represent the Count in Bytes of the input message.
21.11.7 END
The HASH [MD5/SHA1] END instruction is 2 words long. This instruction is used to set the
Destination Address Register for the message and to end the computation of the digest.
The second word represents the Destination Address for the digest.
Table 332.
HASH INIT Instruction bit encoding
W#
Bit Encoding
1
xxxx 000a a00x xxxx cccc cccc cccc cccc
Bit 24 to 23
aa
Algorithm
2’b00
MD5
2’b01
SHA-1
2’b10
Not Used
2’b11
Context (See CONTEXT instruction)
Table 334.
HASH APPEND Instruction bit encoding
W#
Bit Encoding
1
xxxx 010a a01x xxxx cccc cccc cccc cccc
2
32 bit Source Address for the message