![Geehy SEMICONDUCTOR APM32F405 Series User Manual Download Page 298](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630298.webp)
www.geehy.com Page 297
efficiency of the process. The generating program and verification program of
digital signature need to use the same hash algorithm.
SHA-1 and MD5 are secure because of failing to find the corresponding
message of a certain specified message digest or two different messages that
generate the same message digest. Modifying a message being transmitted
may result in a different message digest so that the signature cannot be verified.
The message or data file processed by the hash processor is called bit string.
The length of a message is the number of its bit. 32 bits of this bit string can be
regarded as one word. An important point for stuffing is that the bit string grows
from left to right, and the bits can be divided into bytes or words.
Register address mapping
Table 81 HASH Register Address Mapping
Register name
Description
Offset address
HASH_CTRL
HASH control register
0x00
HASH_INDATA
HASH input data register
0x04
HASH_START
HASH start register
0x08
HASH_DIGx
HASH digest register x
0x0C+
(
x*0x04
)
,
x=0…4
HASH_INT
HASH interrupt register
0x20
HASH_STS
HASH state register
0x24
HASH_CTSWAPx
HASH exchange context register x
0xF8+
(
x*0x04
)
,
x=0…50
Register functional description
HASH control register (HASH_CTRL)
Offset address: 0x00
Reset value: 0x0000 0000
Field
Name
R/W
Description
1:0
Reserved
2
INITCAL
R/W
Initialize Message Digest Calculation
Writing 1 to this bit will reset the hash processor core so that the
hash can calculate a new message digest.
Writing 0 to this bit has no effect. Reading this bit will always return
0.
3
DMAEN
R/W
DMA Enable
0: Disable
1: Enable. When the hash core can receive data, a DMA request
will be sent.
Note: