1 / 23

RIJNDAEL

RIJNDAEL. Arta Doci University Of Colorado. Email: adoci@ouray.cudenver.edu. Topics Covered. Introduction Characteristics of Rijndael Algorithm and its building blocks Mathematics behind Rijndael Conclusion. Rijndael = Rij men & Dae men.

kbillie
Télécharger la présentation

RIJNDAEL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RIJNDAEL Arta Doci University Of Colorado. Email: adoci@ouray.cudenver.edu

  2. Topics Covered • Introduction • Characteristics of Rijndael • Algorithm and its building blocks • Mathematics behind Rijndael • Conclusion

  3. Rijndael = Rijmen &Daemen 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.

  4. Characteristics of Rijndael: • Iterated block cipher • Parallel structure (based on the S-P Network model structure) • Byte Oriented • Predecessor: SQUARE.

  5. 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.

  6. S-P Network Model (Shannon) Divide each Block of Data into smaller manageable pieces of the same length. In parallel each piece goes through: • Confusion (substitution): S-Box • Diffusion (Permutation): P-Box

  7. INPUT(Block of Plaintext, Key): 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] EXAMPLE: Create State Matrix from a given block…

  8. 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]); }

  9. Pseudo Code (continued):

  10. Encryption Round PLAINTEXT SECRET KEY INPUT KEY ROUND 0 ROUND 0 SUB_BYTES KEY ROUND 1 ROUND 1 SHIFT_ROWS EXTENDED_KEY MIX_COLUMNS KEY ROUND Nr-1 ROUND Nr - 1 ROUND KEY ADD_ROUNDKEY KEY ROUND Nr Last_ROUND Nr OUTPUT ENCRYPTED DATA

  11. 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 )

  12. Expand_Key  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.

  13. 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). EXAMPLE: Add_Key illustrated….

  14. Substitute_Bytes (Non-Linear step) Substitutes each byte of the State with a byte from the S-Box as follows: State [row, column] = S-Box [state [row, column]]. S-Box ---- MORE LATER…

  15. 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;

  16. Mathematics Behind Rijndael… • Field • Finite Field • Inverses

  17. Rijndael operates on the: Binary Finite Field, GF(28). FIELD. Definition and Example . FINITE FIELD. The field with a finite number of elements. Rijndael uses polynomial basis. Rijndael is byte oriented. Each byte, which will be stored in Hex and it will represent a polynomial of at most degree 7: b7X7 + b6X6 + b5X5 + b4X4 + b3X3 + b2X2 + b1X1 + bo. Example: { 1 1 0 1 01 0 0} = 0Xd4 = X7 + X6 + X4 + X2

  18. FINITE FIELD GF(2 ^ 8) The set of all polynomials of degree at most 7 with coefficients GF(2) and with the two defined operations: Addition: Just XOR-in Multiplication: Shift to the left. and modulo an irreducible polynomial. Galois Theorem: For any prime p and integer n, there exists a field of order pn and it is unique. Cyclic Group Theorem: GF (pn)*, i.e. multiplicative Group, is cyclic; The nonzero elements are powers of some primitive root . Example: HOW do we construct such a field? Irreducible? Primitive Root?

  19. Finding the multiplicative inverse… Multiplicative inverses in GF(256) using Look Up Tables: 1. Example: Building Log Table. 2. Building Anti Log Table. Reverse the Log process {03}(06) ={55}; {06} = {03}(55) . 3. Building Inverse Table(using Log/Antilog). g (x) has as inverse g (ff ) – ( x) . Example:{12}= {03} (e0), so the inverse will be g (ff ) – ( e0) = g 1f = {aa}

  20. 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]. ??

  21. 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…..

  22. Conclusion • Secure • Excellent resistance to known attacks. • Elegant mathematical structure • Efficient

  23. Q & A

More Related