1111
6437E–ATARM–23-Apr-13
SAM9M11
46. Secure Hash Algorithm (SHA)
46.1
Description
The Secure Hash Algorithm (SHA) is compliant with the American FIPS (Federal Information
Processing Standard) Publication 180-2 specification.
The 512-bit block of message is stored in 16 x 32-bit registers (SHA_IDATAxR) which are all
write-only, by software or through PDC channels.
As soon as the input data (512-bit block) is written, the hash processing may be started. The
registers comprising the 512-bit block of a padded message must be entered consecutively.
Then the message digest is ready to be read out on the 5 up to 8 x 32-bit output data registers
(SHA_ODATAxR), by software only.
46.2
Embedded Characteristics
Supports Secure Hash Algorithm (SHA1 and SHA256)
Compliant with FIPS Publication 180-2
Configurable Processing Period:
– 85 Clock Cycles to Maximize the Bandwidth for SHA1 or 386 Clock Cycles or Other
Applications in PDC (Peripheral DMA)
– 72 Clock Cycles to Maximize the Bandwidth for SHA256 or 265 Clock Cycles or
Other Applications in PDC (Peripheral DMA)
Connection to PDC Channel Capabilities Optimizes Data Transfers
– One Channel for the Transmitter
– Next Buffer Support
46.3
Product Dependencies
46.3.1
Power Management
The SHA may be clocked through the Power Management Controller (PMC), so the programmer
must first configure the PMC to enable the SHA clock.
46.3.2
Interrupt
The SHA interface has an interrupt line connected to the Advanced Interrupt Controller (AIC).
Handling the SHA interrupt requires programming the AIC before configuring the SHA.
46.4
Functional Description
The Secure Hash Algorithm (SHA) module requires a padded message according to FIPS180-2
specification. The first block of the message must be indicated to the module. The SHA module
produces a 160-bit message digest each time a block is written in SHA1 mode or a 256-bit mes-
sage digest each time a block is written in SHA256 mode.
46.4.1
SHA Algorithm
The module can process SHA1 or SHA256 by means of a configuration bit.