iden3 / circomlib

Library of basic circuits for circom
601 stars 209 forks source link

circuit to verify an ethereum signature - curve secp256k1 #1

Open atvanguard opened 5 years ago

atvanguard commented 5 years ago

Hey folks, I am looking for a zkp circuit to verify an ethereum signature. I think that's ECDSA - secp256k1? I need to use for my hackathon project. Is there a implementation for the same already available somewhere?

As a PoC I can use EdDSA signatures as well for my project, however the EdDSA test tests in this repo are failing. Can you help me fix them?

Thank you.

atvanguard commented 5 years ago

Resolved! It was a timeout issue! const cirDef = await compiler(path.join(__dirname, "circuits", "eddsa_test.circom")); takes more time than that set in the test. I precompiled the circuit circom test/circuits/eddsa_test.circom before running the test.

Modifying the title of the issue to ask whether there already is an implementation of ecdsa based on secp256k1.

liamzebedee commented 5 years ago

We're currently exploring this for interchain swaps - and would love some sample code :) - the Aussie from the fantastic Web3 workshop you guys did :)

xhliu commented 2 years ago

https://github.com/0xPARC/circom-ecdsa