diff --git a/src/arithmetic/curves.rs b/src/arithmetic/curves.rs index dccf476..37dd97a 100644 --- a/src/arithmetic/curves.rs +++ b/src/arithmetic/curves.rs @@ -96,10 +96,6 @@ pub trait CurveAffine: /// The projective form of the curve type CurveExt: CurveExt::ScalarExt>; - /// Personalization of BLAKE2b hasher used to generate the uniform - /// random string. - const BLAKE2B_PERSONALIZATION: &'static [u8; 16]; - /// CURVE_ID used for hash-to-curve. const CURVE_ID: &'static str; diff --git a/src/pasta/curves.rs b/src/pasta/curves.rs index e789222..b687b20 100644 --- a/src/pasta/curves.rs +++ b/src/pasta/curves.rs @@ -17,7 +17,7 @@ use super::{Fp, Fq}; use crate::arithmetic::{CurveAffine, CurveExt, FieldExt, Group}; macro_rules! new_curve_impl { - (($($privacy:tt)*), $name:ident, $name_affine:ident, $iso:ident, $base:ident, $scalar:ident, $blake2b_personalization:literal, + (($($privacy:tt)*), $name:ident, $name_affine:ident, $iso:ident, $base:ident, $scalar:ident, $curve_id:literal, $a_raw:expr, $b_raw:expr, $curve_type:ident) => { /// Represents a point in the projective coordinate space. #[derive(Copy, Clone, Debug)] @@ -615,7 +615,6 @@ macro_rules! new_curve_impl { type Base = $base; type CurveExt = $name; - const BLAKE2B_PERSONALIZATION: &'static [u8; 16] = $blake2b_personalization; const CURVE_ID: &'static str = $curve_id; fn is_on_curve(&self) -> Choice { @@ -911,7 +910,6 @@ new_curve_impl!( IsoEp, Fp, Fq, - b"halo2_____pallas", "pallas", [0, 0, 0, 0], [5, 0, 0, 0], @@ -924,7 +922,6 @@ new_curve_impl!( IsoEq, Fq, Fp, - b"halo2______vesta", "vesta", [0, 0, 0, 0], [5, 0, 0, 0], @@ -937,7 +934,6 @@ new_curve_impl!( Ep, Fp, Fq, - b"halo2_iso_pallas", "iso-pallas", [ 0x92bb4b0b657a014b, @@ -955,7 +951,6 @@ new_curve_impl!( Eq, Fq, Fp, - b"halo2__iso_vesta", "iso-vesta", [ 0xc515ad7242eaa6b1, diff --git a/src/transcript.rs b/src/transcript.rs index c3da9a9..2931e7f 100644 --- a/src/transcript.rs +++ b/src/transcript.rs @@ -59,7 +59,7 @@ impl Blake2bRead { Blake2bRead { state: Blake2bParams::new() .hash_length(64) - .personal(C::BLAKE2B_PERSONALIZATION) + .personal(b"Halo2-Transcript") .to_state(), reader, _marker: PhantomData, @@ -136,7 +136,7 @@ impl Blake2bWrite { Blake2bWrite { state: Blake2bParams::new() .hash_length(64) - .personal(C::BLAKE2B_PERSONALIZATION) + .personal(b"Halo2-Transcript") .to_state(), writer, _marker: PhantomData,