Public Key Cryptography



Download 0.67 Mb.
Page6/7
Date13.10.2023
Size0.67 Mb.
#62314
1   2   3   4   5   6   7
Lecture 2 Public Key Cryptography

Why does DH work?

  • Sender calculate its public key as-
  • Ys = aXs mod n
  • Receiver calculate its public key as-
  • Yr = aXr mod n
  • Step-03:
  • Both the parties receive public key of each other.
  • Now, both the parties calculate the value of secret key.

Why does DH work?

  • Sender calculates secret key as-
  • Secret key = (Yr)Xs mod n
  • Receiver calculates secret key as-
  • Secret key = (Ys)Xr mod n
  • Problem-01:
  • Suppose that two parties A and B wish to set up a common secret key (D-H key) between themselves using the Diffie Hellman key exchange technique. They agree on 7 as the modulus and 3 as the primitive root. Party A chooses 2 and party B chooses 5 as their respective secrets. Their D-H key is-

How does DH work?

    • Solution-
    • Given-
    • n = 7
    • a = 3
    • Private key of A = 2
    • Private key of B = 5
    • Step-01:
    • Both the parties calculate the value of their public key and exchange with each other.
    • Public key of A
    • = 3private key of A mod 7
    • = 32 mod 7
    • = 2

How does DH work?

    • Public key of B
    • = 3private key of B mod 7
    • = 35 mod 7
    • = 5
    • Step-02:
    • Both the parties calculate the value of secret key at their respective side.
    • Secret key obtained by A
    • = 5private key of A mod 7
    • = 52 mod 7
    • = 4

How does DH work?

    • Secret key obtained by B
    • = 2private key of B mod 7
    • = 25 mod 7
    • = 4
    • Finally, both the parties obtain the same value of secret key.
    • The value of common secret key = 4.

Public key applications

  • Some applications of public key technology include the following.
  • Encryption
  • This is the main use of a public key to encrypt messages prior to sending. With asymmetric encryption, both the public and private keys are generated randomly. Anyone can have access to a public key to encrypt data, but only an individual who has the matching private key can decrypt the data.
  • Since the public and private keys are mathematically connected, they are used together to encrypt and decrypt information. If anyone other than the owner of the private key tries to decrypt the information using the public key, the information will be unreadable.
  • *On classical computers

Download 0.67 Mb.

Share with your friends:
1   2   3   4   5   6   7




The database is protected by copyright ©ininet.org 2024
send message

    Main page