Block Cipher Cryptanalysis: Basic and Advanced Techniques - - PowerPoint PPT Presentation

block cipher cryptanalysis basic and advanced techniques
SMART_READER_LITE
LIVE PREVIEW

Block Cipher Cryptanalysis: Basic and Advanced Techniques - - PowerPoint PPT Presentation

Block Cipher Cryptanalysis: Basic and Advanced Techniques I & II Andrey Bogdanov KU Leuven, ESAT/COSIC Outline I. Block Ciphers II.


slide-1
SLIDE 1

Block ¡Cipher ¡Cryptanalysis: ¡ ¡ Basic ¡and ¡Advanced ¡Techniques ¡I ¡& ¡II ¡ ¡

Andrey ¡Bogdanov ¡ KU ¡Leuven, ¡ESAT/COSIC ¡

slide-2
SLIDE 2

Outline ¡

  • I. ¡ ¡ ¡Block ¡Ciphers ¡
  • II. ¡ ¡Basic ¡Technique ¡1: ¡Linear ¡Cryptanalysis ¡
  • III. ¡Advanced ¡Technique ¡1: ¡Zero-­‑CorrelaHon ¡Cryptanalysis ¡
  • IV. ¡Basic ¡Technique ¡2: ¡Meet-­‑in-­‑the-­‑Middle ¡Cryptanalysis ¡
  • V. ¡ ¡Advanced ¡Technique ¡2: ¡Biclique ¡MITM ¡Cryptanalysis ¡

¡

slide-3
SLIDE 3

Outline ¡

  • I. ¡ ¡ ¡Block ¡Ciphers ¡
  • II. ¡ ¡Basic ¡Technique ¡1: ¡Linear ¡Cryptanalysis ¡
  • III. ¡Advanced ¡Technique ¡1: ¡Zero-­‑CorrelaHon ¡Cryptanalysis ¡
  • IV. ¡Basic ¡Technique ¡2: ¡Meet-­‑in-­‑the-­‑Middle ¡Cryptanalysis ¡
  • V. ¡ ¡Advanced ¡Technique ¡2: ¡Biclique ¡MITM ¡Cryptanalysis ¡

¡

slide-4
SLIDE 4

Block ¡Ciphers: ¡ MoHvaHon ¡

  • Most ¡basic ¡security ¡primiHves ¡in ¡nearly ¡all ¡security ¡

soluHons, ¡e.g. ¡used ¡for ¡construcHng ¡

– stream ¡ciphers, ¡ ¡ – hash ¡funcHons, ¡ – message ¡authenHcaHon ¡codes, ¡ ¡ – authenHcated ¡encrypHon ¡algorithms, ¡ ¡ – pseudo ¡random ¡number ¡generators, ¡ – entropy ¡extractors, ¡… ¡

  • Probably ¡the ¡best ¡understood ¡cryptographic ¡primiHves ¡

today ¡

  • All ¡U.S. ¡symmetric-­‑key ¡encrypHon ¡standards ¡and ¡

recommendaHons ¡have ¡block ¡ciphers ¡at ¡their ¡core: ¡ DES, ¡AES ¡

slide-5
SLIDE 5

Block ¡Ciphers: ¡ A ¡DefiniHon ¡ ¡

Block ¡cipher ¡ ¡A ¡block ¡cipher ¡with ¡n-­‑bit ¡block ¡and ¡k-­‑bit ¡key ¡is ¡ a ¡subset ¡of ¡2k ¡permuta9ons ¡among ¡all ¡2n! ¡ permuta9ons ¡on ¡n ¡bits. ¡ ¡

block ¡cipher ¡ n ¡bits ¡ n ¡bits ¡ k ¡bits ¡ plaintext ¡ ciphertext ¡ key ¡

2n! ¡

Subset: ¡2k ¡

slide-6
SLIDE 6

f1 ¡

plaintext ¡ ciphertext ¡ user-­‑supplied ¡(master) ¡key ¡

Block ¡Ciphers: ¡ IteraHve ¡ConstrucHon ¡ ¡

Itera2ve ¡block ¡cipher ¡and ¡key ¡schedule ¡ ¡An ¡itera9ve ¡block ¡cipher ¡consists ¡of ¡r ¡ consecu9ve ¡applica9ons ¡of ¡simpler ¡key-­‑ dependent ¡transforms ¡ ¡ ¡

f2 ¡ fr ¡

key ¡schedule ¡ ¡… ¡ e ¡ ¡x ¡ ¡p ¡ ¡a ¡ ¡n ¡ ¡d ¡ ¡e ¡ ¡d ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡k ¡ ¡e ¡ ¡y ¡

slide-7
SLIDE 7

Components ¡for ¡Block ¡Ciphers: ¡ ¡ SubsHtuHon-­‑PermutaHon ¡(SP) ¡ FuncHon ¡

Linear ¡diffusion ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡

addiHon ¡with ¡subkey ¡ linear ¡operaHon: ¡ bit ¡permutaHon, ¡ ¡ matrix-­‑vector ¡mult. ¡ local ¡nonlinear ¡funcHons ¡ Used ¡in ¡many ¡ciphers ¡(DES, ¡AES, ¡Serpent, ¡Present, ¡Camellia, ¡Clefia,…) ¡ and ¡hash ¡funcHons ¡(Whirlwind, ¡Groestl, ¡Spongent, ¡Photon, ¡…) ¡

slide-8
SLIDE 8

Linear ¡diffusion ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡

Components ¡for ¡Block ¡Ciphers: ¡ ¡ SubsHtuHon-­‑PermutaHon-­‑SubsHtuHon ¡ (SPS) ¡FuncHon ¡

