erlang-punch / nostr

A pure Erlang implementation of the nostr protocol
https://github.com/erlang-punch/nostr
MIT License
16 stars 3 forks source link

Implement Schnorr algorithm signature algorithm in pure Erlang #12

Closed niamtokik closed 1 year ago

niamtokik commented 1 year ago

All messages are signed using Schnorr signature, the same protocol used by Bitcoin and defined in BIP-340. That's one of the most important requirement here. Unfortunately, at this time, it seems no version of this algorithm is present in OTP and no one implemented it in pure Erlang.

Implementing an algorithm from the cryptography world is never a good idea, but, it could be great to learn a little bit more. Here the list of specifications and implementation I found.

The test vectors can be found there: https://github.com/bitcoin/bips/blob/master/bip-0340/test-vectors.csv with the implementation: https://github.com/bitcoin/bips/blob/master/bip-0340/reference.py

Other resources:

niamtokik commented 1 year ago

Schnorr signature schema was a requirement for and has been implemented in #3. I am closing this issue.