Commit Graph

5973 Commits

Author SHA1 Message Date
Sean Bowe
69c0f9128c Enforce that the S value of the ed25519 signature is smaller than the group order to prevent malleability attacks. 2016-05-30 11:05:55 -06:00
Sean Bowe
320f2cc7e0 Switch to Ed25519 for cryptographic binding of joinsplits to transactions. 2016-05-30 11:05:55 -06:00
Taylor Hornby
b48122b57b Fix tests for JoinSplit signatures 2016-05-30 11:05:43 -06:00
Taylor Hornby
a138f81404 Implement signature verification in CheckTransaction 2016-05-30 11:05:43 -06:00
Taylor Hornby
ed6c1b5d15 We don't want to benchmark signature creation / verification. 2016-05-30 11:05:43 -06:00
Taylor Hornby
6aae9d1a55 Sign JoinSplit transactions 2016-05-30 11:05:31 -06:00
Sean Bowe
fd7c139e37 Pass -fopenmp at compile-time to enable MULTICORE. 2016-05-25 15:59:59 -06:00
Sean Bowe
e6c2d66c93 Enable MULTICORE proving behavior with omp. 2016-05-25 11:19:13 -06:00
zkbot
8ff7c0752e Auto merge of #954 - ebfull:fix-cpourtx-structure, r=ebfull
CPourTx structural changes

