r/explainlikeimfive • • 18h ago

Technology ELI5: How does CSIDH ley exchange work?

Ok, not entirely like I'm 5, I already understand DH exchange well enough on the concept level (the 'paints' explanation) and some of why mod is useful there. "Root prine modulo" is entirely beyond me.

Anyway, I came across mention of it as a post-quantum cryptography option to replace the base DH key exchange and similar. How does it work, what makes it different from current options?

0 Upvotes

5 comments sorted by

•

u/jamcdonald120 6h ago edited 6h ago

it works exactly the same way as DH, but swap out the Root Prime Modulo part for Supersingularity Elliptic curve Isogeny.

If you think Root Prime Module is beyond you, there is no chance you will get Supersingularity Elliptical curve Isogenys (if you want to try, here is the wikipedia on it https://en.wikipedia.org/wiki/Supersingular_isogeny_graph or maybe try this graduate level lecture on it https://www.youtube.com/watch?v=9R_cEmp1RPI good luck) (basically its a function that makes 1 super singularity EC into another, and since the curves have a bunch of hard to back track properties, this makes it super-fucking-hard (technical term) for a quantum computer to back track but easy to go forward on, which is exactly what you want for asymmetric encryption or key-exchange)., but its just a different way of mixing paints so that a quantum computer cant easily un-mix them (where as a big enough one could easily un mix the Root Prime Modulo paints).

Im not a field expert, but as I understand it, Supersingular Isogeny EC stuff is sorta untrusted for its future (it keeps getting cracked and fixed) and most people are leaning towards hybrid key exchange using elliptic-curve Diffie–Hellman (current used method) and lattice based key-exchange (best quantum resistant algorithm family so far) (that one is actually ELI5able, so bonus) so its likely better to look in to those if you are interested.

•

u/Xhosant 3h ago

Oh, hit me with the ELI5able one please!

•

u/jamcdonald120 1h ago

sure, video for you https://youtu.be/-UrdExQW0cs?si=DujvdOLs3yYZoq4M&t=1097 (timestamp important)

Basically, you pick n n dimensional vectors. for 2d lets say (6,7) (sorry) (-2,8). the lattice is all points you can get to by adding/subtracting these, so (6,7), (12,14), (18,21), (4,15), (16, 26) etc. these vectors are your private keys. add a module for the same reason as everywhere else. Likely has to be prime, but the exact number doesnt matter as long as everyone uses it (everyone uses 3329).

The lattice can be constructed from any n points in it (well, any that use both vectors to get to) so we can give out something like (76,161), (24,121) as a public key. now if someone else wants to encrypt something, they just take it, make it into a number (its on a computer, it already is), and use the bits to move around the public lattice, (it doesnt really matter as long as both sides know what is going on, for simplicity we are just going to multiply 2 character sequences) (we are also going to use modulo 257), like abcd, -> 1,2,3,4, -> (124,146), (67,196) (remember the modulo) then add just a little bit of noise. 122,147,69,200. for anyone with just the public key, it is now hard to tell if 1,2,3,4 is the right answer, or if there is some weird combination that also gets there. but for the person with the private key, they can easily build out the lattice to see which point it is closest to. then since they know the private key, and they know the steps used to encrypt, they can reverse from the known point to the start. but the noise prevents anyone else from doing so without constructing the entire lattice.

Now instead of just doing 2D, use like 1000D and its basically impossible for any computer to ever figure out from the noise public key.

For key exchange, from what im seeing the standard (KYBER) (btw, since cyrstals are sorta lattices, and programmers are nerds, almost all the latice based methods are named some sort of crystal pun, KYBER, Crystallis, Dilithium, saber, no none of those are made up) is basically "Just have 1 party encrypt the key and send it" but you can also do a very similar thing to DH (NewHope (Oh god damn it, thats a starwars movie since its similar to Saber, crystal puns go deep)) where both parties contribute to generating a shared secret. that gets more in to the darker vector math though.

For the hybrid key gen, its pretty much as simple as "Do DH, do KYBER, use a special cryptographic hash function designed for this on the output of both, and thats your key"

•

u/Xhosant 1h ago

KYBER as in Khyber, the dragonshards, or am I crossing my fandoms?