Skip to content

Commit 0dd4ef7

Browse files
committed
Checkpoint
1 parent bdb8109 commit 0dd4ef7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/uint/boxed/div.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! [`BoxedUint`] division operations.
22
3-
use crate::{BoxedUint, CheckedDiv, Limb, NonZero, Wrapping};
3+
use crate::{BoxedUint, CheckedDiv, Limb, NonZero, Wrapping, Reciprocal};
44
use core::ops::{Div, DivAssign, Rem, RemAssign};
55
use subtle::{Choice, ConstantTimeEq, ConstantTimeLess, CtOption};
66

@@ -24,6 +24,13 @@ impl BoxedUint {
2424
self.div_rem_vartime_unchecked(rhs.as_ref())
2525
}
2626

27+
/// Computes `self` / `rhs` using a pre-made reciprocal
28+
/// returns the quotient (q) and remainder (r)
29+
pub fn div_rem_limb_with_reciprocal(&self, reciprocal: &Reciprocal) -> (Self, Limb) {
30+
todo!("Need to implement shl_limb");
31+
// No need to implement div2by1
32+
}
33+
2734
/// Computes self % rhs, returns the remainder.
2835
///
2936
/// Variable-time with respect to `rhs`.

0 commit comments

Comments
 (0)