advanced encryption standard
play

Advanced Encryption Standard Simplified-AES Simplified-AES Example - PDF document

Cryptography Advanced Encryption Standard Overview of AES Advanced Encryption Standard Simplified-AES Simplified-AES Example Details of AES Cryptography AES in OpenSSL AES in Python School of Engineering and Technology CQUniversity


  1. Cryptography Advanced Encryption Standard Overview of AES Advanced Encryption Standard Simplified-AES Simplified-AES Example Details of AES Cryptography AES in OpenSSL AES in Python School of Engineering and Technology CQUniversity Australia Prepared by Steven Gordon on 19 Feb 2020, aes.tex, r1789 1

  2. Cryptography Contents Advanced Encryption Standard Overview of AES Overview of AES Simplified-AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL Simplified-AES Example AES in Python Details of AES AES in OpenSSL AES in Python 2

  3. Cryptography History of AES Advanced Encryption Standard ◮ 1977: DES (56-bit key). NIST published. ◮ 1991: IDEA, similar to DES, secure but patent issues Overview of AES Simplified-AES ◮ 1999: 3DES (168-bit key). NIST recommended 3DES Simplified-AES be used (DES only for legacy systems) Example ◮ 3DES was considered secure (apart from special case Details of AES attacks) AES in OpenSSL ◮ But 3DES is very slow, especially in software AES in Python ◮ DES and 3DES use 64-bit blocks larger block sizes required for efficiency ◮ 1997: NIST called for proposals for new Advanced Encryption Standards ◮ Proposals made public and evaluations performed ◮ 2001: Selected Rijndael as the algorithm for AES 3

  4. Cryptography Selecting a Winner Advanced Encryption ◮ Original NIST criteria: Standard ◮ Security: effort to cryptoanalyse algorithm, randomness, Overview of AES . . . Simplified-AES ◮ Cost: royalty-free license, computationally efficient, . . . Simplified-AES ◮ Algorithm and implementation characteristics: flexibility Example Details of AES (different keys/blocks, implement on different systems), simplicity, . . . AES in OpenSSL AES in Python ◮ 21 candidate algorithms reduced to 5 ◮ Updated NIST evaluation criteria for 5 algorithms: ◮ General Security ◮ Software and hardware implementations (needs to be efficient) ◮ Low RAM/ROM requirements (e.g. for smart cards) ◮ Ability to change keys quickly ◮ Potential to use parallel processors 4

  5. Cryptography Selecting Rijndael for AES Advanced Encryption Standard ◮ Security: good, no known attacks ◮ Software implementation: fast, can make use of parallel Overview of AES Simplified-AES processors Simplified-AES ◮ Hardware implementation: fastest of all candidates Example Details of AES ◮ Low memory requirements: good, except encryption AES in OpenSSL and decryption require separate space AES in Python ◮ Timing and Power analysis attacks: easiest to defend against ◮ Key flexibility: supports on-the-fly change of keys and different size of keys/blocks 5

  6. Cryptography Overview of Rijndael/AES Advanced Encryption ◮ Rijndael allows variety of block and key sizes Standard ◮ 128, 160, 192, 224 and 256 bits Overview of AES ◮ Key can be different size to block Simplified-AES ◮ AES standardises block size of 128 bits, key sizes of Simplified-AES Example 128, 192 and 256 bits Details of AES ◮ We will use S-AES to help understand AES in OpenSSL ◮ Again, S-AES is not used in the real world, only an AES in Python educational tool ◮ For details of AES (S-Boxes and other operations), see the Stallings textbook 6

  7. Cryptography Contents Advanced Encryption Standard Overview of AES Overview of AES Simplified-AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL Simplified-AES Example AES in Python Details of AES AES in OpenSSL AES in Python 7

  8. Cryptography Simplified-AES Advanced Encryption Standard ◮ Input: 16-bit block of plaintext; 16-bit key ◮ Output: 16-bit block of ciphertext Overview of AES Simplified-AES ◮ Four operations: Simplified-AES ◮ Add Key: XOR of a 16-bit key and 16-bit state matrix Example ◮ Nibble substitution: table lookup that swaps nibbles Details of AES (4-bits) AES in OpenSSL ◮ Shift Row: shift of nibbles in a row AES in Python ◮ Mix Column: re-order columns ◮ 3 rounds: ◮ Round 0: Add key ◮ Round 1: All four operations ◮ Round 2: Three operations 8

  9. Cryptography S-AES Encryption and Decryption Advanced Encryption Standard Overview of AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL AES in Python 9 The figure on slide 9 shows the overall steps for S-AES encryption, decryp- tion and key expansion. S-AES operates on 16-bit blocks of plaintext. To encrypt, there is an initial add round key , and then two rounds, where the 2nd round does not include the mix columns operation.

  10. Cryptography S-AES State Operations Advanced Encryption Standard Overview of AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL AES in Python 10 The figure on slide 10 shows that in S-AES the 16-bit blocks are represented as 4 4-bit nibbles. Operations are performed on nibbles. Together the 4 nibbles are referred to as the state matrix .

  11. Cryptography S-AES Add Key and Shift Row Advanced Encryption Standard Overview of AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL AES in Python 11 The figure on slide 11 shows the Add Key operation is an XOR between the current state matrix and a round key. The Shift Row operation simply swaps two nibbles.

  12. Cryptography S-AES Nibble Substitution Advanced Encryption Standard Overview of AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL AES in Python 12 The figure on slide 12 shows the Nibble Substitution operation, which uses S-Boxes. The left-most 2 bits in a nibble determine the row, and the right-most 2 bits in the nibble determine the column. The output is nibble based on the S-Box. The Inverse S-Box is used in decryption.

  13. Cryptography S-AES Mix Column Advanced Encryption Standard Overview of AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL AES in Python 13 The figure on slide 13 shows the Mix Column operation. This operation applies a matrix multiplication on the state matrix. Importantly, the result- ing addition and multiplication operations are in Galois Field GF(2 4 ). We do not cover (Galois) fields, however in Number Theory we saw modular arithmetic with mod n where all operations produced results within 0 to n . This is a simple case of a field, i.e. all operations produce answers within some finite range. GF(2 4 ) means all answers will be within range 0 to 15. The following tables show the exact values for addition and multiplication in GF(2 4 ) for S-AES.

  14. GF(2 4 ) Addition used in S-AES Cryptography Advanced Encryption Standard Overview of AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL AES in Python 14 The figure on slide 14 shows the GF(2 4 ) addition table.

  15. GF(2 4 ) Multiplication used in S-AES Cryptography Advanced Encryption Standard Overview of AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL AES in Python 15 The figure on slide 15 shows the GF(2 4 ) multiplication table.

  16. Cryptography S-AES Key Expansion Advanced Encryption Standard Overview of AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL AES in Python 16 The figure on slide 16 shows how the original 16-bit key is expanded to 3 16-bit round keys. Each round key is made up of 2 8-bit words.

  17. Cryptography Comparing S-AES and AES Advanced Encryption Standard Overview of AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL AES in Python 17 The figure on slide 13 compares S-AES characteristics to that of real AES.

  18. Cryptography Contents Advanced Encryption Standard Overview of AES Overview of AES Simplified-AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL Simplified-AES Example AES in Python Details of AES AES in OpenSSL AES in Python 18

  19. Cryptography Encrypt with S-AES (exercise) Advanced Encryption Show that when the plaintext 1101 0111 0010 1000 is Standard encrypted using Simplified-AES with key 0100 1010 1111 Overview of AES 0101 that the ciphertext obtained is 0010 0100 1110 Simplified-AES 1100 . Simplified-AES Example Details of AES AES in OpenSSL AES in Python 19

  20. Cryptography Contents Advanced Encryption Standard Overview of AES Overview of AES Simplified-AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL Simplified-AES Example AES in Python Details of AES AES in OpenSSL AES in Python 20

  21. Cryptography AES Design Features Advanced Encryption ◮ Only the Add Key stage makes use of the key Standard ◮ The other 3 stages (Shift Row, Mix Column, Nibble Overview of AES Substitution) provide confusion and diffusion of bits. Simplified-AES On their own, they provide no security (do not use key) Simplified-AES ◮ The four operations are easily reversible (for decryption) Example ◮ Encryption and decryption algorithms not identical Details of AES ◮ Final round is only 3 operations, so algorithm is AES in OpenSSL reversible AES in Python ◮ S-Box design aims: ◮ Low correlation between input bits and output bits ◮ Cannot describe output as simple function of input ◮ No fixed or opposite points, for example S-box(a) � = a ◮ Mix columns and shift rows ensure all output bits depend on all input bits after several rounds ◮ In Mix Columns, encryption more efficient than decryption ◮ Very efficient implementations for 8- and 32-bit processors 21

Recommend


More recommend