Cryptography: DH And

Cryptography: DH And

1 ì Key Exchange Secure Software Systems Fall 2018 2 Challenge – Exchanging Keys & & − 1 6(6 − 1) !"#ℎ%&'() = = = 15 & 2 2 The more parties in communication, ! $ the more keys that need to be securely exchanged Do we have to use out-of-band " # methods? (e.g., phone?) % Secure Software Systems Fall 2018 3 Key Exchange ì Insecure communica-ons ì Alice and Bob agree on a channel shared secret (“key”) that ì Eve can see everything! Eve doesn’t know ì Despite Eve seeing everything! ! " (alice) (bob) # (eve) Secure Software Systems Fall 2018 Whitfield Diffie and Martin Hellman, 4 “New directions in cryptography,” in IEEE Transactions on Information Theory, vol. 22, no. 6, Nov 1976. Proposed public key cryptography. Diffie-Hellman key exchange. Secure Software Systems Fall 2018 5 Diffie-Hellman Color Analogy (1) It’s easy to mix two colors: + = (2) Mixing two or more colors in a different order results in + + = the same color: + + = (3) Mixing colors is one-way (Impossible to determine which colors went in to produce final result) https://www.crypto101.io/ Secure Software Systems Fall 2018 6 Diffie-Hellman Color Analogy ! # " (alice) (eve) (bob) + + $ $ = = Mix Mix (1) Start with public color ▇ – share across network (2) Alice picks secret color ▇ and mixes it to get ▇ (3) Bob picks secret color ▇ and mixes it to get ▇ Secure Software Systems Fall 2018 7 Diffie-Hellman Color Analogy ! # " (alice) (eve) (bob) $ $ Mix Mix = = Eve can’t calculate ▇ !! (secret keys were never shared) (4) Alice and Bob exchange their mixed colors (▇,▇) (5) Eve will see the mixed colors too (▇,▇) (6) Alice adds her secret color ▇ to Bob’s mix ▇ = ▇ (7) Bob adds his secret color ▇ to Alice’s mix ▇ = ▇ Secure Software Systems Fall 2018 8 Diffie-Hellman Color Analogy # Mix ! + = (alice) = (order doesn’t matter) # Mix " + = (bob) Secure Software Systems Fall 2018 9 Diffie-Hellman Math ! ≡ ($%) '() (*) y is defined as equal to gx modulo p p = prime number (modulus) g = base integer x = random integer Assumption: Computing y is easy! But computing x given y, g, and p is very hard! Discrete Logarithm Problem Secure Software Systems Fall 2018 10 Diffie-Hellman Math ! " (alice) (bob) & !" ≡ (% ' ) !)* (+) &- !, ≡ (% ) !)* (+) + + # # = (1) Public color ▇ is a large prime number p and base g = (2) Alice secret color ▇ is random integer rA Mix Mix (3) Bob secret color ▇ is random integer rB (4) Alice mixed color ▇ is mA (5) Bob mixed color ▇ is mB (6) Exchange mA and mB Secure Software Systems Fall 2018 11 Diffie-Hellman Math # Mix ! + = & (alice) !% ≡ $" . $() (+) # Mix " + = & (bob) !" ≡ $% ' $() (+) !% = !" Secure Software Systems Fall 2018 12 Diffie-Hellman Math ì Doesn’t have to be modular division ì Could be elliptic curves ì Could be supersingular isogeny key exchange ì Could be <other math words>… Secure So/ware Systems Fall 2018 13 ì Public Key Cryptography Secure Software Systems Fall 2018 14 Public Key Cryptography ì Asymmetric cryptography ì Sending data to Alice? ì Use her public Key ì Alice receives your data? ì She decrypts it with her private key Secure Software Systems Fall 2018 Ron L. Rivest, Adi Shamir, and Leonard15 Adleman. A method for obtaining digital signatures and public-key cryptosystems. Communica)ons of the ACM (February 1978) RSA encryption method First public key method Secure Software Systems Fall 2018 16 Public-Key Algorithms ì Key exchange algorithms ì Allows two parties to agree on a shared secret across an insecure medium ì Example: Diffie-Hellman ì Encryption algorithms ì Allows sender to encrypt without having to agree first on a shared secret ì Example: RSA ì Signature algorithms ì Allows sender to sign information using sender’s private key and receiver to validate using sender’s public key Secure Software Systems Fall 2018 17 Public-Key Encryption Public key encryption is awesome! Should we use it everywhere? Secure So/ware Systems Fall 2018 18 Caveat – Performance ì Rarely use public key encryption by itself ì Reasons: ì Size (RSA can’t encrypt anything larger than its modulus, i.e. 4096 bits) ì Performance ì RSA 2048 encryption: 0.08 megacycles/operation (256B) ì RSA 2048 decryption: 3.25 megacycles/operation ì AES-GCM: 2-4 cycles per byte ì https://www.cryptopp.com/benchmarks.html Hybrid cryptosystem – Use public-key algorithms to coordinate keys, and then use symmetric ciphers (shared key) for bulk operations Secure Software Systems Fall 2018.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    18 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us