mirror of https://github.com/zcash/halo2.git
Some minor changes
This commit is contained in:
parent
d76d2317b7
commit
ac7a90d9ad
|
@ -102,7 +102,7 @@ impl Config {
|
|||
Ok((x_var, y_var))
|
||||
}
|
||||
|
||||
fn assign_xy_constant(
|
||||
fn assign_xy_from_constant(
|
||||
&self,
|
||||
value: (Assigned<pallas::Base>, Assigned<pallas::Base>),
|
||||
offset: usize,
|
||||
|
@ -159,7 +159,7 @@ impl Config {
|
|||
(value.x().into(), value.y().into())
|
||||
};
|
||||
|
||||
self.assign_xy_constant(value, offset, region)
|
||||
self.assign_xy_from_constant(value, offset, region)
|
||||
.map(|(x, y)| EccPoint::from_coordinates_unchecked(x, y))
|
||||
}
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ impl HashDomain {
|
|||
#[allow(non_snake_case)]
|
||||
pub struct CommitDomain {
|
||||
/// A domain in which $\mathsf{SinsemillaHashToPoint}$ and $\mathsf{SinsemillaHash}$ can be used
|
||||
pub M: HashDomain,
|
||||
M: HashDomain,
|
||||
R: pallas::Point,
|
||||
}
|
||||
|
||||
|
@ -226,6 +226,13 @@ impl CommitDomain {
|
|||
.map(|p| p + Wnaf::new().scalar(r).base(self.R))
|
||||
}
|
||||
|
||||
/// $\mathsf{SinsemillaHashToPoint}$ from [§ 5.4.1.9][concretesinsemillahash].
|
||||
///
|
||||
/// [concretesinsemillahash]: https://zips.z.cash/protocol/nu5.pdf#concretesinsemillahash
|
||||
pub fn hash_to_point(&self, msg: impl Iterator<Item = bool>) -> CtOption<pallas::Point> {
|
||||
self.M.hash_to_point(msg)
|
||||
}
|
||||
|
||||
/// Returns `SinsemillaCommit_r(personalization, msg) = hash_point + [r]R`
|
||||
/// where `SinsemillaHash(personalization, msg) = hash_point`
|
||||
/// and `R` is derived from the `personalization`.
|
||||
|
|
Loading…
Reference in New Issue