Cryptographic Acceleration Unit (CAU)
MCF52235 ColdFire® Integrated Microcontroller Reference Manual, Rev. 6
Freescale Semiconductor
5-9
5.3.3.18
DES Key Setup (
DESK
)
cp0ld.l #DESK+{CP}+{DC}
The
DESK
command performs the initial key transformation (permuted choice 1) defined by the DES
algorithm on CA0 and CA1 with CA0 containing bits 1–32 of the key and CA1 containing bits 33–64 of
the key
1
. If the DC bit is set, no shift operation performs and the values C
0
and D
0
store back to CA0 and
CA1 respectively. The DC bit should be set for decrypt operations. If the DC bit is not set, a left shift by
one also occurs and the values C
1
and D
1
store back to CA0 and CA1 respectively. The DC bit should be
cleared for encrypt operations. If the CP bit is set and a key parity error is detected, CASR[DPE] bit is set;
otherwise, it is cleared.
5.3.3.19
Hash Function (
HASH
)
cp0ld.l #HASH+HFx
The
HASH
command performs a hashing operation on a set of registers and adds that result to the value in
CAA and stores the result in CAA. The specific hash function performed is based on the HFx field as
defined in
.
5.3.3.20
Secure Hash Shift (
SHS
)
cp0ld.l #SHS
The
SHS
command does a set of parallel register-to-register move and shift operations for implementing
SHA-1. The following source and destination assignments are made: CAA=CAA<<<5, CA0=CAA,
CA1=CA0, CA2=CA1<<<30, CA3=CA2, CA4=CA3.
2
KSR1
Right 1
3
KSR2
Right 2
1.The DES algorithm numbers the most significant bit of a block as bit 1 and the least significant as bit 64.
Table 5-10. Hash Function Codes
HFx
Code
HFx
Define
Hash Function
Hash Logic
0
HFF
MD5 F()
(CA1 & CA2) | (CA1 & CA3)
1
HFG
MD5 G()
(CA1 & CA3) | (CA2 & CA3)
2
HFH
MD5 H(), SHA Parity()
CA1 ^ CA2 ^ CA3
3
HFI
MD5 I()
CA2 ^ (CA1 | CA3)
4
HFC
SHA Ch()
(CA1 & CA2) ^ (CA1 & CA3)
5
HFM
SHA Maj()
(CA1 & CA2) ^ (CA1 & CA3) ^ (CA2 & CA3)
Table 5-9. Key Shift Function Codes (continued)
KSx
Code
KSx
Define
Shift Function
Because
of
an
order
from
the
United
States
International
Trade
Commission,
BGA-packaged
product
lines
and
part
numbers
indicated
here
currently
are
not
available
from
Freescale
for
import
or
sale
in
the
United
States
prior
to
September
2010:MCF52234CVM60,
MCF52235CVM60