Hi there, you may remember me from various computer science, climate science, and politics threads.
Well I'm back! With a question about cryptography. But really this is a question about group theory/finite fields/abstract algebra (I think). I really have no formal understanding of any of that, but I have been trying to wing it so far, and this is what I've come up with: a failing system.
I am trying to build a "semiprivate key system" using the Networking and Cryptography Library and more specifically Curve25519, which is a form of twisted Edwards curve.
It looks like this, as formally as I can describe it:
https://gist.github.com/tarcieri/4760215
And since SF has [math]LaTeX[/math], perhaps I can try to make it purdier?
Semiprivate keys are supposed to be an infinite recursion of the concept of asymmetric keys, but my post does a poor job of describing that. If you're interested ask me for more details!
I have tried implementing this description in code (via the scalar multiplication function available in the NaCl library) and it failed. Someone else provided me this description of the algorithm in SAGE, which I have not yet verified myself, and does not use the same twisted Edwards curves that NaCl uses:
https://gist.github.com/tarcieri/40d2eb8e4e8f9ed28b3a
Here are semiprivate keys implemented in SAGE:
https://gist.github.com/tarcieri/40d2eb8e4e8f9ed28b3a
This actually works! It's not quite the same thing because SAGE does not support Edwards curves, but it's the same basic idea.