You are on page 1of 2

AES Implementation details

AES is implemented as defined in the FIPS-197 document.


The Algorithm is implemented in ECB mode.

ADD ROUND KEY

SUB SHIFT MIX


BYTES ROWS COLS

CIPHER TEXT

INPUT TEXT
[128 BITS]

KEY [128 BITS]

SUB ROT
WORD WORD

W[i-NK]
RCON

Figure 1-Error! No text of specified style in document.-1 Architectural block diagram

For details about each of the blocks refer the FIPS-197 document.
The decryption process follows virtually the same order as encryption except for another
round of mix columns on the generated keys before giving them to the add round key
step. This flow is clearly explained in the FIPS-197 document.

The encryption/decryption sequence


Input data and key is fed in two blocks of 64 bits in consequtive clock cycles with the
load signal. 64 bits of input and key are read in the posedge after the load signal goes
high and another block of 64 bits of input and key are read in the posedge after the load
signal goes low. Hence the complete data and key is loaded only when the load signal
makes a low-high-low transition(basically a pulse). The process starts once the start
signal is pulsed and the output is validated with 'done' signal 13 clock cycles after the
'start' signal goes low . 'done' remains high until the next start cycle.
clk

load

start
13 clock cycles after start goes low

done

input block input block


data_in [64-127]
[0-63]

key block key block


data_in [64-127]
[0-63]

data_out output valid

Figure -2 Process sequence for encryption/decryption

The arcitecture isnt pipelined and hence only able to perform multi encryption/decryption
serially one after the other. The output is registered and avialable after 'done' signal goes
high. Asserting the start signal during an encrytion/decryption process will lead to
erroneous output.

You might also like