File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,6 @@ use subtle::{
1111} ;
1212
1313impl BoxedUint {
14- /// Returns the truthy value if `self >= rhs` and the falsy value otherwise.
15- #[ inline]
16- pub ( crate ) fn gt ( lhs : & Self , rhs : & Self ) -> ConstChoice {
17- let ( _res, borrow) = rhs. sbb ( lhs, Limb :: ZERO ) ;
18- ConstChoice :: from_word_mask ( borrow. 0 )
19- }
20-
2114 /// Returns the Ordering between `self` and `rhs` in variable time.
2215 pub fn cmp_vartime ( & self , rhs : & Self ) -> Ordering {
2316 debug_assert_eq ! ( self . limbs. len( ) , rhs. limbs. len( ) ) ;
Original file line number Diff line number Diff line change 11//! [`BoxedUint`] square root operations.
22
3- use subtle:: { ConstantTimeEq , CtOption } ;
3+ use subtle:: { ConstantTimeEq , ConstantTimeGreater , CtOption } ;
44
55use crate :: { BoxedUint , NonZero } ;
66
@@ -48,7 +48,7 @@ impl BoxedUint {
4848 // At this point `x_prev == x_{n}` and `x == x_{n+1}`
4949 // where `n == i - 1 == LOG2_BITS + 1 == floor(log2(BITS)) + 1`.
5050 // Thus, according to Hast, `sqrt(self) = min(x_n, x_{n+1})`.
51- Self :: conditional_select ( & x_prev, & x, Self :: gt ( & x_prev, & x) . into ( ) )
51+ Self :: conditional_select ( & x_prev, & x, Self :: ct_gt ( & x_prev, & x) )
5252 }
5353
5454 /// Computes √(`self`)
You can’t perform that action at this time.
0 commit comments