Block Cipher Cryptanalysis: Basic and Advanced Techniques - - PowerPoint PPT Presentation
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.
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 ¡
¡
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 ¡
¡
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 ¡
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 ¡
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 ¡
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, ¡…) ¡
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 ¡ ¡
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,… ¡
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, ¡… ¡ ¡
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 ¡… ¡
¡
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 ¡… ¡
¡
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 ¡… ¡
¡
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 ¡… ¡
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 ¡
¡
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
¡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]: ¡
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) ¡
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 ¡
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 ¡
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
Linear ¡Cryptanalysis: ¡ DistribuHon ¡of ¡Sample ¡CorrelaHon ¡[S08] ¡
mean ¡0, ¡variance ¡1/N ¡ mean ¡C0, ¡variance ¡1/N ¡
Linear ¡Cryptanalysis: ¡ DistribuHon ¡of ¡Sample ¡CorrelaHon ¡[BT11] ¡
mean ¡C‘, ¡variance ¡1/N ¡ mean ¡C0, ¡variance ¡1/N ¡
Linear ¡Cryptanalysis: ¡ DistribuHon ¡of ¡Sample ¡CorrelaHon ¡[BT11] ¡
mean ¡C‘‘, ¡variance ¡1/N ¡ mean ¡C0, ¡variance ¡1/N ¡
Linear ¡Cryptanalysis: ¡ Wrong ¡Key ¡RandomizaHon ¡Hypothesis ¡ [BT11] ¡
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) !
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: ¡ ¡
Linear ¡Cryptanalysis: ¡ ¡ Linear ¡Trails ¡
- IteraHve ¡structure ¡of ¡a ¡block ¡cipher: ¡
¡
- CorrelaHon ¡of ¡a ¡linear ¡approximaHon ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡over ¡
- ne ¡round ¡ ¡ ¡ ¡ ¡ ¡: ¡
¡ ¡ ¡ ¡ ¡Linear ¡trail: ¡ ¡
… ¡
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 ¡
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 ¡
¡
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 ¡
¡
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 ¡
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) ¡
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 ¡
¡
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] ¡
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 ¡
Zero-‑CorrelaHon: ¡ Zero-‑CorrelaHon ¡Linear ¡Hulls ¡[BR11] ¡
- 5 ¡rounds ¡of ¡balanced ¡Feistel ¡with ¡bijecHve ¡funcHons: ¡
Zero-‑CorrelaHon: ¡ Key ¡Recovery ¡[BR11] ¡
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 ¡
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: ¡
¡
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 ¡ ¡
Zero-‑CorrelaHon: ¡ 14R ¡ZC ¡Linear ¡Hulls ¡for ¡TEA/XTEA ¡[BW12] ¡
Zero-‑CorrelaHon: ¡ 21R ¡ZC ¡Linear ¡Agack ¡on ¡TEA ¡[BW12] ¡
Zero-‑CorrelaHon: ¡ ApplicaHon ¡to ¡TEA ¡and ¡XTEA ¡[BW12] ¡
Skipjack-‑ABABABAB ¡ Skipjack-‑AABBAABB ¡
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) ¡
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 ¡
Zero-‑CorrelaHon: ¡ ¡ ¡The ¡Case ¡of ¡AES ¡[BR11] ¡
- Round-‑reduced ¡AES-‑192 ¡and ¡AES-‑256: ¡
¡ ¡
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 ¡
¡
¡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 ¡
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 ¡
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 ¡
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 ¡
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 ¡
¡
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 ¡
MITM: ¡ ¡ Biclique ¡= ¡Complete ¡BiparHte ¡Graph ¡
Biclique ¡of ¡dimension ¡3: ¡ 2·√23 ¡verHces ¡and ¡26 ¡edges ¡
MITM: ¡ Involving ¡Bicliques ¡
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! ¡
Some ¡Results ¡on ¡AES ¡[BKR11] ¡ (key ¡recovery) ¡
Some ¡Results ¡on ¡AES ¡[BKR11] ¡ (key ¡recovery) ¡
Biclique: ¡ ¡ Complete ¡BiparHte ¡Graph ¡
Biclique ¡of ¡dimension ¡3: ¡ 2·√23 ¡verHces ¡and ¡26 ¡edges ¡
Biclique ¡Cryptanalysis: ¡ ¡ Overview ¡
Related ¡to ¡iniHal ¡structures ¡in ¡hash ¡funcHon ¡ cryptanalysis ¡ ¡
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 ¡
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 ¡
Biclique ¡Cryptanalysis ¡of ¡AES-‑128: ¡ Biclique ¡and ¡PrecomputaHons ¡
Biclique ¡Cryptanalysis ¡of ¡AES-‑128: ¡ Biclique ¡and ¡PrecomputaHons ¡
Biclique ¡Cryptanalysis ¡of ¡AES-‑128: ¡ Meet-‑in-‑the-‑Middle ¡and ¡RecomputaHon ¡
Backward ¡direcHon: ¡ Forward ¡direcHon: ¡ Match ¡in ¡this ¡byte! ¡
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 ¡
- 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) ¡
- 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 ¡
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? ¡ ¡
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! ¡
¡
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 ¡
Bicliques: ¡ Lower ¡data ¡complexity ¡for ¡AES ¡ ¡
Bicliques: ¡ Hardware ¡architecture ¡
PrecomputaHon ¡ RecomputaHon ¡
Bicliques: ¡ ImplementaHon ¡on ¡RIVYERA ¡
RIVYERA: ¡
- FPGA-‑based ¡compuHng ¡cluster ¡in ¡Bochum ¡
- 128 ¡Xilinx ¡Spartan3 ¡XC3S500 ¡
- Investment ¡of ¡about ¡$40K ¡per ¡machine ¡
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 ¡
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 ¡
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 ¡… ¡