Professional Documents
Culture Documents
Introduction Characteristics of Rijndael Algorithm and its building blocks Mathematics behind Rijndael Conclusion
Rijndael, the Advanced Encryption Standard, is a symmetric block cipher. It uses the same key between sender and receiver to encrypt and decrypt the message.
Speed and cost make symmetric algorithms as the algorithm of choice for encrypting large amounts of data.
Characteristics of Rijndael:
Iterated block cipher
Parallel structure (based on the S-P
Block Cipher:
Two Principles of a good block cipher, as defined by Claude Shannon, are: 1. Confusion which stands for substitution operations. 2. Diffusion which stands for transposition or permutation operations.
Divide plaintext into blocks of length 1(byte) * 16, thus creating a 4 X 4 matrix, i.e. the STATE matrix. State[Row,Column]=Byte[Row+4Column]
Byte0 Byte1 Byte4 Byte5 Byte8 Byte9 Byte12 Byte13 State[0,0] State[0,1] State[0,2] State[0,3] State[1,0] State[1,1] State[1,2] State[1,3]
Byte2
Byte6
Byte10
Byte14
Byte3
Byte7
Byte11
Byte15
Pseudo Code:
Rijndael_Cipher (byte [] block_of_data, byte [] KEY) { Expand_Key(KEY, Expanded_KEY); Add_Key(State[], Expanded_KEY[0]); DO (Nr 1 times) ROUND(State, Expanded_KEY[i]); Last_Round (State, Expanded_KEY[Nr]); }
Shift_Rows(State);
Mix_Columns(State);
Add_Key(State[],Expanded_KEY[i]);
Encryption
PLAINTEXT SECRET KEY ROUND 0 KEY ROUND 0
Round
INPUT
SUB_BYTES
ROUND 1
KEY ROUND 1
SHIFT_ROWS EXTENDED_KEY KEY ROUND Nr-1 KEY ROUND Nr MIX_COLUMN S ROUND KEY ADD_ROUND KEY
ROUND Nr - 1
Last_ROUND Nr
Number of Rounds
Block size is fixed at 128 bits; key can be 128,192, or 256. Nr is the number of rounds which is a function of Nk(Block length divided by 32 ), and Nb(Key length divided by 32 )
Nr Nk
4
Nb
6 12
8 14
10
This procedure will 1.Expand the key From a cipher Key of bytes [4][Nk] to another array of (4) * (Nb*(Nr + 1)) = 4* (10 + 1) = 44 bytes . 2.Select a round key for each round. This procedure avoids: 1. Weak Keys by introducing asymmetry. 2. Key-related attacks(Biham) 3. Cipher keys that are partially known or that can be chosen by an imposter.
Expand_Key
Add_Key
Add_Key will be called 1. Once in the beginning of rounds 2. Nr-1 times in the Round 3. Once in the final round. It just XOR-s the 16 bytes of the state with the 16 bytes of key (for the 128 bit key).
Shift_Rows
It will not change the values, but will just change their order. It does a left circular shift to each row as below: Row 0 Shift 0; Row 1 Shift 1; Row 2 Shift 2; Row 3 Shift 3;
State[ 0,0] State[ 1,0] State[ 2,0] State[ 0,1] State[ 1,1] State[ 2,1] State[ 0,2] State[ 1,2] State[ 2,2] State[ 0,3] State[ 1,3] State[ 2,3] State[ 0,0] State[ 1,1] State[ 0,1] State[ 1,2] State[ 2,3] State[ 0,2] State[ 1,3] State[ 2,0] State[ 0,3] State[ 1,0] State[ 2,1]
Shift_Rows(..)
State[ 2,2]
State[ 3,0]
State[ 3,1]
State[ 3,2]
State[ 3,3]
State[ 3,3]
State[ 3,0]
State[ 3,1]
State[ 3,2]
Inverses
S-BOX
The only non-linear step S-Box is based on the mapping: X -> X 1 ; where X 1 represents multiplicative inverse in the field. 1. Replaces each byte with its inverse GF (28), g (a); beside 00 mapped to itself. 2. Applies an affine transformation (a bitwise modulo-two matrix, XOR-ed with the hexadecimal number 63. EXAMPLE: Lets find SRD [12]. ??
Mix_Columns
Mix_Columns multiplies two numbers: (A column that is considered as a polynomial) * (A mixing polynomial (modulo x4 + 1)) . Mixing polynomial is {03}*x3 + {01} * x2 + {01} * x + {02}. It should be relatively prime with the polynomial x4 + 1={11}=(x+1)4, Thus, the fixed polynomial will have an inverse (mod x4 + 1) and we can decrypt..
Conclusion
Secure
Excellent resistance to known attacks.
Q&A