feat: add PKCS#1 v1.5 padding to support PKCS#7 signing#291
Open
dallasd1 wants to merge 2 commits intoAzure:mainfrom
Open
feat: add PKCS#1 v1.5 padding to support PKCS#7 signing#291dallasd1 wants to merge 2 commits intoAzure:mainfrom
dallasd1 wants to merge 2 commits intoAzure:mainfrom
Conversation
Add RSA PKCS#1 v1.5 signature algorithm support (RS256, RS384, RS512) alongside the existing PSS algorithms. This is required for dm-verity kernel signature verification which expects PKCS#1 v1.5 signatures. Changes: - Add PKCS1 key spec variants to Protocol/KeySpec.cs - Extend KeySpecExtension to map PKCS1 specs to Azure Key Vault algorithms - Update GenerateSignature to select the correct signing scheme - Add unit tests for new key specs and algorithm mappings Signed-off-by: Dallas Delaney <dadelan@microsoft.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #291 +/- ##
==========================================
- Coverage 93.03% 92.87% -0.16%
==========================================
Files 17 17
Lines 617 674 +57
Branches 78 87 +9
==========================================
+ Hits 574 626 +52
- Misses 31 33 +2
- Partials 12 15 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Improve CI patch coverage for tests to get over 80% Add tests for all RSA key sizes (2048/3072/4096) and EC key sizes (256/384/521) through the PKCS1 code paths. Add tests for empty string and rsassa-pss scheme routing. Add direct tests for ToKeyVaultSignatureAlgorithmPKCS1 and ToSigningAlgorithmPKCS1. Fix trailing whitespace in KeySpec.cs. Signed-off-by: Dallas Delaney <dadelan@microsoft.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.
Add RSA PKCS#1 v1.5 signature algorithm support alongside the existing PSS algorithms. This is required for dm-verity kernel signature verification which expects PKCS#1 v1.5 signature padding. The signing scheme is now selected using the signing_scheme plugin config key. AKV already supports PKCS#1 v1.5 so this change adds the option to select it from the plugin.