Used ¡in ¡E2, ¡Piccolo, ¡and ¡some ¡other ¡ciphers ¡ ¡

slide-9
SLIDE 9

Round ¡ConstrucHons ¡for ¡Block ¡Ciphers: ¡ Balanced ¡and ¡Generalized ¡Feistels ¡ ¡ ¡ ¡ ¡ ¡

¡Balanced ¡Feistel ¡ Network ¡(BFN) ¡

F ¡ F ¡ F ¡

¡Generalized ¡Feistel ¡Network ¡(GFN) ¡ – ¡type-­‑II ¡4-­‑line ¡GFN ¡ Used ¡in ¡DES, ¡Camellia, ¡E2, ¡ Blowfish, ¡Twofish, ¡CAST128, ¡ ¡ KASUMI, ¡MISTY, ¡… ¡ Used ¡in ¡CLEFIA, ¡ SHAvite-­‑3, ¡RC6,… ¡

slide-10
SLIDE 10

Round ¡ConstrucHons ¡for ¡Block ¡Ciphers: ¡ SubsHtuHon-­‑PermutaHon ¡Networks ¡ ¡ ¡ ¡ ¡

1 ¡round ¡= ¡1 ¡SP-­‑funcHon ¡

Linear ¡diffusion ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡

Used ¡in ¡AES, ¡Rijndael, ¡Serpent, ¡Present, ¡Groestl, ¡ Photon, ¡Spongent, ¡… ¡ ¡

slide-11
SLIDE 11

Block ¡Ciphers: ¡ Some ¡Agack ¡Approaches ¡ ¡

  • DifferenHal ¡cryptanalysis ¡
  • Linear ¡cryptanalysis ¡
  • Extensions ¡of ¡differenHal ¡cryptanalysis ¡ ¡

– Truncated, ¡impossible, ¡higher-­‑order ¡differenHal ¡cryptanalysis, ¡ boomerang ¡agacks ¡

  • Extensions ¡of ¡linear ¡cryptanalysis ¡

– MulHple-­‑approximaHon, ¡zero-­‑correlaHon ¡linear ¡cryptanalysis ¡

  • DifferenHal-­‑linear ¡agacks ¡
  • Integral ¡agacks ¡
  • Slide ¡agacks ¡
  • Meet-­‑in-­‑the-­‑middle ¡agacks ¡
  • Weaker ¡agack ¡models: ¡related-­‑key, ¡known-­‑key, ¡chosen-­‑key ¡
  • And ¡many ¡more ¡… ¡

¡

slide-12
SLIDE 12

Block ¡Ciphers: ¡ Some ¡Agack ¡Approaches ¡ ¡

  • DifferenHal ¡cryptanalysis ¡
  • Linear ¡cryptanalysis ¡
  • Extensions ¡of ¡differenHal ¡cryptanalysis ¡ ¡

– Truncated, ¡impossible, ¡higher-­‑order ¡differenHal ¡cryptanalysis, ¡ boomerang ¡agacks ¡

  • Extensions ¡of ¡linear ¡cryptanalysis ¡

– MulHple-­‑approximaHon, ¡zero-­‑correlaHon ¡linear ¡cryptanalysis ¡ ¡

  • DifferenHal-­‑linear ¡agacks ¡
  • Integral ¡agacks ¡
  • Slide ¡agacks ¡
  • Meet-­‑in-­‑the-­‑middle ¡agacks ¡
  • Weaker ¡agack ¡models: ¡related-­‑key, ¡known-­‑key, ¡chosen-­‑key ¡
  • And ¡many ¡more ¡… ¡

¡

slide-13
SLIDE 13

Block ¡Ciphers: ¡ Some ¡Agack ¡Approaches ¡ ¡

  • DifferenHal ¡cryptanalysis ¡
  • Linear ¡cryptanalysis ¡
  • Extensions ¡of ¡differenHal ¡cryptanalysis ¡ ¡

– Truncated, ¡impossible, ¡higher-­‑order ¡differenHal ¡cryptanalysis, ¡ boomerang ¡agacks ¡

  • Extensions ¡of ¡linear ¡cryptanalysis ¡

– MulHple-­‑approximaHon, ¡zero-­‑correlaHon ¡linear ¡cryptanalysis ¡ ¡

  • DifferenHal-­‑linear ¡agacks ¡
  • Integral ¡agacks ¡
  • Slide ¡agacks ¡
  • Meet-­‑in-­‑the-­‑middle ¡agacks ¡
  • Weaker ¡agack ¡models: ¡related-­‑key, ¡known-­‑key, ¡chosen-­‑key ¡
  • And ¡many ¡more ¡… ¡

¡

slide-14
SLIDE 14

Block ¡Ciphers: ¡ Some ¡Agack ¡Approaches ¡ ¡

  • DifferenHal ¡cryptanalysis ¡
  • Linear ¡cryptanalysis ¡
  • Extensions ¡of ¡differenHal ¡cryptanalysis ¡ ¡

– Truncated, ¡impossible, ¡higher-­‑order ¡differenHal ¡cryptanalysis, ¡ boomerang ¡agacks ¡

  • Extensions ¡of ¡linear ¡cryptanalysis ¡

– MulHple-­‑approximaHon, ¡zero-­‑correlaHon ¡linear ¡cryptanalysis ¡ ¡

  • DifferenHal-­‑linear ¡agacks ¡
  • Integral ¡agacks ¡
  • Slide ¡agacks ¡
  • Meet-­‑in-­‑the-­‑middle ¡agacks ¡
  • Weaker ¡agack ¡models: ¡related-­‑key, ¡known-­‑key, ¡chosen-­‑key ¡
  • And ¡many ¡more ¡… ¡
slide-15
SLIDE 15

Outline ¡

  • I. ¡ ¡ ¡Block ¡Ciphers ¡
  • II. ¡ ¡Basic ¡Technique ¡1: ¡Linear ¡Cryptanalysis ¡
  • III. ¡Advanced ¡Technique ¡1: ¡Zero-­‑CorrelaHon ¡Cryptanalysis ¡
  • IV. ¡Basic ¡Technique ¡2: ¡Meet-­‑in-­‑the-­‑Middle ¡Cryptanalysis ¡
  • V. ¡ ¡Advanced ¡Technique ¡2: ¡Biclique ¡MITM ¡Cryptanalysis ¡

¡

slide-16
SLIDE 16

Linear ¡Cryptanalysis ¡As ¡a ¡Basic ¡Tool ¡

AcHon ¡of ¡an ¡n-­‑bit ¡block ¡cipher ¡on ¡plaintext ¡P: ¡ Input ¡and ¡output ¡linear ¡masks: ¡ , Linear ¡approxima2on ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡: ¡ Probability ¡of ¡linear ¡approximaHon: ¡ Correla2on ¡of ¡linear ¡approximaHon: ¡ ¡varies ¡from ¡-­‑1 ¡to ¡1 ¡

fK fK

slide-17
SLIDE 17

¡Linear ¡Cryptanalysis: ¡ ¡ ¡DistribuHon ¡of ¡CorrelaHon ¡

  • Fix ¡a ¡non-­‑trivial ¡approximaHon ¡
  • Randomly ¡choose ¡an ¡n-­‑bit ¡permutaHon ¡
  • What ¡is ¡the ¡probability ¡for ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡to ¡have ¡a ¡

parHcular ¡value? ¡[O94] ¡(over ¡all ¡permutaHons) ¡

  • Normal ¡approximaHon ¡[DR07]: ¡
slide-18
SLIDE 18

Linear ¡Cryptanalysis: ¡ ¡ DistribuHon ¡of ¡CorrelaHon ¡

  • Fix ¡an ¡n-­‑bit ¡permutaHon ¡
  • What ¡is ¡the ¡expected ¡probability ¡for ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡to ¡

have ¡a ¡parHcular ¡value? ¡[BT11] ¡(over ¡all ¡masks) ¡

  • Normal ¡approximaHon: ¡
  • The ¡distribuHon ¡holds ¡already ¡for ¡just ¡a ¡single ¡

randomly ¡picked ¡permutaHon ¡with ¡n=8 ¡ (experiments) ¡

slide-19
SLIDE 19

Linear ¡Cryptanalysis: ¡ ¡ DistribuHon ¡of ¡CorrelaHon ¡

  • Two ¡more ¡observaHons: ¡

– Zero ¡is ¡the ¡most ¡frequent ¡single ¡correlaHon ¡value ¡ – For ¡a ¡randomly ¡drawn ¡permutaHon, ¡a ¡non-­‑trivial ¡ linear ¡approximaHon ¡is ¡unlikely ¡to ¡have ¡ correlaHon ¡significantly ¡deviaHng ¡from ¡0 ¡ ¡

  • For ¡permutaHons ¡with ¡structure, ¡however, ¡non-­‑

trivial ¡linear ¡approximaHons ¡with ¡high ¡deviaHon ¡of ¡ correlaHon ¡from ¡zero ¡might ¡exist ¡for ¡each ¡key ¡

slide-20
SLIDE 20

Linear ¡Cryptanalysis: ¡ ¡ Procedure ¡of ¡Matsui’s ¡Algorithm ¡2 ¡[M93] ¡

  • Let ¡a ¡linear ¡approximaHon ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡be ¡over ¡all ¡but ¡

last ¡round ¡of ¡an ¡iteraHve ¡block ¡cipher ¡ ¡ ¡

  • N ¡plaintext-­‑ciphertext ¡pairs ¡given ¡for ¡right ¡key ¡k0 ¡
  • For ¡each ¡key ¡guess ¡of ¡the ¡last ¡round ¡ki, ¡parHally ¡

decrypt ¡from ¡C ¡to ¡V ¡in ¡each ¡text ¡pair ¡and ¡count ¡the ¡ number ¡of ¡Hmes ¡Ti ¡ ¡the ¡approximaHon ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡is ¡ saHsfied ¡

  • We ¡want ¡T0 ¡(corresponding ¡to ¡right ¡key ¡k0) ¡to ¡deviate ¡

from ¡N/2 ¡significantly ¡

¡

all ¡but ¡last ¡round ¡ ¡ last ¡round ¡ with ¡key ¡k ¡

slide-21
SLIDE 21

Linear ¡Cryptanalysis: ¡ ¡ The ¡NoHon ¡of ¡Advantage ¡[S08] ¡

  • For ¡instance, ¡we ¡want ¡T0 ¡be ¡among ¡the ¡top ¡ ¡ ¡ ¡ ¡ ¡ ¡

counters ¡Ti ¡ ¡for ¡p>1/2 ¡

  • Say, ¡we ¡guess ¡m ¡bits ¡in ¡the ¡last ¡round ¡key, ¡i.e. ¡there ¡

are ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡candidates ¡ ¡

  • Advantage ¡a ¡is ¡the ¡number ¡of ¡bits ¡gained ¡

¡ ¡

  • Sample ¡correla2on ¡of ¡a ¡linear ¡approximaHon: ¡ ¡

¡ ¡ ¡

a = m − r 2Ti N − 1

slide-22
SLIDE 22

Linear ¡Cryptanalysis: ¡ DistribuHon ¡of ¡Sample ¡CorrelaHon ¡[S08] ¡

mean ¡0, ¡variance ¡1/N ¡ mean ¡C0, ¡variance ¡1/N ¡

slide-23
SLIDE 23

Linear ¡Cryptanalysis: ¡ DistribuHon ¡of ¡Sample ¡CorrelaHon ¡[BT11] ¡

mean ¡C‘, ¡variance ¡1/N ¡ mean ¡C0, ¡variance ¡1/N ¡

slide-24
SLIDE 24

Linear ¡Cryptanalysis: ¡ DistribuHon ¡of ¡Sample ¡CorrelaHon ¡[BT11] ¡

mean ¡C‘‘, ¡variance ¡1/N ¡ mean ¡C0, ¡variance ¡1/N ¡

slide-25
SLIDE 25

Linear ¡Cryptanalysis: ¡ Wrong ¡Key ¡RandomizaHon ¡Hypothesis ¡ [BT11] ¡

slide-26
SLIDE 26

Linear ¡Cryptanalysis: ¡ ¡ Probability ¡of ¡Success ¡vs ¡Data ¡Complexity ¡ [BT11] ¡

  • If: ¡

– This ¡wrong ¡key ¡randomizaHon ¡hypothesis ¡holds ¡ – Counters ¡Ti ¡are ¡independent ¡ – N ¡is ¡sufficiently ¡large ¡

  • Then ¡the ¡success ¡probability ¡PS ¡ ¡is ¡

¡ ¡

¡ PS ≈ Φ |c| √ N − r 1 + N 2n Φ−1(1 − 2−a−1) !

slide-27
SLIDE 27

Linear ¡Cryptanalysis: ¡ ¡ Trails ¡and ¡Hulls ¡

Linear ¡diffusion ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ Linear ¡diffusion ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ S ¡ Key ¡schedule ¡map ¡ Key ¡schedule ¡map ¡

Rounds ¡in ¡a ¡key-­‑alterna*ng ¡block ¡cipher ¡look ¡like: ¡ ¡

slide-28
SLIDE 28

Linear ¡Cryptanalysis: ¡ ¡ Linear ¡Trails ¡

  • IteraHve ¡structure ¡of ¡a ¡block ¡cipher: ¡

¡

  • CorrelaHon ¡of ¡a ¡linear ¡approximaHon ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡over ¡
  • ne ¡round ¡ ¡ ¡ ¡ ¡ ¡: ¡

¡ ¡ ¡ ¡ ¡Linear ¡trail: ¡ ¡

… ¡

slide-29
SLIDE 29

Linear ¡Cryptanalysis: ¡ ¡ Linear ¡Hulls ¡

  • Linear ¡hull ¡= ¡linear ¡approximaHon ¡of ¡an ¡iteraHve ¡

block ¡cipher ¡

  • Linear ¡hull ¡contains ¡many ¡linear ¡trails ¡U ¡
  • Each ¡U ¡has ¡its ¡correlaHon ¡contribuHon ¡CU ¡
  • CorrelaHon ¡of ¡linear ¡hull ¡
slide-30
SLIDE 30

Linear ¡Cryptanalysis: ¡ ¡ Linear ¡Hulls ¡[D94], ¡[DR02] ¡

  • The ¡correlaHon ¡of ¡a ¡linear ¡hull ¡in ¡a ¡key-­‑alternaHng ¡

block ¡cipher ¡can ¡be ¡computed ¡as ¡ ¡

– dU ¡is ¡the ¡sign ¡of ¡correlaHon ¡contribuHon ¡for ¡key ¡0 ¡ – K ¡is ¡the ¡expanded ¡key ¡ – The ¡sum ¡is ¡over ¡all ¡compaHble ¡linear ¡trails ¡

  • Thus, ¡the ¡correlaHon ¡value ¡varies ¡due ¡to ¡the ¡key ¡only ¡

¡

slide-31
SLIDE 31

Linear ¡Cryptanalysis: ¡ ¡ Linear ¡Hulls ¡[L11], ¡[O09] ¡

  • For ¡vast ¡classes ¡of ¡keys, ¡the ¡correlaHon ¡value ¡can ¡

deviate ¡greatly ¡from ¡the ¡ ¡average ¡over ¡all ¡keys ¡

  • CorrelaHon ¡amplificaHon ¡[O09] ¡for ¡PRESENT ¡

¡

slide-32
SLIDE 32

Linear ¡vs ¡DifferenHal ¡Cryptanalysis ¡

  • Propaga9on ¡of ¡differences ¡instead ¡of ¡combining ¡

linear ¡masks ¡

  • Differen9al ¡trails ¡instead ¡of ¡linear ¡trails ¡
  • Differen9als ¡instead ¡of ¡linear ¡hulls ¡
  • ComposiHon: ¡MulHplicaHon ¡of ¡probabili9es ¡instead ¡
  • f ¡correlaHons ¡
slide-33
SLIDE 33

Linear ¡and ¡DifferenHal ¡Cryptanalysis: ¡ # ¡AcHve ¡S-­‑Boxes ¡in ¡a ¡Trail ¡as ¡Goodness ¡ Measure ¡ ¡

  • Ac2ve ¡S-­‑box ¡ ¡

S-­‑box ¡involved ¡into ¡the ¡trail ¡ Corresponds ¡to ¡a ¡nonzero ¡component ¡of ¡a ¡trail ¡ ¡

  • #ac2ve ¡S-­‑boxes ¡in ¡a ¡trail ¡is ¡related ¡to ¡the ¡

maximum ¡expected ¡trail ¡probability ¡(METP) ¡

slide-34
SLIDE 34

