@@ -54,9 +54,7 @@ use core::{
5454 ops:: { Mul , MulAssign } ,
5555} ;
5656
57- use crate :: constants:: APLUS2_OVER_FOUR ;
58- #[ cfg( feature = "digest" ) ]
59- use crate :: constants:: { MONTGOMERY_A , MONTGOMERY_A_NEG , SQRT_M1 } ;
57+ use crate :: constants:: { APLUS2_OVER_FOUR , MONTGOMERY_A , MONTGOMERY_A_NEG , SQRT_M1 } ;
6058use crate :: edwards:: { CompressedEdwardsY , EdwardsPoint } ;
6159use crate :: field:: FieldElement ;
6260use crate :: scalar:: { Scalar , clamp_integer} ;
@@ -71,11 +69,11 @@ use subtle::ConstantTimeEq;
7169use zeroize:: Zeroize ;
7270
7371// We need the const 2^((p+3)/8) for elligator_encode. These defs are checked in tests::consts()
74- #[ cfg( all ( curve25519_dalek_bits = "32" , feature = "digest" ) ) ]
72+ #[ cfg( curve25519_dalek_bits = "32" ) ]
7573const FE_C2 : FieldElement = FieldElement :: from_limbs ( [
7674 34513073 , 25610706 , 9377949 , 3500415 , 12389472 , 33281959 , 41962654 , 31548777 , 326685 , 11406482 ,
7775] ) ;
78- #[ cfg( all ( curve25519_dalek_bits = "64" , feature = "digest" ) ) ]
76+ #[ cfg( curve25519_dalek_bits = "64" ) ]
7977const FE_C2 : FieldElement = FieldElement :: from_limbs ( [
8078 1718705420411057 ,
8179 234908883556509 ,
@@ -268,7 +266,6 @@ impl MontgomeryPoint {
268266 }
269267}
270268
271- #[ cfg( feature = "digest" ) ]
272269/// Perform the Elligator2 mapping to a tuple `(xn, xd, yn, yd)` such that
273270/// `(xn / xd, yn / yd)` is a point on curve25519.
274271///
0 commit comments