-
Notifications
You must be signed in to change notification settings - Fork 190
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
elliptic_curve: add BatchInvert
and BatchNormalize
traits
#1376
Conversation
Also, I'd like to write tests but I couldn't as |
InvertBatch
and implemented
I'm reconsidering whether pub fn invert_batch_generic<T, const N: usize>(field_elements: &[T; N]) -> CtOption<[T; N]> {
where
T: Invert<Output = CtOption<Self>>
+ Mul<T, Output = T>
+ Copy
+ Default
+ ConditionallySelectable, It just seems a little weird that there's |
As another option: they could potentially be provided methods on the |
Co-authored-by: Tony Arcieri <[email protected]>
Can't do that, as the output from the |
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.
This looks good now, although I'd like to see RustCrypto/elliptic-curves#971 green before merging
What issues did you run into with the |
The Rust compiler complained that it didn't provided it. We can try to fight it if its important |
Co-authored-by: Tony Arcieri <[email protected]>
BatchInvert
and BatchNormalize
traits
Thanks! |
Addresses RustCrypto/elliptic-curves#943