Cryptographic Acceleration Unit (CAU)
MCF52235 ColdFire® Integrated Microcontroller Reference Manual, Rev. 6
5-10
Freescale Semiconductor
5.3.3.21
Message Digest Shift (
MDS
)
cp0ld.l #MDS
The
MDS
command does a set of parallel register-to-register move operations for implementing MD5. The
following source and destination assignments are made: CAA=CA3, CA1=CAA, CA2=CA1, CA3=CA2.
5.3.3.22
Illegal Command (
ILL
)
cp0ld.l #ILL
The
ILL
command is a specific illegal command that sets CASR[IC]. All other illegal commands are
reserved for use in future implementations.
5.4
Application/Initialization Information
5.4.1
Code Example
A code fragment is shown below as an example of how the CAU is used. This example shows the round
function of the AES algorithm. Core register A0 is pointing to the key schedule.
cp0ld.l #AESS+CA0 ; sub bytes w0
cp0ld.l #AESS+CA1 ; sub bytes w1
cp0ld.l #AESS+CA2 ; sub bytes w2
cp0ld.l #AESS+CA3 ; sub bytes w3
cp0ld.l #AESR ; shift rows
cp0ld.l (%a0)+,#AESC+CA0 ; mix col, add key w0
cp0ld.l (%a0)+,#AESC+CA1 ; mix col, add key w1
cp0ld.l (%a0)+,#AESC+CA2 ; mix col, add key w2
cp0ld.l (%a0)+,#AESC+CA3 ; mix col, add key w3
5.4.2
Assembler Equate Values
The following equates ease programming of the CAU.
; CAU Registers (CAx)
.set
CASR,0x0
.set
CAA,0x1
.set
CA0,0x2
.set
CA1,0x3
.set
CA2,0x4
.set
CA3,0x5
.set
CA4,0x6
.set
CA5,0x7
; CAU Commands
.set
CNOP,0x000
.set
LDR,0x010
.set
STR,0x020
.set
ADR,0x030
.set
RADR,0x040
.set
ADRA,0x050
.set
XOR,0x060
.set
ROTL,0x070
.set
MVRA,0x080
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