From 435aa8b49495cd919baff78fdc265842f6d27366 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Sat, 16 Nov 2024 16:16:04 +0100 Subject: [PATCH] Seed phrases --- src/pedersen.rs | 9 +++++---- src/suites/testing.rs | 7 ++++--- src/testing.rs | 12 ++++++++++++ 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/pedersen.rs b/src/pedersen.rs index ab8980a..d403eae 100644 --- a/src/pedersen.rs +++ b/src/pedersen.rs @@ -143,7 +143,7 @@ impl Verifier for Public { #[cfg(test)] pub(crate) mod testing { use super::*; - use crate::testing::{self as common, random_val, TEST_SEED}; + use crate::testing::{self as common, random_val, PEDERSEN_BASE_SEED, TEST_SEED}; pub fn prove_verify() { use pedersen::{Prover, Verifier}; @@ -163,9 +163,10 @@ pub(crate) mod testing { } pub fn blinding_base_check() { - const BLINDING_BASE_SEED: &[u8] = b"w3f/ring-proof/blinding"; - let p = S::data_to_point(BLINDING_BASE_SEED).unwrap(); - assert_eq!(S::BLINDING_BASE, p); + assert_eq!( + S::data_to_point(PEDERSEN_BASE_SEED).unwrap(), + S::BLINDING_BASE + ); } #[macro_export] diff --git a/src/suites/testing.rs b/src/suites/testing.rs index 25d6ad6..afbfd97 100644 --- a/src/suites/testing.rs +++ b/src/suites/testing.rs @@ -22,10 +22,11 @@ impl Suite for TestSuite { impl PedersenSuite for TestSuite { const BLINDING_BASE: AffinePoint = { - const X: BaseField = - MontFp!("2842812182132742151291439804105987992770071362848070020835328675429531065386"); + const X: BaseField = MontFp!( + "56166678312616788007069565072535608368274441012407488217322349490274061293828" + ); const Y: BaseField = MontFp!( - "51537589290258453714586392305999864217349499404270029291993413345863140891436" + "55452291704810100370049689540036330133850202475722787526070685722371210180696" ); AffinePoint::new_unchecked(X, Y) }; diff --git a/src/testing.rs b/src/testing.rs index 18c9f9b..066af74 100644 --- a/src/testing.rs +++ b/src/testing.rs @@ -5,6 +5,18 @@ use ark_std::{vec, vec::Vec}; use crate::*; use ark_std::{rand::RngCore, UniformRand}; +// The basis that hides the hidden light, which eludes the mind and creates darkness for those who see. +pub const PEDERSEN_BASE_SEED: &[u8] = + b"basis caecans lucis occultae, quae mentem fugit et tenebras iis qui vident creat"; + +// "The substratum of the accumulator, which in the silence of time guards the hidden secret" +pub const ACCUMULATOR_BASE_SEED: &[u8] = + b"substratum accumulatoris, quod in silentio temporis arcanum absconditum custodit"; + +// "A shadow that fills the void left by lost souls, echoing among the darkness" +pub const PADDING_SEED: &[u8] = + b"umbra quae vacuum implet, ab animabus perditis relictum, inter tenebras resonans"; + pub const TEST_SEED: &[u8] = b"seed"; // Zcash SRS file derived from (https://zfnd.org/conclusion-of-the-powers-of-tau-ceremony).