Commit Graph

122 Commits

Author SHA1 Message Date
Sergey Vasilyev
97ca70b854 Merkle tree panics when there's a single leaf - test 2020-05-06 18:07:47 -07:00
Sergey Vasilyev
f4e2039d61 Merkle tree fails to compute the root when there's no need in dummy nodes - test 2020-05-06 18:07:47 -07:00
Georgios Konstantopoulos
ea2adb4f7f fix(fp-cmp): use enforce unchecked in enforce unchecked function 2020-05-06 09:10:28 -07:00
Pratyush Mishra
cc534494ec Add x86_64 asm codegen for PrimeField mul and square (#176) 2020-05-04 06:05:22 -07:00
Pratyush Mishra
04267f48a2 Merge remote-tracking branch 'upstream/master' into inline-asm 2020-05-04 05:40:48 -07:00
Pratyush Mishra
11e689ddc0 Clean up features, and make nightly detection robust 2020-05-04 05:15:26 -07:00
jon-chuang
95fbfe06f6 Merge branch 'master' into inline-asm 2020-04-23 22:00:29 +08:00
Pascal Berrang
3708a444a2 Give Travis more time 2020-04-23 02:42:50 -07:00
Pascal Berrang
9455f00c01 Add benchmark for mixed-radix and radix-2 FFT resembling the Groth16 operations. 2020-04-23 02:42:50 -07:00
Pascal Berrang
13b9c6c6fe Split FpParameters/PrimeField and add FFT related traits 2020-04-23 02:42:50 -07:00
jon-chuang
b1f4c50fd8 Merge branch 'master' into inline-asm 2020-04-23 08:26:20 +08:00
Bruno França
bbb7d75ec8 Implement conditional_check_verify for NIZKs (#195)
* Implement `ToBitsGadget` for `UInt8` and `Vec<UInt8>`
* Add `kary_or` function to `Boolean`.
2020-04-22 13:30:33 -07:00
jon-chuang
535f93d378 --emit=asm seemed to be hurting performance significantly... So lets not recommend it for now. 2020-04-23 01:11:28 +08:00
jon-chuang
a919e8658c update readme 2020-04-22 23:35:34 +08:00
jon-chuang
0b85f5cfa1 update readme 2020-04-22 23:34:17 +08:00
jon-chuang
4e85a68d0f update readme 2020-04-22 23:33:40 +08:00
jon-chuang
33583be17a more readme edits 2020-04-22 17:14:40 +08:00
jon-chuang
2d0f2943e0 More detailed readme instructions 2020-04-22 17:10:08 +08:00
jon-chuang
60ebc0d907 readme asm instructions 2020-04-22 17:05:48 +08:00
Kobi Gurkan
5cc094be6b Adds alloc_constant to AllocGadget (#189)
* adds alloc constant to AllocGadget

* fmt

* fmt

* more alloc constant impls

* fmt

* even more impls

* fixes type

* fixes alloc_constant in gm17

* uses alloc_constant from field gadget in group gadgets

* fmt

* handle most comments
2020-04-18 16:03:33 -07:00
Pascal Berrang
c486e15f0e Add test cases for COFACTOR and generalize SW tests 2020-04-09 11:04:50 -07:00
Pascal Berrang
d4a2d31d07 Fix Vec imports for no_std 2020-04-09 11:04:50 -07:00
Pratyush Mishra
5659b0d9ea Fix CI to test more code in no_std 2020-04-08 18:57:39 -07:00
jon-chuang
0427d2a678 Merge branch 'master' into inline-asm 2020-04-08 20:40:30 +08:00
Pratyush Mishra
33a9da08f8 Switch to stable cargo formatting options 2020-04-07 19:30:27 -07:00
Pratyush Mishra
456f30a849 Fix #172 and improve squaring code for deg-3 extensions (#174) 2020-04-07 19:29:54 -07:00
Pascal Berrang
8631f883c4 MNT4/6 curves and recursive SNARKs (#150)
* Add mnt6_753 curve
Generalize mnt6 curve model

* Add mnt4 curves

* Use resampled generators

* Calculate correct G2 cofactors

* Add fields to r1cs-std

* Add pairings

* Improve reusing of Fq/Fr among MNT curves

* Add instantiations of curves
Fix Fp6_2over3
Rebase code to current master

* Add test for recursive NIZK proof verification

* Address comments in PR

* Improve test case and port to GM17
Also fix a minor bug in to_field_vec
2020-04-04 10:50:46 -07:00
Pratyush Mishra
81f3105a91 Fix MerkleTree leaf index calculation 2020-04-02 08:53:31 -07:00
Kobi Gurkan
c58fc31119 fmt and docs 2020-03-30 01:42:20 -07:00
Kobi Gurkan
ded3d687cc removes unused struct + fmt 2020-03-30 01:42:20 -07:00
Kobi Gurkan
8cd0999431 moves cmp to be under FpGadget 2020-03-30 01:42:20 -07:00
Kobi Gurkan
60058b2186 changes test name 2020-03-30 01:42:20 -07:00
Kobi Gurkan
bd86eb4563 uses core instead of std 2020-03-30 01:42:20 -07:00
Kobi Gurkan
b0f266de1e fmt 2020-03-30 01:42:20 -07:00
Kobi Gurkan
7ed38fe4a6 makes API cmp-like 2020-03-30 01:42:20 -07:00
Kobi Gurkan
ccbb5ef553 adds a smaller than gadget 2020-03-30 01:42:20 -07:00
Weikeng Chen
33f7d3988f Update uint64.rs 2020-03-26 18:50:09 -07:00
weikeng
a205f191f7 used AllocGadget for UInt64 2020-03-26 18:50:09 -07:00
Georgios Konstantopoulos
0ffa409ec1 Apply suggestions from code review
Co-Authored-By: Pratyush Mishra <pratyushmishra@berkeley.edu>
2020-03-25 09:29:49 -07:00
Georgios Konstantopoulos
f4e030793c test: ensure the Counter and the System match 2020-03-25 09:29:49 -07:00
Georgios Konstantopoulos
695df979b5 chore: add helper 2020-03-25 09:29:49 -07:00
Georgios Konstantopoulos
951a6226c9 feat: TestConstraintCounter 2020-03-25 09:29:49 -07:00
Pratyush Mishra
b1913a9ca7 Change default to_bits and to_bytes functions to the safe versions 2020-03-18 23:24:54 -07:00
dependabot-preview[bot]
b24e705527 Update derivative requirement from 1 to 2 (#140) 2020-03-16 15:25:12 -07:00
dependabot-preview[bot]
9ca5a94f2e Update digest requirement from 0.7 to 0.8 (#141)
* Update `digest` and `blake2` requirement from 0.7 to 0.8

Updates the requirements on [digest](https://github.com/RustCrypto/traits) to permit the latest version.
- [Release notes](https://github.com/RustCrypto/traits/releases)
- [Commits](https://github.com/RustCrypto/traits/compare/digest_v0.7.2...digest-v0.8.1)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Pratyush Mishra <pratyushmishra@berkeley.edu>
2020-03-16 15:22:10 -07:00
ValarDragon
20af44e3c9 fix fmt check 2020-03-12 09:21:01 -07:00
ValarDragon
23c6bb4bd0 Rename arguments to CondSelectGadget for code clarity 2020-03-12 09:21:01 -07:00
Weikeng Chen
6c0ee7ffbc Follow the nightly's suggested fmt change 2020-03-05 10:55:54 -08:00
weikeng
e524e46d0b Add UInt64 used for representing Merkle tree node locations 2020-03-05 10:55:54 -08:00
Pratyush Mishra
0df0a15e1b Blake PRF & R1CS Boolean Refactor (#132)
* refactor(r1cs-std/boolean): expose enforcing value less than functionality

* fix(r1cs-std/boolean): ensure num_bits is calculated correctly from the arg

* feat(primitives/blake2s): allow creating Blake2s with custom params
2020-03-05 10:51:59 -08:00