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

A list of breaking changes to consider for v0.6 #268

Closed
5 tasks done
fjarri opened this issue Aug 28, 2023 · 10 comments
Closed
5 tasks done

A list of breaking changes to consider for v0.6 #268

fjarri opened this issue Aug 28, 2023 · 10 comments

Comments

@fjarri
Copy link
Contributor

fjarri commented Aug 28, 2023

There's a lot of small stuff so I decided to put them in one issue:

@AaronFeickert
Copy link
Contributor

The functionality for DynResidueParams::new_checked added in #240 was done with the understanding that it could be moved to DynResidueParams::new in a future breaking release.

@tarcieri
Copy link
Member

tarcieri commented Aug 29, 2023

Uint::{sqrt, checked_sqrt, wrapping_sqrt} should be removed or replaced with a constant-time implementation

@fjarri
Copy link
Contributor Author

fjarri commented Oct 31, 2023

@tarcieri , what are your plans regarding the v0.6 release? I can start working on this so that we have time to discuss the planned breaking changes.

@tarcieri
Copy link
Member

We're getting the ball rolling on another cycle of breaking changes over at https://github.com/rustcrypto/traits

I can cut a v0.5.4 release here and we can switch master to be v0.6.0-pre. If need be we can make a 0-5-stable branch for changes to the current release series.

tarcieri added a commit that referenced this issue Nov 21, 2023
This version bump does not signify a release, but that we are starting a
new round of breaking changes, as proposed in #268.

The first actual prerelease with an associated crate released to
crates.io will be versioned v0.6.0-pre.0.
@tarcieri
Copy link
Member

Starting on this in #295

tarcieri added a commit that referenced this issue Nov 21, 2023
This version bump does not signify a release, but that we are starting a
new round of breaking changes, as proposed in #268.

The first actual prerelease with an associated crate released to
crates.io will be versioned v0.6.0-pre.0.
@tarcieri
Copy link
Member

#296 made DynResidueParams::new fallible

@tarcieri
Copy link
Member

Looking at the division operations, I'm wondering if we should consider NonZero divisors, which would eliminate the need to have multiple division functions, e.g. instead of wrapping_div (which makes no sense, except for cargo cult parity with std) and checked_div, we could have a single infallible-and-panic-free function with a NonZero<Self> divisor. The same goes for the *_rem functions.

Also, since it's only constant time with respect to the dividend and not to the divisor, it should probably be called div_vartime (or otherwise we need to rename all of the existing functions with _vartime suffixes, e.g. wrapping_div_vartime, checked_div_vartime).

We already use this approach for various *_mod functions.

@tarcieri
Copy link
Member

It'd be nice to close #70, perhaps with a trait redesign

@fjarri
Copy link
Contributor Author

fjarri commented Dec 14, 2023

This probably can be closed now?

@tarcieri
Copy link
Member

Indeed!

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

No branches or pull requests

3 participants