mirror of https://github.com/zcash/orchard.git
Merge pull request #389 from zcash/368-fix-variable-name
Fix variable name in `spec::diversify_hash`
This commit is contained in:
commit
b40a12f1ff
|
@ -220,10 +220,10 @@ pub(crate) fn commit_ivk(
|
||||||
/// [concretediversifyhash]: https://zips.z.cash/protocol/nu5.pdf#concretediversifyhash
|
/// [concretediversifyhash]: https://zips.z.cash/protocol/nu5.pdf#concretediversifyhash
|
||||||
pub(crate) fn diversify_hash(d: &[u8; 11]) -> NonIdentityPallasPoint {
|
pub(crate) fn diversify_hash(d: &[u8; 11]) -> NonIdentityPallasPoint {
|
||||||
let hasher = pallas::Point::hash_to_curve(KEY_DIVERSIFICATION_PERSONALIZATION);
|
let hasher = pallas::Point::hash_to_curve(KEY_DIVERSIFICATION_PERSONALIZATION);
|
||||||
let pk_d = hasher(d);
|
let g_d = hasher(d);
|
||||||
// If the identity occurs, we replace it with a different fixed point.
|
// If the identity occurs, we replace it with a different fixed point.
|
||||||
// TODO: Replace the unwrap_or_else with a cached fixed point.
|
// TODO: Replace the unwrap_or_else with a cached fixed point.
|
||||||
NonIdentityPallasPoint(CtOption::new(pk_d, !pk_d.is_identity()).unwrap_or_else(|| hasher(&[])))
|
NonIdentityPallasPoint(CtOption::new(g_d, !g_d.is_identity()).unwrap_or_else(|| hasher(&[])))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// $PRF^\mathsf{nfOrchard}(nk, \rho) := Poseidon(nk, \rho)$
|
/// $PRF^\mathsf{nfOrchard}(nk, \rho) := Poseidon(nk, \rho)$
|
||||||
|
|
Loading…
Reference in New Issue