Commit Graph

1475 Commits

Author SHA1 Message Date
Sean Bowe 6841763ae7
Add TODO for improving lookup performance. 2017-12-28 16:10:19 -07:00
Sean Bowe 849f330441
Add test to monitor the number of constraints consumed by the pedersen hash (in the context of a merkle tree). 2017-12-28 12:00:22 -07:00
Sean Bowe e9c9618ef4
Implement pedersen hashes inside and outside of the circuit. 2017-12-28 11:06:05 -07:00
Sean Bowe 07f2e553a7
Implement twisted Edwards point conversion and addition in the circuit. 2017-12-22 11:52:13 -07:00
Sean Bowe 8e3bef80a4
Bump version of bellman. 2017-12-22 11:52:13 -07:00
Sean Bowe e1ab3be3cc
Implementation of conditional negation for AllocatedNum. 2017-12-22 11:52:13 -07:00
Sean Bowe 87548f3d1d
Implementation of Montgomery point addition in the circuit. 2017-12-22 11:52:08 -07:00
ebfull 041060e5ca
Merge pull request #13 from ebfull/tidy-up
Tidy up the codebase (TODOs into github issues)
2017-12-18 22:11:05 -07:00
Sean Bowe 031ae638ce
Tidy up the codebase (TODOs into github issues). 2017-12-18 22:08:57 -07:00
ebfull 49cc4e05d9
Merge pull request #4 from ebfull/refactor-jubjub
Group Hash implementation in the circuit
2017-12-18 21:38:30 -07:00
Sean Bowe 1e56289f19
Implementation of group hash in the circuit. 2017-12-18 11:34:15 -07:00
Sean Bowe d143d3230a
Relocate grouphash implementation. 2017-12-18 11:15:02 -07:00
Jay Graber 635bd8104e
Add grouphash 2017-12-18 10:58:59 -07:00
Sean Bowe 7d6a57661b
Add Montgomery point interpretation. 2017-12-17 10:07:00 -07:00
Sean Bowe eb8803f9eb
Implementation of `into_bits_strict` for `Num`. 2017-12-17 09:31:33 -07:00
Sean Bowe 068fbbc2be
Implementation of `into_bits` for `Num`. 2017-12-17 09:12:04 -07:00
Sean Bowe 6c6a193551
Implementation of `from_bits_strict` for `Num`. 2017-12-16 17:03:40 -07:00
Sean Bowe d04c5acdb8
Implement `enforce_in_field` and `enforce_nand` for Boolean. 2017-12-16 16:01:13 -07:00
Sean Bowe dfd82439de
Implementation of k-ary AND. 2017-12-15 14:12:38 -07:00
Sean Bowe dc981e6abc Allow linear combinations to be added together. 2017-12-14 16:11:24 -07:00
Sean Bowe 46cbfb4831
Implementation of Montgomery point doubling in the circuit. 2017-12-14 15:41:37 -07:00
Sean Bowe 8c4433ee82
Add 2A precomputation to jubjub parameters. 2017-12-14 11:34:57 -07:00
Sean Bowe 6b43a4ed10
Make UInt32::addmany produce constant results when fed constant inputs, to allow for blake2s block precomputation for group hash. 2017-12-12 14:53:16 -07:00
Sean Bowe 3a6e8d448f
Add `get_for_x` to Montgomery implementation. 2017-12-12 10:31:13 -07:00
Sean Bowe e9d3923829
Refactor jubjub implementation to be abstract over field, parameters. 2017-12-11 23:06:05 -07:00
ebfull bba5797e72
Merge pull request #2 from ebfull/mont-to-projective
Do not perform inversions when converting from montgomery to edwards
2017-12-11 15:44:11 -07:00
Sean Bowe c0f5645ab4
Do not perform inversions when converting from Montgomery to projective extended twisted Edwards. 2017-12-06 17:22:35 -07:00
Sean Bowe 7c48792511
Some test cleanups. 2017-12-06 10:21:56 -07:00
Sean Bowe bcb4925c6d
Rename "sapling" to "sapling-crypto" in COPYRIGHT. 2017-12-06 10:15:12 -07:00
Sean Bowe 96bcc84447
Change library name and add README. 2017-12-06 10:10:56 -07:00
Sean Bowe 86619c7334
Implementation of fundamental circuitry and primitive Jubjub curve arithmetic. 2017-12-06 10:06:34 -07:00
bmerge a8583dd818 Auto merge of #71 - ebfull:expose-arith, r=ebfull
Expose arithmetic

