Encryption and Attacks Attacks on Encryption Block Cipher Design - - PowerPoint PPT Presentation

encryption and attacks
SMART_READER_LITE
LIVE PREVIEW

Encryption and Attacks Attacks on Encryption Block Cipher Design - - PowerPoint PPT Presentation

Cryptography Encryption and Attacks Encryption Building Blocks Encryption and Attacks Attacks on Encryption Block Cipher Design Principles Cryptography Stream Cipher Design Principles Example: Brute School of Engineering and Technology


slide-1
SLIDE 1

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

1/51

Encryption and Attacks

Cryptography

School of Engineering and Technology CQUniversity Australia

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

slide-2
SLIDE 2

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

2/51

Contents

Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

slide-3
SLIDE 3

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

3/51

Model of Encryption for Confidentiality

slide-4
SLIDE 4

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

4/51

Characterising Ciphers by Number of Keys

Symmetric sender/receiver use same key (single-key, secret-key, shared-key, conventional) Public-key sender/receiver use different keys (asymmetric)

slide-5
SLIDE 5

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

5/51

Symmetric Key Encryption for Confidentiality

P E() D() K K C=E(K,P) P=D(K,C) secret key secret key Ciphertext Plaintext Plaintext Encryption Decryption Shared Shared

slide-6
SLIDE 6

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

6/51

Common Operations in Symmetric Ciphers

Substitution replace one element in plaintext with another Permutation re-arrange elements (also called transposition) Product systems multiple stages of substitutions and permutations, e.g. Feistel network, Substitution Permutation Network (SPN)

slide-7
SLIDE 7

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

7/51

Characterising Ciphers by Processing Plaintext

Block cipher process one block of elements at a time, typically 64 or 128 bits Stream cipher process input elements continuously, e.g. 1 byte at a time, by XOR plaintext with keystream

slide-8
SLIDE 8

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

8/51

Two Important Symmetric Key Block Ciphers

Data Encryption Standard (DES) Became a US government standard in 1977 and widely used for more than 20 years; key is too short Advanced Encryption Standard (AES) Standardised a replacement of DES in 1998, and now widely

  • used. Highly recommended for use.
slide-9
SLIDE 9

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

9/51

Common Symmetric Key Block Ciphers

slide-10
SLIDE 10

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

10/51

Contents

Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

slide-11
SLIDE 11

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

11/51

Aims and Knowledge of the Attacker

◮ Study of ciphers and attacks on them is based on assumptions and requirements

◮ Assumptions about what attacker knows and can do, e.g. intercept messages, modify messages ◮ Requirements of the system/users, e.g. confidentiality, authentication

◮ Normally assumed attacker knows cipher

◮ Keeping internals of algorithms secret is hard ◮ Keeping which algorithm used secret is hard

◮ Attacker also knows the ciphertext ◮ Attacker has two general approaches

◮ “Dumb”: try all possible keys, i.e. brute force ◮ “Smart”: use knowledge of algorithm and ciphertext/plaintext to discover unknown information, i.e. cryptanalysis

slide-12
SLIDE 12

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

12/51

Worst Case Brute Force Time for Different Keys

Key Key Worst case time at speed: length space 109/sec 1012/sec 1015/sec 32 232 4 sec 4 ms 4 us 56 256 833 days 20 hrs 72 sec 64 264 584 yrs 213 days 5 hrs 80 280 107 yrs 104 yrs 38 yrs 100 2100 1013 yrs 1010 yrs 107 yrs 128 2128 1022 yrs 1019 yrs 1016 yrs 192 2192 1041 yrs 1038 yrs 1035 yrs 256 2256 1060 yrs 1057 yrs 1054 yrs 26! 288 1010 yrs 107 yrs 104 yrs

slide-13
SLIDE 13

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

13/51

Classifying Attacks Based Upon Information Known

  • 1. Ciphertext Only Attack
  • 2. Known Plaintext Attack
  • 3. Chosen Plaintext Attack
  • 4. Chosen Ciphertext Attack
  • 5. Chosen Text Attack
slide-14
SLIDE 14

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

14/51

Ciphertext Only Attack

◮ Attacker knows:

◮ encryption algorithm ◮ ciphertext

◮ Hardest type of attack ◮ If cipher can be defeated by this, then cipher is weakest

slide-15
SLIDE 15

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

15/51

Known Plaintext Attack

◮ Attacker knows:

◮ encryption algorithm ◮ ciphertext ◮ one or more plaintext–ciphertext pairs formed with the secret key

◮ E.g. attacker has intercept past ciphertext and somehow discovered their corresponding plaintext ◮ All pairs encrypted with the same secret key (which is unknown to attacker)

slide-16
SLIDE 16

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

16/51

Chosen Plaintext Attack

◮ Attacker knows:

◮ encryption algorithm ◮ ciphertext ◮ plaintext message chosen by attacker, together with its corresponding ciphertext generated with the secret key

slide-17
SLIDE 17

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

17/51

Chosen Ciphertext Attack

◮ Attacker knows:

◮ encryption algorithm ◮ ciphertext ◮ ciphertext chosen by attacker, together with its corresponding decrypted plaintext generated with the secret key

◮ Attackers aim is to find the secret key (not the plaintext)

slide-18
SLIDE 18

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

18/51

General Measures of Security

Unconditionally Secure Ciphertext does not contained enough information to derive plaintext or key ◮ One-time pad is only unconditionally secure cipher (but not very practical) Computationally Secure If: ◮ cost of breaking cipher exceeds value of encrypted information ◮ or time required to break cipher exceeds useful lifetime of encrypted information ◮ Hard to estimate value/lifetime of some information ◮ Hard to estimate how much effort needed to break cipher

slide-19
SLIDE 19

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

19/51

Common Metrics for Attacks

Time: usually measured as number of operations, since real time depends on implementation and computer specifics ◮ Operations are encrypts or decrypts; ignore other processing tasks ◮ E.g. worst case brute force of k-bit key takes 2k (decrypt) operations Amount of Memory: temporary data needed to be stored during attack Known information: number of known plaintext/ciphertext values attacker needs to know in advance to perform attack

slide-20
SLIDE 20

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

20/51

Contents

Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

slide-21
SLIDE 21

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

21/51

Block Ciphers

◮ Encrypt a block of plaintext as a whole to produce same sized ciphertext ◮ Typical block sizes are 64 or 128 bits ◮ Modes of operation used to apply block ciphers to larger plaintexts

slide-22
SLIDE 22

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

22/51

Reversible and Irreversible Mappings

◮ n-bit block cipher takes n bit plaintext and produces n bit ciphertext ◮ 2n possible different plaintext blocks ◮ Encryption must be reversible (decryption possible) ◮ Each plaintext block must produce unique ciphertext block ◮ Total transformations is 2n!

00 11 Plaintext Ciphertext Reversible Mapping 11 10 01 01 00 10 Plaintext Ciphertext 00 01 11 10 11 10 01 01 Irreversible Mapping

slide-23
SLIDE 23

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

23/51

Ideal Block Cipher

◮ n-bit input maps to 2n possible input states ◮ Substitution used to produce 2n output states ◮ Output states map to n-bit output ◮ Ideal block cipher allows maximum number of possible encryption mappings from plaintext block ◮ Maximum mappings is 2n! ◮ Problems with ideal block cipher:

◮ Small block size: equivalent to classical substitution cipher; cryptanalysis based on statistical characteristics feasible ◮ Large block size: key must be very large; performance/implementation problems

slide-24
SLIDE 24

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

24/51

Ideal 2-bit Block Cipher (exercise)

Consider an ideal 2-bit block cipher. How many different mappings are possible? How many different keys are possible? How many bits are needed to store a single key?

slide-25
SLIDE 25

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

25/51

Ideal 2-bit Block Cipher

slide-26
SLIDE 26

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

26/51

Ideal 64-bit Block Cipher (exercise)

Consider an idea 64-bit block cipher. How many different different mappings/keys are possible? How many bits are needed to store a single key?

slide-27
SLIDE 27

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

27/51

Feistel Structure for Block Ciphers

◮ Feistel proposed applying two or more simple ciphers in sequence so final result is cryptographically stronger than component ciphers ◮ n-bit block length; k-bit key length; 2k transformations ◮ Feistel cipher alternates: substitutions, transpositions (permutations) ◮ Applies concepts of diffusion and confusion ◮ Applied in many ciphers today ◮ Approach:

◮ Plaintext split into halves ◮ Subkeys (or round keys) generated from key ◮ Round function, F, applied to right half ◮ Apply substitution on left half using XOR ◮ Apply permutation: interchange to halves

slide-28
SLIDE 28

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

28/51

Diffusion and Confusion

◮ Diffusion

