Add getters for Q() and R()

This commit is contained in:
therealyingtong 2021-03-19 09:15:53 +08:00
parent 873e1b7d7e
commit 18fba2a62e
1 changed files with 18 additions and 0 deletions

View File

@ -115,6 +115,12 @@ impl HashDomain {
pub(crate) fn hash(&self, msg: impl Iterator<Item = bool>) -> pallas::Base {
extract_p(&self.hash_to_point(msg))
}
/// Return `Q`
#[allow(non_snake_case)]
pub(crate) fn Q(&self) -> pallas::Point {
self.Q
}
}
/// A domain in which [`sinsemilla::commit`] and
@ -176,6 +182,18 @@ impl CommitDomain {
) -> pallas::Base {
extract_p(&self.commit(msg, r))
}
/// Return `Q`
#[allow(non_snake_case)]
pub(crate) fn Q(&self) -> pallas::Point {
self.Q
}
/// Return `R`
#[allow(non_snake_case)]
pub(crate) fn R(&self) -> pallas::Point {
self.R
}
}
#[cfg(test)]