Outline ¡

  • I. ¡ ¡ ¡Block ¡Ciphers ¡
  • II. ¡ ¡Basic ¡Technique ¡1: ¡Linear ¡Cryptanalysis ¡
  • III. ¡Advanced ¡Technique ¡1: ¡Zero-­‑Correla2on ¡Cryptanalysis ¡
  • IV. ¡Basic ¡Technique ¡2: ¡Meet-­‑in-­‑the-­‑Middle ¡Cryptanalysis ¡
  • V. ¡ ¡Advanced ¡Technique ¡2: ¡Biclique ¡MITM ¡Cryptanalysis ¡

¡

slide-35
SLIDE 35

Zero-­‑CorrelaHon: ¡ ¡Towards ¡Zero-­‑CorrelaHon ¡Cryptanalysis ¡

  • Standard ¡linear ¡cryptanalysis ¡tries ¡to ¡make ¡use ¡of ¡

linear ¡approximaHons ¡with ¡highly ¡nonzero ¡ correlaHon ¡values ¡

  • Zero ¡correlaHon ¡linear ¡cryptanalysis ¡uses ¡linear ¡

approximaHons ¡with ¡correlaHon ¡exactly ¡zero ¡

  • It ¡is ¡the ¡counterpart ¡of ¡impossible ¡differenHal ¡

cryptanalysis ¡in ¡the ¡domain ¡of ¡linear ¡cryptanalysis ¡

  • ¡Cf. ¡[ER10], ¡[CS11], ¡[RN11] ¡
slide-36
SLIDE 36

Zero-­‑CorrelaHon: ¡ ¡ SuscepHble ¡Structures ¡[BR11] ¡

  • Zero ¡correlaHon ¡linear ¡hulls ¡exist ¡in ¡many ¡popular ¡

cipher ¡construcHons: ¡ ¡

– Feistel ¡networks, ¡round-­‑reduced ¡Rijndael-­‑type ¡ciphers, ¡… ¡

Balanced ¡Feistel ¡ CAST256 ¡ Skipjack ¡(Rule ¡A) ¡ CLEFIA ¡

slide-37
SLIDE 37

Zero-­‑CorrelaHon: ¡ Zero-­‑CorrelaHon ¡Linear ¡Hulls ¡[BR11] ¡

  • 5 ¡rounds ¡of ¡balanced ¡Feistel ¡with ¡bijecHve ¡funcHons: ¡
slide-38
SLIDE 38

Zero-­‑CorrelaHon: ¡ Key ¡Recovery ¡[BR11] ¡

slide-39
SLIDE 39

Zero-­‑CorrelaHon: ¡ ¡DisHnguishing ¡Test ¡[BW12] ¡

  • Underlying ¡staHsHc: ¡

– ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡= ¡number ¡of ¡known ¡PC ¡pairs ¡available ¡ – ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡= ¡number ¡of ¡zero-­‑correlaHon ¡linear ¡hulls ¡used ¡ – ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡= ¡counter ¡for ¡approximaHon ¡i ¡

  • Two ¡disHnct ¡distribuHons: ¡

¡

¡

¡

¡

for ¡wrong ¡keys ¡ for ¡the ¡right ¡key ¡

slide-40
SLIDE 40

Zero-­‑CorrelaHon: ¡ DisHnguishing ¡Complexity ¡[BW12] ¡

  • Proposi*on: ¡DisHnguisher ¡works ¡if ¡

¡ ¡ ¡ ¡ ¡where: ¡

– ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡and ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡= ¡quanHles ¡of ¡std. ¡norm. ¡dist. ¡ – ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡= ¡failure ¡probability ¡of ¡agack ¡ – ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡= ¡proporHon ¡of ¡surviving ¡keys ¡ – ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡= ¡number ¡of ¡known ¡PC ¡pairs ¡available ¡ – ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡= ¡number ¡of ¡zero-­‑correlaHon ¡linear ¡approx. ¡used ¡

¡

¡

  • ¡ ¡ ¡Less ¡formally: ¡

¡

slide-41
SLIDE 41

Zero-­‑CorrelaHon: ¡ TEA ¡

  • ¡64 ¡rounds ¡ ¡
  • ¡Feistel-­‑type ¡network ¡with ¡ARX ¡
  • ¡by ¡Wheeler ¡and ¡Needham ¡at ¡FSE’94 ¡
  • ¡key ¡length ¡128 ¡bit ¡
  • ¡effecHve ¡key ¡length ¡126 ¡bit ¡ ¡
slide-42
SLIDE 42

Zero-­‑CorrelaHon: ¡ 14R ¡ZC ¡Linear ¡Hulls ¡for ¡TEA/XTEA ¡[BW12] ¡

slide-43
SLIDE 43

Zero-­‑CorrelaHon: ¡ 21R ¡ZC ¡Linear ¡Agack ¡on ¡TEA ¡[BW12] ¡

slide-44
SLIDE 44

Zero-­‑CorrelaHon: ¡ ApplicaHon ¡to ¡TEA ¡and ¡XTEA ¡[BW12] ¡

slide-45
SLIDE 45

Skipjack-­‑ABABABAB ¡ Skipjack-­‑AABBAABB ¡

slide-46
SLIDE 46

Zero-­‑CorrelaHon: ¡ ApplicaHon ¡to ¡Skipjack ¡Variants ¡

  • Skipjack-­‑AABBAABB ¡(original): ¡ ¡

– 17-­‑R ¡ZC ¡linear ¡approximaHon ¡(a,0,0,0)→(b,b,0,0) ¡ ¡ – 24-­‑R ¡impossible ¡differenHal ¡(0,a,0,0)→(b,0,0,0) ¡

  • Skipjack-­‑AAAAAAAA: ¡

