Skip to content

crypto: Cleanup RSA, add Symcrypt support#3423

Open
smalis-msft wants to merge 5 commits intomicrosoft:mainfrom
smalis-msft:rsa-symcrypt
Open

crypto: Cleanup RSA, add Symcrypt support#3423
smalis-msft wants to merge 5 commits intomicrosoft:mainfrom
smalis-msft:rsa-symcrypt

Conversation

@smalis-msft
Copy link
Copy Markdown
Contributor

@smalis-msft smalis-msft commented May 5, 2026

Now that we have a second backend implementation for RSA we can clean up the interface and make it nice. So this PR is a near complete rewrite of our openssl backend, an addition of the symcrypt backend, and the introduction of the RustCrypto parsing crates for use with symcrypt.

The transmutes are unfortunate, but they do allow for a much nicer interface, and they should be guaranteed safe.

Copilot AI review requested due to automatic review settings May 5, 2026 16:53
@smalis-msft smalis-msft requested a review from a team as a code owner May 5, 2026 16:53
@github-actions github-actions Bot added the unsafe Related to unsafe code label May 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

⚠️ Unsafe Code Detected

This PR modifies files containing unsafe Rust code. Extra scrutiny is required during review.

For more on why we check whole files, instead of just diffs, check out the Rustonomicon

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@smalis-msft smalis-msft requested a review from Copilot May 5, 2026 21:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 10 comments.

Comment thread support/crypto/src/rsa/symcrypt.rs Outdated
Comment thread support/crypto/src/rsa/symcrypt.rs
Comment thread support/crypto/src/rsa/symcrypt.rs
Comment thread support/crypto/src/rsa/ossl.rs
Comment thread support/crypto/src/rsa/ossl.rs
Comment thread support/crypto/src/rsa/mod.rs
Comment thread support/crypto/src/rsa/mod.rs
Comment thread support/crypto/src/x509/ossl.rs
Comment thread support/crypto/src/lib.rs
Comment thread support/crypto/src/rsa/symcrypt.rs
Copilot AI review requested due to automatic review settings May 5, 2026 22:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.

Comment thread support/crypto/src/x509/ossl.rs
Comment thread support/crypto/src/rsa/ossl.rs
Comment thread support/crypto/src/rsa/symcrypt.rs
Comment thread support/crypto/src/rsa/symcrypt.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

unsafe Related to unsafe code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants