Skip to content
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

Constructors for scalars from u128 #709

Merged
merged 1 commit into from
Jan 12, 2023
Merged

Conversation

nickray
Copy link
Member

@nickray nickray commented Jan 12, 2023

These are helpful when using the scalars in Shamir secret sharing with random (128 bit) participants.

I didn't touch the field.rs files, as then automatic method selection in the multiplicative_generator implementations fails - so there is potentially a danger of backwards incompat in p256+p384 which don't have From<u32>.

Personally, I'm only interested in From<u128> for k256.

@tarcieri
Copy link
Member

It seems this breaks inference for integer conversions where the type isn't annotated, so you'll need to annotate the types where they weren't annotated before

@nickray
Copy link
Member Author

nickray commented Jan 12, 2023

Right, I missed the 32-bit build test.

@tarcieri tarcieri merged commit 2c1ec0a into RustCrypto:master Jan 12, 2023
@tarcieri
Copy link
Member

Thanks!

This was referenced Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants