Remove `esk` and `ephemeral_key` arguments from `parse_note_plaintext_without_memo_ovk`

Fixes #850


Extracted from: be89e81534
This commit is contained in:
Kris Nuttycombe 2023-05-26 09:16:42 -06:00
parent 81d8f61b0d
commit a7fa69c504
2 changed files with 11 additions and 3 deletions

View File

@ -7,6 +7,16 @@ and this library adheres to Rust's notion of
## [Unreleased]
### Changed
- The `esk` and `ephemeral_key` arguments have been removed from
`Domain::parse_note_plaintext_without_memo_ovk`. It is therefore no longer
necessary (or possible) to ensure that `ephemeral_key` is derived from `esk`
and the diversifier within the note plaintext. We have analyzed the safety of
this change in the context of callers within `zcash_note_encryption` and
`orchard`. See https://github.com/zcash/librustzcash/pull/848 and the
associated issue https://github.com/zcash/librustzcash/issues/802 for
additional detail.
## [0.3.0] - 2023-03-22
### Changed
- The `recipient` parameter has been removed from `Domain::note_plaintext_bytes`.

View File

@ -237,8 +237,6 @@ pub trait Domain {
fn parse_note_plaintext_without_memo_ovk(
&self,
pk_d: &Self::DiversifiedTransmissionKey,
esk: &Self::EphemeralSecretKey,
ephemeral_key: &EphemeralKeyBytes,
plaintext: &NotePlaintextBytes,
) -> Option<(Self::Note, Self::Recipient)>;
@ -654,7 +652,7 @@ pub fn try_output_recovery_with_ock<D: Domain, Output: ShieldedOutput<D, ENC_CIP
.ok()?;
let (note, to) =
domain.parse_note_plaintext_without_memo_ovk(&pk_d, &esk, &ephemeral_key, &plaintext)?;
domain.parse_note_plaintext_without_memo_ovk(&pk_d, &plaintext)?;
let memo = domain.extract_memo(&plaintext);
// ZIP 212: Check that the esk provided to this function is consistent with the esk we