Skip to content

Fix possible panic in internals::left_pad#262

Merged
tarcieri merged 1 commit intoRustCrypto:masterfrom
dfabregat:fix_left_pad_panic
Feb 10, 2023
Merged

Fix possible panic in internals::left_pad#262
tarcieri merged 1 commit intoRustCrypto:masterfrom
dfabregat:fix_left_pad_panic

Conversation

@dfabregat
Copy link
Copy Markdown
Contributor

This commit prevents potential panics in internals::left_pad when the requested padded length is smaller than the input length. It also removes related dead-code in the implementation of EncryptionPrimitive for RsaPublicKey (when not panicking, the returned vector was always of length pad_size).

Feedback welcome :)

@tarcieri tarcieri merged commit 6f8d112 into RustCrypto:master Feb 10, 2023
@tarcieri tarcieri mentioned this pull request Mar 2, 2023
takumi-earth pushed a commit to earthlings-dev/RSA that referenced this pull request Jan 27, 2026
Co-authored-by: Diego Fabregat Traver <diego.fabregat@rwth-aachen.de>
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