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