Kris Nuttycombe
943e6f5c20
Fix a couple of broken doc links.
...
Extracted from: 5541552453
2021-09-01 14:01:47 -06:00
str4d
b7a3885b7f
Merge pull request #428 from nuttycom/public_compact_size
...
Move the CompactSize, Vector, Array and Option encodings to a new zcash_encoding crate.
Extracted from: edcde252de
2021-09-01 20:45:28 +01:00
Kris Nuttycombe
1fd5c8d748
Fix stray clippy complaints.
...
Extracted from: fa092da456
2021-08-31 13:19:24 -06:00
Jack Grigg
b0ff1f9914
zcash_note_encryption: Switch to chacha20poly1305 crate
...
Extracted from: f03f05f251
2021-08-30 15:03:39 +01:00
str4d
6770db186b
Merge pull request #425 from str4d/batch-note-decryption
...
Batch note decryption
Extracted from: 13b023387b
2021-08-11 00:47:27 +01:00
Jack Grigg
7f3ca6d79d
zcash_note_encryption: Add support for batch-parsing `ephemeral_key`
...
This is useful when the underlying curve requires an inversion to parse
an encoded point (such as for Jubjub).
Extracted from: 4b4dd2ea55
2021-08-10 02:57:11 +01:00
Jack Grigg
2b4a88be36
zcash_note_encryption: Add batched trial decryption APIs
...
Extracted from: 8a615c4393
2021-08-10 02:17:10 +01:00
str4d
2040c32078
Merge pull request #423 from str4d/trial-decryption-optimisation
...
Store OutputDescription `ephemeral_key` as bytes
Extracted from: 51aa991ce0
2021-08-10 02:16:17 +01:00
Jack Grigg
53e008b278
Use `EphemeralKeyBytes` type in place of `[u8; 32]`
...
Extracted from: 279a8b6bb6
2021-08-09 21:28:42 +01:00
str4d
0e533078f4
Merge pull request #421 from str4d/bench-compact-decryption
...
zcash_primitives: Benchmark trial decryption of compact outputs
Extracted from: 99d877e22d
2021-08-05 23:29:16 +01:00
Jack Grigg
e7f43cbe25
Disable default benchmark harness for all workspace crates
...
This is necessary in order to provide criterion-specific arguments to
`cargo bench`, such as `--profile-time`.
Extracted from: 0f15743200
2021-08-05 22:39:36 +01:00
str4d
158edbcb20
Merge pull request #400 from str4d/rework-shieldedoutput-api
...
zcash_note_encryption: Add `ShieldedOutput::ephemeral_key() -> EphemeralKeyBytes`
Extracted from: cc533a9da4
2021-06-10 19:22:03 +01:00
Jack Grigg
3999630051
zcash_note_encryption: Add `ShieldedOutput::ephemeral_key() -> EphemeralKeyBytes`
...
This replaces the `ShieldedOutput::epk() -> &Domain::EphemeralPublicKey`
which could not be satisfied by output types that did not parse epk.
Extracted from: c7c79d266e
2021-06-10 18:35:19 +01:00
str4d
3a105f6c07
Merge pull request #395 from str4d/bump-deps
...
Migrate to bitvec 0.22, ff 0.10, etc.
Extracted from: 2ba8073971
2021-06-04 22:36:29 +01:00
Jack Grigg
53115e4b43
Migrate to bitvec 0.22, ff 0.10, etc.
...
Requires patching three dependencies:
- bellman is pending a new release.
- nom is part of the funty breakage; we are blocking on a new release.
- orchard is in development.
Extracted from: 1222391dd7
2021-06-04 22:02:48 +01:00
str4d
5204d69665
Merge pull request #390 from str4d/note-decryption-fixes
...
zcash_note_encryption: Note decryption fixes
Extracted from: c13a5d3f3d
2021-06-02 22:22:35 +01:00
str4d
8aab0aea5a
Merge branch 'master' into note-decryption-fixes
...
Extracted from: f7f5cd472b
2021-06-02 18:45:01 +01:00
Kris Nuttycombe
4fab40c3c6
Merge pull request #385 from nuttycom/feature/zip-225-prep
...
ZIP-225/244 #1 : Minor refactoring and preparatory updates.
Extracted from: 010a5377a9
2021-06-02 09:39:02 -06:00
Kris Nuttycombe
70dbd54382
Add Nu5 NetworkUpgrade variant.
...
Extracted from: 3dc05a69eb
2021-06-01 07:03:31 -06:00
Jack Grigg
a06b406eb4
zcash_note_encryption: Doc fixes
...
Extracted from: eba6f417fe
2021-05-29 00:15:25 +01:00
Jack Grigg
1385c8cc41
zcash_note_encryption: Fix array size in Domain::extract_{esk, pk_d}
...
Decrypted output size is `OUT_PLAINTEXT_BYTES`, which the decryptor
can always provide (either by decrypting into the correct size array
as now, or truncating the buffer before passing it to the domain).
Extracted from: 362838c3fa
2021-05-28 23:48:03 +01:00
Jack Grigg
18e290dbc0
zcash_note_encryption: Add ovk recovery API
...
Extracted from: f6705f23c3
2021-05-28 23:45:23 +01:00
Jack Grigg
befb178c61
zcash_note_encryption: Pass cmstar_bytes to Domain::derive_ock
...
PRF^ock in the spec takes cm* as a byte array.
Extracted from: ae43e6c074
2021-05-28 23:41:13 +01:00
Jack Grigg
d94482d5ac
zcash_note_encryption: s/TryFrom/From on ExtractedCommitmentBytes bound
...
This was left over from an earlier refactor where we could call a domain
API to extract cmstar from a note commitment (which could fail for
Orchard). This part of extraction was subsequently refactored into the
domain logic (and is rejected earlier for Orchard). The resulting bound
is wrong because it's always possible to serialize a scalar.
Extracted from: ee2b96c82d
2021-05-28 22:57:48 +01:00
Jack Grigg
22d0991a46
zcash_note_encryption: Enforce ZIP 212 check on esk from outPlaintext
...
It needs to equal the esk derived from the note (for v2 note plaintexts).
Extracted from: 16627b4569
2021-05-28 22:33:00 +01:00
Jack Grigg
c78a79c998
Migrate to ff 0.9 et al.
...
Extracted from: 5623e02a7c
2021-05-19 18:29:37 +01:00
str4d
a014a10384
Merge pull request #358 from nuttycom/refactor/component_modules_2
...
Generalize Sapling note encryption to allow reuse with Orchard notes.
Extracted from: 3b02c8b26e
2021-04-16 04:17:57 +01:00
Jack Grigg
dc22102d41
cargo fmt
...
Extracted from: 28a45028ab
2021-04-16 14:03:55 +12:00
Daira Hopwood
0a4fb8ff34
Update comment about which case is covered by example code
...
Extracted from: dc0f6e7115
2021-04-16 00:10:05 +01:00
Kris Nuttycombe
9e499c08ca
Fix naming cmstar -> cmstar_bytes and cm -> cmstar
...
Extracted from: b2b3efd4c2
2021-04-15 15:24:45 -06:00
Kris Nuttycombe
5358e678b2
Make cmstar check follow the spec more closely.
...
Extracted from: 00d04de547
2021-04-14 15:38:58 -06:00
Kris Nuttycombe
a14db84fea
Minor comment on epk canonicity.
...
Extracted from: 389e6ca6a3
2021-04-12 18:43:21 -06:00
Kris Nuttycombe
c3d0a64fac
Update documentation for note encryption traits.
...
Extracted from: f34e87884a
2021-04-12 17:41:06 -06:00
Kris Nuttycombe
2884d70e29
Use ephemeral_key bytes instead of the epk abstract point where specified.
...
Extracted from: 6fc1d1d1c0
2021-04-12 16:19:50 -06:00
Kris Nuttycombe
3843f4ba2b
Use ShieldedOutput trait for note encryption/decryption.
...
This change modifies note encryption and decryption functions
to treat a shielded output as a single value instead of handling
the parts of an output as independent arguments.
Extracted from: 324fc36521
2021-04-12 12:59:06 -06:00
Kris Nuttycombe
4903214bfe
Apply suggestions from code review
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
Extracted from: 4f22f1d578
2021-04-12 09:18:51 -06:00
Kris Nuttycombe
e06b628f19
Use constant-time equality for EphemeralKeyBytes.
...
Fixes #370
Extracted from: e654cc4ce6
2021-04-12 09:13:04 -06:00
Kris Nuttycombe
a8fd731e26
Add myself to crate contributors.
...
Extracted from: cfdbafe2e3
2021-04-08 10:13:04 -06:00
Kris Nuttycombe
c6f3730279
Update comments describing COMPACT_NOTE_SIZE components.
...
Co-authored-by: ebfull <ewillbefull@gmail.com>
Extracted from: 24e62d3a7b
2021-04-08 10:08:58 -06:00
Kris Nuttycombe
78bb0fd6bd
Remove spurious mut references.
...
Extracted from: a560101bb2
2021-04-08 10:08:00 -06:00
Kris Nuttycombe
5e355ffc24
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
Extracted from: 879eea863a
2021-04-08 08:20:23 -06:00
Kris Nuttycombe
cb60fd2092
Fix zcash_note_encryption doctests.
...
Extracted from: dad8663c55
2021-04-08 08:20:23 -06:00
Kris Nuttycombe
8838bf5ef5
Fix Clippy complaints.
...
Extracted from: 213cd6cce9
2021-04-08 08:20:23 -06:00
Kris Nuttycombe
41c71910b1
Update zcash_primitives dev dependency for zcash_note_encryption
...
Extracted from: be225daabf
2021-04-08 08:20:23 -06:00
Kris Nuttycombe
fd018d64f9
Add try_output_recovery_with_ovk to shared note encryption code.
...
Extracted from: 5b13bb3a1e
2021-04-08 08:20:23 -06:00
Kris Nuttycombe
44bb542f8d
Move generalized note encryption functionality to zcash_note_encryption crate.
...
Extracted from: 266285b536
2021-04-08 08:20:21 -06:00
str4d
7ad6ed1f9f
Merge pull request #366 from str4d/lint-fixes
...
Lint fixes
Extracted from: 1b4aab0b76
2021-04-02 11:04:53 +13:00
Jack Grigg
8912285eba
clippy: Fix small lints
...
Extracted from: 56b577b31e
2021-03-27 19:01:03 +13:00
Jack Grigg
9f60f56c2a
Empty zcash_note_encryption crate
...
Extracted from: b7c31e3f54
2021-03-20 09:56:20 +13:00