Skip to content

Add RsaPublicKey::new_with_max_size; 4096-bit default max#176

Merged
tarcieri merged 2 commits intomasterfrom
rsapublickey-new-with-max-size
Aug 9, 2022
Merged

Add RsaPublicKey::new_with_max_size; 4096-bit default max#176
tarcieri merged 2 commits intomasterfrom
rsapublickey-new-with-max-size

Conversation

@tarcieri
Copy link
Member

@tarcieri tarcieri commented Aug 8, 2022

This constructor accepts a configurable maximum key size which can be used in applications that need to deal with unusually large RSA public keys, such as OpenPGP.

With the ability to configure an upper limit, this makes it possible to lower the default maximum key size to 4096-bits, which is a reasonable upper limit for most applications.

Fixes #166

This constructor accepts a configurable maximum key size which can be
used in applications that need to deal with unusually large RSA public
keys, such as OpenPGP.

With the ability to configure an upper limit, this makes it possible to
lower the default maximum key size to 4096-bits, which is a reasonable
upper limit for most applications.

Fixes #166
@tarcieri tarcieri force-pushed the rsapublickey-new-with-max-size branch from 53af215 to 1e8b392 Compare August 8, 2022 14:56
Copy link
Member

@dignifiedquire dignifiedquire left a comment

Choose a reason for hiding this comment

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

lgtm, can you add a test for the new defaults?

@tarcieri
Copy link
Member Author

tarcieri commented Aug 8, 2022

@dignifiedquire added

@tarcieri tarcieri merged commit e7f4810 into master Aug 9, 2022
@tarcieri tarcieri deleted the rsapublickey-new-with-max-size branch August 9, 2022 14:24
Br1ght0ne added a commit to aletheia-rs/RSA that referenced this pull request Nov 10, 2022
takumi-earth pushed a commit to earthlings-dev/RSA that referenced this pull request Jan 27, 2026
…to#176)

This constructor accepts a configurable maximum key size which can be
used in applications that need to deal with unusually large RSA public
keys, such as OpenPGP.

With the ability to configure an upper limit, this makes it possible to
lower the default maximum key size to 4096-bits, which is a reasonable
upper limit for most applications.

Fixes RustCrypto#166
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.

Denial of Service (DoS) via Large Public Key

2 participants