From 016eab859651d7bc1d3cdebaf8bb82117575bd20 Mon Sep 17 00:00:00 2001 From: Jonathan Wang <31040440+jonathanpwang@users.noreply.github.com> Date: Tue, 2 Jan 2024 11:55:55 -0500 Subject: [PATCH] chore: constant values cannot be todo!() --- src/ed25519/fq.rs | 12 +++++++++--- src/ed25519/fr.rs | 10 +++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/ed25519/fq.rs b/src/ed25519/fq.rs index b478d60a..ca132397 100644 --- a/src/ed25519/fq.rs +++ b/src/ed25519/fq.rs @@ -80,8 +80,11 @@ const SQRT_MINUS_ONE: Fq = Fq::from_raw([ 0x2b8324804fc1df0b, ]); +/// TODO const ZETA: Fq = Fq::zero(); +/// TODO const DELTA: Fq = Fq::zero(); +/// TODO const ROOT_OF_UNITY_INV: Fq = Fq::zero(); use crate::{ @@ -207,8 +210,10 @@ impl ff::PrimeField for Fq { const CAPACITY: u32 = 255; const MODULUS: &'static str = MODULUS_STR; const MULTIPLICATIVE_GENERATOR: Self = MULTIPLICATIVE_GENERATOR; - const ROOT_OF_UNITY: Self = todo!(); - const ROOT_OF_UNITY_INV: Self = todo!(); + /// TODO + const ROOT_OF_UNITY: Self = Self::one(); + /// TODO + const ROOT_OF_UNITY_INV: Self = Self::zero(); const TWO_INV: Self = TWO_INV; const DELTA: Self = DELTA; const S: u32 = 1; @@ -276,7 +281,8 @@ impl FromUniformBytes<64> for Fq { } impl WithSmallOrderMulGroup<3> for Fq { - const ZETA: Self = todo!(); + /// TODO + const ZETA: Self = ZETA; } #[cfg(test)] diff --git a/src/ed25519/fr.rs b/src/ed25519/fr.rs index 2e9c86df..e500d461 100644 --- a/src/ed25519/fr.rs +++ b/src/ed25519/fr.rs @@ -216,8 +216,11 @@ impl ff::PrimeField for Fr { const NUM_BITS: u32 = 256; const CAPACITY: u32 = 255; const MODULUS: &'static str = MODULUS_STR; - const MULTIPLICATIVE_GENERATOR: Self = todo!(); - const ROOT_OF_UNITY: Self = todo!(); + /// TODO + const MULTIPLICATIVE_GENERATOR: Self = Self::one(); + /// TODO + const ROOT_OF_UNITY: Self = Self::one(); + /// TODO const ROOT_OF_UNITY_INV: Self = ROOT_OF_UNITY_INV; const TWO_INV: Self = TWO_INV; const DELTA: Self = DELTA; @@ -286,7 +289,8 @@ impl FromUniformBytes<64> for Fr { } impl WithSmallOrderMulGroup<3> for Fr { - const ZETA: Self = todo!(); + /// TODO + const ZETA: Self = ZETA; } #[cfg(test)]