slide1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Rachana Y. Patil PowerPoint Presentation
Download Presentation
Rachana Y. Patil

Rachana Y. Patil

97 Views Download Presentation
Download Presentation

Rachana Y. Patil

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Rachana Y. Patil 1

  2. Symmetric and asymmetric-key cryptography will exist in parallel and continue to serve the community. We actually believe that they are complements of each other; the advantages of one can compensate for the disadvantages of the other. Symmetric-key cryptography is based on sharing secrecy; asymmetric-key cryptography is based on personal secrecy. 10.2

  3. Asymmetric key cryptography uses two separate keys: one private and one public. Locking and unlocking in asymmetric-key cryptosystem 10.3

  4. General idea of asymmetric-key cryptosystem 10.4

  5. Plaintext/Ciphertext Unlike in symmetric-key cryptography, plaintext and ciphertext are treated as integers in asymmetric-key cryptography. Encryption/Decryption C = f (Kpublic , P) P = g(Kprivate , C) 10.5

  6. RSA CRYPTOSYSTEM The most common public-key algorithm is the RSA cryptosystem, named for its inventors (Rivest, Shamir, and Adleman).


  8. Procedure Encryption, decryption, and key generation in RSA

  9. RSA Algorithm

  10. Encryption

  11. Decryption

  12. Example Bob chooses 7 and 11 as p and q and calculates n = 77. The value of f(n) = (7 − 1)(11 − 1) or 60. Now he chooses two exponents, e and d, from Z60∗. If he chooses e to be 13, then d is 37. Note that e × d mod 60 = 1 (they are inverses of each Now imagine that Alice wants to send the plaintext 5 to Bob. She uses the public exponent 13 to encrypt 5. Bob receives the ciphertext 26 and uses the private key 37 to decipher the ciphertext:

  13. Example Now assume that another person, John, wants to send a message to Bob. John can use the same public key announced by Bob (probably on his website), 13; John’s plaintext is 63. John calculates the following: Bob receives the ciphertext 28 and uses his private key 37 to decipher the ciphertext:

  14. Example n=221 e=5 find d p=19 q=23 e=3 find Ø(n) and d e=17 n=187 find d n=19519 e=17 find d

  15. Attacks on RSA


  17. Key Generation

  18. Encryption

  19. Decryption

  20. Bob chooses p = 11 and e1 = 2. and d = 3 e2 = e1d = 8. So the public keys are (2, 8, 11) and the private key is 3. Alice chooses r = 4 and calculates C1 and C2 for the plaintext 7. Bob receives the ciphertexts (5 and 6) and calculates the plaintext.

  21. Example In ElGamal,given the prime p=31 Choose an appropriate e1 and d,then calculate e2 Encrypt the plaintext message 5 Decrypt the ciphertext to obtain the plaintext

  22. SYMMETRIC-KEY AGREEMENT Alice and Bob can create a session key between themselves. This method of session-key creation is referred to as the symmetric-key agreement.

  23. Diffie-Hellman Key Agreement

  24. Note The symmetric (shared) key in the Diffie-Hellman method is K = gxy mod p.

  25. Example Assume that g = 7 and p = 23. The steps are as follows: • Alice chooses x = 3 and calculates R1 = 73 mod 23 = 21. • Bob chooses y = 6 and calculates R2 = 76 mod 23 = 4. • Alice sends the number 21 to Bob. • Bob sends the number 4 to Alice. • Alice calculates the symmetric key K = 43 mod 23 = 18. • Bob calculates the symmetric key K = 216 mod 23 = 18. • The value of K is the same for both Alice and Bob; gxy mod p = 718 mod 35 = 18.

  26. Example Alice and Bob decide to use diffie hellman key exchange protocol To agree upon a common key, they choose p=13 and g=2.Each chooses his own secret number and exchange the numbers 6 and 11. • What will be the common secret key they derived? • What are their secret numbers? • Can intruder M gain any knowledge from the protocol run if he sees P,g and the two public key 6 and 11? If yes show how

  27. Digital Signature The digital signature process. • The sender uses a signing algorithm to sign the message. • The message and the signature are sent to the receiver. • The receiver receives the message and the signature and applies the verifying algorithm to the combination. • If the result is true, the message is accepted; otherwise, it is rejected.

  28. The digital signature process.

  29. Need for Keys Note A digital signature needs a public-key system. The signer signs with her private key; the verifier verifies with the signer’s public key. 13.29

  30. Note A cryptosystem uses the private and public keys of the receiver: a digital signature uses the private and public keys of the sender. 13.30

  31. DIGITAL SIGNATURE SCHEMES Several digital signature schemes have evolved during the last few decades. Some of them have been implemented. 13.31

  32. RSA Digital Signature Scheme 13.32

  33. Note Key Generation Key generation in the RSA digital signature scheme is exactly the same as key generation in the RSA In the RSA digital signature scheme, d is private; e and n are public. 13.33

  34. Signing and Verifying RSA digital signature scheme 13.34

  35. Example Alice selects n=221 and e=15.Find Private key of Alice. If Alice wants to send message M=11 to Bob. Calculate The Signature and show Bob can Verify the message.

  36. ElGamal Digital Signature Scheme General idea behind the ElGamal digital signature scheme 13.36

  37. Note Key Generation The key generation procedure here is exactly the same as the one used in the cryptosystem. In ElGamal digital signature scheme, (e1, e2, p) is Alice’s public key; d is her private key. 13.37

  38. Verifying and Signing ElGamal digital signature scheme 13.38

  39. Example • Bob chooses p=11,e1=2,r=9,d=8 and sign message M=5 using Elgamal digital signature scheme. Calculate s1 and s2 and show how Alice can verify the signature • Alice chooses p=23,e1=5,d=3 a random number 9 and sign message M=7 before sending it to bob. Calculate s1 and s2 and show how bob can verify the signature.