From f73bdf59f92fb59909bb4697f16c6ddd622c14ee Mon Sep 17 00:00:00 2001 From: Ayush Shukla Date: Wed, 3 Jan 2024 12:09:15 +0100 Subject: [PATCH] fix: typos --- src/ed25519/fq.rs | 4 ++-- src/ed25519/fr.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ed25519/fq.rs b/src/ed25519/fq.rs index 46eb3098..9dfa2a7e 100644 --- a/src/ed25519/fq.rs +++ b/src/ed25519/fq.rs @@ -49,7 +49,7 @@ const MODULUS_STR: &str = "0x7ffffffffffffffffffffffffffffffffffffffffffffffffff /// `GF(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed).primitive_element()` const MULTIPLICATIVE_GENERATOR: Fq = Fq::from_raw([0x02, 0x0, 0x0, 0x0]); -/// INV = -(p^{-1} mod 2^64) mod 2^64 +/// INV = -(q^{-1} mod 2^64) mod 2^64 const INV: u64 = 0x86bca1af286bca1b; /// R = 2^256 mod q @@ -72,7 +72,7 @@ const TWO_INV: Fq = Fq::from_raw([ 0x3fffffffffffffff, ]); -/// sqrt(-1) mod q = 2^((p - 1) / 4) mod q +/// sqrt(-1) mod q = 2^((q - 1) / 4) mod q const SQRT_MINUS_ONE: Fq = Fq::from_raw([ 0xc4ee1b274a0ea0b0, 0x2f431806ad2fe478, diff --git a/src/ed25519/fr.rs b/src/ed25519/fr.rs index 3d53e508..aac2fe51 100644 --- a/src/ed25519/fr.rs +++ b/src/ed25519/fr.rs @@ -49,7 +49,7 @@ const MODULUS_STR: &str = "0x1000000000000000000000000000000014def9dea2f79cd6581 /// `GF(0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed).primitive_element()` const MULTIPLICATIVE_GENERATOR: Fr = Fr::from_raw([0x02, 0x0, 0x0, 0x0]); -/// INV = -(q^{-1} mod 2^64) mod 2^64 +/// INV = -(r^{-1} mod 2^64) mod 2^64 const INV: u64 = 0xd2b51da312547e1b; /// R = 2^256 mod r @@ -87,7 +87,7 @@ const TWO_INV: Fr = Fr::from_raw([ 0x0800000000000000, ]); -/// sqrt(-1) mod p = 2^((p - 1) / 4) mod p +/// sqrt(-1) mod r = 2^((r - 1) / 4) mod r const SQRT_MINUS_ONE: Fr = Fr::from_raw([ 0xbe8775dfebbe07d4, 0x0ef0565342ce83fe,