Advanced Encryption Standard Simplified-AES Simplified-AES Example - - PowerPoint PPT Presentation

advanced encryption standard
SMART_READER_LITE
LIVE PREVIEW

Advanced Encryption Standard Simplified-AES Simplified-AES Example - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

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

1/30

Advanced Encryption Standard

Cryptography

School of Engineering and Technology CQUniversity Australia

Prepared by Steven Gordon on 19 Feb 2020, aes.tex, r1789

slide-2
SLIDE 2

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

2/30

Contents

Overview of AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL AES in Python

slide-3
SLIDE 3

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

3/30

History of AES

◮ 1977: DES (56-bit key). NIST published. ◮ 1991: IDEA, similar to DES, secure but patent issues ◮ 1999: 3DES (168-bit key). NIST recommended 3DES be used (DES only for legacy systems)

◮ 3DES was considered secure (apart from special case attacks) ◮ But 3DES is very slow, especially in software ◮ 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

slide-4
SLIDE 4

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

4/30

Selecting a Winner

◮ Original NIST criteria:

◮ Security: effort to cryptoanalyse algorithm, randomness, . . . ◮ Cost: royalty-free license, computationally efficient, . . . ◮ Algorithm and implementation characteristics: flexibility (different keys/blocks, implement on different systems), simplicity, . . .

◮ 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

slide-5
SLIDE 5

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

5/30

Selecting Rijndael for AES

◮ Security: good, no known attacks ◮ Software implementation: fast, can make use of parallel processors ◮ Hardware implementation: fastest of all candidates ◮ Low memory requirements: good, except encryption and decryption require separate space ◮ Timing and Power analysis attacks: easiest to defend against ◮ Key flexibility: supports on-the-fly change of keys and different size of keys/blocks

slide-6
SLIDE 6

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

6/30

Overview of Rijndael/AES

◮ Rijndael allows variety of block and key sizes

◮ 128, 160, 192, 224 and 256 bits ◮ Key can be different size to block

◮ AES standardises block size of 128 bits, key sizes of 128, 192 and 256 bits ◮ We will use S-AES to help understand

◮ Again, S-AES is not used in the real world, only an educational tool

◮ For details of AES (S-Boxes and other operations), see the Stallings textbook

slide-7
SLIDE 7

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

7/30

Contents

Overview of AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL AES in Python

slide-8
SLIDE 8

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

8/30

Simplified-AES

◮ Input: 16-bit block of plaintext; 16-bit key ◮ Output: 16-bit block of ciphertext ◮ Four operations:

◮ Add Key: XOR of a 16-bit key and 16-bit state matrix ◮ Nibble substitution: table lookup that swaps nibbles (4-bits) ◮ Shift Row: shift of nibbles in a row ◮ Mix Column: re-order columns

◮ 3 rounds:

◮ Round 0: Add key ◮ Round 1: All four operations ◮ Round 2: Three operations

slide-9
SLIDE 9

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

9/30

S-AES Encryption and Decryption

slide-10
SLIDE 10

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

10/30

S-AES State Operations

slide-11
SLIDE 11

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

11/30

S-AES Add Key and Shift Row

slide-12
SLIDE 12

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

12/30

S-AES Nibble Substitution

slide-13
SLIDE 13

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

13/30

S-AES Mix Column

slide-14
SLIDE 14

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

14/30

GF(24) Addition used in S-AES

slide-15
SLIDE 15

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

15/30

GF(24) Multiplication used in S-AES

slide-16
SLIDE 16

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

16/30

S-AES Key Expansion

slide-17
SLIDE 17

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

17/30

Comparing S-AES and AES

slide-18
SLIDE 18

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

18/30

Contents

Overview of AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL AES in Python

slide-19
SLIDE 19

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

19/30

Encrypt with S-AES (exercise)

Show that when the plaintext 1101 0111 0010 1000 is encrypted using Simplified-AES with key 0100 1010 1111 0101 that the ciphertext obtained is 0010 0100 1110 1100.

slide-20
SLIDE 20

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

20/30

Contents

Overview of AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL AES in Python

slide-21
SLIDE 21

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

21/30

AES Design Features

◮ Only the Add Key stage makes use of the key

◮ The other 3 stages (Shift Row, Mix Column, Nibble Substitution) provide confusion and diffusion of bits. On their own, they provide no security (do not use key)

◮ The four operations are easily reversible (for decryption) ◮ Encryption and decryption algorithms not identical ◮ Final round is only 3 operations, so algorithm is reversible ◮ 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

slide-22
SLIDE 22

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

22/30

AES Parameters

slide-23
SLIDE 23

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

23/30

AES Encryption and Decryption

slide-24
SLIDE 24

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

24/30

Contents

Overview of AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL AES in Python

slide-25
SLIDE 25

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

25/30

AES Key Generation (exercise)

Generate a shared secret key to be used with AES and share it with another person.

slide-26
SLIDE 26

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

26/30

AES Encryption (exercise)

Create a message in a plain text file and after using AES, send the ciphertext to the person you shared the key with.

slide-27
SLIDE 27

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

27/30

AES Decryption (exercise)

Decrypt the ciphertext you received.

slide-28
SLIDE 28

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

28/30

AES Performance Benchmarking (exercise)

Perform speed tests on AES using both the software and hardware implementations (if available). Compare and discuss the impact of the following on performance: key length; software vs hardware; different computers (e.g. compare the performance with another person).

slide-29
SLIDE 29

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

29/30

Contents

Overview of AES Simplified-AES Simplified-AES Example Details of AES AES in OpenSSL AES in Python

slide-30
SLIDE 30

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

30/30

AES in Python Cryptography Library

◮ https://cryptography.io/en/latest/hazmat/ primitives/symmetric-encryption/