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::{
11
11
} ;
12
12
13
13
impl 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
-
21
14
/// Returns the Ordering between `self` and `rhs` in variable time.
22
15
pub fn cmp_vartime ( & self , rhs : & Self ) -> Ordering {
23
16
debug_assert_eq ! ( self . limbs. len( ) , rhs. limbs. len( ) ) ;
Original file line number Diff line number Diff line change 1
1
//! [`BoxedUint`] square root operations.
2
2
3
- use subtle:: { ConstantTimeEq , CtOption } ;
3
+ use subtle:: { ConstantTimeEq , ConstantTimeGreater , CtOption } ;
4
4
5
5
use crate :: { BoxedUint , NonZero } ;
6
6
@@ -48,7 +48,7 @@ impl BoxedUint {
48
48
// At this point `x_prev == x_{n}` and `x == x_{n+1}`
49
49
// where `n == i - 1 == LOG2_BITS + 1 == floor(log2(BITS)) + 1`.
50
50
// 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) )
52
52
}
53
53
54
54
/// Computes √(`self`)
You can’t perform that action at this time.
0 commit comments