Hash Days 11 Slides
Hash Days 11 Slides
Reality
Jean-Philippe Aumasson
1 / 54
2 / 54
3 / 54
4 / 54
Reality noun (pl. realities) 1. the state of things as they actually exist, as opposed to an idealistic or notional idea of them. 2. a thing that is actually experienced or seen. 3. the quality of being lifelike. 4. the state or quality of having existence or substance.
Compact Oxford English Dictionary
5 / 54
Cryptanalysis relies on an ATTACKER MODEL = assumptions on what the attacker can and cannot do All models are in simulacra, that is, simplied reections of reality, but, despite their inherent falsity, they are
6 / 54
Cryptanalysis usually excludes methods of attack that do not primarily target weaknesses in the actual cryptography, such as bribery, physical coercion,
burglary, keystroke logging, and social engineering, although these types of attack are an
important concern and are often more effective
Wikipedia
7 / 54
8 / 54
9 / 54
10 / 54
11 / 54
12 / 54
Models language overlaps with real-world language: attacks, broken have multiple meanings
13 / 54
14 / 54
15 / 54
Remainder of this talk PART 1: PHYSICAL ATTACKS Bypass and misuse Side channels PART 2: ALGORITHMIC ATTACKS State-of-the-ciphers Why attacks arent attacks Cognitive biases What about AES?
CONCLUSIONS
REFERENCES
16 / 54
17 / 54
HTTPS protection uses (say) 2048-bit RSA to authenticate servers, and to avoid MitM attacks
18 / 54
HTTPS protection uses (say) 2048-bit RSA to authenticate servers, and to avoid MitM attacks
18 / 54
HTTPS protection uses (say) 2048-bit RSA to authenticate servers, and to avoid MitM attacks
Or 20 by compromising a CA. . .
18 / 54
19 / 54
AES-256 provides 256-bit security (does it really?) FIPS 140-2 is supposed to inspire condence. . .
Yet secure USB drives by Kingston, SanDisk, Verbatim were easily broken
21 / 54
How NOT to use decent cryptographic primitives: ECDSA signing with a constant instead of a random number
to nd SONY PS3s private key
21 / 54
How NOT to use decent cryptographic primitives: ECDSA signing with a constant instead of a random number
to nd SONY PS3s private key
RC4 stream cipher with part of the key public and predictable (as found in the WEP WiFi protection)
21 / 54
How NOT to use decent cryptographic primitives: ECDSA signing with a constant instead of a random number
to nd SONY PS3s private key
RC4 stream cipher with part of the key public and predictable (as found in the WEP WiFi protection)
21 / 54
22 / 54
23 / 54
24 / 54
PART 2: ALGORITHMIC ATTACKS State-of-the-ciphers Why attacks arent attacks What about AES? Cognitive biases
25 / 54
ALGORITHMIC ATTACKS = attacks targetting a cryptographic function seen as an algorithm and described as algorithms rather than physical
procedures
ALGORITHMIC ATTACKS are thus independent of the implementation of the function attacked
26 / 54
Well focus on symmetric cryptographic primitives: Block ciphers Stream ciphers Hash functions PRNGs MACs
Though thered be a lot to say about public-key encryption/signatures, authentication protocols, etc.
27 / 54
28 / 54
Block cipher: DES (56-bit key): practical break by. . . bruteforce Stream cipher: A5/1 (GSM): attacks on GSM facilitated Hash function: MD5: famous rogue certicate attack PoC
29 / 54
CAST5 (default cipher in OpenPGP) IDEA (1991!) IDEA-NXT (aka FOX) Serpent (AES nalist) Twosh (AES nalist)
Stream ciphers:
Despite the large amount of research and new techniques, breaks almost never happen:
Why?
31 / 54
High-complexity attacks
Example: preimage attack on MD5 with time complexity
2123.4
against 2128 ideally High-complexity attacks do not matter as long as the effort is obviously unfeasible, or overwhelms the cost of other attacks
Yet MD5 can no longer be sold as 128-bit security hash
32 / 54
The difference between 80 bits and 128 bits of keysearch is like the difference between a mission to Mars and a mission to Alpha Centauri. As far as I can see, there is
*no* meaningful difference between 192-bit and 256-bit keys in terms of practical brute force attacks; impossible is impossible.
John Kelsey (NIST)
33 / 54
Back-to-reality interlude
2 GHz CPU
1 year 258 clocks 1000 years 268 clocks since the Big-Bang 2116 clocks
34 / 54
The encryption doesnt even have to be very strong to be useful, it just must be stronger than the other weak links in the system. Using any standard commercial risk management model, cryptosystem failure is orders of magnitude below any other risk.
Ian Griff, Peter Gutmann, IEEE Security & Privacy 9(3), 2011
35 / 54
36 / 54
36 / 54
37 / 54
2119
against 2256 ideally! Needs 4 related keys. . . actually, related subkeys
attacks are still mainly of theoretical interest and do not present a threat to practical applications using AES
the authors (Khovratovich / Biryukov)
38 / 54
MPEG stream encrypted with CSA Common Scrambling Algorithm, 48b or 64b key
Distinguishing attacks
aka distinguishers
41 / 54
Distinguishing attacks
aka distinguishers
42 / 54
43 / 54
Cryptographic Num3rol0gy
The basic concept is that as long as your encryption keys are at least this big, youre ne, even if none of the surrounding infrastructure benets from that size or even works at all
Ian Griff, Peter Gutmann, IEEE Security & Privacy 9(3), 2011
44 / 54
Cryptographic Num3rol0gy
The basic concept is that as long as your encryption keys are at least this big, youre ne, even if none of the surrounding infrastructure benets from that size or even works at all
Ian Griff, Peter Gutmann, IEEE Security & Privacy 9(3), 2011
Choosing a key size if fantastically easy, whereas making the crypto work effectively is really hard
Ibid
45 / 54
Zero-risk bias
= Preference for reducing a small risk to zero over a greater reduction in a larger risk Example: reduce risk from 1% to 0% whereas another risk could be reduced from 50% to 30% at the same cost
46 / 54
Zero-risk bias
= Preference for reducing a small risk to zero over a greater reduction in a larger risk Example: reduce risk from 1% to 0% whereas another risk could be reduced from 50% to 30% at the same cost
46 / 54
Survivorship bias
We only remember/see the unbroken, deployed and/or standardized, algorithms Not the numerous experimental designs broken
47 / 54
Survivorship bias
We only remember/see the unbroken, deployed and/or standardized, algorithms Not the numerous experimental designs broken Example: of the 56 SHA-3 submissions published 14 implemented attacks (e.g. example of collision) 3 close-to-practical attacks ( 260 ) 14 high-complexity attacks Practical attacks kill ciphers before they are
47 / 54
48 / 54
49 / 54
50 / 54
Reactions heard (from customers, third parties): AES is insecure! Lets use AES with 42 rounds! AES is secure! The attack is far from practical!
50 / 54
CONCLUSIONS
REFERENCES
51 / 54
Conclusions
Algorithmic attacks on deployed schemes are (almost) never a threat to security, due to High complexities, unrealistic models, etc. Weak ciphers are broken earlier and forgotten We dont break ciphers, we evaluate their security
Orr Dunkelman
52 / 54
Conclusions
Algorithmic attacks on deployed schemes are (almost) never a threat to security, due to High complexities, unrealistic models, etc. Weak ciphers are broken earlier and forgotten We dont break ciphers, we evaluate their security
Orr Dunkelman
52 / 54
Conclusions
Algorithmic attacks on deployed schemes are (almost) never a threat to security, due to High complexities, unrealistic models, etc. Weak ciphers are broken earlier and forgotten We dont break ciphers, we evaluate their security
Orr Dunkelman
Beware cryptographic numerology! AES is ne, weak implementations are the biggest threat
52 / 54
Related works
Leakage-resilience vs. Reality
Leakage Resilient Cryptography in Practice Standaert et al. http://eprint.iacr.org/2009/341
Junod http://crypto.junod.info/hashdays10_talk.pdf
53 / 54
54 / 54