chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

22
vendor/p256/tests/scalar.rs vendored Normal file
View File

@@ -0,0 +1,22 @@
//! Scalar arithmetic tests.
#![cfg(feature = "arithmetic")]
use elliptic_curve::ops::{Invert, Reduce};
use p256::{Scalar, U256};
use proptest::prelude::*;
prop_compose! {
fn scalar()(bytes in any::<[u8; 32]>()) -> Scalar {
<Scalar as Reduce<U256>>::reduce_bytes(&bytes.into())
}
}
proptest! {
#[test]
fn invert_and_invert_vartime_are_equivalent(w in scalar()) {
let inv: Option<Scalar> = w.invert().into();
let inv_vartime: Option<Scalar> = w.invert_vartime().into();
prop_assert_eq!(inv, inv_vartime);
}
}