@@ -7,8 +7,8 @@ use core::fmt;
77#[ cfg( feature = "bigint" ) ]
88use crate :: Uint ;
99
10- #[ cfg( feature = "subtle " ) ]
11- use subtle :: { Choice , ConstantTimeEq } ;
10+ #[ cfg( feature = "ctutils " ) ]
11+ use ctutils :: { Choice , CtEq } ;
1212
1313#[ cfg( any( feature = "bigint" , feature = "zeroize" ) ) ]
1414use zeroize:: Zeroize ;
@@ -40,8 +40,8 @@ use zeroize::Zeroizing;
4040/// | 80 | `00 00 00 02 00 80`
4141/// |-1234 | `00 00 00 02 ed cc`
4242/// | -deadbeef | `00 00 00 05 ff 21 52 41 11`
43- #[ cfg_attr( not( feature = "subtle " ) , derive( Clone ) ) ]
44- #[ cfg_attr( feature = "subtle " , derive( Clone , Ord , PartialOrd ) ) ] // TODO: constant time (Partial)`Ord`?
43+ #[ cfg_attr( not( feature = "ctutils " ) , derive( Clone ) ) ]
44+ #[ cfg_attr( feature = "ctutils " , derive( Clone , Ord , PartialOrd ) ) ] // TODO: constant time (Partial)`Ord`?
4545pub struct Mpint {
4646 /// Inner big endian-serialized integer value
4747 inner : Box < [ u8 ] > ,
@@ -112,17 +112,17 @@ impl AsRef<[u8]> for Mpint {
112112 }
113113}
114114
115- #[ cfg( feature = "subtle " ) ]
116- impl ConstantTimeEq for Mpint {
115+ #[ cfg( feature = "ctutils " ) ]
116+ impl CtEq for Mpint {
117117 fn ct_eq ( & self , other : & Self ) -> Choice {
118118 self . as_ref ( ) . ct_eq ( other. as_ref ( ) )
119119 }
120120}
121121
122- #[ cfg( feature = "subtle " ) ]
122+ #[ cfg( feature = "ctutils " ) ]
123123impl Eq for Mpint { }
124124
125- #[ cfg( feature = "subtle " ) ]
125+ #[ cfg( feature = "ctutils " ) ]
126126impl PartialEq for Mpint {
127127 fn eq ( & self , other : & Self ) -> bool {
128128 self . ct_eq ( other) . into ( )
0 commit comments