Skip to content

Commit ced95ba

Browse files
Merge pull request #103 from cconlon/sha3
Add SHA-3 support to `MessageDigest`, `Mac`, and `Signature` services
2 parents 613e4f4 + 920c921 commit ced95ba

22 files changed

+3094
-128
lines changed

README_JCE.md

+16
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ The JCE provider currently supports the following algorithms:
9292
SHA-256
9393
SHA-384
9494
SHA-512
95+
SHA3-224
96+
SHA3-256
97+
SHA3-384
98+
SHA3-512
9599

96100
SecureRandom Class
97101
DEFAULT (maps to HashDRBG)
@@ -112,6 +116,10 @@ The JCE provider currently supports the following algorithms:
112116
HmacSHA256
113117
HmacSHA384
114118
HmacSHA512
119+
HmacSHA3-224
120+
HmacSHA3-256
121+
HmacSHA3-384
122+
HmacSHA3-512
115123

116124
Signature Class
117125
MD5withRSA
@@ -120,11 +128,19 @@ The JCE provider currently supports the following algorithms:
120128
SHA256withRSA
121129
SHA384withRSA
122130
SHA512withRSA
131+
SHA3-224withRSA
132+
SHA3-256withRSA
133+
SHA3-384withRSA
134+
SHA3-512withRSA
123135
SHA1withECDSA
124136
SHA224withECDSA
125137
SHA256withECDSA
126138
SHA384withECDSA
127139
SHA512withECDSA
140+
SHA3-224withECDSA
141+
SHA3-256withECDSA
142+
SHA3-384withECDSA
143+
SHA3-512withECDSA
128144

129145
KeyAgreement Class
130146
DiffieHellman

jni/include/com_wolfssl_wolfcrypt_FeatureDetect.h

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jni/include/com_wolfssl_wolfcrypt_Hmac.h

+32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jni/include/com_wolfssl_wolfcrypt_Sha3.h

+87
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jni/jni_feature_detect.c

+12
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,18 @@ JNIEXPORT jboolean JNICALL Java_com_wolfssl_wolfcrypt_FeatureDetect_Sha512Enable
100100
#endif
101101
}
102102

103+
JNIEXPORT jboolean JNICALL Java_com_wolfssl_wolfcrypt_FeatureDetect_Sha3Enabled
104+
(JNIEnv* env, jclass jcl)
105+
{
106+
(void)env;
107+
(void)jcl;
108+
#ifdef WOLFSSL_SHA3
109+
return JNI_TRUE;
110+
#else
111+
return JNI_FALSE;
112+
#endif
113+
}
114+
103115
JNIEXPORT jboolean JNICALL Java_com_wolfssl_wolfcrypt_FeatureDetect_AesEnabled
104116
(JNIEnv* env, jclass jcl)
105117
{

0 commit comments

Comments
 (0)