Commit Graph

540 Commits

Author SHA1 Message Date
Michele Orrù
9846ad2d17 Some (easy) cleanups as suggested from @ebfull.
Thanks!
2017-08-24 20:13:07 +02:00
Michele Orrù
2ac2d1213d Some (easy) cleanups as suggested from @daira.
Thanks!
2017-08-23 19:17:20 +02:00
Michele Orrù
a86d0b7270 s/Q/Quadratic/ in LegendreSymbol enum.
Proposed by @ebfull.
2017-08-23 19:10:34 +02:00
Michele Orrù
6feb0f802f Merge traits SqrtField and LegendreField into SqrtField. 2017-08-23 19:08:00 +02:00
Michele Orrù
2d3f498e75 Polish sqrt in fr.rs: use pattern matching with Legendre enums. 2017-08-23 19:07:44 +02:00
Michele Orrù
57b4e73627 Create enum for LegendreSymbol, fix test. 2017-08-23 19:06:43 +02:00
Michele Orrù
1b6cf85251 Add Legendre symbol for Fq and Fq2. 2017-08-23 19:04:56 +02:00
Sean Bowe
2042876fcf Disable default features for pairing. 2017-08-22 20:45:45 -06:00
Sean Bowe
3148662234 Reimplementation of groth16 using pairing library. 2017-08-22 16:03:04 -06:00
bmerge
c4c6e25bc0 Auto merge of #37 - ebfull:0.11-release, r=ebfull
Release 0.11.
2017-08-22 21:37:06 +00:00
Sean Bowe
1239b7648d
Release 0.11. 2017-08-22 15:35:02 -06:00
bmerge
dcbd0f3d0c Auto merge of #35 - ebfull:stable-arith, r=ebfull
Introduce stable arithmetic to avoid nightly/unstable features for some platforms

This PR allows the user to opt-out of the "u128-support" feature so that they can use the stable compiler and avoid the unstable `i128_type` feature in the Rust compiler. (Pass `--no-default-features` to opt out.)

This roughly triples the cost of everything in my experience, but it's necessary on some platforms (`arm-linux-androideabi`) which Rust/LLVM doesn't compile 128-bit integers for correctly yet.

**Before this can be merged the CI needs to test against this being enabled or disabled.**
2017-08-22 17:53:46 +00:00
bmerge
68747b4174 Auto merge of #34 - mmaker:fix/is_in_correct_subgroup, r=ebfull
s/is_in_correct_subgroup/is_in_correct_subgroup_assuming_on_curve/

I added a new method`is_in_correct_subgroup_assuming_on_curve` and added the method `is_in_correct_subgroup` for the `CurveAffine` trait.
2017-08-16 16:26:16 +00:00
Michele Orrù
ec49fcc638 s/is_in_correct_subgroup/is_in_correct_subgroup_assuming_on_curve/
Literelly run:
$ sed -i s/is_in_correct_subgroup/is_in_correct_subgroup_assuming_on_curve/g bls12_381/ec.rs
2017-08-16 12:08:52 +02:00
Sean Bowe
51b16c52b3
Only enable i128_type when necessary. 2017-08-15 13:54:51 -06:00
bmerge
3f55cda9d1 Auto merge of #33 - plutomonkey:fix-use, r=ebfull
Remove redundant `use`.
2017-08-15 19:06:15 +00:00
Sean Bowe
3908552fb9
Introduce stable arithmetic to avoid nightly/unstable features for some platforms. 2017-08-15 12:53:22 -06:00
Jason Davies
b893aa17ac Remove redundant use. 2017-08-14 22:15:24 +01:00
bmerge
2eb25d2298 Auto merge of #32 - plutomonkey:fix-const, r=ebfull
Replace inline value with const.
2017-08-14 17:57:37 +00:00
Jason Davies
b1d981e916 Replace inline value with const. 2017-08-14 17:16:21 +01:00
bmerge
990401395c Auto merge of #31 - plutomonkey:fix-doc, r=ebfull
Fix some minor typos in docs.
2017-08-14 15:43:05 +00:00
Jason Davies
122d2b161d Update clippy to 0.0.151. 2017-08-14 16:41:55 +01:00
Jason Davies
d2f47cfa2d Fix minor typos in comments/docs. 2017-08-14 09:47:23 +01:00
Jason Davies
21b0384f28 Fix for superscript period appearing in docs. 2017-08-14 00:22:54 +01:00
Sean Bowe
bf03be0b9d Starting fresh... 2017-08-07 07:43:39 -06:00
bmerge
d72929f64e Auto merge of #26 - ebfull:even-more-adjustments, r=ebfull
Even more adjustments

