DocID018909 Rev 11
731/1731
RM0090
Cryptographic processor (CRYP)
757
The system memory organization is little-endian: whatever the data type (bit, byte, 16-bit
half-word, 32-bit word) used, the least-significant data occupy the lowest address locations.
A bit, byte, or half-word swapping operation (depending on the kind of data to be encrypted)
therefore has to be performed on the data read from the IN FIFO before they enter the
CRYP processor. The same swapping operation should be performed on the CRYP data
before they are written into the OUT FIFO. For example, the operation would be byte
swapping for an ASCII text stream.
The kind of data to be processed is configured with the DATATYPE bitfield in the CRYP
control register (CRYP_CR).
shows how the 64-bit data block M1...64 is constructed from two consecutive 32-
bit words popped off the IN FIFO by the CRYP processor, according to the DATATYPE
value. The same schematic can easily be extended to form the 128-bit block for the AES
Table 112. Data types
DATATYPE in
CRYP_CR
Swapping performed
System memory data
(plaintext or cypher)
00b
No swapping
Example: TDES block value
0x
ABCD7720
6973FE01
is
represented in system memory as:
01b
Half-word (16-bit)
swapping
Example: TDES block value
0x
ABCD
7720
6973
FE01
is
represented in system memory as:
10b
Byte (8-bit) swapping
Example: TDES block value
0x
ABCD
7720
6973
FE01
is
represented in system memory as:
11b
Bit swapping
TDES block value
0x
4E6F772069732074
is represented in system
memory as:
[
$%&'
)(
7'(6EORFNVL]H ELW [ELW
[
$%&'
[
)(
#
#
V\VWHPPHPRU\
[
$%&'
)(
7'(6EORFNVL]H ELW [ELW
[
$%&'
[)(
#
#
V\VWHPPHPRU\
[
$%&'
)(
7'(6EORFNVL]H ELW [ELW
[
&'$%
[)(
#
#
V\VWHPPHPRU\
[()
[(()
[(&(
#
#
#
#
V\VWHPPHPRU\
7'(6%ORFVL]H ELW [ELW