Skip to content

Add sha2 feature with oid subfeature enabled#255

Merged
tarcieri merged 1 commit intomasterfrom
sha2-feature
Jan 20, 2023
Merged

Add sha2 feature with oid subfeature enabled#255
tarcieri merged 1 commit intomasterfrom
sha2-feature

Conversation

@tarcieri
Copy link
Copy Markdown
Member

We seem to be running into a lot of people who are having trouble with PKCS#1 v1.5 signatures because the failure mode for the oid feature of the sha2 crate being disabled is fairly unscrutable.

See #234, #253, and the semi-related tracking issue for #238.

If rsa has a sha2 feature, we can always ensure oid is enabled, and this can be used in code examples. It also means users don't need two crates to create/verify PKCS#1 v1.5 signatures.

RSA is used commonly enough with the SHA2 family that this integration probably makes sense.

cc @lumag

We seem to be running into a lot of people who are having trouble with
PKCS#1 v1.5 signatures because the failure mode for the `oid` feature of
the `sha2` crate being disabled is fairly unscrutable.

See #234, #253, and the semi-related tracking issue for #238.

If `rsa` has a `sha2` feature, we can always ensure `oid` is enabled,
and this can be used in code examples. It also means users don't need
two crates to create/verify PKCS#1 v1.5 signatures.

RSA is used commonly enough with the SHA2 family that this integration
probably makes sense.
Copy link
Copy Markdown
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.

sounds good

@tarcieri tarcieri merged commit 134a061 into master Jan 20, 2023
@tarcieri tarcieri deleted the sha2-feature branch January 20, 2023 23:46
@tarcieri tarcieri mentioned this pull request Jan 21, 2023
tarcieri added a commit that referenced this pull request Jan 21, 2023
Uses `rsa::sha2` to access `Sha256` in the code example, noting the
`sha2` feature must be enabled, ala #255
tarcieri added a commit that referenced this pull request Jan 21, 2023
Uses `rsa::sha2` to access `Sha256` in the code example, noting the
`sha2` feature must be enabled, ala #255
takumi-earth pushed a commit to earthlings-dev/RSA that referenced this pull request Jan 27, 2026
We seem to be running into a lot of people who are having trouble with
PKCS#1 v1.5 signatures because the failure mode for the `oid` feature of
the `sha2` crate being disabled is fairly unscrutable.

See RustCrypto#234, RustCrypto#253, and the semi-related tracking issue for RustCrypto#238.

If `rsa` has a `sha2` feature, we can always ensure `oid` is enabled,
and this can be used in code examples. It also means users don't need
two crates to create/verify PKCS#1 v1.5 signatures.

RSA is used commonly enough with the SHA2 family that this integration
probably makes sense.
takumi-earth pushed a commit to earthlings-dev/RSA that referenced this pull request Jan 27, 2026
Uses `rsa::sha2` to access `Sha256` in the code example, noting the
`sha2` feature must be enabled, ala RustCrypto#255
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