Repository navigation
Make #![no_std] unconditional - #784
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #784 +/- ##
==========================================
- Coverage 90.29% 90.29% -0.01%
==========================================
Files 29 29
Lines 4091 4090 -1
==========================================
- Hits 3694 3693 -1
Misses 397 397 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tarcieri
force-pushed
the
unconditional-no_std
branch
2 times, most recently
from
November 7, 2026 04:56
0176ace to
a7ca7a5
Compare
Previously it was gated on `not(test)`. Only a tiny number of changes, mostly just imports, are needed to eliminate the conditional gating.
tarcieri
force-pushed
the
unconditional-no_std
branch
from
November 7, 2026 05:01
a7ca7a5 to
cc45f7b
Compare
kaidokert
added a commit
to kaidokert/RSA
that referenced
this pull request
Nov 8, 2026
#82) * Add `PrivateKey`/`PublicKey` inherent methods for algorithms (RustCrypto#638) Adds algorithm-specific inherent methods for encryption and signing prefixed with the algorithm name, e.g. `pkcs1v15_decrypt`, `pkcs1v15_sign`, as an alternative to the `PaddingScheme` and `SignatureScheme` traits. We already have an entirely separate trait-based API from `PaddingScheme` and `SignatureScheme`, namely traits like `RandomizedEncryptor`, `RandomizedDecryptor`, and `Decryptor`, along with the traits from the `signature` crate. These traits are well-typed and enforce usage of a particular algorithm's family of types, but also seem to have overlapping responsibilities / use cases to the `PaddingScheme` and `SignatureScheme` traits. The current `PaddingScheme` and `SignatureScheme` traits do let you mix encryption and signing operations with a single key type (along with different algorithms), but they're a little awkward to use and I don't think we're getting a whole lot out of the trait-based abstraction they provide which isn't provided better by the aforementioned well-typed traits. The goal of being able to execute any operation of any algorithm you want on a given key type can also be met by just having a bunch of methods which do exactly what you want, which is what this PR proposes. Fork adaptation: the inherent methods are on the alloc key types only and are gated on `alloc`. The doc examples that call `Generate::generate` need `keygen` as well as `getrandom`, since the fork gates `Generate` on `keygen`. `pss_verify_prehash` and `pkcs1v15_verify_prehash` delegate to the fork's `Pss` and `Pkcs1v15Sign` verify paths, which perform the same checks; the fork has no byte-slice `verify` helpers. Upstream's README hunk goes to UPSTREAM_README.md. (cherry picked from commit 6ab482b) * Make `#![no_std]` unconditional (RustCrypto#784) Previously it was gated on `not(test)`. Only a tiny number of changes, mostly just imports, are needed to eliminate the conditional gating. Fork adaptation: the one conflict is a test the fork had already moved to `core::mem::swap`; it takes upstream's `mem::swap` with the new import. (cherry picked from commit 58c89a6) * Test the per-algorithm inherent key methods Upstream covers the new PublicKey/PrivateKey methods only from doc examples, which the coverage job does not run, so project coverage fell below the codecov target. Round-trip each method, with and without an explicit RNG, plus the hash-length and wrong-message rejections. --------- Co-authored-by: Tony Arcieri <bascule@gmail.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.
Previously it was gated on
not(test).Only a tiny number of changes, mostly just imports, are needed to eliminate the conditional gating.