1 / 44

Cryptographic Tools

Cryptographic Tools. Symmetric Ciphers, Public Key Crypto, and Hashes. Crypto in This Class. Mechanism A means to achieving security goals Details Beyond the scope of this class Build your own? Beyond the scope of this professor You better know your stuff. Substitution.

Télécharger la présentation

Cryptographic Tools

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Cryptographic Tools Symmetric Ciphers, Public Key Crypto, and Hashes

  2. Crypto in This Class • Mechanism • A means to achieving security goals • Details • Beyond the scope of this class • Build your own? • Beyond the scope of this professor • You better know your stuff

  3. Substitution • Substitution Cipher • Many keys (how many?) • Easily broken (homework!) a b c d e f g h i j k l m n o p q r s t u v w x y z csj x i n f gz u l mo w d y va q e r z bp h t

  4. R = xvuteeqrdfndidktdlea PT = thegirlinfrontiscute R = ndezdftkenbnewvdfkdy PT = drwrightisveryboring Infinitely Better! • Unbreakable crypto • OTP R PT hbdceuitermqzeplaebx +(mod 26)

  5. We Don’t Use OTP • Why not? • Sources of randomness • Thermal noise • Photoelectric effect • Etc. • Why else? xvuteeqrdfndidktdlea… hbdceuitermqzeplaebx  PT

  6. Transposition • Permutation of text • america • maacrie • What is the key?

  7. 03 10 17 24 04 11 18 25 02 09 16 23 01 08 15 22 05 12 19 26 06 13 20 27 07 04 21 28 Improved Cryptography • Double Transposition 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 17 09 05 27 24 16 12 07 10 02 22 20 03 25 15 13 04 23 19 14 11 01 26 21 18 08 06 28

  8. Block Ciphers • Functions • Encrypt • Input: plaintext block of n bits, key • Output: ciphertext block of n bits • Familiar operations • Substitution • Transposition • Rounds

  9. Block Cipher Security • Key length • Protect against trying all keys • How long should the key be? • Design • Protect against cryptanalysis

  10. Public Key Crypto Or: How Alice Learned to Stop Worrying and Love the Bob

  11. The Big Problem • Alice and Bob want to talk sure, Alice. but I need to keep it secret. hey, u look like superman. let’s chat. OK - text me a key. well, let’s encrypt the chat session never mind. ur dumb.

  12. Key Exchange • Use a KDC • What if you don’t trust the KDC? • Central point of failure • Scale • Suppose we have n users • How many keys needed? • What about new users? • Internet scale?

  13. Key Exchange “What good would it do after all to develop impenetrable cryptosystems, if their users were forced to share their keys with aKDC that could be compromised by either burglary or subpoena?” • Whit Diffie

  14. Let’s Imagine • A Public Key • Everyone should know • Including Alice • New York Times? • Can be used to encrypt • A Private Key • Only Alice should have it • Can be used to decrypt

  15. A Metaphor • A lockbox and a key KRa KUa • Did we solve the key exchange problem?

  16. Key Exchange • Public Keys kewl. but it still needs to be secret OK - send me a key. My public key is KUbob that was mean of me. let’s chat. well, let’s encrypt the chat session Ekey[“u stink”] EKUbob[key]

  17. More Formally • A simple protocol • What’s the vulnerability? A to B: KUa B to A: E[KUa,Ks] A to B: E[Ks,M]

  18. Test Protocols • Is it confidential? Does it work? 1. A to B: E[KUB,M] 2. B to A: E[KUB,Ks], E[Ks,M] 3. A to B: E[KUB,Ks], E[Ks,M] 4. B to A: E[KUA,Ks||E[Ks,M]]

  19. Signatures • Suppose … • Alice could encrypt with her private key • And Bob could decrypt it with her public key • Why? • Sign (given private key) S = EKRa(M) • Verify (given public key) M = EKUa(S)

  20. More for your Metaphor • A special lockbox KRa KUa

  21. Test Protocols • What security properties do you get? 1. A to B: E[KRB,M] 2. B to A: E[KRB,Ks], E[Ks,M] 3. A to B: E[KUB,E[KRA,M]] 4. B to A: E[KRB,Ks||E[Ks,M]] 5. A to B: E[KRA,M]

  22. Security of RSA • How could we break it? • Guess d! • Very hard -- 1024 bit keys or more • Factor n into it’s two primes • Factoring large numbers • Slow! • 600+ bits

  23. Cryptographic Hash Functions

  24. Hash Functions • Purpose • pack information into a fixed size container • Random-looking • Reproducible • Does NOT provide integrity • Benefits • Fixed size • typically smaller than the data • Can keep data in clear text

  25. 0 0 1 Example • A simple hash • Bitwise XOR of all blocks

  26. What is a Hash Function? • Basic Requirements: • take input of any size • produce a fixed-length output • easy to compute • Collision Resistance • weak collision resistance • given x, hard to find y s.t. H(y) = H(x)

  27. Why Weak Collision Resistance? • “Encrypted Hash” method • Message x, hash h = H(x) • send x||EK(h) • K is a secret shared between A and B • The attack: • Mallory gets x||EK(h) • Mallory finds a message ys.t. H(y) = h • How does he know what h is? • What good is y?

  28. When Weak Collision is Weak Alice sends this message M: To LocalBank: I have enclosed $10,000 to be deposited in my beloved son Anthony’s money market account (#12345) so that I may help him pay for graduate school. • -Alice She signs a 16-bit hash h = H(M) and sends this signature

  29. An Evilsmith Production To LocalBank: I have enclosed a check for $10,000 to be deposited in my beloved friend Mallory Evilsmith’s money market account (#98765) so that I may help him pay for graduate school. He’s such a hard-working, honest student, and he always follows the code of conduct for his classes in information security. • -Alice

  30. Many Equivalent Letters { - || To} LocalBank { - || , Inc.} : I {have enclosed || am including} { - || a check for} {$10,000 || ten thousand dollars} to {be deposited || deposit} in my {beloved || favorite} {friend || pal} {- || Mr.} {Mallory || M.} Evilsmith’s money market account {(#98765) || (no. 98765)} so that I {may || can} help him {pay for || afford} {attending || - } graduate school { - || at UTA}. {He’s || he is} such a {hard-working || diligent}, {honest || responsible} {student || person}, and he always follows the code of conduct for his {classes || courses} in {computer || information} security. • - Alice • 221 possibilities

  31. When Weak Collision is Weak • Alternately • “space-space-backspace” • Replace some with “space-backspace-space” • Images • Small low-order bit changes in a bitmap • Re-compress into JPEG • Cost to the attacker • How much?

  32. scytale History • Cool Ideas

  33. Beware the Ides of Class • Encoding • a = 1, b = 2, w = ? • Encryption • “hw wx euxwh” ? • “et tu brute” “You too my son, will have a taste of power"

  34. Friends, Romans, Cryptographers • Encryption • f(“et tu brute”, ) = “hw wx euxwh” • Input = plaintext • Output = ciphertext • Algorithm • What is the Caesar Cipher algorithm? • [Pair Up!]

  35. Wrapped in a Riddle • WWII • Essentially repeated substitutions • Continually updated • 159 Quintillion keys • Broken!

  36. Modern Block Ciphers • Familiar operations • Substitution • Transposition • Rounds • Sub-keys • Key is expanded • Different sub-key in each round

  37. Substitution on Bits • S-Boxes • Important: non-linear input: 011011

  38. Transposition on Bits • p-boxes

  39. Secure Block Ciphers • Block size • What if you had 1 bit blocks? • Today: 128-bits+ • Diffusion • Flip one bit in PT, many bits of CT • Confusion • Difficult to reverse (without key) • Difficult determine key bits • Rounds

  40. Requirements • Easy • Key Generation (KUa, KRa) • Encryption (given public key) C = EKUa(M) • Decryption (given private key) M = EKRa(C) • Hard • Get the private key (given the public key) • Decrypt (given just the public key)

  41. RSA • Setup • Select n = pq, two primes • Find e, no common factors w/ n • Find d, ed  1 mod (p-1)(q-1) • Public Key • KUa = n, e • Private Key • KRa = n, d

  42. RSA • Encryption • C = Me mod n • Decryption • M = Cd mod n = Med mod n • Magic

  43. Cryptography • A little etymology… • Krypto = hidden • Grafo = writing • Legein (logy) = speaking • Roots • Information theory, mathematics, CS

  44. A More Complex Hash • Using a block cipher • Use known IV for the key (e.g. all 0’s) • XOR all ciphertexts together • CBC Mode • Take the last ciphertext P1 P2 0   C1 … AES AES Key Key C1 C2

More Related