From a68d519e0be3ac85d9b70faa5d1ca4290b91a0b4 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 20 Apr 2023 17:02:03 +0300 Subject: [PATCH] updated naming --- halo2_gadgets/src/sinsemilla/primitives.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/halo2_gadgets/src/sinsemilla/primitives.rs b/halo2_gadgets/src/sinsemilla/primitives.rs index 281a76d504..f90c63ac12 100644 --- a/halo2_gadgets/src/sinsemilla/primitives.rs +++ b/halo2_gadgets/src/sinsemilla/primitives.rs @@ -201,14 +201,10 @@ impl CommitDomain { } } - /// Constructs a new `CommitDomain` from `hash_personalization` a personalization for hashing - /// and `blind_personalization` another personalization for blinding. - pub fn new_with_two_personalizations( - hash_personalization: &str, - blind_personalization: &str, - ) -> Self { - let m_prefix = format!("{}-M", hash_personalization); - let r_prefix = format!("{}-r", blind_personalization); + /// Constructs a new `CommitDomain` from different values for `hash_domain` and `blind_domain` + pub fn new_with_personalization(hash_domain: &str, blind_domain: &str) -> Self { + let m_prefix = format!("{}-M", hash_domain); + let r_prefix = format!("{}-r", blind_domain); let hasher_r = pallas::Point::hash_to_curve(&r_prefix); CommitDomain { M: HashDomain::new(&m_prefix), @@ -230,7 +226,7 @@ impl CommitDomain { .map(|p| p + Wnaf::new().scalar(r).base(self.R)) } - /// Returns `SinsemillaCommit_r(personalization, msg) = hash_point + \[r\]R` + /// Returns `SinsemillaCommit_r(personalization, msg) = hash_point + [r]R` /// where `SinsemillaHash(personalization, msg) = hash_point` /// and `R` is derived from the `personalization`. #[allow(non_snake_case)]