Skip to content
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

Add SHA-3 support to MessageDigest, Mac, and Signature services #103

Merged
merged 6 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README_JCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ The JCE provider currently supports the following algorithms:
SHA-256
SHA-384
SHA-512
SHA3-224
SHA3-256
SHA3-384
SHA3-512

SecureRandom Class
DEFAULT (maps to HashDRBG)
Expand All @@ -112,6 +116,10 @@ The JCE provider currently supports the following algorithms:
HmacSHA256
HmacSHA384
HmacSHA512
HmacSHA3-224
HmacSHA3-256
HmacSHA3-384
HmacSHA3-512

Signature Class
MD5withRSA
Expand All @@ -120,11 +128,19 @@ The JCE provider currently supports the following algorithms:
SHA256withRSA
SHA384withRSA
SHA512withRSA
SHA3-224withRSA
SHA3-256withRSA
SHA3-384withRSA
SHA3-512withRSA
SHA1withECDSA
SHA224withECDSA
SHA256withECDSA
SHA384withECDSA
SHA512withECDSA
SHA3-224withECDSA
SHA3-256withECDSA
SHA3-384withECDSA
SHA3-512withECDSA

KeyAgreement Class
DiffieHellman
Expand Down
8 changes: 8 additions & 0 deletions jni/include/com_wolfssl_wolfcrypt_FeatureDetect.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions jni/include/com_wolfssl_wolfcrypt_Hmac.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

87 changes: 87 additions & 0 deletions jni/include/com_wolfssl_wolfcrypt_Sha3.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions jni/jni_feature_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,18 @@ JNIEXPORT jboolean JNICALL Java_com_wolfssl_wolfcrypt_FeatureDetect_Sha512Enable
#endif
}

JNIEXPORT jboolean JNICALL Java_com_wolfssl_wolfcrypt_FeatureDetect_Sha3Enabled
(JNIEnv* env, jclass jcl)
{
(void)env;
(void)jcl;
#ifdef WOLFSSL_SHA3
return JNI_TRUE;
#else
return JNI_FALSE;
#endif
}

JNIEXPORT jboolean JNICALL Java_com_wolfssl_wolfcrypt_FeatureDetect_AesEnabled
(JNIEnv* env, jclass jcl)
{
Expand Down
Loading