◮ Statistical nature of plaintext is reduced in ciphertext ◮ E.g. A plaintext letter affects the value of many ciphertext letters ◮ How: repeatedly apply permutation (transposition) to data, and then apply function

◮ Confusion

◮ Make relationship between ciphertext and key as complex as possible ◮ Even if attacker can find some statistical characteristics

  • f ciphertext, still hard to find key

◮ How: apply complex (non-linear) substitution algorithm

slide-29
SLIDE 29

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

29/51

Feistel Encryption and Decryption

slide-30
SLIDE 30

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

30/51

Using the Feistel Structure

◮ Exact implementation depends on various design features

◮ Block size, e.g. 64, 128 bits: larger values leads to more diffusion ◮ Key size, e.g. 128 bits: larger values leads to more confusion, resistance against brute force ◮ Number of rounds, e.g. 16 rounds ◮ Subkey generation algorithm: should be complex ◮ Round function F: should be complex

◮ Other factors include fast encryption in software and ease of analysis ◮ Trade-off: security vs performance

slide-31
SLIDE 31

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

31/51

Contents

Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

slide-32
SLIDE 32

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

32/51

Stream Ciphers

◮ Encrypts a digital data stream one bit or one byte at a time ◮ One time pad is example; but practical limitations ◮ Typical approach for stream cipher:

◮ Key (K) used as input to bit-stream generator algorithm ◮ Algorithm generates cryptographic bit stream (ki) used to encrypt plaintext ◮ ki is XORed with each byte of plaintext Pi ◮ Users share a key; use it to generate keystream

slide-33
SLIDE 33

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

33/51

Stream Cipher Encrypt and Decrypt

slide-34
SLIDE 34

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

34/51

Key Re-use in Stream Ciphers

◮ Encrypting two different plaintexts with the same key leads to key re-use attack

◮ Attacker intercepts two ciphertexts: C1 = P1 ⊕ k1 and C2 = P2 ⊕ k1 ◮ Properties of XOR: commutative and A ⊕ A = 0 ◮ Attacker performs XOR on two ciphertexts ◮ C1 ⊕ C2 = P1 ⊕ k1 ⊕ P2 ⊕ k1 = P1 ⊕ P2 ◮ Even without knowing P1 or P2, attacker can easily use frequency analysis to discover both

◮ Solution: Use additional IV that changes for every encryption

slide-35
SLIDE 35

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

35/51

When can key re-use attack be successful if IV is used? (question)

If a stream cipher is using a n-bit IV, but the same key, under what conditions is a key re-use attack possible? Assume the IV increments every time an encrypt operation is performed.

slide-36
SLIDE 36

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

36/51

Contents

Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

slide-37
SLIDE 37

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

37/51

DES and Real Brute Force Attacks

◮ DES is 64-bit block cipher with 56-bit (effective) key length ◮ Developed in 1977, recommended standard until 1990’s ◮ Brute force: 256 operations ◮ Hardware built to perform brute force attack

◮ 1998: DeepCrack ◮ 2006: COPACABANA

slide-38
SLIDE 38

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

38/51

DeepCrack by EFF, 1998

◮ Developed by EFF ◮ Cost less than $US250,000 ◮ 80 × 109 keys/sec ◮ Solved DES challenge in 56 hours ◮ See www.cryptography.com and www.eff.org

slide-39
SLIDE 39

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

39/51

COPACABANA by SciEngines, 2006

◮ Joint effort by SciEngines and German universities ◮ 120 FPGA, 400 × 106 keys/sec/FPGA ◮ For comparison, a Pentium 4: 2 × 106 keys/sec ◮ Brute force DES in 8.6 days ◮ Cost about $US10,000 ◮ See www.sciengines.com

slide-40
SLIDE 40

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

40/51

Can We Estimate Cost Today?

◮ Moore’s law: computers double speed every 1.5 years ◮ Alternative: computers halve in cost every 1.5 years ◮ $US10,000 to brute force DES in 2006 ◮ Cost has halved about 10 times ◮ Cost to brute force DES in 2020: $10

slide-41
SLIDE 41

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

41/51

Contents

Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

slide-42
SLIDE 42

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

42/51

RIVYERA S3-5000 by SciEngines, 2013

◮ Rivyera S3 supported up to 128 Xilinx Spartan-3 FPGAs ◮ Approx $100 per FPGA (XCS5000) ◮ AES-128 Brute Force