* Enable binary serialization of proofs and the proving key (closes #799) and make the proofs fixed-size.
* Reorder fields of CPourTx to match the spec (closes #927)
2016-05-25 16:33:31 +00:00
Sean Bowe
6b5d608899 Update proving key and tests that depend on transaction structure changes 2016-05-24 11:09:17 -06:00
Sean Bowe
3ebca007f3 Reorder fields of CPourTx to reflect the spec. 2016-05-24 11:08:31 -06:00
Sean Bowe
9285bba885 Enable binary serializations of proofs and r1cs keys, and make the CPourTx proof field fixed-size. 2016-05-24 11:08:31 -06:00
Sean Bowe
defe37a6d4 Enforce first four bits are zero for all spending keys and phi. 2016-05-24 11:07:09 -06:00
zkbot
4ac1841614 Auto merge of #958 - ebfull:prf-refactor, r=ebfull
Refactor PRF_gadget to hand responsibility to PRF_addr_a_pk_gadget for creating the '0' argument to the PRF

Closes #930
2016-05-24 01:11:44 +00:00
Alfie John
1785bdb98a Rename libzerocash to libzcash 2016-05-24 08:36:48 +10:00
Sean Bowe
1bcdec40a4 Refactor PRF_gadget to hand responsibility to PRF_addr_a_pk_gadget for creating the '0' argument to the PRF. 2016-05-23 10:43:25 -06:00
zkbot
671b9562f1 Auto merge of #943 - str4d:938-clientversion, r=ebfull
Update version and help strings for Zcash

Closes #938.
2016-05-21 00:30:13 +00:00
Jack Grigg
b3e712a4d2 Minor error message tweak 2016-05-21 11:48:52 +12:00
Jack Grigg
c5d080bb83 Add Zcash Developers to CLI copyright notice 2016-05-20 11:56:19 +12:00
Jack Grigg
a1de76c7a0 Bitcoin -> Zcash in version and help text 2016-05-20 11:56:11 +12:00
Taylor Hornby
7c1ccd9006 Remove unused code in libzerocash util.cpp 2016-05-18 11:22:29 -06:00
Taylor Hornby
675e17022f Use left shift instead of floating-point pow() in equihash. 2016-05-18 11:22:29 -06:00
Taylor Hornby
6fe2e85816 Use HARDENED_CPPFLAGS in the Makefile consistently. 2016-05-18 11:22:29 -06:00
Taylor Hornby
e857a0cd1f Fix build warnings in sighash tests. 2016-05-18 11:22:29 -06:00
Jack Grigg
fe0cacd2d8 Add Zcash revision to version strings 2016-05-18 16:50:28 +12:00
Sean Bowe
383f8b0c8a Change testnet network magics. 2016-05-16 22:54:33 -06:00
Taylor Hornby
bf2e3122ac Remove the Merkle tree hash function's fixed point. 2016-05-16 20:20:36 -06:00
zkbot
9e387120eb Auto merge of #908 - ebfull:trafford, r=ebfull
libzcash and new zkSNARK circuit implementation

This PR completes [`libzcash`](https://github.com/zcash/zcash/tree/zc.v0.11.2.latest/src/zcash), the implementation of the [Zcash protocol specification](9bb4410e45/protocol/protocol.pdf) and replacement of [`libzerocash`](https://github.com/Zerocash/libzerocash), our old Zerocash protocol implementation. The new spec comes with some improvements to security and terminology, with minimal differences from the original academic design.

This implementation includes:

* A rewrite of the zkSNARK circuit for `JoinSplit` operations. This rewrite is cleaner, broken up into separate gadgets, easier to audit and review, and fixes some security bugs. (Closes #822, Closes #809, Closes #500, Closes #854)
* A minimal API for interacting with `JoinSplit`s and surrounding primitives. This PR removes almost twice as much code as it introduces. (Closes #877, Closes #315, Closes #824, Closes #798, Closes #707, Closes #512, Closes #247, Closes #128, Closes #514)
2016-05-17 01:04:49 +00:00
Sean Bowe
1896a89cac Add h_sig test vectors. 2016-05-12 16:45:12 -06:00
Sean Bowe
81469bbb83 Note values should be little-endian byte order. 2016-05-12 16:45:12 -06:00
Sean Bowe
032164d5d5 Rename hmac -> mac in circuit. 2016-05-12 16:45:12 -06:00
Sean Bowe
a9640f67f1 Rename ZCASH_ constants to ZC_. 2016-05-12 16:45:07 -06:00
Sean Bowe
53ab7c06ba Use inheritance for PRF gadgets. 2016-05-12 16:44:49 -06:00
Sean Bowe
ccb439c510 Protect-style joinsplits should anchor to the latest root for now, until #604 is resolved. 2016-05-12 16:44:49 -06:00
Sean Bowe
b8d320df19 Update public zkSNARK parameters for new circuit. 2016-05-12 16:44:49 -06:00
Sean Bowe
4ec57478c4 Remove nearly all of libzerocash. 2016-05-12 16:44:49 -06:00
Sean Bowe
0d990f31a7 Stop testing old tree against new tree. 2016-05-12 16:44:49 -06:00
Sean Bowe
5975bf1c32 Added public zkSNARK parameter generation utility. 2016-05-12 16:44:49 -06:00
Sean Bowe
2dc3599271 Transplant of libzcash. 2016-05-12 16:44:47 -06:00
Sean Bowe
2140639309 Remove scriptPubKey/scriptSig from CPourTx, and add randomSeed. 2016-05-12 16:44:30 -06:00
Sean Bowe
5a2db9e283 libzcash: Add tests for API 2016-05-12 16:44:30 -06:00
Daira Hopwood
dbab243725 zkSNARK: Add constraint that the total value in a JoinSplit is a 64-bit integer. 2016-05-12 16:44:30 -06:00
Sean Bowe
59c3d926c6 zkSNARK: Enforce merkle authentication path from nonzero-valued public inputs to root. 2016-05-12 16:44:30 -06:00
Sean Bowe
fcece37f00 zkSNARK: Witness commitments to input notes. 2016-05-12 16:44:30 -06:00
Sean Bowe
e5f7c49d55 zkSNARK: Ensure that values balance correctly. 2016-05-12 16:44:30 -06:00
Sean Bowe
5e61a78fec zkSNARK: Enforce disclosure of commitments to output notes. 2016-05-12 16:44:30 -06:00
Sean Bowe
6b010d9bfd zkSNARK: Enforce that new output notes have unique rho to prevent faerie gold attack. 2016-05-12 16:44:30 -06:00
Sean Bowe
e52f40e839 zkSNARK: Authenticate h_sig with a_sk 2016-05-12 16:44:30 -06:00
Sean Bowe
2a2f3fb80f zkSNARK: Enforce disclosure of input note nullifiers 2016-05-12 16:44:30 -06:00
Sean Bowe
ca8d6c9347 zkSNARK: Enforce spend-authority of input notes. 2016-05-12 16:44:30 -06:00