-
Notifications
You must be signed in to change notification settings - Fork 5.2k
SHA3 #84132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
SHA3 #84132
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
ef69307
Initial SHA3 bringup on Linux
vcsjones 64f1c2e
Fix failures on unsupported platforms
vcsjones d077e4e
Some HKDF tests
vcsjones deccd5a
Get HKDF working with tests
vcsjones 2fa0c13
Add derived hash tests
vcsjones 9319d66
Remove outdated comment
vcsjones 9d1f651
Fix hash validation for PBKDF2
vcsjones 0e79766
Wire in CNG algorithm support testing
vcsjones 5741ea2
Fix querying invalid handles
vcsjones faa42cf
Wire SHA3 in to SP800108
vcsjones e8ff0b7
SP800108: Throw PNSE for SHA3 on .NET 8 when not supported
vcsjones 7b90cca
Fix CNG identifiers
vcsjones 9948ff6
Fix PlatformDetection
vcsjones 8081638
Use correct version
vcsjones 693e19b
Psuedo handles for Windows
vcsjones 1f399e7
Fix algorithm identifiers throughout
vcsjones e80d2fd
Block sizes for SP800-108
vcsjones 34e3077
Add one shots for SP800-108 in CNG
vcsjones 54d16d4
Use known consts for identifiers
vcsjones 8b8a193
SHA3_256 Platform guards
vcsjones 63d383b
Fix SHA3-384 and 512 UOSP
vcsjones 95af4f5
Fix missing SHA3 test coverage
vcsjones 14bc9a0
Only ask CNG if supported for SHA3
vcsjones b1a27c4
Fix SHA3 availability detection for RSAOpenSsl
vcsjones bb13b32
Revert "Fix SHA3 availability detection for RSAOpenSsl"
vcsjones 733813c
Prevent SHA3 usage on RSAOpenSsl for macOS
vcsjones 3d608eb
Fixup CAPI and add some tests for signatures
vcsjones f459f63
Fix verify for CryptoServiceProvider, too
vcsjones 4ae22be
Make PSS as forgiving as PKCS1
vcsjones c178ca0
Add HMAC and hash tests for ECDH with SHA-3
vcsjones 52f5434
Merge remote-tracking branch 'ms/main' into sha3
vcsjones 81071fd
Code review feedback
vcsjones 630b72d
More code review feedback
vcsjones a8d26e1
Merge remote-tracking branch 'ms/main' into sha3
vcsjones 9fc9541
Merge remote-tracking branch 'ms/main' into sha3
vcsjones 86d7ec6
Merge remote-tracking branch 'ms/main' into sha3
vcsjones 7dfcd6f
Remove UOSP attribute from SHA3
vcsjones d7d9abe
Remove unused using for HMAC
vcsjones f904880
Merge remote-tracking branch 'ms/main' into sha3
vcsjones 43385c2
Code review feedback on HKDF tests
vcsjones 08af75f
Additional code review feedback
vcsjones 8abcc7a
Add tests for IsSupported on algorithm implementations
vcsjones dc8ae5f
Simplify IsBCryptAlgorithmSupported
vcsjones b3efe82
Implement and test SHA3 with SignedCms
vcsjones 5305f10
Add multi-'block' tests for SHA3
vcsjones a639910
Use a separate bool to track cached EVP handles
vcsjones af7a6b1
Add a SHA3 certificate test
vcsjones 95a7ced
Change IsSupported to have backing fields to help enlighten JIT about…
vcsjones 81049b2
Change HashOneShotHelpers to use a switch
vcsjones 64329a9
Add trailing commas
vcsjones c55fea4
Fix CNG test failures
vcsjones c735e7a
Fix hash algorithm support detection on Android
vcsjones File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix algorithm identifiers throughout
- Loading branch information
commit 1f399e7b81568181fa1e76d2be68bf9a9455c8d6
There are no files selected for viewing
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
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do any of the myriad PNSEs in this change need a custom string, or will it always be pretty obvious that the thing not supported is a SHA-3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most straight forward uses of SHA3 like
SHA3_256
are going to check is supported in Create or their constructor, etc. Many other places try to guard against unsupported SHA3 (like RSA.SignData) guard as well.We can change it to have a custom string if you prefer, but the call site that throws should make it pretty obvious. The throw here is unlikely to even get hit since we do more up-front checking, but, I can imagine there might be some path to this that doesn't have a precondition check, so an assert felt wrong.