ATmega1284PR231 Atmel Corporation, ATmega1284PR231 Datasheet - Page 131

no-image

ATmega1284PR231

Manufacturer Part Number
ATmega1284PR231
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATmega1284PR231

Flash (kbytes)
128 Kbytes
Max. Operating Frequency
20 MHz
Max I/o Pins
32
Spi
3
Twi (i2c)
1
Uart
2
Adc Channels
8
Adc Resolution (bits)
10
Adc Speed (ksps)
15
Analog Comparators
1
Crypto Engine
AES
Sram (kbytes)
16
Eeprom (bytes)
4096
Operating Voltage (vcc)
1.8 to 3.6
Timers
3
Frequency Band
2.4 GHz
Max Data Rate (mb/s)
2
Antenna Diversity
Yes
External Pa Control
Yes
Power Output (dbm)
3
Receiver Sensitivity (dbm)
-101
Receive Current Consumption (ma)
13.2
Transmit Current Consumption (ma)
14.4
Link Budget (dbm)
104
11.1.4.2
8111C–MCU Wireless–09/09
Cipher Block Chaining (CBC)
When decrypting, due to the nature of AES algorithm, the initial key to be used is not the same
as the one used for encryption, but rather the last round key instead. This last round key is the
content of the key address space stored after running one full encryption cycle, and must be
saved for decryption. If the decryption key has not been saved, it has to be recomputed by first
running a dummy encryption (of an arbitrary plaintext) using the original encryption key, then
fetching the resulting round key from the key memory, and writing it back into the key memory as
the decryption key.
ECB decryption is not used by either IEEE 802.15.4 or ZigBee frame security. Both of these
standards do not directly encrypt the payload, but rather a nonce instead, and protect the pay-
load by applying an XOR operation between the resulting (AES-) cipher text and the original
payload. As the nonce is the same for encryption and decryption only ECB encryption is
required. Decryption is performed by XORing the received cipher text with its own encryption
result respectively, which results in the original plaintext payload upon success.
In CBC mode, the result of a previous AES operation is XORed with the new incoming vector,
forming the new plaintext to encrypt, see
computation of a cryptographic checksum (message integrity code, MIC).
Figure 11-4. CBC Mode - Encryption
After preparing the AES key, and defining the AES operation direction using SRAM register bit
AES_DIR, the data has to be provided to the AES engine and the CBC operation can be started.
The first CBC run has to be configured as ECB to process the initial data (plaintext XORed with
an initialization vector provided by the microcontroller). All succeeding AES runs are to be con-
figured as CBC by setting register bits AES_MODE = 0x2 (register 0x83, AES_CTRL). Register
bit AES_DIR (register 0x83, AES_CTRL) must be set to AES_DIR = 0 to enable AES encryption.
The data to be processed has to be transferred to the SRAM starting with address 0x84 to 0x93
( r e g i s t e r A E S _ S T AT E ) . S e t t i n g r e g i s t e r b i t A E S _ R E Q U E S T = 1 ( r e g i s t e r 0 x 9 4 ,
AES_CTRL_MIRROR) as described in
starts the first encryption within one SRAM access. This causes the next 128 bits of plaintext
data to be XORed with the previous cipher text data, see
According to IEEE 802.15.4 the input for the very first CBC operation has to be prepared by a
XORing a plaintext with an initialization vector (IV). The value of the initialization vector is 0.
However, for non-compliant usage any other initialization vector can be used. This operation has
to be prepared by the microcontroller.
Encryption
Key
Plaintext
Block Cipher
Encryption
Ciphertext
Initialization Vector (IV)
mode
ECB
Section 11.1.4 “Security Operation Modes” on page 129
Figure 11-4 on page
Encryption
Key
Figure 11-4 on page
Block Cipher
131. This mode is used for the
Encryption
Ciphertext
Plaintext
mode
CBC
AT86RF231
131.
131

Related parts for ATmega1284PR231