beautypg.com

Ence is shown in – Rainbow Electronics AT86RF231 User Manual

Page 130

background image

130

8111A–AVR–05/08

AT86RF231

A security operation can be started within one SRAM access by appending the start command
AES_REQUEST = 1 (register 0x94, AES_CON_MIRROR) to the SPI sequence. Register
AES_CON_MIRROR is a mirrored version of register 0x83 (AES_CON).

Figure 11-1. ECB Programming SPI Sequence - Encryption

Summarizing, the following steps are required to perform a security operation using only one
SPI access:

This sequence is recommended because the security operation is configured and started within
one SPI transaction.

The ECB encryption operation is illustrated in

Figure 11-2 on page 130

.

Figure 11-3 on page 130

shows the ECB decryption mode, which is supported in a similar way.

Figure 11-2. ECB Mode - Encryption

Figure 11-3. ECB Mode - Decryption

0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0

data_0[7:0]

byte 1 (address)

byte 0 (cmd.)

byte 2 (AES cmd)

byte 3 (data)

data_15[7:0]

byte 18 (data)

1 0 0 0 0 0 0 0

byte 19 (AES cmd)

AES start

ECB, encryption

0x83

SRAM write

1. Configure SPI Access

a) SRAM Write, refer to

Section 6.2.3

b) Start Address 0x83

2. Configure AES Operation

Address 0x83: select ECB mode, direction

3. Write 128-bit data block

Addresses 0x84 - 0x93: either plain or ciphertext

4. Start AES Operation

Addresses 0x94: start AES operation, ECB mode

Block Cipher

Encryption

Encryption

Key

Plaintext

Ciphertext

Block Cipher

Encryption

Plaintext

Ciphertext

Encryption

Key

Block Cipher

Decryption

Decryption

Key

Plaintext

Ciphertext

Block Cipher

Decryption

Decryption

Key

Plaintext

Ciphertext