Skip to content

Commit 87c7bfb

Browse files
authored
Merge pull request #163 from cconlon/cipherAesCts
JNI/JCE: add AesCts to JNI and Cipher.AES/CTS/NoPadding to wolfJCE
2 parents e06ba5a + 3a71b6a commit 87c7bfb

File tree

18 files changed

+1725
-21
lines changed

18 files changed

+1725
-21
lines changed

IDE/Android/app/src/main/cpp/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/ssl_load.c)
257257
list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/ssl_misc.c)
258258
list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/ssl_p7p12.c)
259259
list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/ssl_sess.c)
260+
list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/ssl_sk.c)
260261
list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/x509.c)
261262
list(REMOVE_ITEM TLS_SOURCES ${wolfssl_DIR}/src/x509_str.c)
262263

@@ -336,7 +337,14 @@ add_library(wolfssl SHARED
336337
# wolfCrypt JNI Java files are tied into build in Module build.gradle file
337338
add_library(wolfcryptjni SHARED
338339
${wolfcryptjni_DIR}/jni/jni_aes.c
340+
${wolfcryptjni_DIR}/jni/jni_aesccm.c
341+
${wolfcryptjni_DIR}/jni/jni_aescmac.c
342+
${wolfcryptjni_DIR}/jni/jni_aesctr.c
343+
${wolfcryptjni_DIR}/jni/jni_aescts.c
344+
${wolfcryptjni_DIR}/jni/jni_aesecb.c
339345
${wolfcryptjni_DIR}/jni/jni_aesgcm.c
346+
${wolfcryptjni_DIR}/jni/jni_aesgmac.c
347+
${wolfcryptjni_DIR}/jni/jni_aesofb.c
340348
${wolfcryptjni_DIR}/jni/jni_asn.c
341349
${wolfcryptjni_DIR}/jni/jni_chacha.c
342350
${wolfcryptjni_DIR}/jni/jni_curve25519.c

IDE/WIN/wolfcryptjni.vcxproj

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@
3636
</ItemGroup>
3737
<ItemGroup>
3838
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_Aes.h" />
39+
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_AesCcm.h" />
40+
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_AesCmac.h" />
41+
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_AesCtr.h" />
42+
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_AesCts.h" />
43+
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_AesEcb.h" />
44+
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_AesGcm.h" />
3945
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_AesGmac.h" />
46+
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_AesOfb.h" />
4047
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_Asn.h" />
4148
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_Chacha.h" />
4249
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_Curve25519.h" />
@@ -67,8 +74,14 @@
6774
</ItemGroup>
6875
<ItemGroup>
6976
<ClCompile Include="..\..\jni\jni_aes.c" />
77+
<ClCompile Include="..\..\jni\jni_aesccm.c" />
78+
<ClCompile Include="..\..\jni\jni_aescmac.c" />
79+
<ClCompile Include="..\..\jni\jni_aesctr.c" />
80+
<ClCompile Include="..\..\jni\jni_aescts.c" />
81+
<ClCompile Include="..\..\jni\jni_aesecb.c" />
7082
<ClCompile Include="..\..\jni\jni_aesgcm.c" />
7183
<ClCompile Include="..\..\jni\jni_aesgmac.c" />
84+
<ClCompile Include="..\..\jni\jni_aesofb.c" />
7285
<ClCompile Include="..\..\jni\jni_asn.c" />
7386
<ClCompile Include="..\..\jni\jni_chacha.c" />
7487
<ClCompile Include="..\..\jni\jni_curve25519.c" />
@@ -462,4 +475,4 @@ ant build-jce-release</Command>
462475
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
463476
<ImportGroup Label="ExtensionTargets">
464477
</ImportGroup>
465-
</Project>
478+
</Project>

IDE/WIN/wolfcryptjni.vcxproj.filters

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,27 @@
1818
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_Aes.h">
1919
<Filter>Header Files</Filter>
2020
</ClInclude>
21+
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_AesCcm.h">
22+
<Filter>Header Files</Filter>
23+
</ClInclude>
24+
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_AesCmac.h">
25+
<Filter>Header Files</Filter>
26+
</ClInclude>
27+
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_AesCtr.h">
28+
<Filter>Header Files</Filter>
29+
</ClInclude>
30+
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_AesEcb.h">
31+
<Filter>Header Files</Filter>
32+
</ClInclude>
33+
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_AesGcm.h">
34+
<Filter>Header Files</Filter>
35+
</ClInclude>
36+
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_AesGmac.h">
37+
<Filter>Header Files</Filter>
38+
</ClInclude>
39+
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_AesOfb.h">
40+
<Filter>Header Files</Filter>
41+
</ClInclude>
2142
<ClInclude Include="..\..\jni\include\com_wolfssl_wolfcrypt_Asn.h">
2243
<Filter>Header Files</Filter>
2344
</ClInclude>
@@ -104,6 +125,30 @@
104125
<ClCompile Include="..\..\jni\jni_aes.c">
105126
<Filter>Source Files</Filter>
106127
</ClCompile>
128+
<ClCompile Include="..\..\jni\jni_aesccm.c">
129+
<Filter>Source Files</Filter>
130+
</ClCompile>
131+
<ClCompile Include="..\..\jni\jni_aescmac.c">
132+
<Filter>Source Files</Filter>
133+
</ClCompile>
134+
<ClCompile Include="..\..\jni\jni_aesctr.c">
135+
<Filter>Source Files</Filter>
136+
</ClCompile>
137+
<ClCompile Include="..\..\jni\jni_aescts.c">
138+
<Filter>Source Files</Filter>
139+
</ClCompile>
140+
<ClCompile Include="..\..\jni\jni_aesecb.c">
141+
<Filter>Source Files</Filter>
142+
</ClCompile>
143+
<ClCompile Include="..\..\jni\jni_aesgcm.c">
144+
<Filter>Source Files</Filter>
145+
</ClCompile>
146+
<ClCompile Include="..\..\jni\jni_aesgmac.c">
147+
<Filter>Source Files</Filter>
148+
</ClCompile>
149+
<ClCompile Include="..\..\jni\jni_aesofb.c">
150+
<Filter>Source Files</Filter>
151+
</ClCompile>
107152
<ClCompile Include="..\..\jni\jni_asn.c">
108153
<Filter>Source Files</Filter>
109154
</ClCompile>
@@ -174,4 +219,4 @@
174219
<Filter>Source Files</Filter>
175220
</ClCompile>
176221
</ItemGroup>
177-
</Project>
222+
</Project>

README_JCE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ The JCE provider currently supports the following algorithms:
104104
Cipher Class
105105
AES/CBC/NoPadding
106106
AES/CBC/PKCS5Padding
107+
AES/CTS/NoPadding
107108
AES/CCM/NoPadding
108109
AES/CTR/NoPadding
109110
AES/ECB/NoPadding

jni/include/com_wolfssl_wolfcrypt_AesCts.h

Lines changed: 59 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jni/include/com_wolfssl_wolfcrypt_FeatureDetect.h

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)