Datasheet

2010 Microchip Technology Inc. DS39935C-page 135
ENC424J600/624J600
To encrypt a block using CTR mode:
1. Load the encryption key as described in
Section 15.3.1 “Key Support”.
2. Set AESOP<1:0> (ECON1<10:9>) to ‘
00’.
3. Copy the counter value to TEXTA at 7C20h.
4. Set AESST (ECON1<11>) to initiate the
encryption.
5. Copy the plaintext message to TEXTB at
7C30h.
6. Wait for the hardware to clear AESST.
7. Read the ciphertext message from XOROUT at
7C40h.
8. Repeat steps 3 through 7 for subsequent blocks.
To decrypt a block using CTR mode:
1. Load the encryption key as described in
Section 15.3.1 “Key Support”. Note that this
mode does not make use of a decryption key.
2. Set AESOP<1:0> to ‘
00’.
3. Copy the counter value to TEXTA at 7C20h.
4. Set AESST to initiate the encryption.
5. Copy the ciphertext message to TEXTB at
7C30h.
6. Wait for the hardware to clear AESST.
7. Read the plaintext message from XOROUT at
7C40h.
8. Repeat steps 3 through 7 for subsequent blocks.
The context for CTR mode consists of the AES encryp-
tion key and the counter value. It is up to the application
to determine what needs to be saved for the counter
value context.