Skip to content

Upgrade all crates to the 2024 edition and bump MSRV to 1.85 #913

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 33 commits into from
Mar 1, 2025

Conversation

Copy link
Member Author

@baloo baloo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opinion about RandomizedSignerMut signature?

@@ -107,7 +107,7 @@ impl<Mode: LmsOtsMode> RandomizedSignerMut<Signature<Mode>> for SigningKey<Mode>

// Generate the message randomizer C
let mut c = <Output<Mode::Hasher>>::default();
rng.fill_bytes(&mut c);
rng.try_fill_bytes(&mut c).map_err(|_| Error::new())?;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We kind of eat the error here. This might be a bad idea.

I wish we could do Error::from_source instead, but that would require the RandomizedSignerMut to change its signature to something like:

fn try_sign_with_rng<E: core:error::Error, R: TryCryptoRng<Error = E>>(
        &mut self,
        rng: &mut R,
        msg: &[u8],
    ) -> Result<Signature<Mode>, Error> {
``
Not sure.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can potentially consider something like that

prehash: &[u8],
) -> Result<Signature<C>> {
let z = bits2field::<C>(prehash)?;
let mut ad = FieldBytes::<C>::default();
rng.fill_bytes(&mut ad);
rng.try_fill_bytes(&mut ad).map_err(|_| Error::new())?;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar situation here.

@baloo baloo force-pushed the baloo/edition-2024 branch 2 times, most recently from 2e419ca to 733b105 Compare February 24, 2025 06:37
@tarcieri
Copy link
Member

@baloo can you rebase?

@baloo baloo force-pushed the baloo/edition-2024 branch from 9d6fe57 to 9a7625f Compare February 24, 2025 16:06
@baloo baloo force-pushed the baloo/edition-2024 branch from 9a7625f to 6ad65c7 Compare February 24, 2025 16:43
@erik-3milabs
Copy link

Would it be possible to include new elliptic-curve and ecdsa pre-releases with this PR? 😄

Currently, [email protected] and [email protected] do not work together, because:

elliptic-curve has already been updated to use 0.3.0; it just needs a new release for these packages to work together again.

I might be mistaken, but all I think needs to happen is:

If this is not the right place and/or time, I'm happy to create a separate issue for it :)

@tarcieri
Copy link
Member

@erik-3milabs we generally do releases in separate PRs to keep ones like this focused

@baloo
Copy link
Member Author

baloo commented Feb 24, 2025

Just to mitigate expectations, I don't know if we'll be able to release elliptic-curve until the situation of group and ff support of rand_core 0.9 is sorted out. (RustCrypto/traits#1751 (comment))

@erik-3milabs
Copy link

@erik-3milabs we generally do releases in separate PRs to keep ones like this focused

In that case, would there be a point in raising an issue for this?

@tarcieri
Copy link
Member

Sure, please open a separate issue

@baloo
Copy link
Member Author

baloo commented Feb 28, 2025

Anything else needed here?

@tarcieri tarcieri merged commit 0e69f92 into RustCrypto:master Mar 1, 2025
75 checks passed
@baloo baloo deleted the baloo/edition-2024 branch March 1, 2025 02:52
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.

3 participants