-
Notifications
You must be signed in to change notification settings - Fork 423
Add SHA3 mechanism support #894
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
Open
AlexLaroche
wants to merge
10
commits into
softhsm:main
Choose a base branch
from
AlexLaroche:add-sha3-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4c583bf
Add SHA3 (FIPS 202) mechanism support
AlexLaroche b349775
Gate SHA3 support behind detected OpenSSL/LibreSSL capability
AlexLaroche 41cd8d2
Fix RSA-PSS salt length bound to use actual hash size
AlexLaroche 875d335
Fix SHA3 detection to report result on cached configure runs
AlexLaroche 223d3d8
Add missing WITH_SHA3 cmakedefine to config.h.in.cmake
AlexLaroche 663cf20
Factor RSA-PSS mechanism parameter checks into a dedicated method
AlexLaroche f13e1b4
Factor RSA-PSS mechanism parameter checks into a dedicated method (OS…
AlexLaroche 2563983
Move RSA-PSS parameter check into a shared RSAUtil class
AlexLaroche accc4d7
Use short SPDX copyright header for new SHA3 files
AlexLaroche 9b8b40c
Wire up SHA3 detection in the CMake build
AlexLaroche 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| /* | ||
| * Copyright (c) 2026 SoftHSMv2 contributors | ||
| * | ||
| * SPDX-License-Identifier: BSD-2-Clause | ||
| */ | ||
| #include <openssl/evp.h> | ||
| int main() | ||
| { | ||
| const EVP_MD *md224 = EVP_sha3_224(); | ||
| const EVP_MD *md256 = EVP_sha3_256(); | ||
| const EVP_MD *md384 = EVP_sha3_384(); | ||
| const EVP_MD *md512 = EVP_sha3_512(); | ||
| if (md224 == NULL || md256 == NULL || md384 == NULL || md512 == NULL) | ||
| return 1; | ||
| return 0; | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| AC_DEFUN([ACX_OPENSSL_SHA3],[ | ||
| tmp_CPPFLAGS=$CPPFLAGS | ||
| tmp_LIBS=$LIBS | ||
|
|
||
| CPPFLAGS="$CPPFLAGS $CRYPTO_INCLUDES" | ||
| LIBS="$CRYPTO_LIBS $LIBS" | ||
|
|
||
| AC_LANG_PUSH([C]) | ||
| AC_CACHE_CHECK([for OpenSSL SHA3 support], [acx_cv_lib_openssl_sha3_support],[ | ||
| acx_cv_lib_openssl_sha3_support=no | ||
| AC_LINK_IFELSE([ | ||
| AC_LANG_SOURCE([[ | ||
| #include <openssl/evp.h> | ||
| int main() | ||
| { | ||
| const EVP_MD *md224 = EVP_sha3_224(); | ||
| const EVP_MD *md256 = EVP_sha3_256(); | ||
| const EVP_MD *md384 = EVP_sha3_384(); | ||
| const EVP_MD *md512 = EVP_sha3_512(); | ||
| if (md224 == NULL || md256 == NULL || md384 == NULL || md512 == NULL) | ||
| return 1; | ||
| return 0; | ||
| } | ||
| ]]) | ||
| ],[ | ||
| acx_cv_lib_openssl_sha3_support=yes | ||
| ],[ | ||
| acx_cv_lib_openssl_sha3_support=no | ||
| ]) | ||
| ]) | ||
| AC_LANG_POP([C]) | ||
|
|
||
| CPPFLAGS=$tmp_CPPFLAGS | ||
| LIBS=$tmp_LIBS | ||
| have_lib_openssl_sha3_support="${acx_cv_lib_openssl_sha3_support}" | ||
| ]) |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.