Jack Grigg
a6f2172b20
bls12_381: Replace Choice::unwrap_u8 with bool::from
...
The latter is clearer and the intended route for un-CT-ing Choices.
2020-08-13 18:17:29 +01:00
Jack Grigg
7a2235ad03
jubjub: Replace Choice::unwrap_u8 with bool::from
...
The latter is clearer and the intended route for un-CT-ing Choices.
2020-08-13 18:17:27 +01:00
str4d
6b1281e8e0
Merge pull request #266 from str4d/group-trait-updates
...
Updates to group traits
2020-08-13 11:11:04 +12:00
Jack Grigg
9e9bec826c
group: Fix documentation of CofactorGroup::clear_cofactor
...
Co-authored-by: Sean Bowe <ewillbefull@gmail.com>
2020-08-13 00:09:27 +01:00
str4d
6831d5991a
Merge pull request #267 from str4d/bls12_381-subtree-update
...
Update bls12_381 subtree
2020-08-13 10:56:35 +12:00
Jack Grigg
636db2aca3
Merge commit 'a5a6f57c5abcf47387d1c9e1ea2ee8ab01925734' into bls12_381-subtree-update
2020-08-12 18:25:52 +01:00
Jack Grigg
a5a6f57c5a
Squashed 'bls12_381/' changes from 1a2e9f3..d0ea5d4
...
d0ea5d4 Merge pull request #32 from narodnik/sum
24aa1a4
Merge pull request #31 from zkcrypto/release-0.1.1
fb7c4cb add cargo fmt for sum traits (code we added)
ccef392 add sum iterator implementations
82e14ed
Release 0.1.1
a3608d4
Put endo optimizations behind endo crate feature.
e32494e
Merge pull request #18 from mmaker/master
948b199
Fix typo in comment.
b3d1fe1
Merge pull request #27 from rex4539/fix-typos
253f681
Merge pull request #25 from mmaker/fix/sage-script
c55f88f
Fix typos
14b5e16
No need to define a polynomial ring in notes/design.rs.
c9d17f6
Make sage script in notes/design.rs work with sage 3.9.
af9ec4d
Minor changes to comments documenting `clear_cofactor`
7dc6f31
Add clear_cofactor.
git-subtree-dir: bls12_381
git-subtree-split: d0ea5d4958cae999dea1800207704171aa07a9ef
2020-08-12 18:25:52 +01:00
Daira Hopwood
81c3b54b24
Merge pull request #258 from therealyingtong/zip212-esk-plaintext-impl
...
ZIP212 implementation
2020-08-12 10:19:08 +01:00
str4d
0e9b6e6d73
Merge pull request #158 from zcash/codecov-tweaks
...
Code coverage tweaks
2020-08-12 20:11:42 +12:00
Jack Grigg
418cba0e85
group: Document that Group::random is non-deterministic
2020-08-12 08:18:45 +01:00
Jack Grigg
ed6b7eceef
group: Hard-code a w-NAF window size of 4
...
We were already ignoring the actual bit length of the scalar, and
selecting the window size based on the maximum bit length, which
effectively hard-coded a window size of 4.
2020-08-12 08:12:48 +01:00
Jack Grigg
1e8fd4da68
group: CofactorGroup::mul_by_cofactor -> CofactorGroup::clear_cofactor
...
The generic API now only guarantees that the torsion component is
cleared deterministically; group elements may be multiplied by multiples
of the cofactor (not necessarily the actual cofactor), as long as the
choice of multiplier is fixed for a given implementation.
2020-08-12 08:12:25 +01:00
Jack Grigg
94c22ed2cb
CI: Fetch Zcash params for code coverage
2020-08-12 07:21:22 +01:00
str4d
18b1ce7401
Merge pull request #265 from str4d/wasm-ci
...
CI: Build zcash_proofs against WASM targets
2020-08-08 04:14:01 +12:00
Jack Grigg
663d4ee4c4
CI: Measure code coverage for zkcrypto crates
2020-08-07 16:47:13 +01:00
Jack Grigg
e22e15a34a
CI: Build zcash_proofs against WASM targets
...
This ensures that we don't introduce any regressions for WASM consumers.
2020-08-07 16:36:46 +01:00
ying tong
72cc8fc916
Minor refactor of enumeration in tests in note_encryption.rs
...
Co-authored-by: str4d <thestr4d@gmail.com>
2020-08-07 08:46:15 +08:00
ying tong
13f4d0844e
Avoid using unwrap() when calling derive_esk()
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-08-07 00:12:07 +08:00
therealyingtong
d54fd09c5f
Add esk check in parse_note_plaintext_without_memo() and try_sapling_output_recovery()
2020-08-06 18:39:49 +08:00
therealyingtong
5480a376df
Extract derive_esk() into separate function
2020-08-06 18:21:27 +08:00
therealyingtong
7cee29bbcc
Use <P: consensus::Parameters> type for Builder impl
2020-08-06 18:12:15 +08:00
ying tong
0f8f1b3f5d
Fix parsing of rseed in parse_note_plaintext_without_memo() and try_sapling_output_recovery()
...
Co-authored-by: str4d <thestr4d@gmail.com>
2020-08-06 18:12:15 +08:00
ying tong
40a908e0a8
Refactor leadbyte_array in note_encryption tests
...
Co-authored-by: str4d <thestr4d@gmail.com>
2020-08-06 18:12:10 +08:00
therealyingtong
8968547981
Document pub enum Rseed<Fs> with link to ZIP 212
2020-08-06 13:13:49 +08:00
therealyingtong
878646855c
Switch on leadbyte instead of tx height when decrypting outputs
2020-08-06 12:57:48 +08:00
therealyingtong
c3d89644e2
Revert SaplingNoteEncryption::new() API to take rng instead of esk
2020-08-06 12:47:35 +08:00
therealyingtong
4f22077cf6
Remove const activation heights from consensus.rs
2020-08-06 12:30:48 +08:00
therealyingtong
9970a8aefd
Hard-code NetworkUpgrade::Canopy in generate_random_rseed
2020-08-06 12:27:20 +08:00
therealyingtong
b05e257f79
Fix database queries in scan.rs and transact.rs
2020-08-06 12:00:49 +08:00
therealyingtong
44f46e50ce
Add <P: consensus::Parameters> type parameter to Builder struct
2020-08-06 11:43:07 +08:00
therealyingtong
88072d64ec
Remove network cfg from zcash_client_backend and zcash_primitives
2020-08-06 11:35:05 +08:00
Henry de Valence
139fc09f10
bellman: add VerificationError ( #254 )
...
* bellman: add VerificationError
This adds a distinct VerificationError type to the crate and changes
`verify_proof` to return `Result<(), VerificationError>` rather than
`Result<bool, SynthesisError>`. This is significantly safer, because it avoids
the need to mix pattern-matching logic with boolean logic (the cause of
RUSTSEC-2019-0004).
* Rename VerificationError variants per review comments.
* Add missing Clone impl to VerificationError.
2020-08-05 22:26:31 +12:00
therealyingtong
d6deaddc0a
Only query last_height when needed in decrypt_and_store_transaction()
2020-08-05 16:09:41 +08:00
therealyingtong
c8fcdeb50b
Minor changes in note_encryption.rs
2020-08-05 15:45:18 +08:00
therealyingtong
2ed9b6f881
Refactor contextual random rseed generation into util method in zcash_primitives
2020-08-05 15:21:42 +08:00
therealyingtong
a3ae1b273d
Switch plaintext version on height for dummy outputs in Builder
2020-08-05 14:27:36 +08:00
therealyingtong
d5f80618ef
Switch plaintext version on height in commit_to_address() in zcash_client_sqlite
2020-08-05 14:26:57 +08:00
therealyingtong
a25348dfba
Revert passing Parameters to methods
2020-08-05 12:47:29 +08:00
therealyingtong
74b2f0a79e
Pass height to decrypt_transaction()
2020-08-04 21:05:29 +08:00
therealyingtong
0a47a9dbea
Pass rseed to Prover
2020-08-04 16:40:53 +08:00
str4d
a224d826fa
Merge pull request #251 from str4d/bundled-prover
...
zcash_proofs: Add LocalProver::bundled
2020-08-04 05:35:07 +12:00
therealyingtong
b34e8b903c
Add invalid version byte tests for ZIP212
2020-08-03 13:51:45 +08:00
therealyingtong
eba542c95f
Add activation heights as consts in consensus::Parameters
2020-08-03 13:40:39 +08:00
therealyingtong
b1ddd556af
Check derived esk against claimed epk when decrypting note
2020-07-31 22:40:52 +08:00
therealyingtong
895e251793
Fix tests
2020-07-31 22:40:48 +08:00
therealyingtong
6904c8f933
Implement plaintext_version_is_valid()
2020-07-31 22:28:51 +08:00
therealyingtong
eda00ec7ad
Pass esk to SaplingNoteEncryption::new and add generate_or_derive_esk()
2020-07-31 22:28:50 +08:00
therealyingtong
65504d9ca7
Add enum Rseed<E::Fs> to Note struct
2020-07-31 22:28:40 +08:00
therealyingtong
b537f0f712
Pass height to methods which encrypt or decrypt Sapling outputs
2020-07-31 12:39:39 +08:00
str4d
2cca23c6d2
Merge pull request #257 from therealyingtong/canopy-activation-heights
...
Set activation heights for Canopy
2020-07-31 12:16:18 +12:00