Commit Graph

355 Commits (c19e3f0fa12f5f4bcefc4dbe9c439aaaefcbbeba)

Author SHA1 Message Date
Chris Conlon ea114dac0a JCE: throw AEADBadTagException on AES-GCM Cipher decrypt failure 2025-08-19 15:18:45 -06:00
Chris Conlon b186504dce JCE: change debug log timestamp format from java.sql.Timestamp to Java Instant.ofEpochMilli, no need to import modules 2025-08-18 16:02:18 -06:00
Chris Conlon 17321eaffc JCE: Fix AES-CTR IV consistency and add regression tests for CTR and other modes 2025-08-18 14:00:36 -06:00
Chris Conlon c522d9e0c0 JSSE: add lock around hash operations in WolfCryptSignature to prevent threading issues 2025-08-15 13:25:37 -06:00
Chris Conlon 4e1b62aebb JSSE: synchronize methods in WolfCryptRandom 2025-08-15 13:25:37 -06:00
Chris Conlon 290473f462 JCE: test removing rngLock around ECC sign operation, to fix sporadic failing CI test 2025-08-15 13:25:35 -06:00
Chris Conlon 23d76334e0 JCE: refresh debug flags when WolfCryptProvider is loaded 2025-07-28 16:23:45 -06:00
Ruby Martin b94f30b411
Merge pull request #131 from cconlon/rsaPss
Add RSA-PSS support to JNI wrapper and JCE Signature class
2025-07-25 11:17:55 -06:00
Chris Conlon 15932a2d86 JCE: synchronize key generation and encoding block to prevent multiple threads conflicting 2025-07-23 10:37:46 -06:00
Chris Conlon f028f73b89 JNI: reset MessageDigest state back to WolfCryptState.UNINITIALIZED after final call, correctly allows reinitialization when needed 2025-07-22 15:55:41 -06:00
Chris Conlon 5abb2d375a JCE: add RSASSA-PSS support to KeyPairGenerator 2025-07-22 13:24:01 -06:00
Chris Conlon 9737bd57ac JNI/JCE: add RSA-PSS support to JNI wrapper and JCE Signature class 2025-07-22 13:23:59 -06:00
Chris Conlon 42fe75dbab JCE: add Mac AESGMAC / AES-GMAC support 2025-07-17 10:47:35 -06:00
Chris Conlon f665b74322 JCE: add Mac AESCMAC / AES-CMAC support 2025-07-17 10:47:35 -06:00
Chris Conlon 968cf09723 JCE: add Cipher AES/CCM/NoPadding support 2025-07-17 10:47:35 -06:00
Chris Conlon 04c250d079 JCE: add Cipher AES/OFB/NoPadding support 2025-07-17 10:47:35 -06:00
Chris Conlon add2c83efd JCE: add Cipher AES/CTR/NoPadding support 2025-07-17 10:47:35 -06:00
Chris Conlon bf77c474d9 JCE: add Cipher AES/ECB/NoPadding and AES/ECB/PKCS5Padding support 2025-07-17 10:47:35 -06:00
Chris Conlon 3ae921c905 JNI: add AES-GMAC to com.wolfssl.wolfcrypt package 2025-07-17 10:47:34 -06:00
Chris Conlon 0fb9492c44 JNI: add AES-CMAC to com.wolfssl.wolfcrypt package 2025-07-17 10:47:12 -06:00
Chris Conlon 126f4cd161 JNI: add AES-CCM to com.wolfssl.wolfcrypt package 2025-07-17 10:46:44 -06:00
Chris Conlon dc8d10862d JNI: add AES-OFB to com.wolfssl.wolfcrypt package 2025-07-17 10:46:16 -06:00
Chris Conlon 1604d8e178 JNI: add AES-ECB to com.wolfssl.wolfcrypt package 2025-07-17 10:46:16 -06:00
Chris Conlon 98898a8087 JNI: add AES-CTR to com.wolfssl.wolfcrypt package 2025-07-17 10:46:16 -06:00
Chris Conlon 2c4ef8854e JNI/JCE: get hash OID sums dynamically since they can change in native wolfSSL based on defines used 2025-07-11 12:14:18 -06:00
Chris Conlon bda62a83a6 JCE: use local KDF iterations in WKSPrivateKey.getDecryptedKey() in case Security property iteration count has changed 2025-05-08 16:04:27 -06:00
Chris Conlon 0834dbdafc JCE: initial implementation of WolfCryptUtil.convertKeyStoreToWKS() 2025-05-08 16:04:27 -06:00
Chris Conlon 4fa8642264 JNI: get ASN algo enum values dynamically in static class block, more flexible if native enum values change 2025-05-08 14:41:01 -06:00
Chris Conlon 3a91ddb811 JCE: switch WolfCryptDebug to use Java Logging 2025-05-07 11:36:52 -06:00
Chris Conlon dbfbe28cab JCE: fix Cipher.getOutputSize() for AES/GCM/NoPadding in DECRYPT mode, should remove tag from length 2025-03-19 16:55:14 -06:00
Chris Conlon 427548f230 JCE: add Signature implementation for SHA3-224withRSA, SHA3-256withRSA, SHA3-384withRSA, SHA3-512withRSA, SHA3-224withECDSA, SHA3-256withECDSA, SHA3-384withECDSA, SHA3-512withECDSA 2025-03-05 15:21:24 -07:00
Chris Conlon c950e78306 JCE: add Mac implementation for HmacSHA3-224, HmacSHA3-256, HmacSHA3-384, HmacSHA3-512 2025-03-05 15:21:24 -07:00
Chris Conlon 53a40020f7 JNI: wrap native SHA-3 support in com.wolfssl.wolfcrypt.Hmac class 2025-03-05 15:21:23 -07:00
Chris Conlon 89403b8b49 JCE: add MessageDigest implementation for SHA3-224, SHA3-256, SHA3-384, SHA3-512 2025-03-05 15:18:07 -07:00
Chris Conlon 00f2b1c318 JNI: wrap native SHA-3 support in com.wolfssl.wolfcrypt.Sha3 class 2025-03-05 15:18:05 -07:00
Chris Conlon aa49b15cdb JCE: add HmacSHA224 support to KeyGenerator implementation 2025-03-05 09:17:14 -07:00
Chris Conlon 9e025b75ce JCE: add SHA224withRSA and SHA224withECDSA to Signature implementation 2025-03-05 09:17:12 -07:00
Chris Conlon dcddf92aaf JCE: add HmacSHA224 support to Mac implementation 2025-03-05 09:16:32 -07:00
Chris Conlon 0149a37ef1 JCE: add SHA-224 MessageDigest implementation 2025-03-05 09:16:32 -07:00
Chris Conlon bcbc411bb1 JNI: add SHA-224 to com.wolfssl.wolfcrypt.Sha224 class 2025-03-05 09:16:32 -07:00
David Garske 713451196d
Merge pull request #101 from cconlon/cursorFixes
JNI/JCE: fix warnings reported by Cursor/VSCode
2025-03-04 16:57:22 -08:00
Chris Conlon 3484adef93 JNI/JCE: fix unused imports and variable warnings reported by Cursor/VSCode 2025-02-24 15:23:34 -07:00
Chris Conlon f953bc34d1 JCE: add KeyGenerator implementation for AES/HmacSHA1/HmacSHA256/HmacSHA384/HmacSHA512 2025-01-28 10:50:46 -07:00
Chris Conlon ea2cf2564d JNI/JSSE: call wolfSSL_Init() in WolfObject init() before running FIPS CASTs 2025-01-23 11:15:26 -07:00
Chris Conlon 560534e3de JNI/JCE: bump version to 1.8 2025-01-21 16:31:12 -07:00
Chris Conlon 6ccdf43175 JNI/JCE: update copyright to 2025 2025-01-20 15:15:14 -07:00
Chris Conlon fa4995b324 JNI: check and run FIPS CASTs if needed in com.wolfssl.wolfcrypt.Fips class methods 2024-12-13 11:58:37 -07:00
Chris Conlon acbad58f17 JNI/JCE: only run FIPS CASTs once up front, for JCE run once when WolfCryptProvider is created 2024-12-13 11:58:35 -07:00
Chris Conlon fc85641fab JCE: add Security property support for wolfjce.mapJKStoWKS and wolfjce.mapPKCS12toWKS 2024-11-13 12:29:25 -07:00
Chris Conlon cc05b61585 JNI: fix FB Infer warnings on OSX, potential threading issues 2024-11-11 10:42:39 -07:00
Chris Conlon c112d0d47c JNI/JCE: fix build compatibility with latest FIPS versions > 5 2024-11-08 15:16:05 -07:00
Chris Conlon 4a4ea6be6a Bump version to 1.7 2024-11-08 10:48:13 -07:00
Chris Conlon 2e8a380e3b JNI: fix warnings from Android gradle build, lots related to potential incomplete object initialization in constructors 2024-10-11 14:38:47 -06:00
Chris Conlon 4b96ee8b84 JCE: clean up WolfCryptDebug log() methods across classes 2024-10-11 14:38:47 -06:00
Chris Conlon e4da66fb4a JNI/JSSE: account for native RSA_MIN_SIZE in JUnit tests, add Rsa.RSA_MIN_SIZE helper 2024-09-18 14:54:47 -06:00
Chris Conlon 2d7f778839 JCE: KeyPairGenerator: remove use of longValueExact(), not available on some platforms 2024-07-26 15:09:13 -06:00
Chris Conlon 8f254f67b3 JCE: add WolfSSLKeyStore (WKS) KeyStore implementation 2024-07-15 15:50:06 -06:00
Chris Conlon 30a1916233 JNI: synchronize wc_ecc_sign_hash() on rngLock, add sanity check for wc_ecc_sig_size() 2024-04-16 17:53:40 -06:00
Chris Conlon 5f382e244d JCE: move rng.init() into initialize() methods of WolfCryptKeyPairGenerator 2024-04-16 17:53:40 -06:00
Chris Conlon 947db4345a JNI/JCE: reduce extra WolfCryptRng object creation between Signature and KeyPairGenerator classes 2024-04-16 17:53:40 -06:00
Chris Conlon 6478c261dd JCE: move RNG used for sign operations to class variable, only init once per class 2024-04-16 17:53:40 -06:00
Chris Conlon 85148e3305 JCE: add synchronization to public methods of WolfCryptKeyPairGenerator 2024-04-15 12:32:44 -06:00
Chris Conlon ee8a0b7819 JCE: fix Infer thread safety violation warning in WolfCryptSignature 2024-04-09 16:19:57 -06:00
Chris Conlon a9a3bc9b64 Bump version to 1.6 2024-04-09 15:27:19 -06:00
Chris Conlon 68c0acff19 JCE: check for native PBKDF2 support before adding support for SecretKeyFactory 2024-04-09 15:15:27 -06:00
Chris Conlon 45deb2802f JCE: add support for SecureRandom.getInstance("DEFAULT"), maps to HashDRBG 2024-04-05 10:04:29 -06:00
Daniel Pouzzner 430b8b7503
Merge pull request #71 from cconlon/javaDocFixes
JNI/JCE: fix Javadoc warnings with newer Java versions
2024-03-30 02:57:42 -04:00
Daniel Pouzzner 9f1c54231a
Merge pull request #68 from cconlon/signatureSynchronize
JCE: add synchronization to protected methods in WolfCryptSignature
2024-03-30 02:57:05 -04:00
Daniel Pouzzner 4ac446e7ec
Merge pull request #69 from cconlon/keyAgreementSecretPadding
JCE: prepend zero byte to DH shared secret if less than prime length
2024-03-30 02:56:40 -04:00
Chris Conlon 73c23524de JNI/JCE: fix Javadoc warnings with newer Java versions 2024-03-22 14:37:28 -06:00
Chris Conlon c6d4819d8a JCE: add SecretKeyFactory implementation for PBKDF2 2024-03-21 17:11:56 -06:00
Chris Conlon 05b4c9852a JCE: prepend zero byte to DH shared secret if less than prime length 2024-03-19 14:55:20 -06:00
Chris Conlon d03ebc739c JCE: add synchronization to protected methods in WolfCryptSignature 2024-03-15 12:01:58 -06:00
Chris Conlon 1140503101 JCE: set PKIXParameters Signature provider to wolfJCE if null when using wolfCrypt FIPS 2024-03-11 13:47:15 -06:00
Chris Conlon 627e5c1d70 JCE: add implementation of CertPathValidator (PKIX) 2024-02-21 13:37:44 -07:00
David Garske f256662464
Merge pull request #62 from cconlon/aesgcm
Add AES-GCM and Cipher AES/GCM/NoPadding Support
2024-02-13 13:26:55 -08:00
JacobBarthelmeh e1e1a818a3
Merge pull request #63 from cconlon/infer
Fix potential deadlock / thread safety issues reported by Infer
2024-02-14 04:00:45 +07:00
Chris Conlon 9bd93de973 JCE: add Cipher support for AES/GCM/NoPadding 2024-02-09 16:59:18 -07:00
Chris Conlon ac9b6f8a4c JNI: fix infer potential thread safety violation in NativeStruct/Rsa 2024-02-09 16:15:56 -07:00
Chris Conlon 15cbdc1fdf JNI/JCE: fix infer potential deadlock in WolfCryptKeyAgreement(DiffieHellman) 2024-02-09 16:12:44 -07:00
Chris Conlon a5434c8c38 JNI: add JNI-level AES-GCM support in com.wolfssl.wolfcrypt.AesGcm 2024-02-09 15:37:24 -07:00
Chris Conlon 4f1f3b5630 JCE: add "SHA1" alias for MessageDigest SHA-1, for interop with Sun 2024-02-08 09:44:52 -07:00
Chris Conlon 0e521059a6 update copyright to 2024 2024-01-16 15:41:15 -07:00
Chris Conlon d31cde3ad0 JCE: adjust feature detection for native HMAC to check for NO_HMAC 2023-10-27 15:56:08 -06:00
Chris Conlon e6f3a9e823 JCE: remove HMAC-MD5 from wolfJCE provider if not available in underlying FIPS library 2023-10-27 15:56:05 -06:00
Chris Conlon 79bed5d9d3 JNI: add synchronization around native Hmac pointer access in Hmac class 2023-08-10 13:33:16 -06:00
Chris Conlon f6ffb7489e JNI: add synchronization around native ecc_key/RsaKey/DhKey pointer access in Ecc/Rsa/Dh class 2023-08-10 13:32:59 -06:00
Chris Conlon 8606e9e14e JNI/JCE: add synchronization around native BlockCipher pointer access 2023-08-07 11:24:50 -06:00
Chris Conlon 1fe2ad65fd JNI/JCE: add synchronization around native MessageDigest pointer access 2023-08-07 11:24:45 -06:00
Chris Conlon 8788d42474 JCE: add Cipher support for RSA, same as RSA/ECB/PKCS1Padding 2023-06-15 10:58:33 -06:00
Chris Conlon 836223f7a3 JCE: add support for Cipher AES/CBC/PKCS5Padding support 2023-06-15 10:04:34 -06:00
Chris Conlon 5e2a1eb364 JNI: native ECC code cleanup and typo fixes 2023-06-05 10:43:52 -06:00
Chris Conlon 9401c82d31 JCE: add RSA support in KeyPairGenerator, Rsa supporting methods, native cleanup 2023-06-05 10:43:09 -06:00
JacobBarthelmeh b964b59f02
Merge pull request #44 from cconlon/rngSynchronization
Add synchronization to wolfCrypt Rng Class
2023-05-17 16:00:44 -06:00
Chris Conlon e5d2998750 add script to run Facebook Infer, fix reported issues 2023-05-12 16:27:20 -06:00
Chris Conlon 46beebf1b0 Add synchronization to com.wolfssl.wolfcrypt.Rng, JUnit test cases 2023-05-05 17:18:09 -06:00
Chris Conlon 05091926cb fix build errors and warnings for Visual Studio on Windows 2023-05-03 10:06:41 -06:00
Chris Conlon 040ad75bab add release notes and bump version for 1.5 release 2022-11-11 16:21:19 -07:00
Chris Conlon 9a7b7263c3 add MessageDigest.clone() support and underlying wolfCrypt class object copy methods 2022-11-10 14:22:15 -07:00
Chris Conlon d7665cc5e9 add SHA cipher alias for SHA-1 to wolfJCE, WolfCryptProvider.java 2022-10-13 10:33:53 -06:00
Chris Conlon f98ae38819 skip test error for JDK versions ECKeyFactory that may not support all wolfCrypt curves 2022-08-17 16:37:41 -06:00
Chris Conlon 0cb31efe2c bump version to 1.4 in build.xml and WolfCryptProvider.java 2022-08-11 12:25:49 -06:00
Chris Conlon c51d6122a9 cleanup ChaCha native wrapper, fix double free of ChaCha pointer 2022-07-29 14:00:52 -06:00
Chris Conlon 311422057c replace non-ASCII apostrophes in Fips.java/README_JCE.md 2022-07-20 11:56:26 -06:00
Chris Conlon d6a9e66a84 update wolfJCE version to match 1.3 release 2022-05-17 15:09:54 -06:00
Chris Conlon 798c635c0b fix Javadoc warnings and missing default constructors 2022-05-03 16:56:32 -06:00
Chris Conlon d98babe74d add support for MessageDigestSpi.engineGetDigestLength() 2022-02-15 10:38:56 -07:00
Chris Conlon 0aff7b3e63 update copyright to 2022 2022-01-18 09:29:36 -07:00
Chris Conlon 1f5d20460e convert tabs to 4 spaces, remove trailing whitespace 2022-01-18 09:17:51 -07:00
Chris Conlon d21904f6db update missing Javadocs, fixes build warnings with newer JDKs 2022-01-18 08:45:34 -07:00
Chris Conlon 9c64fd108e run FIPS tests on ant test, wrap AES-GCM SetExtIV, fix Fips.RsaSSL_Sign() 2022-01-05 14:02:45 -07:00
Chris Conlon 4e477cdc1b update copyright to 2021, minor comment updates 2021-11-15 10:17:00 -07:00
Chris Conlon e11bc558a2 add FIPS 140-3 compatibility 2021-11-15 09:50:45 -07:00
Chris Conlon 3cee7b1368 suppress finalize deprecation warnings 2020-08-26 10:25:49 -07:00
Chris Conlon b6277811e1 call wc_ecc_set_rng() when needed 2020-08-26 10:09:14 -07:00
Chris Conlon b6d982a7fc remove BLAKE2b, fix hash algo conditional compiles 2020-01-09 10:51:22 -07:00
Maxime Vincent 7e3b82b3b4 Fix pub/private export bug in Curve25519 2018-07-26 20:32:49 +02:00
Chris Conlon b77ccff718
Merge pull request #4 from danielinux/chacha-ed25519-curve25519
Added wrappers for ed25519, curve25519, chacha.
2018-07-26 11:31:14 -06:00
Aaron Jense 0ac485039a Create getFipsVersion JNI method to allow for Java level access to HAVE_FIPS_VERSION 2018-07-12 14:00:35 -06:00
Chris Conlon 5a4240e157
Merge pull request #13 from aaronjense/update-error-codes
Updated Error Codes
2018-06-29 17:29:32 -06:00
Aaron Jense 3cd5f255a6 Updated Error Codes 2018-06-29 15:36:50 -06:00
Aaron Jense 44d872ad16 replace tab with 4 spaces 2018-06-29 15:33:30 -06:00
Aaron Jense b0839d524f Add WolfCrypt.FAILURE 2018-06-29 15:27:47 -06:00
Aaron Jense c5d78b2d58 <hash> to <hash>type and simplify getHashCode switch statement 2018-06-29 15:26:14 -06:00
Aaron Jense 64b8e3a418 Add dynamic defines for the different hash types depending on their enum code. This fixes the error where the unintended hash type is chosen when switching between different version of wolfssl where the enum codes are different 2018-06-29 10:29:22 -06:00
Daniele Lacamera c406ea2dc0 Added wrappers for ed25519, curve25519, chacha.
Added maven pom.xml build file.
2018-04-17 20:16:31 +02:00
Chris Conlon 9615fe0d7c JCE: code review fixes, cleanup 2017-06-15 11:47:56 -06:00
Chris Conlon aed7a9d787 JCE: spacing and cleanup 2017-06-15 09:44:50 -06:00
Chris Conlon d8ae69a322 JCE: throw exception on bad IV length in Cipher class 2017-06-15 09:20:10 -06:00
Chris Conlon df6569090c JCE: Allow Signature object to be initialized multiple times before free 2017-06-15 09:20:10 -06:00
Chris Conlon 622b5ed1b6 JCE: reset state in Cipher on doFinal, add more Cipher tests 2017-06-15 09:20:10 -06:00
Chris Conlon 6c2ab6976a JCE: fix Cipher.update on multi block operations 2017-06-15 09:20:10 -06:00
Chris Conlon 1696c909f8 JCE: only release native structs when not null 2017-06-15 09:20:10 -06:00
Chris Conlon 69b42b64fb JCE: fix Cipher update with offset 2017-06-15 09:20:10 -06:00
Chris Conlon 2a38c5684b JCE: remove comments from WolfCryptDebug 2017-06-15 09:20:10 -06:00
Chris Conlon 7b489dd7b9 JCE: add debug logging with wolfjce.debug system property 2017-06-15 09:20:10 -06:00
Chris Conlon eccb8f512b JCE: remove getL() dependency from DH 2017-06-15 09:20:10 -06:00
Chris Conlon cb9dc47d61 JCE: remove unimplemented KeyFactory stub 2017-06-15 09:20:10 -06:00
Chris Conlon 90ed9f33d1 JCE: update Cipher.update to match expected return 2017-06-15 09:20:10 -06:00
Chris Conlon f4066c7ede JCE: set verified to false instead of throwing exception on error 2017-06-15 09:20:10 -06:00
Chris Conlon 9f765f70f4 JCE: KeyAgreement cleanup for importing ECC keys with correct curves 2017-06-15 09:20:10 -06:00
Chris Conlon 92d3556b56 JCE: restructure to match new JNI directory struct 2017-06-15 09:20:10 -06:00
Chris Conlon 844bbae6ec JNI: switch MessageDigest to use READY state 2017-06-14 14:58:59 -06:00
Chris Conlon efb90aaf9d JNI: reset state when BlockCipher and MessageDigest are released 2017-05-01 15:16:30 -06:00
Chris Conlon 3a306131a5 JNI: fix for DH state check when loading private/public keys 2017-04-27 16:39:36 -06:00
Chris Conlon 1132acbae9 Dh.makeKey() sets key size internally based on DH parameters 2017-04-17 10:51:59 -06:00
Chris Conlon 5ccd3bdc05 JNI: allow user to get curve name from ECParameterSpec 2017-04-05 16:42:10 -06:00
Chris Conlon a100d81c47 JNI: allow ECC private import with curve name 2017-04-05 16:02:04 -06:00
JacobBarthelmeh c461c1e8bd Merge pull request #51 from cconlon/jni_ecc
JNI: ECC key gen with curve, PKCS8 private key getter
2017-04-05 15:59:50 -06:00
Chris Conlon e3414c7e7c JNI: remove toUpperCase() in getCurveSizeFromName(), native handles case 2017-04-05 15:20:17 -06:00
Chris Conlon 1a491558d4 Merge pull request #55 from moisesguimaraes/adds-sign-sanitizers
sanitizes buffer access
2017-04-04 16:52:19 -06:00
Moisés Guimarães 08bcbf801c sanitizes buffer access 2017-04-03 19:31:10 -03:00
Chris Conlon 858d9c9c51 JNI: add Dh.getPrivateKey(), reset keys first in free() before changing state 2017-03-31 11:58:50 -06:00
Chris Conlon 9b2cc29783 JNI: ECC key gen with curve, PKCS8 private key getter 2017-03-31 11:54:33 -06:00
Chris Conlon db688226a1 JNI: put tests in own package, match Maven directory layout standard 2017-03-24 17:04:58 -06:00