– 16-­‑R ¡ZC ¡ ¡linear ¡approximaHon ¡(a,0,0,0)→(b,b,0,0) ¡ – 16-­‑R ¡impossible ¡differenHal ¡(0,a,0,0)→(b,b,0,0) ¡

  • Skipjack-­‑BBBBBBBB: ¡

– 16-­‑R ¡ZC ¡linear ¡approximaHon ¡(a,a,0,0)→(0,b,0,0) ¡ – 16-­‑R ¡impossible ¡differenHal ¡(a,a,0,0)→(b,0,0,0) ¡

  • Skipjack-­‑BABABABA: ¡

– 30-­‑R ¡ZC ¡linear ¡approximaHon ¡(a,a,0,0)→(b,b,0,0) ¡ – 21-­‑R ¡impossible ¡differenHal ¡(0,a,0,0)→(b,0,0,0) ¡

slide-47
SLIDE 47

Zero-­‑CorrelaHon: ¡ More ¡ApplicaHons ¡to ¡Feistels ¡

Four-­‑Cell ¡ Dual ¡Four-­‑Cell ¡ Best ¡known ¡impossible ¡differenHal: ¡18-­‑R ¡ Best ¡known ¡zero-­‑correlaHon ¡hull: ¡12-­‑R ¡ Best ¡known ¡impossible ¡differenHal: ¡12-­‑R ¡ Best ¡known ¡zero-­‑correlaHon ¡hull: ¡18-­‑R ¡

slide-48
SLIDE 48

Zero-­‑CorrelaHon: ¡ ¡ ¡The ¡Case ¡of ¡AES ¡[BR11] ¡

  • Round-­‑reduced ¡AES-­‑192 ¡and ¡AES-­‑256: ¡

¡ ¡

slide-49
SLIDE 49

Outline ¡

  • I. ¡ ¡ ¡Block ¡Ciphers ¡
  • II. ¡ ¡Basic ¡Technique ¡1: ¡Linear ¡Cryptanalysis ¡
  • III. ¡Advanced ¡Technique ¡1: ¡Zero-­‑Correla2on ¡Cryptanalysis ¡
  • IV. ¡Basic ¡Technique ¡2: ¡Meet-­‑in-­‑the-­‑Middle ¡Cryptanalysis ¡
  • V. ¡ ¡Advanced ¡Technique ¡2: ¡Biclique ¡MITM ¡Cryptanalysis ¡

¡

slide-50
SLIDE 50

¡MITM: ¡ Basics ¡

  • Guess ¡K1 ¡and ¡K2 ¡independently ¡
  • Compute ¡forwards ¡from ¡P ¡
  • Compute ¡backwards ¡from ¡C ¡
  • Matching ¡at ¡state ¡on ¡b ¡bits ¡
  • Complexity: ¡2|K1|+2|K2|+2|K|-­‑b ¡computaHons ¡

K1 ¡ K2 ¡

plaintext ¡P ¡ ciphertext ¡C ¡ b ¡

slide-51
SLIDE 51

MITM: ¡ ParHal ¡Matching ¡

  • Guess ¡K1 ¡and ¡K2 ¡independently ¡
  • Compute ¡forwards ¡from ¡P ¡
  • Compute ¡backwards ¡from ¡C ¡
  • Matching ¡at ¡part ¡of ¡state ¡on ¡m ¡bits ¡
  • Complexity: ¡2|K1|+2|K2|+2|K|-­‑m ¡computaHons ¡

plaintext ¡P ¡ ciphertext ¡C ¡ m ¡

K2 ¡ K1 ¡

parHal ¡matching, ¡m ¡< ¡b ¡

slide-52
SLIDE 52

MITM: ¡ IntersecHng ¡Key ¡Spaces ¡

  • 3 ¡key ¡spaces: ¡ ¡
  • A0 ¡(both ¡in ¡K1 ¡and ¡K2) ¡
  • A1(K1 ¡only), ¡A2 ¡(K2 ¡only) ¡
  • Guess ¡A0, ¡then ¡A1 ¡and ¡A2 ¡independently ¡
  • Complexity: ¡2|A0|(2|A1|+2|A2|)+2|K|-­‑m ¡

plaintext ¡P ¡ ciphertext ¡C ¡ m ¡

K1 ¡ K2 ¡

|K1 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡K2 ¡| ¡> ¡0 ¡ U ¡

slide-53
SLIDE 53

MITM: ¡ Splice ¡& ¡Cut ¡

  • Guess ¡A0, ¡then ¡A1 ¡and ¡A2 ¡independently ¡
  • Compute ¡forwards ¡from ¡splixng ¡point ¡
  • Compute ¡backwards ¡from ¡splixng ¡point ¡
  • Over ¡encrypHon/decrypHon ¡oracle! ¡
  • Complexity: ¡2|A0|(2|A1|+2|A2|)+2|K|-­‑m ¡

plaintexts ¡{P} ¡ ciphertexts ¡{C} ¡ m ¡ splixng ¡point ¡ encrypHon ¡oracle ¡

K2 ¡ K2 ¡ K1 ¡

slide-54
SLIDE 54

Outline ¡

  • I. ¡ ¡ ¡Block ¡Ciphers ¡
  • II. ¡ ¡Basic ¡Technique ¡1: ¡Linear ¡Cryptanalysis ¡
  • III. ¡Advanced ¡Technique ¡1: ¡Zero-­‑Correla2on ¡Cryptanalysis ¡
  • IV. ¡Basic ¡Technique ¡2: ¡Meet-­‑in-­‑the-­‑Middle ¡Cryptanalysis ¡
  • V. ¡ ¡Advanced ¡Technique ¡2: ¡Biclique ¡MITM ¡Cryptanalysis ¡

¡

slide-55
SLIDE 55

