What lies beneath Public-Key-Cryptography?

Alice performs this operation with her corresponding private key a
Bob performs this operation with his corresponding private key b
The key Alice received from Bob and performs exponentiation with her private key
The key Bob received from Alice and performs exponentiation with his private key
This is the agreed upon public key which is same for both parties even while keeping their inputs secret
Given x and m, compute the logarithm of β base x mod m

Some important Caveats and points:

  • While the above was tried with simpler numbers, the actual numbers are chosen based on a certain criteria. For instance, the integer factorization problem becomes hard for numbers that have a large number of digits and specifically where n (the number to be factored) is a product of prime numbers.
  • The Diffie-Hellman parameters are chosen in such a manner that the Discrete Logarithm problem is hard in a chosen integer group particularly cyclic groups of prime order (The discussion of groups is omitted to keep this as simpler as possible and limited to numbers only).
  • RSA has been dropped from TLS 1.3 as the key-exchange mechanism² and uses Ephemeral DH instead.
  • The fundamental key agreement technique Diffie-Hellman is implemented in many technologies like SSH(Secure Shell), IPSec and TLS.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aaqib Bashir

Aaqib Bashir


I used to be a Researcher sometime back, now I write code for a living. Backend Engineer