3.1.3
Command Structure Conventions
This section designates some command structure conventions, clarifies some confusing
topics, and provides a better understanding of how a command structure is built.
All data streams described in this section are assumed to have the basic format shown
below:
Figure 3-7. Basic Data Sequence
3.1.3.1
Initial Hash engine Value (IHV)
For a hash related operations, the host software must write the Initial Hash Value (IHV) for
the hash engine in the proper place in the source buffer. IHV stands for not only the initial
hash operation value, but also the partial MAC operation value in stateful MAC operation.
Because a slice hash operation always uses the same default value, the host software need
not write the IHV for slice hash operations. The descriptions below apply for file hash and
all types of hash/MAC operations.
For a stateless hash operation or the first block of a stateful hash operation, the IHV is the
default value defined by the hash algorithm. For a stateful hash/MAC operation after the
first block, the host software should read the IHV (Partial hash/MAC result) from the hash
buffer (the first destination buffer is used as a hash buffer in a hash related command).
Default Initial Hash Vector for Hash Operations
The default value and size of the IHV depend on the hash algorithm. In the 820x, the host
software must pad the IHV to 256 bits for all algorithms before writing the IHV to the first
source buffer.
The examples below illustrate the default IHV after padding for three common hash
algorithms.
SHA1: IHV[0:255] ={ 67452301
efcdab89
98badcfe
h10325476
c3d2e1f0
96'd0};
SHA256: IHV[0:255] = { 6a09e667
bb67ae85
3c6ef372
a54ff53a
510e527f
9b05688c
820x – Data Sheet, DS-0157-D
Page67
Hifn Confidential