From a65018f93ca0c13fed5823d97afcf61b69743b69 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 11 Apr 2023 00:23:33 +0000 Subject: [PATCH] Fix variable name in `spec::diversify_hash` Closes zcash/orchard#368. --- src/spec.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spec.rs b/src/spec.rs index 91ff2b29..698b7a39 100644 --- a/src/spec.rs +++ b/src/spec.rs @@ -220,10 +220,10 @@ pub(crate) fn commit_ivk( /// [concretediversifyhash]: https://zips.z.cash/protocol/nu5.pdf#concretediversifyhash pub(crate) fn diversify_hash(d: &[u8; 11]) -> NonIdentityPallasPoint { 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. // 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)$