The minimum number of inserted pad bytes depends on the cipher algorithm, selected using the
PKTE_SA_CMD0.CIPHER bit field, and the cipher mode, selected using the PKTE_SA_CMD1.CIPHERMD bit
field.
For block ciphers, the plain text data is always (as a minimum) padded to the next block boundary. More pad bytes
beyond the algorithm or protocol alignment requirements can be inserted using the pad control
(PKTE_CTL_STAT.PADCTLSTAT) in the command descriptor. This feature can be used for traffic flow security
to conceal the number of plain text bytes in an encrypted packet.
Encrypt operations that use block ciphers have minimum pad requirements based on their block size. The packet
engine enforces a minimum pad alignment for block ciphers according to the Pad Alignment table. For ESP out-
bound operations, the minimum pad alignment is forced to 4 bytes.
For stream ciphers and null crypto the data is never padded when the stream cipher pad bit
(PKTE_SA_CMD0.SCPAD) =0. When PKTE_SA_CMD0.SCPAD =1 the plain text data is padded to the length
as defined by the PKTE_CTL_STAT.PADCTLSTAT bits in the command descriptor.
NOTE:
The SSL protocol does not allow padding to exceed the ciphers block length. This length is 8 bytes for
DES/Triple-DES and 16 bytes for AES. For SSL, the packet engine does not enforce this pad alignment
value. The host processor must ensure that the PKTE_CTL_STAT.PADCTLSTAT bit field is configured
correctly.
Table 44-6: Pad Alignment
Pad Control
PADCTLSTAT =
PKTE_CTL_STAT[31:24]
Crypto Algo-
Crypto Mode Pad Stream
rithm
DES
ECB, CBC
AES
ECB, CBC
CTR, ICM
with ESP
CTR, ICM
no ESP
NULL
with ESP
no ESP
ARC4
with ESP
no ESP
ADSP-SC58x/ADSP-2158x SHARC+ Processor Hardware Reference
0x00
0x01
%8
%1
Ciphers
N/A
8
8
N/A
16
16
N/A
8
4
no
0
0
yes
8
0
N/A
8
4
no
8
0
yes
8
0
N/A
8
4
no
0
0
yes
8
0
*1
0x02
0x04
0x08
%4
%8
%16
8
8
16
16
16
16
4
8
16
0
0
0
4
8
16
4
8
16
0
0
0
4
8
16
4
8
16
0
0
0
4
8
16
Crypto Padding
0x10
0x20
0x40
%32
%64
%128
32
64
128
32
64
128
32
64
128
0
0
0
32
64
128
32
64
128
0
0
0
32
64
128
32
64
128
0
0
0
32
64
128
*2
0x80
%256
256
256
256
0
256
256
0
256
256
0
256
44–11
Need help?
Do you have a question about the ADSP-SC58 Series and is the answer not in the manual?