Repository navigation
Blind the default RSA decryption paths - #739
Merged
Merged
Conversation
Note: this PR is an extraction of #702 Enables the `getrandom` crate feature by default and uses `SysRng` for blinding in `RsaPrivateKey::decrypt` and the PKCS#1v1.5/OAEP `Decryptor` implementations. Also builds without `getrandom`, which retains the previous behavior, in whcih case callers can supply a custom RNG explicitly through the existing blinding APIs.
5 of 8 tasks
This was referenced Nov 1, 2026
tarcieri
added a commit
that referenced
this pull request
Nov 1, 2026
Avoid a padding oracle by returning a deterministic rejection symbol rather than an error on padding failures. See sections 7.1/7.2 of: https://www.ietf.org/archive/id/draft-irtf-cfrg-rsa-guidance-10.html Incorporates some of the code from #680 / #702, where some of the code from the latter was merged in #739 (blinding support). Uses `cargo checkct` / BINSEC to verify constant-time operation. Closes #626
tarcieri
added a commit
that referenced
this pull request
Nov 1, 2026
Avoid a padding oracle by returning a deterministic rejection symbol rather than an error on padding failures. See sections 7.1/7.2 of: https://www.ietf.org/archive/id/draft-irtf-cfrg-rsa-guidance-10.html Incorporates some of the code from #680 / #702, where some of the code from the latter was merged in #739 (blinding support). Uses `cargo checkct` / BINSEC to verify constant-time operation. Closes #626
tarcieri
added a commit
that referenced
this pull request
Nov 1, 2026
Avoid a padding oracle by returning a deterministic rejection symbol rather than an error on padding failures. See sections 7.1/7.2 of: https://www.ietf.org/archive/id/draft-irtf-cfrg-rsa-guidance-10.html Incorporates some of the code from #680 / #702, where some of the code from the latter was merged in #739 (blinding support). Uses `cargo checkct` / BINSEC to verify constant-time operation. Closes #626
tarcieri
added a commit
that referenced
this pull request
Nov 2, 2026
Similar change to #739, but for signing instead of decryption, utilizing `getrandom` when available to supply randomness for blinding automatically when the crate feature is enabled (which it is by default). This also changes `pss::BlindedSigningKey` into a deprecated type alias for `pss::SigningKey`. Contrary to a code comment claiming that it's an implementation of `draft-irtf-cfrg-rsa-blind-signatures` (now RFC9474) it doesn't actually implement this protocol but merely blinds the signing paths, now making it redundant. A proper implementation of RFC9474 blinded signatures would be interesting to add, but the API would need to receive an already encoded and blinded representative from the client, and we don't support that.
tarcieri
added a commit
that referenced
this pull request
Nov 2, 2026
) Similar change to #739, but for signing instead of decryption, utilizing `getrandom` when available to supply randomness for blinding automatically when the crate feature is enabled (which it is by default). This also changes `pss::BlindedSigningKey` into a deprecated type alias for `pss::SigningKey`. Contrary to a code comment claiming that it's an implementation of `draft-irtf-cfrg-rsa-blind-signatures` (now RFC9474) it doesn't actually implement this protocol but merely blinds the signing paths, now making it redundant. A proper implementation of RFC9474 blinded signatures would be interesting to add, but the API would need to receive an already encoded and blinded representative from the client, and we don't support that.
yukaia
pushed a commit
to yukaia/blink
that referenced
this pull request
Nov 4, 2026
suppaftp 12.2.1 sets data_connection_open only after the 150 is read, one of the conditions the entry named. The rsa fixes (RustCrypto/RSA#739, #749) merged on 2026-11-01 and rsa 0.10.0-rc.20 is out; russh 0.65.1 still pins rc.18. New entries: resume with an unknown size, known_hosts format subset, IPv6 legacy host ambiguity, missing Windows device names, checkpoint file-name length. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: this PR is an extraction of #702
Enables the
getrandomcrate feature by default and usesSysRngfor blinding inRsaPrivateKey::decryptand the PKCS#1v1.5/OAEPDecryptorimplementations.Also builds without
getrandom, which retains the previous behavior, in whcih case callers can supply a custom RNG explicitly through the existing blinding APIs.