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

lms: bump rand_core from 0.6 to 0.9.0 #905

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

baloo
Copy link
Member

@baloo baloo commented Feb 16, 2025

No description provided.

@baloo baloo marked this pull request as draft February 16, 2025 04:00
@@ -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

@baloo baloo Feb 16, 2025

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.

(see ecdsa where this happens too: #901 (comment))

@baloo baloo force-pushed the baloo/lms/rand_core-0.9 branch from 0269b6e to 9655757 Compare February 16, 2025 04:13
@baloo baloo marked this pull request as ready for review February 16, 2025 04:13
@baloo baloo force-pushed the baloo/lms/rand_core-0.9 branch from 9655757 to 8ceddf4 Compare February 20, 2025 19:09
@baloo baloo force-pushed the baloo/lms/rand_core-0.9 branch from 8ceddf4 to d6d4770 Compare February 20, 2025 21:08
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.

1 participant