This exposes `adc`/`sbb`/`mac_with_carry` from this library for downstream use, as long as a `expose-arith` feature is enabled. We need this downstream to avoid code duplication.

This also bumps to `0.13.2`.
2017-12-05 04:43:24 +00:00
Sean Bowe fb679470db
Bump version. 2017-12-04 21:48:22 -07:00
Sean Bowe 04a32fb443
Introduce `expose-arith` unstable feature for exposing arithmetic functions downstream. 2017-12-04 21:47:45 -07:00
Sean Bowe 70a588ceee Version bump 2017-12-02 23:31:37 -07:00
ebfull 3163e801b9
Merge pull request #16 from ebfull/recode
Part one of recoding bellman
2017-12-02 23:30:57 -07:00
Sean Bowe 5a88b4f818 Guarantee inheritance of variable type for public constraint system contexts. 2017-12-02 23:30:23 -07:00
bmerge cc8be5b780 Auto merge of #70 - ebfull:comment-fixes, r=ebfull
Fix some comments

The `mod q` stuff was spotted by @Pratyush and/or @howardwu.

I just noticed the `// 2` typo.
2017-11-26 10:19:09 +00:00
Sean Bowe b8394bf14d
Fix some comments. 2017-11-26 03:09:06 -07:00
bmerge ed5a7f31e2 Auto merge of #69 - ebfull:0.13.1-release, r=ebfull
Release of 0.13.1

This release features the following changes:

* The `byteorder` version is now set to `1` as conventional.
* The `CurveAffine`/`CurveProjective` traits now enforce that the scalar field of the `Engine` is the same scalar field for the curves.
* `Engine` is now `'static` and `Clone` to avoid problems with lifetime quirks and auto-derives.
* The scalar field of `Engine` is now guaranteed to be `SqrtField` which helps downstream abstractions.

In this PR I will be updating the `clippy` version and fixing any linting problems that show up. The builder should be using the newest nightly/stable versions of Rust also.
2017-11-26 04:27:58 +00:00
Sean Bowe bb1ced0bd7
Update clippy version. 2017-11-25 21:32:14 -07:00
Sean Bowe 566f100480
Release of 0.13.1. 2017-11-25 21:01:55 -07:00
bmerge df9d2aaa37 Auto merge of #68 - ebfull:scalar-sqrt, r=ebfull
Scalar field should be guaranteed to be SqrtField
2017-11-26 03:50:21 +00:00
Sean Bowe aa0cc06e5e
Scalar field should be guaranteed to be SqrtField. 2017-11-25 20:57:10 -07:00
Sean Bowe 1fc640e88f Guarantee that we inherit the correct variable type. 2017-11-24 10:14:11 -07:00
Sean Bowe 92029393f6 Guarantee that variables are Copy+Clone. 2017-11-22 22:55:32 -07:00
Sean Bowe 1d394e00f6 Allow linear combination terms to be inspected for downstream evaluation. 2017-11-22 21:11:41 -07:00
Sean Bowe e54c4bc1b3 Rename to `namespace_public`. 2017-11-21 14:00:00 -07:00
Sean Bowe af91dcda33 Infrastructure for public input namespacing. 2017-11-21 13:44:56 -07:00
Sean Bowe b7f2f9e409 Part one of Bellman being recoded. 2017-11-21 01:59:49 -07:00