outline
play

Outline More crypto protocols CSci 5271 Introduction to Computer - PDF document

Outline More crypto protocols CSci 5271 Introduction to Computer Security Announcements intermission More crypto protocols and failures Stephen McCamant More causes of crypto failure University of Minnesota, Computer Science &


  1. Outline More crypto protocols CSci 5271 Introduction to Computer Security Announcements intermission More crypto protocols and failures Stephen McCamant More causes of crypto failure University of Minnesota, Computer Science & Engineering Abstract protocols Protocol notation Outline of what information is communicated in ❆ ✦ ❇ ✿ ◆ ❇ ❀ ❢ ❚ ✵ ❀ ❇❀ ◆ ❇ ❣ ❑ ❇ messages Omit most details of encoding, naming, sizes, choice of ❆ ✦ ❇ : message sent from Alice intended for Bob ciphers, etc. ❇ (after :): Bob’s name Describes honest operation ❢ ✁ ✁ ✁ ❣ ❑ : encryption with key ❑ But must be secure against adversarial participants Seemingly simple, but many subtle problems Needham-Schroeder Needham-Schroeder MITM ❆ ✦ ❈ ✿ ❢ ◆ ❆ ❀ ❆ ❣ ❊ ❈ Mutual authentication via nonce exchange, assuming ❈ ✦ ❇ ✿ ❢ ◆ ❆ ❀ ❆ ❣ ❊ ❇ public keys (core): ❇ ✦ ❈ ✿ ❢ ◆ ❆ ❀ ◆ ❇ ❣ ❊ ❆ ❆ ✦ ❇ ✿ ❢ ◆ ❆ ❀ ❆ ❣ ❊ ❇ ❈ ✦ ❆ ✿ ❢ ◆ ❆ ❀ ◆ ❇ ❣ ❊ ❆ ❇ ✦ ❆ ✿ ❢ ◆ ❆ ❀ ◆ ❇ ❣ ❊ ❆ ❆ ✦ ❈ ✿ ❢ ◆ ❇ ❣ ❊ ❈ ❆ ✦ ❇ ✿ ❢ ◆ ❇ ❣ ❊ ❇ ❈ ✦ ❇ ✿ ❢ ◆ ❇ ❣ ❊ ❇ Certificates, Denning-Sacco Attack against Denning-Sacco ❆ ✦ ❙ ✿ ❆❀ ❇ A certificate signed by a trusted third-party ❙ binds ❙ ✦ ❆ ✿ ❈ ❆ ❀ ❈ ❇ an identity to a public key ❆ ✦ ❇ ✿ ❈ ❆ ❀ ❈ ❇ ❀ ❢ Sign ❆ ✭ ❑ ❆❇ ✮ ❣ ❑ ❇ ❈ ❆ ❂ Sign ❙ ✭ ❆❀ ❑ ❆ ✮ ❇ ✦ ❙ ✿ ❇❀ ❈ Suppose we want to use S in establishing a session ❙ ✦ ❇ ✿ ❈ ❇ ❀ ❈ ❈ ❆ ✦ ❙ ✿ ❆❀ ❇ ❇ ✦ ❈ ✿ ❈ ❆ ❀ ❈ ❈ ❀ ❢ Sign ❆ ✭ ❑ ❆❇ ✮ ❣ ❑ ❈ key ❑ ❆❇ : ❙ ✦ ❆ ✿ ❈ ❆ ❀ ❈ ❇ By re-encrypting the signed key, Bob can pretend to be ❆ ✦ ❇ ✿ ❈ ❆ ❀ ❈ ❇ ❀ ❢ Sign ❆ ✭ ❑ ❆❇ ✮ ❣ ❑ ❇ Alice to Charlie

  2. Envelopes analogy Design robustness principles Use timestamps or nonces for freshness Encrypt then sign, or vice-versa? Be explicit about the context On paper, we usually sign inside an envelope, not outside. Two reasons: Don’t trust the secrecy of others’ secrets Attacker gets letter, puts in his own envelope (c.f. attack Whenever you sign or decrypt, beware of being an against X.509) oracle Signer claims “didn’t know what was in the envelope” Distinguish runs of a protocol (failure of non-repudiation) Implementation principles Outline More crypto protocols Ensure unique message types and parsing Design for ciphers and key sizes to change Announcements intermission Limit information in outbound error messages Be careful with out-of-order messages More causes of crypto failure Note to early readers Outline More crypto protocols This is the section of the slides most likely to change in the final version Announcements intermission If class has already happened, make sure you have the latest slides for announcements More causes of crypto failure Random numbers and entropy Netscape RNG failure Early versions of Netscape SSL (1994-1995) seeded Cryptographic RNGs use cipher-like techniques to with: provide indistinguishability Time of day But rely on truly random seeding to stop brute force Process ID Parent process ID Extreme case: no entropy ✦ always same “randomness” Modern best practice: seed pool with 256 bits of Best case entropy only 64 bits entropy (Not out of step with using 40-bit encryption) Suitable for security levels up to ✷ ✷✺✻ But worse because many bits guessable

  3. Debian/OpenSSL RNG failure (1) Debian/OpenSSL RNG failure (2) Debian maintainer commented out some lines to fix OpenSSL has pretty good scheme using a Valgrind warning ✴❞❡✈✴✉r❛♥❞♦♠ “Potential use of uninitialized value” Also mixed in some uninitialized variable values Accidentally disabled most entropy (all but 16 bits) “Extra variation can’t hurt” From modern perspective, this was the original sin Brief mailing list discussion didn’t lead to understanding Remember undefined behavior discussion? But had no immediate ill effects Broken library used for ✘ 2 years before discovery Detected RSA/DSA collisions New factoring problem (CCS’17) 2012: around 1% of the SSL keys on the public net are breakable An Infineon RSA library used primes of the form Some sites share complete keypairs ♣ ❂ ❦ ✁ ▼ ✰ ✭ ✻✺✺✸✼ ❛ mod ▼ ✮ RSA keys with one prime in common (detected by large-scale GCD) Smaller problems: fingerprintable, less entropy One likely culprit: insufficient entropy in key Major problem: can factor with a variant of generation Coppersmith’s algoritm Embedded devices, Linux ✴❞❡✈✴✉r❛♥❞♦♠ vs. E.g., 3 CPU months for a 1024-bit key ✴❞❡✈✴r❛♥❞♦♠ DSA signature algorithm also very vulnerable Side-channel attacks WEP “privacy” Timing analysis: Number of 1 bits in modular exponentiation First WiFi encryption standard: Wired Equivalent Unpadding, MAC checking, error handling Privacy (WEP) Probe cache state of AES table entries F&S: designed by a committee that contained no Power analysis cryptographers Especially useful against smartcards Problem 1: note “privacy”: what about integrity? Fault injection Nope: stream cipher + CRC = easy bit flipping Data non-erasure Hard disks, “cold boot” on RAM WEP shared key WEP key size and IV size Original sizes: 40-bit shared key (export restrictions) Single key known by all parties on network plus 24-bit IV = 64-bit RC4 key Easy to compromise Both too small Hard to change 128-bit upgrade kept 24-bit IV Also often disabled by default Vague about how to choose IVs Least bad: sequential, collision takes hours Example: a previous employer Worse: random or everyone starts at zero

  4. WEP RC4 related key attacks New problem with WPA (CCS’17) Session key set up in a 4-message handshake Only true crypto weakness Key reinstallation attack: replay #3 RC4 “key schedule” vulnerable when: Causes most implementations to reset nonce and replay RC4 keys very similar (e.g., same key, similar IV) counter First stream bytes used In turn allowing many other attacks Not a practical problem for other RC4 users like SSL One especially bad case: reset key to 0 Protocol state machine behavior poorly described in spec Key from a hash, skip first output bytes Outside the scope of previous security proofs Trustworthiness of primitives Dual EC DRBG (1) Pseudorandom generator in NIST standard, based on Classic worry: DES S-boxes elliptic curve Obviously in trouble if cipher chosen by your Looks like provable (slow enough!) but strangely no adversary proof In a public spec, most worrying are unexplained Specification includes long unexplained constants elements Academic researchers find: Best practice: choose constants from well-known Some EC parts look good math, like digits of ✙ But outputs are statistically distinguishable Dual EC DRBG (2) Found 2007: special choice of constants allows prediction attacks Big red flag for paranoid academics Significant adoption in products sold to US govt. FIPS-140 standards Semi-plausible rationale from RSA (EMC) NSA scenario basically confirmed by Snowden leaks NIST and RSA immediately recommend withdrawal

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend