Srinath Setty
e8a6e45b3c
move StepSNARK to nifs.rs in prep for recursion APIs ( #61 )
...
* move StepSNARK to nifs.rs in prep for recursion APIs
* clippy
2022-05-14 18:59:42 -07:00
iontzialla
9f7c12dbc5
Base case for second circuit ( #60 )
...
* output the incoming instance as the running instance in one of the circuits
* Make some verifier circuit inputs optional (for base case)
2022-05-14 07:56:57 -07:00
Srinath Setty
3193d67bce
delegate sampling of generators to trait implementors ( #59 )
2022-05-14 12:16:22 +05:30
Srinath Setty
36d4be2145
take ro_constants as a parameter ( #58 )
2022-05-14 10:50:10 +05:30
Srinath Setty
6ac9c7706d
precompute R1CSShape's digest ( #57 )
2022-05-13 07:53:21 -07:00
Srinath Setty
fab07689eb
remove unneeded tracking and checks ( #55 )
...
* remove unneeded tracking and checks
* remove unused error type
2022-05-13 14:50:42 +05:30
Srinath Setty
562fa71027
move from rug to num-bigint ( #53 )
2022-05-13 01:50:37 -07:00
Srinath Setty
677fe23673
Switch RO to use the one in the Group trait ( #54 )
...
* switch to RO in the Group trait
* simplify compression
* absorb IO as bignum for relaxedR1CS
2022-05-13 01:49:34 -07:00
Srinath Setty
82b7fabd9d
absorb running instance separately (for clarity) ( #52 )
2022-05-12 23:18:53 -07:00
Srinath Setty
706d688a13
add hash(params, U, z0, zi, i) when generating a challenge ( #51 )
...
* add hash(params, U, z0, zi, i) when generating a challenge
* address clippy
2022-05-12 22:34:12 -07:00
Srinath Setty
ccc6dc3a04
Truncate digest bits ( #50 )
...
* apply a hash function before adding to transcript
* truncate shape_digest into 250 bits
* add missing file
* fix clippy
* cargo fmt
2022-05-12 22:08:43 -07:00
Srinath Setty
0d53db18e3
implement transcript methods for various types ( #49 )
...
* implement transcript methods for various types
* address clippy
* add shape to transcript
2022-05-11 23:58:43 -07:00
Srinath Setty
485eb3fac6
fix build ( #48 )
...
* fix build
* switch to stable
2022-05-10 23:27:27 -07:00
Srinath Setty
f11a8f19d1
trait updates to support using Poseidon as RO ( #43 )
2022-05-10 22:36:24 -07:00
Arthur Greef
9a466d1467
Change alloc_num_equals arguments to references ( #45 )
2022-04-30 04:14:38 +05:30
Srinath Setty
bcbdec2982
Accelerated MSM prep ( #41 )
...
* remove send + sync
* introduce a new associative type to capture any form of preprocessing on group elements
* update pasta_curves version
* simplify trait requirements
* fix clippy
2022-04-25 21:09:47 -07:00
Srinath Setty
3445d7da61
remove unused constants ( #40 )
2022-04-25 18:40:09 -07:00
Srinath Setty
751b3434ec
make gadgets public, expose coords, cleanup ( #39 )
...
* make gadgets public, expose coords, cleanup
* fix clippy
2022-04-25 16:11:56 -07:00
Srinath Setty
fd0b0b787b
remove unused where ( #38 )
2022-04-25 15:58:30 -07:00
Samuel Burnham
fbc855d1d6
Wasm support ( #34 )
...
* Bump commit.
* Add wasm support
* Add nix build
* Update bellperson
* Update bellperson
* Remove Nix
* Remove .envrc
* Always use bellperson
* Use updated bellperson-nonnative
* Update bellperson-nonnative
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com >
Co-authored-by: Anders Christiansen Sørby <anders@sorby.xyz >
2022-04-25 15:58:16 -07:00
iontzialla
4656a7179d
Refactor circuit code ( #37 )
...
* update crate versions
* refactor
* small tweaks
* run cargo fmt
* fix comments
* remove unused code
* address clippy
Co-authored-by: Srinath Setty <srinath@microsoft.com >
2022-04-25 14:54:53 -07:00
Srinath Setty
72920fb62b
update crate versions ( #36 )
...
This PR updates the crate versions of neptune, bellperson, and bellperson-nonnative to the latest.
2022-04-25 12:45:20 -07:00
Srinath Setty
beb6dace82
add tinyr1cs example using bellperson ( #33 )
...
* add tinyr1cs example using bellperson
* clippy
2022-04-21 14:41:05 -07:00
Srinath Setty
c2106e8109
Base case cleanup ( #32 )
...
* small cleanup
* small cleanup
2022-04-21 13:20:08 -07:00
Srinath Setty
dcea0be01f
output h2 as AllocatedNum ( #31 )
...
* output h2 as AllocatedNum
* clippy
2022-04-15 16:59:41 -07:00
Srinath Setty
9a0f5604d6
make step_circuit mandatory; add support for longer hashes ( #30 )
2022-04-15 16:06:26 -07:00
Srinath Setty
866717a8f2
cleanup how points are allocated ( #29 )
2022-04-15 12:04:52 -07:00
Srinath Setty
9a44d06aec
PrimeField --> ff::PrimeField ( #28 )
...
* PrimeField --> ff::PrimeField
* cargo fmt
2022-04-14 07:48:55 -07:00
Srinath Setty
c20da2f58c
Cleanup ( #27 )
...
* VerificationCircuit --> NIFSVerifierCircuit, for clarity
* InnerCircuit --> StepCircuit
* Rename
* cleanup imports
* additional cleanup in the test
* small cleanup
2022-04-13 17:29:48 -07:00
Srinath Setty
cbc3fe81dc
cleanup: merge ecc and ecc_circuit ( #25 )
2022-04-08 14:19:32 -07:00
Srinath Setty
bebcc94904
support for stable Rust
2022-04-08 13:34:48 -07:00
Srinath Setty
27839896a3
bump version number
2022-04-08 11:03:35 -07:00
porcuquine
648eb0bb6e
Fix CS::one() bug in solver. ( #24 )
...
* Test and fix solver CS::one() bug.
* Remove unused linear-combination evaluations.
* rustfmt
* Clippy.
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com >
2022-04-08 06:30:52 -07:00
Srinath Setty
e47b6148f4
Verifier circuit ( #23 )
...
* ECC scalar multiplication (first draft)
* fix clippy nits
* start implementing the ro gadget: 1st design Poseidon + truncate
* truncate to 128 bits
* implement add + double in constraints
* finish implementing constraints for ecc
* cargo fmt
* input of smul should be an array of bits
* cleanup ro a bit. Make the challenge returned be a vec of allocated bits
* switch to neptune 6.0
* start implementing high level circuit
* incomplete version of the verifier circuit with many TODOS
* optimize ecc ops. add i ==0 case to the circuit
* fix 0/1 constants at the circuit
* wrap CompressedGroupElement of Pallas and Vesta
* cargo fmt
* generate poseidon constants once instead of every time we call get_challenge
* Implement RO-based poseidon to use outside of circuit. Reorganize the repo
* add inner circuit to verification circuit
* start adding folding of the io. there is an error in the first call to mult_mod
* add test to check that bellperson-nonnative is compatible with nova
* remove swap file
* add another test that fails
* add inputs to the circuits in tests
* rename q to m in circuit.rs. add more tests in test_bellperson_non_native. change a in test_mult_mod to expose error
* push test for equal_with_carried. fix the issue is src/r1cs.rs
* cargo fmt + update the verifier circuit: add folding of X and update all hashes with X
* make limb_width and n_limbs parameters
* make params part of h1
* allocate the field order as constant. add check that z0 == zi when i == 0
* fix error in test_poseidon_ro
* remove merge error
* small fixes
* small fixes to comments
* clippy lints
* small edits; rename tests
* move inputize before from_num
* _limbs --> _bn
* _limbs --> _bn
Co-authored-by: Ioanna <iontzialla@gmail.com >
2022-04-07 14:53:57 -07:00
Srinath Setty
6797e1e042
fix loop bound ( #20 )
2022-04-01 13:58:54 -07:00
porcuquine
2919fe4e78
Use bellperson v0.19.0. ( #18 )
...
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com >
2022-03-22 12:24:45 -07:00
Srinath Setty
e55d4f680b
remove test feature (we don't seem to use it) ( #17 )
2022-02-18 14:14:54 -08:00
porcuquine
853ab90f7c
Use pasta_curves 0.3.0. ( #15 )
...
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com >
2022-02-15 15:10:11 -08:00
Srinath Setty
5e5dd65abc
Update version
2021-10-20 10:31:39 -07:00
Srinath Setty
2a877f9ad0
Update rust.yml
2021-10-20 10:26:28 -07:00
porcuquine
338fbff9ac
Add missing doc comments.
2021-10-20 10:19:20 -07:00
porcuquine
c28c421ab9
Use released bellperson 0.18.0.
2021-10-20 10:19:20 -07:00
Srinath Setty
8027bcf056
cargo fmt
2021-10-20 10:19:20 -07:00
Srinath Setty
ff885c4d5d
fix bellperson path; address minor clippy-suggested edit
2021-10-20 10:19:20 -07:00
porcuquine
efb73ef325
Rename Prover and ProvingAssignment.
2021-10-20 10:19:20 -07:00
porcuquine
3b668e7ac6
Add support for using bellperson to generate R1CS.
2021-10-20 10:19:20 -07:00
Srinath Setty
6e59ebccd3
add CI ( #9 )
2021-10-14 16:47:23 -07:00
Srinath Setty
4c711a99a5
bump the version number
2021-10-08 09:55:29 -07:00
porcuquine
3e80c5c8ba
Derive more traits. ( #7 )
...
Co-authored-by: porcuquine <porcuquine@users.noreply.github.com >
2021-10-08 09:52:36 -07:00
porcuquine
cf5d708202
Add InputOutputMismatch error.
2021-10-06 10:10:37 -07:00