Post Quantum CSI DiffieHellman Key Exchange

So this will be a post where I have no idea what I am talking about but I asked AI for a post quantum diffie hellman key exchange and using some custom curve and point math it can apparently be done called, Commutative Supersingular Isogeny DH. The only explanation to my limited understanding is, instead of bouncing around inside of just one singular elliptic curve, this algorithm apparently walks across a massive group of different elliptic curves using some sort of special bridge to connect them all… idk!

However, this is sourced from and based on a random github repository that hasn’t been updated in a while as this is not something that is supported in OpenSSL. I forked the repo and removed the 512 version, kept the 1024 version, and asked AI to help implement a 2048 version which operates very very very slowly… lol!

Example output:

./csidh-p2048-demo 

Alice's private key   (  0.219 ms):
  1bf55999a9049348a609a2bea4e19b715c6ca61bc8bb5a75427c97188e8be583f9441932df76892e676e83e2555f1e621ff8695a6771869a6ad9534479669c59595b0beaadc637d4b649a851ff0b26809bec17980e1b0b6d4e91f8483b291b36a7b8354fd621ab6e4d5ef73e05bb5d8750961605

Bob's private key     (  0.119 ms):
  5d66a88828c3b5b8f7377687257c6b05ff6ab0677b8a778aeab5836a8a67a6f9176a52e6bc8a27886a8a690d73b080505767e55f6a9756bbf81681592c586964fdde8b599061e675f90e739730bc863d7bc5459c0baf7e8954a4a57058b2cbc8badc6451b0ffdc99ba6aa769b96496e909654708

Alice's public key    (21605.810 ms):
  05f2898b1ed19a1ca9ad4e2f3dd99488aafd0ec32799061caffe821dd00747413032d29899d4072178e2e3dd33b523eef24a4447d464354e4db6d85e035bc036c05c54ffebb1c1e8639a0b139ae729daaf2e87124733cef560ad13fc1e7db8504d4620e9fdc1d504ac7f3f68a8becd1800b8d6b2504e9d62cc90ef133a92905a77d9a2cc0b801d3015857459b39ab828562c13e24a77793e2205e5eb94961121d4121eae941cce12bd591a5153214669e88b0a3c50e630b6440576bca65f06121738470e377a498895343dc263a4b3f4434a91e9cad3b4b0d13e82babf50d4dbbff4f3e46f83c718a1cad4fbe3a3c1a3d9c7afc6f2d923638f45230802aa5f56

Bob's public key      (23381.409 ms):
  017f59052fd14ed4b47de9e35e0e63993f219ad0c384a03526f3c96a3e85cffd33f33cb04134fe2f2a8a95e1c2139b304e6b68dfb4e9e3d061b7aa51607b38501d841c4a1f55e9246e4afade6deadfe0585645667918ae7c5d32e3559ca78a0a887a0300e030b13b1d8c89cd78ded5bc57b6c1410fd21d9f661e395080c113697ec957d1989ad3a71921a5b205f49b585b2dcc4f1171dc7ba79b454997895cba7452339b17b45609e2bf35c22ff96fba8f8d2799f9bd776d8684c4b9c31fbb60444bd122a677f09e1efda0b7c049c83cc7bff9b9f3fef2321bebc3436c5bcf3bcd793cb94ba8d345e95f49363fb631e0b19dd748f7f9f271e2d41a844f004249

Alice's shared secret (21874.875 ms):
  0c3c2d16f579881e3d9c3a3796916e4a6bf1763e993f4b4ef35f65861731a2845e990ae3bf2d35e47d1b6b10fe4d665577d2e7c0f61b2d8ab98f5559e89a0c226ef1323d0fac6cddd54d65b30e40713c7f65dfe62b7311b5bcee5a94ff03209022be4d3e90bc8c290fa887668baec43a4eb5f56ebca2a6dbda3277184d54bf8726595c50cd813c23393eae0e59b8b65e9a980e2892639981537f8dc1dd1d8a06580920ae893cf5f212faeb40495283aad490412f3f4582d9b2c7c9bd8c15edb562bfcaeac8303d66a4731734c2a76dc63eaaf6804fa991ed9efec2be4861b4565a74c444118c4b40ca5c90c3520cdc974ee9d5e5ad91b8f6b3499dc71f2d7c30

Bob's shared secret   (23434.600 ms):
  0c3c2d16f579881e3d9c3a3796916e4a6bf1763e993f4b4ef35f65861731a2845e990ae3bf2d35e47d1b6b10fe4d665577d2e7c0f61b2d8ab98f5559e89a0c226ef1323d0fac6cddd54d65b30e40713c7f65dfe62b7311b5bcee5a94ff03209022be4d3e90bc8c290fa887668baec43a4eb5f56ebca2a6dbda3277184d54bf8726595c50cd813c23393eae0e59b8b65e9a980e2892639981537f8dc1dd1d8a06580920ae893cf5f212faeb40495283aad490412f3f4582d9b2c7c9bd8c15edb562bfcaeac8303d66a4731734c2a76dc63eaaf6804fa991ed9efec2be4861b4565a74c444118c4b40ca5c90c3520cdc974ee9d5e5ad91b8f6b3499dc71f2d7c30

    equal.

Source Code: https://github.com/stoops/csidh/

~

Leave a Reply