◮ 500 × 106 keys per sec ◮ 4 × 106 keys per mW

◮ Biclique Attack

◮ 945 × 106 keys per sec ◮ 7.3 × 106 keys per mW

slide-43
SLIDE 43

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

43/51

Breaking AES-128 in 2020

◮ AES-128 has key space of 2128 ◮ 2013: $US12,800 for 5 × 108 k/s ◮ Assume: computers double speed every 1.5 years ◮ 2020: Increase by 25 = 32; 1.6 × 1010 k/s

◮ $12,800: 6.7 × 1020 years ◮ $12,800,000: 6.7 × 1017 years ◮ $12,800,000,000: 6.7 × 1014 years

◮ Biclique attack about 2 to 4 times faster, but requires 288 known plaintext/ciphertext pairs ◮ In 2035, cost $12,800,000,000 to brute force AES-128 in 670,000,000,000 years

slide-44
SLIDE 44

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

44/51

Contents

Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

slide-45
SLIDE 45

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

45/51

Double Encryption Concept

◮ Encrypt plaintext with one key, then encrypt output with another key ◮ Advantage: doubles the key length

◮ Single version of cipher has k-bit key ◮ Double version of cipher uses two different k-bit keys ◮ Worst case brute force: 22k

◮ Advantage: uses an existing cipher ◮ Disadvantage: doubles the processing time ◮ Problem: double encryption is subject to meet-in-the-middle attack

slide-46
SLIDE 46

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

46/51

Meet-in-the-Middle Attack

◮ Double Encryption where key K is k-bits: C = E(K2, E(K1, P)) ◮ Say X = E(K1, P) = D(K2, C) ◮ Attacker knows two plaintext, ciphertext pairs (Pa, Ca) and (Pb, Cb)

  • 1. Encrypt Pa using all 2k values of K1 to get multiple

values of X

  • 2. Store results in table and sort by X
  • 3. Decrypt Ca using all 2k values of K2
  • 4. As each decryption result produced, check against table
  • 5. If match, check current K1, K2 on Cb. If Pb obtained,

then accept the keys

◮ With two known plaintext, ciphertext pairs, probability

  • f successful attack is almost 1

◮ Encrypt/decrypt operations required: ≈ 2 × 2k (twice as many as single encryption)

slide-47
SLIDE 47

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

47/51

Example 5-bit Block Cipher

slide-48
SLIDE 48

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

48/51

Meet-in-the-Middle Attack (exercise)

The figure on slide 47 shows an example 5-bit block cipher, referred to as Bob’s Cipher. A double version of Bob’s cipher, called Double-Bob, was used by two users to exchange multiple encrypted messages using the same 6-bit secret key. You have obtained the plaintext/ciphertext pairs

  • f two of those messages: (P1, C1) = (01101, 11111) and

(P2, C2) = (11001, 11011). Using a meet-in-the-middle attack, find the secret key.

slide-49
SLIDE 49

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

49/51

Triple Encryption Concept

◮ Two variations:

◮ Use 2 keys, e.g. Triple-DES 112 bits ◮ Use 3 keys, e.g. Triple-DES 168 bits

◮ Why E-D-E? To be compatible with single DES: C = E(K1, D(K1, E(K1, P))) = E(K1, P) ◮ Problem: 3 times slower than single DES

slide-50
SLIDE 50

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

50/51

Contents

Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

slide-51
SLIDE 51

Cryptography Encryption and Attacks Encryption Building Blocks Attacks on Encryption Block Cipher Design Principles Stream Cipher Design Principles Example: Brute Force on DES Example: Brute Force on AES Example: Meet-in-the-Middle Attack Example: Cryptanalysis on Triple-DES and AES

51/51

Cryptanalysis of Triple-DES and AES

Cipher Method Key Required resources: space Time Memory Known data DES Brute force 256 256

  • 3DES

MITM 2168 2111 256 22 3DES Lucks 2168 2113 288 232 AES 128 Biclique 2128 2126.1 28 288 AES 256 Biclique 2256 2254.4 28 240 ◮ Known data: chosen pairs of (plaintext, ciphertext) ◮ MITM: Meet-in-the-middle ◮ Lucks: S. Lucks, Attacking Triple Encryption, in Fast Software Encryption, Springer, 1998 ◮ Biclique: Bogdanov, Khovratovich and Rechberger, Biclique Cryptanalysis of the Full AES, in ASIACRYPT2011, Springer, 2011