
Message Digest Hardware Accelerator (MDHA)
33-18
Freescale Semiconductor
10. MDHA does the required algorithm’s auto padding of the message.
11. Set the MDCMR[GO] bit.
12. Wait for MDSR[DONE] to be set or done interrupt to be triggered to indicate successful
completion (or failure).
NOTE
You need to provide a time-out feature in the interrupt handler. The MDHA
stalls with no response if it is waiting for message data. This most likely
occurs if the MDDSR write is not received or auto-padding is disabled and
a partial message block is provided.
13. If MDSR[DONE] is set or done interrupt is triggered, then read the message digest from the
message digest registers.
33.4.5
Performing a MAC Operation With the MACFULL Bit
The HMAC/EHMAC is done in one step with the MACFULL bit.
1. Reset the MDHA using the MDCMR[SWR] bit.
2. MDCR register write. Enable the interrupts. (optional)
3. MDMR register write. Select algorithm, data padding, HMAC or EHMAC, and MACFULL bits.
4. Direct context load of key into MD
x
1 registers.
5. MDMDS register write. Load this register with the length of the key.
6. Fill data FIFO with message to be hashed.
7. MDDSR register write. Load this register with the length of the message data (without padding) in
bytes.
8. MDHA does the required algorithm’s auto padding of the message.
9. Set the MDCMR[GO] bit.
10. Wait for MDSR[INT] to be set or done interrupt to be triggered to indicate successful completion
(or failure).
NOTE
You need to provide a time-out feature in the interrupt handler. The MDHA
stalls with no response if it is waiting for message data. This most likely
occurs if the MDDSR write is not received or auto-padding is disabled and
a partial message block is provided.
11. If MDSR[DONE] is set or done interrupt is triggered, then read the message digest from the
message digest registers.
33.4.6
Performing an NMAC
An NMAC consists of one Hash operation.
1. Reset the MDHA using the MDCMR[SWR] bit.
2. MDCR register write. Enable the interrupts. (optional)
MCF5329 Reference Manual, Rev 3
Summary of Contents for MCF5329
Page 106: ...ColdFire Core 3 32 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 148: ...Cache 5 22 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 154: ...Static RAM SRAM 6 6 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 184: ...Power Management 8 18 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 204: ...Reset Controller Module 10 8 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 220: ...System Control Module SCM 11 16 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 228: ...Crossbar Switch XBS 12 8 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 268: ...General Purpose I O Module 13 40 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 392: ...SDRAM Controller SDRAMC 18 30 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 436: ...Fast Ethernet Controller FEC 19 44 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 594: ...FlexCAN 23 30 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 678: ...Pulse Width Modulation PWM Module 26 22 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 684: ...Watchdog Timer Module 27 6 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 704: ...DMA Timers DTIM0 DTIM3 29 12 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 754: ...UART Modules 31 34 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 770: ...I2 C Interface 32 16 Freescale Semiconductor MCF5329 Reference Manual Rev 3...
Page 866: ...Debug Module 36 50 Freescale Semiconductor MCF5329 Reference Manual Rev 3...