MITM: ¡ Bicliques ¡

  • Allow ¡all ¡key ¡bits ¡affect ¡a ¡part ¡of ¡the ¡cipher ¡
  • SHck ¡to ¡a ¡structure ¡to ¡enable ¡efficient ¡

enumeraHon ¡of ¡keys ¡and ¡states ¡in ¡this ¡part ¡

  • Structure ¡= ¡biclique! ¡

plaintexts ¡{P} ¡ ciphertexts ¡{C} ¡ m ¡ encrypHon ¡oracle ¡

K2 ¡ K2 ¡ K1 ¡ K ¡

all ¡key ¡bits ¡

slide-56
SLIDE 56

MITM: ¡ ¡ Biclique ¡= ¡Complete ¡BiparHte ¡Graph ¡

Biclique ¡of ¡dimension ¡3: ¡ 2·√23 ¡verHces ¡and ¡26 ¡edges ¡

slide-57
SLIDE 57

MITM: ¡ Involving ¡Bicliques ¡

slide-58
SLIDE 58

10+ ¡Years ¡of ¡AES-­‑128 ¡Cryptanalysis: ¡ Key ¡Recovery ¡in ¡Single-­‑Key ¡Model ¡

ASIACRYPT’10: ¡ ¡ Dunkelman ¡et ¡al ¡ FSE’00: ¡Ferguson ¡et ¡al ¡ ¡ ¡

10 ¡years ¡

A}er ¡10 ¡years ¡of ¡cryptanalysis, ¡sHll ¡7 ¡rounds ¡broken ¡only! ¡

slide-59
SLIDE 59

Some ¡Results ¡on ¡AES ¡[BKR11] ¡ (key ¡recovery) ¡

slide-60
SLIDE 60

Some ¡Results ¡on ¡AES ¡[BKR11] ¡ (key ¡recovery) ¡

slide-61
SLIDE 61

Biclique: ¡ ¡ Complete ¡BiparHte ¡Graph ¡

Biclique ¡of ¡dimension ¡3: ¡ 2·√23 ¡verHces ¡and ¡26 ¡edges ¡

slide-62
SLIDE 62

Biclique ¡Cryptanalysis: ¡ ¡ Overview ¡

Related ¡to ¡iniHal ¡structures ¡in ¡hash ¡funcHon ¡ cryptanalysis ¡ ¡

slide-63
SLIDE 63

Biclique ¡Cryptanalysis: ¡ The ¡Toolbox ¡of ¡Techniques ¡

  • Independent ¡bicliques ¡(of ¡higher ¡dimension) ¡
  • Bicliques ¡from ¡independent ¡related-­‑key ¡

differenHals ¡

  • Matching ¡with ¡precomutaHons ¡
  • Long ¡bicliques ¡(of ¡lower ¡dimension) ¡
  • Bicliques ¡from ¡interleaving ¡related-­‑key ¡

differenHals ¡

slide-64
SLIDE 64

Biclique ¡Cryptanalysis: ¡ The ¡Toolbox ¡of ¡Techniques ¡

  • Independent ¡bicliques ¡(of ¡higher ¡dimension) ¡
  • Bicliques ¡from ¡independent ¡related-­‑key ¡

differenHals ¡

  • Matching ¡with ¡precomutaHons ¡
  • Long ¡bicliques ¡(of ¡lower ¡dimension) ¡
  • Bicliques ¡from ¡interleaving ¡related-­‑key ¡

differenHals ¡

slide-65
SLIDE 65

Biclique ¡Cryptanalysis ¡of ¡AES-­‑128: ¡ Biclique ¡and ¡PrecomputaHons ¡

slide-66
SLIDE 66

Biclique ¡Cryptanalysis ¡of ¡AES-­‑128: ¡ Biclique ¡and ¡PrecomputaHons ¡

slide-67
SLIDE 67

Biclique ¡Cryptanalysis ¡of ¡AES-­‑128: ¡ Meet-­‑in-­‑the-­‑Middle ¡and ¡RecomputaHon ¡

Backward ¡direcHon: ¡ Forward ¡direcHon: ¡ Match ¡in ¡this ¡byte! ¡

slide-68
SLIDE 68

Biclique ¡Cryptanalysis ¡of ¡AES-­‑128: ¡ Bringing ¡It ¡All ¡Together ¡

Costs ¡ ¡of ¡recomputaHon: ¡ 3R ¡bicliue ¡of ¡dimension ¡8 ¡ 5R ¡backward ¡comput. ¡ 2R ¡forward ¡comput. ¡ 7R ¡matching ¡ 3.4375/12.5 ¡= ¡0.275 ¡AES ¡runs ¡per ¡key ¡

slide-69
SLIDE 69
  • ComputaHonal ¡complexity: ¡

Biclique ¡Cryptanalysis ¡of ¡AES-­‑128: ¡ ComplexiHes ¡

¡= ¡ ¡27 ¡(complexity ¡of ¡biclique ¡construcHon, ¡upper ¡bound) ¡ ¡= ¡ ¡27 ¡(complexity ¡of ¡precomputaHon) ¡

¡= ¡ ¡214.14 ¡(complexity ¡of ¡recomputaHon) ¡

¡= ¡ ¡28 ¡(complexity ¡of ¡handling ¡false ¡posiHves) ¡

= ¡ ¡128 ¡(key ¡bit ¡length) ¡ ¡ = ¡ ¡8 ¡(biclique ¡dimension) ¡

slide-70
SLIDE 70
  • Data ¡complexity: ¡

– 12 ¡bytes ¡(96 ¡bits) ¡of ¡the ¡ciphertext ¡affected ¡by ¡the ¡ forward ¡modificaHon ¡ – ¡Two ¡bytes ¡of ¡the ¡12 ¡bytes ¡are ¡equal ¡ – 288 ¡data ¡complexity ¡

  • Memory ¡complexity: ¡

