Application/Initialization Information - Freescale Semiconductor MCF54455 Reference Manual

Table of Contents

Advertisement

Cryptographic Acceleration Unit (CAU)
24.3.3.21 Message Digest Shift (
cp0ld.l
#MDS
The
command does a set of parallel register-to-register move operations for implementing MD5. The
MDS
following source and destination assignments are made: CAA=CA3, CA1=CAA, CA2=CA1, CA3=CA2.
24.3.3.22 Illegal Command (
cp0ld.l
#ILL
The
command is a specific illegal command that sets CASR[IC]. All other illegal commands are
ILL
reserved for use in future implementations.
24.4

Application/Initialization Information

24.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
cp0ld.l
#AESS+CA1
cp0ld.l
#AESS+CA2
cp0ld.l
#AESS+CA3
cp0ld.l
#AESR
cp0ld.l
(%a0)+,#AESC+CA0
cp0ld.l
(%a0)+,#AESC+CA1
cp0ld.l
(%a0)+,#AESC+CA2
cp0ld.l
(%a0)+,#AESC+CA3
24.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
24-11
)
MDS
)
ILL
; sub bytes w0
; sub bytes w1
; sub bytes w2
; sub bytes w3
; shift rows
; mix col, add key w0
; mix col, add key w1
; mix col, add key w2
; mix col, add key w3
Freescale Semiconductor

Advertisement

Table of Contents
loading

Table of Contents