Add comments with specification references
This commit is contained in:
parent
6d03b5c1db
commit
23aa869bf4
|
@ -1,4 +1,6 @@
|
|||
//! Sapling key components
|
||||
//! Sapling key components.
|
||||
//!
|
||||
//! Implements section 4.2.2 of the Zcash Protocol Specification.
|
||||
|
||||
use blake2_rfc::blake2b::{Blake2b, Blake2bResult};
|
||||
use ff::{PrimeField, PrimeFieldRepr};
|
||||
|
|
|
@ -297,6 +297,8 @@ impl SaplingNoteEncryption {
|
|||
let shared_secret = sapling_ka_agree(&self.esk, &self.to.pk_d);
|
||||
let key = kdf_sapling(&shared_secret, &self.epk);
|
||||
|
||||
// Note plaintext encoding is defined in section 5.5 of the Zcash Protocol
|
||||
// Specification.
|
||||
let mut input = Vec::with_capacity(NOTE_PLAINTEXT_SIZE);
|
||||
input.push(1);
|
||||
input.extend_from_slice(&self.to.diversifier.0);
|
||||
|
|
Loading…
Reference in New Issue