Commit Graph

231 Commits

Author SHA1 Message Date
bmerge
09b6e6f921 Auto merge of #82 - str4d:read-write-le, r=ebfull
Add read_le and write_le to PrimeFieldRepr
2018-05-17 17:55:18 +00:00
Sean Bowe
da5f1d3e37 Update to latest rustfmt 2018-05-17 11:59:20 -06:00
Sean Bowe
e4143a4bbc Apply rustfmt to benchmarks 2018-05-17 10:50:56 -06:00
Sean Bowe
97bdd1655f Update clippy 2018-05-17 10:44:28 -06:00
str4d
2a28b61468 Bump version 2018-05-17 16:52:19 +12:00
str4d
98bab6877a Add read_le and write_le to PrimeFieldRepr 2018-05-17 16:50:40 +12:00
ebfull
a64c850e6d Merge pull request #10 from ebfull/small-order-checks
Check epk/rk/cv are not small order
2018-05-14 16:26:40 -06:00
Sean Bowe
63730f3846 Check epk/rk/cv are not small order. 2018-05-14 16:23:34 -06:00
str4d
b12276e63c Merge pull request #6 from ebfull/sprout-proofs
Sprout proofs
2018-05-10 23:40:39 -04:00
Sean Bowe
fefa46b4c4 Implementation of Sprout proving and verifying 2018-05-10 14:29:02 -06:00
ebfull
5e220695e5 Merge pull request #7 from ebfull/sapling-verification
Sapling verification
2018-05-07 23:37:11 -06:00
Sean Bowe
313e45cc01 Implementation of Sapling transaction verification. 2018-05-07 19:22:07 -06:00
ebfull
ef676eff50 Merge pull request #8 from ebfull/minor-changes
Minor changes
2018-05-07 18:50:54 -06:00
Sean Bowe
e9f8c88c95 Use little endian encoding for Pedersen hash digest output. 2018-05-07 18:06:53 -06:00
Sean Bowe
d73044896e Update sapling-crypto dependency. 2018-05-07 17:52:44 -06:00
Sean Bowe
5f233ef989 Initialize Jubjub parameters up front 2018-05-07 17:41:49 -06:00
ebfull
6cc1813ae3 Merge pull request #4 from ebfull/zksnark-param-loading
Support loading zk-SNARK parameters
2018-04-19 10:53:12 -06:00
Sean Bowe
170397b5a5 Apply rustfmt 2018-04-17 14:22:35 -06:00
Sean Bowe
4f9953f18f Support loading zk-SNARK parameters 2018-04-17 14:16:14 -06:00
str4d
2a86c912f6 Merge pull request #3 from ebfull/params-and-merkle-hash
Expose API for merkle hash
2018-04-14 19:29:15 -06:00
Sean Bowe
37f20fb90c Use lazy_static to initialize the Jubjub parameters, to avoid passing parameters around. 2018-04-12 18:38:25 -06:00
Sean Bowe
cb8c9ebbce Make panic abort to avoid FFI problems. 2018-04-12 15:35:20 -06:00
Sean Bowe
96654ee5bd Fix typos 2018-04-12 15:01:48 -06:00
Sean Bowe
f1d35708bc Expose API for init/free of parameters and, to test, a merkle tree hash invocation. 2018-04-11 21:51:30 -06:00
str4d
7dc69c6893 Merge pull request #2 from str4d/sapling-crypto
Add sapling-crypto to dependencies
2018-04-10 13:57:56 -06:00
Sean Bowe
5199fdfcb7 Use newer versions of libc and num_cpus 2018-04-10 13:57:33 -06:00
str4d
222e0b3515 Add sapling-crypto to dependencies 2018-04-09 18:28:42 -06:00
bmerge
dbe897d365 Auto merge of #79 - ebfull:nomorenightly, r=ebfull
Remove feature(i128_type)

The `i128_type` feature was recently stabilized in Rust, so this is unnecessary now for nightly users. In fact, in a few days there should be a new Rust beta (`1.26`) containing stable support for `i128_type`, meaning that (for Zcash) we can switch to the beta compiler for all future Rust development, and even switch to the stable compiler in six weeks when that's released.
2018-03-30 23:55:32 +00:00
Sean Bowe
2d12b9a858 Apply newer rustfmt rules. 2018-03-29 11:18:15 -06:00
Sean Bowe
fcaddaa356 Update Clippy to support latest nightly, and fix some lints. 2018-03-29 10:13:00 -06:00
Sean Bowe
bcc8379a7f Version bump. 2018-03-29 09:23:20 -06:00
Sean Bowe
4cf5a534ec i128_type feature has been stabilized in Rust. 2018-03-29 09:18:26 -06:00
bmerge
ef7ade8c2c Auto merge of #78 - ebfull:release-0.14, r=ebfull
Release of pairing 0.14.0.

This release makes some changes in response to an audit of this library, as well as some obversations about the API that I made. Some names were changed (`divn` -> `shr`, `muln` -> `shl`) and `add_nocarry`/`sub_noborrow` no longer return anything (as their names would suggest.) Some potentially misleading comments are fixed as well.

The release also applies `rustfmt` and new lints from `clippy` to the codebase, enforced by the CI on a more recent version of the Nightly compiler.

Thanks go to @jasondavies for his contributions to this release.
2018-03-05 03:31:26 +00:00
Sean Bowe
92d2c13285 Release of pairing 0.14.0. 2018-03-04 20:01:23 -07:00
bmerge
6fea7e382d Auto merge of #77 - ebfull:rustfmt-application-2, r=ebfull
Apply rustfmt

Supersedes #76

I've made a change to the CI which checks `rustfmt` against the code. Let's see if it worked.
2018-03-05 02:49:40 +00:00
Sean Bowe
53083f4290 Apply rustfmt to the codebase. 2018-02-21 11:08:58 -07:00
bmerge
d51a5b0122 Auto merge of #73 - plutomonkey:update-rand-dependency, r=ebfull
Update "rand" dependency to 0.4.
2018-02-21 16:33:33 +00:00
bmerge
da717f4472 Auto merge of #75 - ebfull:primerepr-fixes, r=ebfull
PrimeRepr improvements

These are API-breaking changes that make `PrimeRepr` a little nicer.
2018-02-21 15:56:41 +00:00
Sean Bowe
541fda7580 Fix misleading comments on write_be and read_be. 2018-02-13 17:14:17 -07:00
Sean Bowe
b971bdedda Rename divn/muln to shr/shl. 2018-02-13 17:07:10 -07:00
bmerge
7b6e13bcb9 Auto merge of #74 - plutomonkey:clippy, r=ebfull
Update clippy and fix code indentation.

(The code indentation issue was not caught by clippy -- I noticed it by chance!)
2018-02-14 00:03:26 +00:00
Sean Bowe
a0fcf717c8 add_nocarry and sub_noborrow should no longer return anything. 2018-02-13 16:41:10 -07:00
Jason Davies
bce9f5d639 Update clippy and fix code indentation.
(The code indentation issue was not caught by clippy -- I noticed it by
chance!)
2018-02-13 16:02:30 +00:00
Jason Davies
2338174244 Update "rand" dependency to 0.4. 2018-02-13 15:51:16 +00: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
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