The Math of Cryptography
The Algorithms Protecting the Global Network
1. RSA: The Power of Primes
RSA (Rivest-Shamir-Adleman) is based on the difficulty of Integer Factorization. It is easy to multiply two large prime numbers $p$ and $q$ to get $N$. It is extremely hard for a computer to take $N$ and find $p$ and $q$ if they are hundreds of digits long.
2. Elliptic Curve Cryptography (ECC)
ECC is the modern replacement for RSA. Instead of using large numbers, it uses parity and paths along an algebraic curve.
Because the math of ECC is much more complex for a computer to "reverse engineer," we can use much smaller keys. A 256-bit ECC key provides the same security as a 3072-bit RSA key. Smaller keys mean faster handshakes, less CPU usage, and less battery drain on mobile devices.
3. Diffie-Hellman Key Exchange
How do you and a website agree on a password without an eavesdropper seeing it?
- You both agree on a public number (the Generator).
- You both pick a secret number.
- You mix your secret with the public number and send the result to the other person.
- Even if an attacker sees the "mix," they cannot un-mix it to find your secrets.
Conclusion
The encryption protecting our bank accounts and private messages is only as strong as the math behind it. As we approach the era of Quantum Computing, we are now developing "Post-Quantum Cryptography" based on even more complex patterns like Lattices and Isogenies.