Commit Graph

525 Commits

Author SHA1 Message Date
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
bmerge
affead11a5 Auto merge of #67 - ebfull:static-engine, r=ebfull
Engine should always be 'static, for flexibility in downstream code.
2017-11-21 06:47:28 +00:00
Sean Bowe
4a1ac94799
Implement Clone for Bls12. 2017-11-20 23:53:58 -07:00
Sean Bowe
4b366a143d
Ensure Engine's are always Clone. 2017-11-20 23:20:11 -07:00
Sean Bowe
6d55a4052a Move everything into oldsrc. 2017-11-20 23:01:15 -07:00
Sean Bowe
945d86fe7d Make the namespacing not introduce too much indirection. 2017-11-20 15:50:41 -07:00
bmerge
36ad8b672c Auto merge of #66 - ebfull:scalar-assoc, r=ebfull
Enforce that Fr of Engine is the scalar for curve points

In bellman, I want to write:

```rust
pub struct Point<C: CurveProjective>(pub C);

impl<C: CurveProjective> Copy for Point<C> { }

impl<C: CurveProjective> Clone for Point<C> {
    fn clone(&self) -> Point<C> {
        *self
    }
}

impl<C: CurveProjective> Group<C::Engine> for Point<C> {
    fn group_zero() -> Self {
        Point(C::zero())
    }
    fn group_mul_assign(&mut self, by: &C::Scalar) {
        self.0.mul_assign(by.into_repr());
    }
    fn group_add_assign(&mut self, other: &Self) {
        self.0.add_assign(&other.0);
    }
    fn group_sub_assign(&mut self, other: &Self) {
        self.0.sub_assign(&other.0);
    }
}
```

However, this doesn't typecheck because the compiler cannot know that the `Engine`'s `Fr` type (as dictated by the `Group` trait) is the same as the `Scalar` type of the `CurveProjective` point. This can be solved with a where bound over the trait (for now), but it is generally a good idea for this to be constrained in `pairing`.
2017-11-20 19:26:16 +00:00
Sean Bowe
f32cb40929
Engine should always be 'static, for flexibility in downstream code. 2017-11-20 12:22:51 -07:00
Sean Bowe
a1e1aa30b5 More infrastructure for test development. 2017-11-18 20:10:47 -07:00
ebfull
d47a1d3d1f
Merge pull request #4 from garethtdavies/master
Fixing typo in README
2017-11-16 06:13:08 -07:00
Gareth Davies
22846cda9a
Fixing typo in README 2017-11-15 19:37:38 -08:00
Sean Bowe
3ee1a576f4 Bump version 2017-11-13 01:36:54 -07:00
Sean Bowe
471db6ab27
Enforce that Fr of Engine is the scalar for curve points, for simpler downstream abstractions. 2017-11-12 16:19:08 -07:00
Sean Bowe
7df272b349 Make license files/copyright identical to pairing crate. 2017-11-12 15:56:03 -07:00
Sean Bowe
13a5cbf9d5 Modify the public api surrounding multiexp. 2017-11-12 15:52:10 -07:00
Sean Bowe
e4c62180d7 Use a basic heuristic to choose c for multiexp. 2017-11-12 15:50:34 -07:00
Sean Bowe
b15f5f6f43 Fix some warnings and TODO's. 2017-11-12 13:45:13 -07:00
Sean Bowe
d616362884 Add TestConstraintSystem 2017-11-12 13:26:03 -07:00
Sean Bowe
bc19c76326 Change API to support constraint/variable annotation. 2017-11-11 04:50:30 -07:00
Sean Bowe
9e1553c437
Fix mistake in README. 2017-11-09 16:31:35 -07:00
Sean Bowe
416e6b6199
Add verify_transform tool for solo verification. 2017-11-09 12:42:49 -07:00
ebfull
8cb460ec66
Merge pull request #1 from petertodd/2017-11-alternate-rust-compiler
Add alternate rust toolchain recommendation
2017-11-08 22:23:44 -07:00
Sean Bowe
60297403e6
Add new tool to repository for initializing the first challenge file. 2017-11-08 21:09:43 -07:00
Peter Todd
654b446811
Add alternate rust toolchain recommendation 2017-11-08 21:53:32 -05:00
Sean Bowe
83583caa92
Add link to Rust in README. 2017-11-08 13:40:40 -07:00
Sean Bowe
7c8da6abb9
Implementation of compute tool for participants, along with README changes and a version bump. 2017-11-08 13:38:17 -07:00
Sean Bowe
3bb6596507 Don't make u128-support a default feature anymore. 2017-11-05 19:35:28 -07:00
Sean Bowe
746f45f9e6
Update paper link 2017-10-31 09:35:46 -06:00
Sean Bowe
f21732a8e5
Initial commit 2017-10-29 18:58:34 -06:00
Sean Bowe
326996139e Update to use the latest version of pairing library. 2017-10-22 05:45:26 -06:00
bmerge
5d9f77f5bf Auto merge of #65 - ebfull:byteorder-version, r=ebfull
Use 1 for the byteorder crate's version.
2017-10-12 17:48:25 +00:00
Sean Bowe
342b94c76b
Use "1" for the byteorder crate's version. 2017-10-12 11:20:57 -06:00
bmerge
48044a853f Auto merge of #64 - ebfull:bump-13, r=ebfull
Bump version to 0.13.0

After #58 and #63 are merged.
2017-10-12 17:20:04 +00:00
bmerge
364796d88c Auto merge of #58 - ebfull:derive-clone, r=ebfull
Derive `Clone` for G1/G2 encodings.

AFAIK this will finally work on stable when the next version of Rust is released.

Closes #55
2017-10-12 16:45:21 +00:00
bmerge
30ae5d6313 Auto merge of #63 - ebfull:rand-unknown-exponent, r=ebfull
G1/G2 rand() should produce elements of unknown exponent.

Closes #60.
2017-10-12 16:16:52 +00:00
Sean Bowe
39c25cd506
Bump version to 0.13.0 2017-10-10 01:54:53 -06:00
Sean Bowe
12b9606b9c
G1/G2 rand() should produce elements of unknown exponent. 2017-10-10 01:13:35 -06:00
bmerge
044256c2f7 Auto merge of #62 - mmaker:feature/scale_by_cofactor, r=ebfull
Add "scale_by_cofactor".

Add a function for Affine types that multiplies point by the cofactor of the
group. If the points are in the group, they'll thus end up in the
correct subgroup.

note: this patch is already being tested with previous unittests.
note: this patch raises warning for unused functions and consts.
2017-10-09 23:15:59 +00:00
Sean Bowe
65e50a9e5a
Allow scale_by_cofactor to be dead code temporarily. 2017-10-09 17:14:36 -06:00
Michele Orrù
e5607bb528 Add "scale_by_cofactor".
Add a function for Affine types that multiplies point by the cofactor of the
group.
2017-10-09 10:04:22 +02:00
bmerge
dfb836170b Auto merge of #61 - ebfull:minor-changes, r=ebfull
Minor changes
2017-10-05 18:36:27 +00:00