sCrypt-Inc / zokrates

A zero-knowledge proof toolbox on Bitcoin. A fork of zokrates (https://github.com/Zokrates/ZoKrates).
GNU Lesser General Public License v3.0
14 stars 1 forks source link

Generate proof #16

Closed zhfnjust closed 3 years ago

zhfnjust commented 3 years ago
  1. add secp256k1
  2. add Secp256k1Program
  3. support generate_proof
  4. use Secp256k1 as default CurveParameter

run

cargo run -- generate-proof -i flattened.json
zhfnjust commented 3 years ago

image

P = 115792089237316195423570985008687907853269984665640564039457584007908834671663

There are two methods that can be counted as COMMIT, but for the P-1 mentioned above, neither of these two methods work, and the commit cannot be generated.

it seems the secp256k1 lib verify fail https://github.com/bitcoin-core/secp256k1/blob/1e5d50fa93d71d751b95eec6a80f6732879a0071/src/scalar_low_impl.h#L50

we have a unit test for this, but it fail now.

有unit test https://github.com/sCrypt-Inc/zokrates/blob/generate_proof/zokrates_core/src/pederson.rs#L689

zhfnjust commented 3 years ago

image

compilation failed. sha256