From 99a301ccee77527ed6188a111d9a3b2c08a45fc8 Mon Sep 17 00:00:00 2001 From: Ayush Shukla Date: Mon, 22 Jan 2024 23:31:27 +0530 Subject: [PATCH] fix: add backticks for code --- src/ed25519/fq.rs | 10 ++++++---- src/ed25519/fr.rs | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/ed25519/fq.rs b/src/ed25519/fq.rs index 6ebccf09..cfba8129 100644 --- a/src/ed25519/fq.rs +++ b/src/ed25519/fq.rs @@ -81,7 +81,8 @@ const SQRT_MINUS_ONE: Fq = Fq::from_raw([ ]); // Element in small order subgroup (3-order) -// GF(q).primitive_element() ** ((q - 1) // N) where N = 3 +// Sage: +// `GF(q).primitive_element() ** ((q - 1) // N)` where N = 3 const ZETA: Fq = Fq::from_raw([ 0xaa86d89d8618e538, 0x1a1aada8413a4550, @@ -91,8 +92,8 @@ const ZETA: Fq = Fq::from_raw([ // The `2^s` root of unity. // It can be calculated by exponentiating `MULTIPLICATIVE_GENERATOR` by `t`, // where `2^s * t = q - 1` with `t` odd. -// -// GF(q).primitive_element() ** t +// Sage: +// `GF(q).primitive_element() ** t` const ROOT_OF_UNITY: Fq = Fq::from_raw([ 0xc4ee1b274a0ea0b0, 0x2f431806ad2fe478, @@ -107,7 +108,8 @@ const ROOT_OF_UNITY_INV: Fq = Fq::from_raw([ 0x547cdb7fb03e20f4, ]); // Generator of the `t-order` multiplicative subgroup -// GF(q).primitive_element() ** (2**s) +// Sage: +// `GF(q).primitive_element() ** (2**s)` const DELTA: Fq = Fq::from_raw([0x10, 0, 0, 0]); use crate::{ diff --git a/src/ed25519/fr.rs b/src/ed25519/fr.rs index 07c32287..dc2c0789 100644 --- a/src/ed25519/fr.rs +++ b/src/ed25519/fr.rs @@ -96,7 +96,8 @@ const SQRT_MINUS_ONE: Fr = Fr::from_raw([ ]); // Element in small order subgroup (3-order) -// GF(r).primitive_element() ** ((r - 1) // N) where N = 3 +// Sage: +// `GF(r).primitive_element() ** ((r - 1) // N)` where N = 3 const ZETA: Fr = Fr::from_raw([ 0x158687e51e07e223, 0x471dd911c6cce91e, @@ -106,8 +107,8 @@ const ZETA: Fr = Fr::from_raw([ // The `2^s` root of unity. // It can be calculated by exponentiating `MULTIPLICATIVE_GENERATOR` by `t`, // where `2^s * t = r - 1` with `t` odd. -// -// GF(r).primitive_element() ** t +// Sage: +// `GF(r).primitive_element() ** t` const ROOT_OF_UNITY: Fr = Fr::from_raw([ 0xbe8775dfebbe07d4, 0x0ef0565342ce83fe, @@ -122,7 +123,8 @@ const ROOT_OF_UNITY_INV: Fr = Fr::from_raw([ 0x06b58cef1f867e18, ]); // Generator of the `t-order` multiplicative subgroup -// GF(r).primitive_element() ** (2**s) +// Sage: +// `GF(r).primitive_element() ** (2**s)` const DELTA: Fr = Fr::from_raw([0x10, 0, 0, 0]); use crate::{