From 41689be2f3999a23f3a685554e651026ab1fda04 Mon Sep 17 00:00:00 2001 From: Michael Lodder Date: Wed, 1 Nov 2023 14:55:42 -0600 Subject: [PATCH] forgot conditional compile flag Signed-off-by: Michael Lodder --- curve25519-dalek/src/field.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/curve25519-dalek/src/field.rs b/curve25519-dalek/src/field.rs index 290d0d5db..9812ee07e 100644 --- a/curve25519-dalek/src/field.rs +++ b/curve25519-dalek/src/field.rs @@ -306,6 +306,7 @@ impl FieldElement { FieldElement::sqrt_ratio_i(&FieldElement::ONE, self) } + #[cfg(feature = "group")] /// Handle 48 bytes like a big integer and reduce mod order /// i.e. big_int(48 bytes) % p /// but without using any reduce methods @@ -317,17 +318,16 @@ impl FieldElement { // and the 2nd half as the lo value let mut arr = [0u8; 32]; for i in 0..24 { - arr[i] = bytes[23-i]; + arr[i] = bytes[23 - i]; } let mut hi = FieldElement::from_bytes(&arr); for i in 0..24 { - arr[i] = bytes[47-i]; + arr[i] = bytes[47 - i]; } let lo = FieldElement::from_bytes(&arr); hi *= &FieldElement::F_2_192; &hi + &lo } - } #[cfg(test)]