Add `ValueSum::commit`

This commit is contained in:
Tomas Krnak 2022-08-11 12:37:36 +02:00
parent 3faab98e9e
commit a71287c51e
1 changed files with 9 additions and 0 deletions

View File

@ -174,6 +174,15 @@ impl ValueSum {
sign,
)
}
/// Commits this value with the corresponding trapdoor `rcv` by $ValueCommit^Orchard$
///
/// Defined in [Zcash Protocol Spec § 5.4.8.3: Homomorphic Pedersen commitments (Sapling and Orchard)][concretehomomorphiccommit].
///
/// [concretehomomorphiccommit]: https://zips.z.cash/protocol/nu5.pdf#concretehomomorphiccommit
pub fn commit(self, rcv: ValueCommitTrapdoor) -> ValueCommitment {
ValueCommitment::derive(self, rcv)
}
}
impl Add for ValueSum {