English
Language : 

ENC624J600-I Datasheet, PDF (132/168 Pages) Microchip Technology – Stand-Alone 10/100 Ethernet Controller with SPI or Parallel Interface
ENC424J600/624J600
To initialize decryption using a known encryption key:
1. Verify that AESST is clear, indicating that the
engine is Idle.
2. Configure AESLEN<1:0> to select the correct
key size.
3. Use the DMA to transfer the encryption key to
address 7C00h. Keys shorter than 256 bits
should be left-aligned.
4. Configure AESOP<1:0> (ECON1<10:9>) to
‘00’.
5. Set AESST to initiate the key expansion.
6. Wait until the hardware clears the AESST flag.
15.3.2 CONTEXT SWITCHING
After each block is complete, the internal state may be
saved in order to switch encryption keys or operations.
Context switching may only be performed when
AESST (ECON2<11>) is clear, indicating that the
engine is Idle. The values comprising the context varies
depending on the mode selected. The sections
describing each mode details which values must be
saved.
15.3.3 BLOCK MODES
Block ciphers are commonly used in one of five modes
as described by the NIST Special Publication 800-38A,
“Recommendations for Block Cipher Modes of
Operation: Methods and Techniques”. The use of the
AES engine in each of these modes is described in the
following sections.
Four modes are natively supported in hardware:
• Electronic Code Book (ECB)
• Cipher Block Chaining (CBC)
• Cipher Feedback (CFB)
• Output Feedback (OFB)
The fifth mode, Counter (CTR), can be used with the
addition of software support for the counter.
15.3.3.1 Electronic Code Book Mode (ECB)
The Electronic Code Book mode applies the AES
encryption function directly to each plaintext block. No
feedback is included, so the encryption of each block is
completely independent of any previous block.
Assuming a given session key, any plaintext block will
always yield to the same ciphertext block (and vice
versa). If this is an undesirable property, a different
block mode should be selected. Figure 15-1 shows the
use of ECB mode for encryption and decryption.
FIGURE 15-1:
ECB ENCRYPTION AND DECRYPTION
ENCRYPTION
DECRYPTION
Plaintext0
Key
Plaintext1
Key
Ciphertext0
Key
Ciphertext1
Key
DATA KEY
ENCRYPTER
DATA KEY
ENCRYPTER
DATA
KEY
DECRYPTER
DATA
KEY
DECRYPTER
Ciphertext0
Ciphertext1
Plaintext0
Plaintext1
DS39935C-page 130
 2010 Microchip Technology Inc.