Closes #22
Closes #24
Closes #25
2017-08-01 17:38:38 +00:00
Sean Bowe
766c902d8c
Allow unreadable_literal lint. 2017-08-01 11:37:51 -06:00
Sean Bowe
ca5efdcebe
Update clippy again. 2017-08-01 11:23:42 -06:00
Sean Bowe
6410bdf998
Adopt idiomatic code suggestions. 2017-07-31 09:39:57 -06:00
Sean Bowe
34aa52b0f7
Another clippy update. 2017-07-31 08:41:51 -06:00
Sean Bowe
ba2c9c7bf0
Clippy update. 2017-07-30 01:12:35 -06:00
Sean Bowe
964fad5a67
Version bump 2017-07-30 00:56:24 -06:00
Sean Bowe
05183c5348
Make Fq6 public. 2017-07-30 00:55:18 -06:00
Sean Bowe
053698eefb
Add Engine associated type to CurveProject/CurveAffine. 2017-07-30 00:54:23 -06:00
Sean Bowe
40ec989184
Add (not particularly efficient) from_str to PrimeField. 2017-07-30 00:47:24 -06:00
Sean Bowe
dcca363d1b
Add muln() to PrimeFieldRepr along with tests for muln/divn. 2017-07-29 23:20:59 -06:00
Sean Bowe
9af0c7dd30
PrimeFieldRepr::divn() should accept u32. 2017-07-29 22:50:48 -06:00
Sean Bowe
1a481bc741
PrimeField::s() should return u32. 2017-07-29 22:47:06 -06:00
bmerge
aa5d634c04 Auto merge of #21 - ebfull:bump-again, r=ebfull
Version bump to 0.10.1
2017-07-24 15:52:14 +00:00
Sean Bowe
7960f69ba9
Use newer version of clippy. 2017-07-24 09:51:20 -06:00
Sean Bowe
f111008d66
Version bump to 0.10.1. 2017-07-23 20:21:08 -06:00
bmerge
c643f0b1fa Auto merge of #20 - ebfull:pairing_with, r=ebfull
Add pairing_with API.

I needed this for something I'm doing so I just wrote it.

Closes #8
2017-07-23 22:56:39 +00:00
Sean Bowe
41834bc4b2
Add pairing_with API. 2017-07-20 20:52:36 -06:00
bmerge
f51a383ef1 Auto merge of #19 - ebfull:ohtenrelease, r=ebfull
Version bump.
2017-07-18 19:38:37 +00:00
Sean Bowe
59765c5830
Version bump. 2017-07-18 13:36:18 -06:00
bmerge
8fc026bb61 Auto merge of #18 - ebfull:primefieldreprtests, r=ebfull
Random encoding/decoding tests for `PrimeFieldRepr`
2017-07-18 17:20:57 +00:00
Sean Bowe
176c77d602
Random encoding/decoding tests for PrimeFieldRepr. Closes #3. 2017-07-18 11:18:42 -06:00
bmerge
a6528a7876 Auto merge of #17 - ebfull:various-improvements, r=ebfull
Group encoding negative test vectors

Closes #10

Also simplifies the encoding code, which has the side-effect of being useful for testing. Also adds more descriptive error reporting throughout the API. Also ensures use of Debug/Display are consistent with standard expectations.
2017-07-18 16:21:39 +00:00
Sean Bowe
9e5f70f126
(clippy) More idomatic reference matching. 2017-07-18 10:16:49 -06:00
Sean Bowe
19efad5ba6
Small fixups to reduce diff. 2017-07-18 09:17:38 -06:00