Skip to content

Commit

Permalink
Merge pull request #103 from cconlon/sha3
Browse files Browse the repository at this point in the history
Add SHA-3 support to `MessageDigest`, `Mac`, and `Signature` services
  • Loading branch information
JacobBarthelmeh authored Mar 5, 2025
2 parents 613e4f4 + 920c921 commit ced95ba
Show file tree
Hide file tree
Showing 22 changed files with 3,094 additions and 128 deletions.
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

0 comments on commit ced95ba

Please sign in to comment.