09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>RM0090</strong> Cryptographic processor (CRYP)<br />

During the DES or TDES CBC encryption, the CRYP_IV0(L/R) bits are XORed with the 64bit<br />

data block popped off the IN FIFO after swapping (according to the DATATYPE value),<br />

that is, with the M1...64 bits of the data block. When the output of the DEA3 block is<br />

available, it is copied back into the CRYP_IV0(L/R) vector, and this new content is XORed<br />

with the next 64-bit data block popped off the IN FIFO, and so on.<br />

During the DES or TDES CBC decryption, the CRYP_IV0(L/R) bits are XORed with the 64bit<br />

data block (that is, with the M1...64 bits) delivered by the TDEA1 block before swapping<br />

(according to the DATATYPE value), and pushed into the OUT FIFO. When the XORed<br />

result is swapped and pushed into the OUT FIFO, the CRYP_IV0(L/R) value is replaced by<br />

the output of the IN FIFO, then the IN FIFO is popped, and a new 64-bit data block can be<br />

processed.<br />

During the AES CBC encryption, the CRYP_IV0...1(L/R) bits are XORed with the 128-bit<br />

data block popped off the IN FIFO after swapping (according to the DATATYPE value). When<br />

the output of the AES core is available, it is copied back into the CRYP_IV0...1(L/R) vector,<br />

and this new content is XORed with the next 128-bit data block popped off the IN FIFO, and<br />

so on.<br />

During the AES CBC decryption, the CRYP_IV0...1(L/R) bits are XORed with the 128-bit<br />

data block delivered by the AES core before swapping (according to the DATATYPE value)<br />

and pushed into the OUT FIFO. When the XORed result is swapped and pushed into the<br />

OUT FIFO, the CRYP_IV0...1(L/R) value is replaced by the output of the IN FIFO, then the<br />

IN FIFO is popped, and a new 128-bit data block can be processed.<br />

During the AES CTR encryption or decryption, the CRYP_IV0...1(L/R) bits are encrypted by<br />

the AES core. Then the result of the encryption is XORed with the 128-bit data block popped<br />

off the IN FIFO after swapping (according to the DATATYPE value). When the XORed result<br />

is swapped and pushed into the OUT FIFO, the counter part of the CRYP_IV0...1(L/R) value<br />

(32 LSB) is incremented.<br />

Any write operation to the CRYP_IV0...1(L/R) registers when bit BUSY = 1b in the<br />

CRYP_SR register is disregarded (CRYP_IV0...1(L/R) register content not modified). Thus,<br />

you must check that bit BUSY = 0b before modifying initialization vectors.<br />

Doc ID 018909 Rev 3 566/1416

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!