– Dominated ¡by ¡29 ¡precomputaHons ¡in ¡each ¡key ¡ group ¡ – At ¡most ¡several ¡kB ¡

Biclique ¡Cryptanalysis ¡of ¡AES-­‑128: ¡ ComplexiHes ¡

slide-71
SLIDE 71

Bicliques: ¡ Some ¡QuesHons ¡

  • Can ¡we ¡reduce ¡the ¡data ¡complexity ¡of ¡biclique ¡

key ¡recovery ¡for ¡AES? ¡

  • Is ¡the ¡model ¡of ¡complexity ¡esHmaHon ¡(based ¡
  • n ¡counHng ¡# ¡recomputed ¡S-­‑boxes) ¡adequate ¡

in ¡real-­‑world? ¡

  • Can ¡bicliques ¡actually ¡compete ¡with ¡“smart” ¡

brute ¡force? ¡ ¡

slide-72
SLIDE 72

Bicliques: ¡ Some ¡QuesHons ¡

  • Can ¡we ¡reduce ¡the ¡data ¡complexity ¡of ¡biclique ¡

key ¡recovery ¡for ¡AES? ¡

  • Is ¡the ¡model ¡of ¡complexity ¡esHmaHon ¡(based ¡
  • n ¡counHng ¡# ¡recomputed ¡S-­‑boxes) ¡adequate ¡

in ¡real-­‑world? ¡

  • Can ¡bicliques ¡actually ¡compete ¡with ¡“smart” ¡

brute ¡force? ¡ ¡ All ¡ques*ons ¡can ¡be ¡answered ¡in ¡the ¡posi*ve! ¡

¡

slide-73
SLIDE 73

Bicliques: ¡ Lower ¡data ¡complexity ¡for ¡AES ¡

  • A ¡biclique ¡of ¡length ¡2 ¡rounds ¡can ¡be ¡

constructed ¡and ¡put ¡it ¡in ¡the ¡beginning ¡of ¡ AES-­‑128 ¡instead ¡of ¡the ¡final ¡rounds ¡

  • Key ¡recovery: ¡

– 2126.88 ¡computaHons ¡ ¡ – data ¡complexity ¡of ¡16 ¡chosen ¡PTs ¡(for ¡bilcique ¡ dimension ¡4) ¡ ¡ – success ¡probability ¡of ¡1 ¡

slide-74
SLIDE 74

Bicliques: ¡ Lower ¡data ¡complexity ¡for ¡AES ¡ ¡

slide-75
SLIDE 75

Bicliques: ¡ Hardware ¡architecture ¡

PrecomputaHon ¡ RecomputaHon ¡

slide-76
SLIDE 76

Bicliques: ¡ ImplementaHon ¡on ¡RIVYERA ¡

RIVYERA: ¡

  • FPGA-­‑based ¡compuHng ¡cluster ¡in ¡Bochum ¡
  • 128 ¡Xilinx ¡Spartan3 ¡XC3S500 ¡
  • Investment ¡of ¡about ¡$40K ¡per ¡machine ¡
slide-77
SLIDE 77

Bicliques: ¡ Real-­‑world ¡advantage ¡for ¡AES ¡

„Smart“ ¡brute ¡force: ¡

  • @263.16 ¡MHz ¡
  • 2 ¡pipelined ¡engines ¡

per ¡FPGA ¡ → ¡0.526 ¡Gkeys/sec ¡ Bicliques: ¡

  • @236.22 ¡MHz ¡
  • 4 ¡pipelined ¡engines ¡

per ¡FPGA ¡ → ¡0.945 ¡Gkeys/sec ¡ Factor ¡of ¡advantage ¡≈ ¡2 ¡

slide-78
SLIDE 78

Bicliques: ¡ A ¡sample ¡applicaHon ¡to ¡AES ¡

  • AES-­‑128 ¡with ¡a ¡key ¡entropy ¡reduced ¡to ¡e.g. ¡64 ¡bits: ¡

– WiFi ¡routers ¡ – ASCII ¡passwords ¡with ¡lower ¡entropy ¡ – Output ¡of ¡TRNGs ¡in ¡poor ¡condiHons ¡

  • 10 ¡RIVYERA ¡machines ¡break ¡it: ¡

– in ¡< ¡3 ¡months ¡Hme ¡ – with ¡ ¡$400K ¡investment ¡

  • 2 ¡RIVYERA ¡machines ¡break ¡it: ¡

– in ¡about ¡13 ¡months ¡Hme ¡ – with ¡$80K ¡investment ¡

slide-79
SLIDE 79

Instead ¡of ¡Conclusion ¡

  • DifferenHal ¡cryptanalysis ¡
  • Linear ¡cryptanalysis ¡
  • Extensions ¡of ¡differenHal ¡cryptanalysis ¡ ¡

– Truncated, ¡impossible, ¡higher-­‑order ¡differenHal ¡cryptanalysis, ¡ boomerang ¡agacks ¡

  • Extensions ¡of ¡linear ¡cryptanalysis ¡

– MulHple-­‑approximaHon, ¡zero-­‑correlaHon ¡linear ¡cryptanalysis ¡ ¡

  • DifferenHal-­‑linear ¡agacks ¡
  • Integral ¡agacks ¡
  • Slide ¡agacks ¡
  • Meet-­‑in-­‑the-­‑middle ¡agacks ¡
  • Weaker ¡agack ¡models: ¡related-­‑key, ¡known-­‑key, ¡chosen-­‑key ¡
  • And ¡many ¡more ¡… ¡