Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement schnorr signatures over 1st order curve secp256k1 in C #736

Open
jaromil opened this issue Sep 30, 2023 · 2 comments
Open

Implement schnorr signatures over 1st order curve secp256k1 in C #736

jaromil opened this issue Sep 30, 2023 · 2 comments
Assignees
Labels
crypto issue related to cryptographic primitives

Comments

@jaromil
Copy link
Member

jaromil commented Sep 30, 2023

The goal is to make a schnorr signature that aligns with the implementation used in Bitcoin and nostr

The current Schnorr signature implementation uses overloaded arithmetic over ECP using the BLS curve in Zenroom. But most of the implementations out there (bitcoin, nostr..) use the secp256k1 curve, whose arithmetic is only implemented in C. To improve compatibility and efficiency, we need an implementation of schnorr sigs in C: one can follow the code in Lua and translate it.

Verification for the implementation can be done using vectors from Bitcoin BIP34 here https://github.com/bitcoin/bips/blob/master/bip-0340/test-vectors.csv

@jaromil jaromil added the crypto issue related to cryptographic primitives label Sep 30, 2023
@matteo-cristino
Copy link
Collaborator

Zenroom Schnorr signature are performed over BLS (using zenroom.ecp) while the one you linked (and the standard) are over Secp256k1, thus the vector tests will fail.
What we are missing to have it aligned with the standard is the possibility to perform operations over Secp256k1 in zenroom.

@jaromil
Copy link
Member Author

jaromil commented Sep 30, 2023

@matteo-cristino ACK!! thanks! I forgot this. It is possible to implement schnorr over secp256k1 using C then.

@jaromil jaromil changed the title Cover schnorr signatures with vector tests Implement schnorr signatures over 1st order curve secp256k1 in C Oct 2, 2023
@puria puria assigned puria and matteo-cristino and unassigned puria Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto issue related to cryptographic primitives
Projects
None yet
Development

No branches or pull requests

3 participants