Skip to content

Add BoxedUint::{from_be_slice_vartime, from_le_slice_vartime} #833

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

Merged
merged 2 commits into from
Jun 2, 2025

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented Jun 1, 2025

Adds methods for decoding BoxedUint which infer the precision from the input size.

This is useful for decoding public parameters, especially when the size of other parameters is inferred from some public parameter that needs to be decoded first, e.g. RSA modulus.

Adds methods for decoding `BoxedUint` which infer the precision from the
input size.

This is useful for decoding public parameters, especially when the size
of other parameters is inferred from some public parameter that needs to
be decoded first, e.g. RSA modulus.
@tarcieri tarcieri requested review from fjarri and baloo June 1, 2025 23:53
@tarcieri
Copy link
Member Author

tarcieri commented Jun 1, 2025

Not sure this is the greatest name or implementation. Notably the existing BoxedUint::from_*_slice methods are vartime to an extent.

These methods are unsuitable for use on secret values, however, so *_vartime felt appropriate.

@tarcieri tarcieri merged commit c451e15 into master Jun 2, 2025
23 checks passed
@tarcieri tarcieri deleted the boxed-uint/from-slice-vartime branch June 2, 2025 20:06
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