English
Language : 

TM4C129XNCZAD Datasheet, PDF (1082/2191 Pages) Texas Instruments – Tiva Microcontroller
SHA/MD5 Accelerator
Table 15-7. SHA/MD5 Performance (continued)
Operation
Algorithm
MD5
SHA-1
HMAC from Key SHA-224
SHA-256
MD5
HMAC from
precomputes
SHA-1
SHA-224
SHA-256
Cycles per operation
196 / 261
244 / 325
196 / 261
196 / 261
66 / 131
82 / 163
66 / 131
66 / 131
Cycles per block
65
81
65
65
65
81
65
65
Note: An extra block needs to be processed if the length of the data block to be hashed module
64 is 0 or equal to 56.
15.1.7
SHA/MD5 Programming Guide
This section covers the hardware programming sequences for configuration and use of the SHA/MD5
Module.
15.1.7.1 Global Initialization
Surrounding Modules Global Initialization
This section identifies the requirements for initializing the surrounding modules when the SHAM is
used for the first time after a device reset.
1. When reset has completed, enable the SHA/MD5 Module by setting the R0 bit in the CRC And
Cryptographic Modules Run Mode Clock Gating Control (RCGCCCM) register, System
Control offset 0x674. When the R0 bit is set in the CRC and Cryptographic Modules (PRCCM)
register, System Control offset 0xA74 register, the SHA/MD5 Module is powered and ready to
be configured.
2. Configure the SHA µDMA channels for Context In, Context Out, Data In, and/or Data Out by
programming the appropriate encoding value in the DMA Channel Map Select n (DMACHMAPn)
register in the µDMA module, offset 0x510. For more information on how to program channel
assignments as well as enabling burst and the configured channels, refer to “Micro Direct
Memory Access (μDMA)” on page 711.
3. Execute a software reset by setting the SOFTRESET bit in the SHA_SYSCONFIG register. When
reset is complete, the RESETDONE bit reads as 1 in the SHA_SYSSTATUS register.
4. If the SHA channels are configured in the µDMA, enable the required SHA DMA requests by
programming bits [9:5] of the SHA_SYSCONFIG register, in addition to the completion interrupts
in the SHA DMA Interrupt Mask (SHA_DMAIM) register, CRC and Cryptographic Modules
offset 0x020.
Starting a New HMAC using the SHA-1 Hash Function and HMAC Key Processing
The following procedure is used to begin a new HMAC operation, starting from initial digest values.
1. Load the key value in the SHA_ODIGEST_A/SHA_IDIGEST_A to
SHA_ODIGEST_H/SHA_IDIGEST_H registers.
1082
Texas Instruments-Production Data
June 18, 2014