Skip to content

Commit

Permalink
chore: constant values cannot be todo!()
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpwang committed Jan 2, 2024
1 parent a9b016f commit 016eab8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
12 changes: 9 additions & 3 deletions src/ed25519/fq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)]
Expand Down
10 changes: 7 additions & 3 deletions src/ed25519/fr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)]
Expand Down

0 comments on commit 016eab8

Please sign in to comment.