zcash_note_encryption: Pass cmstar_bytes to Domain::derive_ock
PRF^ock in the spec takes cm* as a byte array.
Extracted from: ae43e6c074
This commit is contained in:
parent
d94482d5ac
commit
befb178c61
|
@ -110,7 +110,7 @@ pub trait Domain {
|
||||||
fn derive_ock(
|
fn derive_ock(
|
||||||
ovk: &Self::OutgoingViewingKey,
|
ovk: &Self::OutgoingViewingKey,
|
||||||
cv: &Self::ValueCommitment,
|
cv: &Self::ValueCommitment,
|
||||||
cmstar: &Self::ExtractedCommitment,
|
cmstar_bytes: &Self::ExtractedCommitmentBytes,
|
||||||
ephemeral_key: &EphemeralKeyBytes,
|
ephemeral_key: &EphemeralKeyBytes,
|
||||||
) -> OutgoingCipherKey;
|
) -> OutgoingCipherKey;
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ impl<D: Domain> NoteEncryption<D> {
|
||||||
rng: &mut R,
|
rng: &mut R,
|
||||||
) -> [u8; OUT_CIPHERTEXT_SIZE] {
|
) -> [u8; OUT_CIPHERTEXT_SIZE] {
|
||||||
let (ock, input) = if let Some(ovk) = &self.ovk {
|
let (ock, input) = if let Some(ovk) = &self.ovk {
|
||||||
let ock = D::derive_ock(ovk, &cv, &cmstar, &D::epk_bytes(&self.epk));
|
let ock = D::derive_ock(ovk, &cv, &cmstar.into(), &D::epk_bytes(&self.epk));
|
||||||
let input = D::outgoing_plaintext_bytes(&self.note, &self.esk);
|
let input = D::outgoing_plaintext_bytes(&self.note, &self.esk);
|
||||||
|
|
||||||
(ock, input)
|
(ock, input)
|
||||||
|
|
Loading…
Reference in New Issue