How public key cryptography works, using only simple math
quantamagazine.org
quantamagazine.org
Saying that Natasha and Boris both choose a prime number and then "create a safe" with it, is the same as telling someone that to make cake Alice and Bob went to the store and bought flour and eggs.
If you want a real, good and visual explanation of _how_ it works, with simple maths, go watch Computerphile's video[0] about Diffie-Hellman.
https://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Di...
For an actually well written and deeply informative ‘how it works’ for public key cryptography, see:
https://www.bloomberg.com/features/2022-the-crypto-story/?em...
Worked example using p = 3 and q = 11.
φ(n) is the most complex part, but you can take it as shown if you don't care about the proof. For two primes, φ(p * q) = (p - 1) * (q - 1). The proof of this is more complex, and the calculation can get more involved if it's not a pair of primes, but for RSA it's that simple.
Coprime can be defined using middle/high school math: two numbers are coprime if gcd(n,m) = 1. They have no common factors other than 1, that's all it means. So 4 and 9 are coprime even though neither are prime.
----
φ(n) is Euler's totient function. It gives you the number of numbers coprime to n in the range 1 <= k <= n. So in the worked example, φ(n) = 20 means there are 20 numbers in that range that have no factors other than 1 in common with 33:
1 2 4 5 7
8 10 13 14 16
17 19 20 23 25
26 28 29 31 32
None of those have 3 or 11 as factors.Do you mean an explainer for ZK proofs? I found this primer by Matthew Green very helpful in understanding the basics: https://blog.cryptographyengineering.com/2014/11/27/zero-kno...
https://fangpenlin.com/posts/2019/10/07/elliptic-curve-crypt...
I wasn't very successful, and eventually gave up. It's hard to come with something simple that's easy to do in one direction, but moderately hard to do in the opposite across some skill levels.
Which, eventually makes the concept unintuitive, when explained through the lens or “simple, primary school math” (which is all most grown ups can deal with, without immediately reaching out for a phone/calculator).
So, the intuitive explanation that does work (for RSA) is the “I send you an open safe only I have the key for, you fill it, and you close it and send it to me.” That's instantly intuitive, and works. The rest… meh.
Quanta also has an article about how lattice-based cryptography works: https://www.quantamagazine.org/cryptographys-future-will-be-...
Until you can piece it together from other explanations that omitted different bits.