Open pchiusano opened 6 months ago
So the racket library crypto supports es25519, but it's LGPL. It looks like that library uses libdecaf under the hood, which shouldn't be too hard to write FFI for
Update on this: turns out openssl's libcrypto
supports es25519, so I'm doing FFI to that.
@pchiusano ok I've got signature generation working, but I have a question: the unison impl requires both the seed
and the public key
for signature generation, but the public key
can be generated from the signature, and libcrypto
only requires the seed
. Should I just ignore the public key
argument?
@pchiusano @jaredly would it be possible to extend this support to RSA signatures 🙏 ?
This is needed for many applications (Discord webhook auth came up), and I don't think we should try to implement in pure Unison right now, same as other crypto primitives.
The
Failure
is because not allBytes
correspond to a valid public key or secret key.In base, I'd wrap these in more convenient typed interfaces:
It might not be worth newtyping SecretKey, PublicKey, and Signature, depending on taste. There's also the question of whether we have a separate newtype for all the different public key algos, when more are added.
Following:
https://hackage.haskell.org/package/cryptonite-0.5/docs/Crypto-PubKey-Ed25519.html#t:PublicKey
@jaredly does this seem easy to implement in Racket?