-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crypto-bigint: add initial proptests for equivalence with num-bigint #563
Conversation
@@ -44,7 +44,7 @@ impl<const LIMBS: usize> UInt<LIMBS> { | |||
|
|||
/// Perform wrapping multiplication, discarding overflow. | |||
pub const fn wrapping_mul(&self, rhs: &Self) -> Self { | |||
self.mul_wide(rhs).0 | |||
self.mul_wide(rhs).1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it were, these tests uncovered a bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably should cut a release with this fix and yank the versions with this bug. Even though I've seen this comment, I recently hit this bug and it took me some time to uncover this bug.
Ugh, looks like it's breaking due to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
Will need to factor it into a pseudo-crate for now to avoid breaking |
864d091
to
8aed700
Compare
Adds an initial set of property-based tests to check equivalence between `crypto_bigint::U256` and `num_bigint::BigUint`.
8aed700
to
cd19cd3
Compare
Adds an initial set of property-based tests to check equivalence between
crypto_bigint::U256
andnum_bigint::BigUint
.I mostly want these for #561, but I figured I could push up an initial integration separately.