Skip to content

Conversation

@hko-s
Copy link
Contributor

@hko-s hko-s commented Oct 17, 2025

Cherry picked copy of #594 from 0-9-x

Currently, this crate allows instantiation of public keys larger than
4096 bit (via `RsaPublicKey::new_with_max_size`), but doing
cryptographic operations with such public keys fails in
`key::check_public`, which always checks the modulus size against the
constant `RsaPublicKey::MAX_SIZE`.

I think it would be nice to cap both public and private key sizes to
4096 bit by default, but to allow opt-in creation of larger keys
(complete with working cryptographic operations).
@tarcieri tarcieri merged commit 40e1750 into RustCrypto:master Oct 17, 2025
12 checks passed
@hko-s hko-s deleted the large-keys branch November 1, 2025 08: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.

2 participants