mirror of https://github.com/zcash/orchard.git
Publicize `ValueCommitment::derive` constructor
This commit is contained in:
parent
3faab98e9e
commit
158f3e6e71
|
@ -286,13 +286,13 @@ impl<'a> Sum<&'a ValueCommitment> for ValueCommitment {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ValueCommitment {
|
impl ValueCommitment {
|
||||||
/// $ValueCommit^Orchard$.
|
/// Derives a `ValueCommitment` by ValueCommit^Orchard.
|
||||||
///
|
///
|
||||||
/// Defined in [Zcash Protocol Spec § 5.4.8.3: Homomorphic Pedersen commitments (Sapling and Orchard)][concretehomomorphiccommit].
|
/// 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
|
/// [concretehomomorphiccommit]: https://zips.z.cash/protocol/nu5.pdf#concretehomomorphiccommit
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
pub(crate) fn derive(value: ValueSum, rcv: ValueCommitTrapdoor) -> Self {
|
pub fn derive(value: ValueSum, rcv: ValueCommitTrapdoor) -> Self {
|
||||||
let hasher = pallas::Point::hash_to_curve(VALUE_COMMITMENT_PERSONALIZATION);
|
let hasher = pallas::Point::hash_to_curve(VALUE_COMMITMENT_PERSONALIZATION);
|
||||||
let V = hasher(&VALUE_COMMITMENT_V_BYTES);
|
let V = hasher(&VALUE_COMMITMENT_V_BYTES);
|
||||||
let R = hasher(&VALUE_COMMITMENT_R_BYTES);
|
let R = hasher(&VALUE_COMMITMENT_R_BYTES);
|
||||||
|
|
Loading…
Reference in New Issue