Repository navigation
To download the release bundle of wolfCrypt JNI/JCE visit the download page at www.wolfssl.com/download/
Release 1.12.0 of wolfCrypt JNI and JCE has bug fixes and new features including Ed25519 and Ed448 signature and key support, new cipher modes for AES-CFB, AES-XTS, and AES Key Wrap, and SHAKE128 and SHAKE256 digest support. Bug fixes correct exception and parameter handling in RSA, AES, and DH operations, certificate path validation and revocation checking, and WKS KeyStore loading. Other changes add stricter input and buffer validation, zeroize more key and secret material, fix FIPS wrapper issues, and refresh the examples and tests.
New JCE Functionality:
- Add Ed25519 and Ed448 Signature, KeyPairGenerator, and KeyFactory support (PR 279)
- Add EdDSA key and cert storage to WKS KeyStore (PR 279)
- Implement
EdECPublicKeyandEdECPrivateKeyon JDK 15+ for SunEC key interop (PR 279) - Add
RSA/ECB/NoPaddingCipher for raw RSA operations (PR 280) - Add AES-XTS Cipher support as
AES/XTS/NoPadding(PR 268) - Add AES Key Wrap (RFC 3394) Cipher support as
AESWrapandAES/KW/NoPadding(PR 269) - Add AES-CFB Cipher support for CFB128, CFB8, and CFB1 (PR 272)
- Add SHAKE128 and SHAKE256 MessageDigest support (PR 274)
New JNI Functionality:
- Add Ed448 support via new
Ed448class (PR 279) - Add DER key import/export plus context and pre-hash sign/verify to
Ed25519(PR 279) - Add AES-XTS support via new
AesXtsclass (PR 268) - Add AES Key Wrap support via new
AesKeyWrapclass (PR 269) - Add AES-CFB support via new
AesCfbclass (PR 272) - Add SHAKE128 and SHAKE256 support via new
Shakeclass (PR 274) - Add raw RSA support via new
Rsa.direct()method (PR 280) - Add
AesGcm.setIV()andAesGcm.encryptEx()for native AES-GCM IV generation (PR 281) - Add
WolfCrypt.getDigestSize()wrapping nativewc_HashGetDigestSize()(PR 292) - Add
WolfCrypt.encryptedKeyPemToDer()overload taking a wipeablechar[]password (PR 277)
New Property Support:
- Add
wolfjce.wks.maxIterationsproperty to bound PBKDF2 iterations when loading WKS KeyStores (PR 275)
JNI and JCE Changes:
- Throw
SignatureExceptionfor wrong-length RSA and RSA-PSS signatures inSignature.verify()(PR 297) - Throw
SignatureExceptioninstead ofWolfCryptExceptionon nativeSignature.sign()errors (PR 296) - Reject invalid RSA key sizes and exponents at
KeyPairGenerator.initialize()(PR 295) - Throw
IllegalBlockSizeExceptionfor oversized RSA PKCS#1 v1.5 and OAEP encrypt input (PR 292) - Reject AES-GCM and AES-GMAC IVs under 96 bits at
init()on FIPS v5.2.4 and v7 or later (PR 293) - Allow AES-GCM decrypt
Cipher.init()withnullparameters (PR 291) - Return a random IV from AES and DESede
Cipher.getParameters()beforeinit()(PR 291) - Return IV-carrying
AlgorithmParametersfrom AES/CTSCipher.getParameters()(PR 284) - Throw
ShortBufferExceptionfromCipher.update()before input is consumed (PR 282) - Include the AES-CCM auth tag in
Cipher.getOutputSize()(PR 271) - Enforce 7 to 13 byte AES-CCM nonces and generate a valid one for parameterless
init()(PR 271) - Throw
AEADBadTagExceptionon AES-CCM tag mismatch, matching AES-GCM (PR 264) - Return the configured AES-GMAC tag length from
Mac.getMacLength()(PR 261) - Reject a mismatched PRF in PBKDF2
SecretKeyFactory.translateKey()(PR 271) - Encode DH
privateValueLengthand reject trailing data in DHAlgorithmParameters(PR 271) - Enforce the
Dh.DH_MIN_SIZEminimum prime size on all DHKeyFactoryimports (PR 264) - Fix DH
KeyAgreement.init()ignoring the private key when given aDHParameterSpec(PR 258) - Reject a
DHParameterSpecconflicting with the key in DHKeyAgreement.init()(PR 258) - Treat runtime-disabled native DH as unavailable in
FeatureDetectand wolfJCE (PR 289) - Fix
CertPathValidatorpassing certs toPKIXCertPathCheckers in the wrong order (PR 260) - Fail revocation checks with
PREFER_CRLSandNO_FALLBACKwhen no CRL source exists (PR 265) - Report revoked stapled OCSP responses as
BasicReason.REVOKEDinPKIXRevocationChecker(PR 258) - Evaluate all
keySizeoperators injdk.certpath.disabledAlgorithms(PR 265) - Require native wolfSSL 5.9.2 or later for the native
CertPathBuilderverifier (PR 271) - Fix
WolfSSLX509StoreCtxtreating native certificate add failures as success (PR 257) - Fix
WolfSSLCertManagerleaking verify callbacks onfree()or when replaced (PR 255) - Fix WKS KeyStore
load()failing on streams that return partial reads (PR 276) - Fix WKS KeyStore ML-DSA key and cert matching with NULL SPKI algorithm parameters (PR 276)
- Reject a negative certificate chain count when loading a WKS KeyStore (PR 275)
- Compare
WolfCryptPBEKeypasswords in constant time (PR 286) - Fix undersized DH shared secret buffer for primes over 4096 bits, such as ffdhe8192 (PR 298)
- Fix
Dh.generateDhParams()failing to return the generated p and g (PR 299) - Fix
Dh.exportKeyPair()failures andDh.exportParams()for keys without q (PR 299) - Fix default-salt RSA-PSS verify failing for small keys, such as RSA 1024 with SHA-512 (PR 298)
- Throw
WolfCryptExceptionon operational errors inAesGmac.verify()andAesCmac.verify()(PR 256, 258) - Return
falsefrom LMSSignature.verify()for wrong-length signatures (PR 257) - Fix
AesCmacreuse afterdoFinal()freed the native CMAC context (PR 298) - Fix
AesOfbdecryption when the key is set withDECRYPT_MODE(PR 265) - Fix
AesandDes3update()returning output sized to the full input array (PR 259) - Return an empty array instead of throwing from
Chacha.process()on empty input (PR 261) - Fix
Ecc.getAllSupportedCurves()returning no curves on single-curve native builds (PR 261) - Fix FIPS RSA, DH, and ECC JNI wrappers passing wrong sizes on big-endian platforms (PR 254)
- Fix the FIPS error callback leaving native threads attached to the JVM (PR 259, 276)
- Fix
Ed25519verify availability on native sign-only and verify-only builds (PR 254) - Fix race between
Hmacrelease and concurrent operations (PR 261) - Fix native context leaks when
Sha256and other digests are re-initialized or released (PR 298) - Validate IV, key, and input lengths in native AES, 3DES, and ChaCha wrappers (PR 256, 264, 267)
- Validate PBKDF password, salt, and key lengths in
Pwdbased(PR 262, 276) - Reject undersized output buffers in MD5 and SHA native final wrappers (PR 257, 270, 276)
- Use overflow-safe bounds checks in
MessageDigest.update()and Base16 encoding (PR 255, 286) - Validate buffer sizes before native use in
Fips,Rsa, andEccJNI wrappers (PR 257, 259, 270, 275)
Debugging Changes:
- Log JNI debug hex dumps only after inputs are validated (PR 256, 267, 270, 283)
- Log the processed buffer region and size in JNI debug output (PR 259, 267)
- Escape CR and LF characters in wolfJCE debug log messages (PR 261)
Example Changes:
- Add
EdDSAExampleEd25519 and Ed448 sign and verify example (PR 279) - Add
AesXtsExampleAES-XTS encrypt and decrypt example (PR 268) - Add
AesKeyWrapExampleAES Key Wrap example (PR 269) - Add
AesCfbExampleAES-CFB encrypt and decrypt example (PR 272) - Add
ShakeExampleSHAKE128 and SHAKE256 example (PR 274) - Add Ed25519 and Ed448 certs and WKS KeyStores to
examples/certs(PR 279) - Update expired example certs, keys, and KeyStores in
examples/certs(PR 278) - Add SHAKE and EdDSA benchmarks to
CryptoBenchmark(PR 274, 279) - Run example scripts from any directory and handle paths containing spaces (PR 260, 266, 287)
- Link Android example native libraries with 16 KB page alignment for Android 15+ (PR 289)
- Regenerate the Android example Gradle wrapper JAR with Gradle 8.4 (PR 276)
Testing Changes:
- Add GitHub Actions EdDSA build matrix on Linux and macOS (PR 279)
- Add multi-release JAR layout checks to the Java module GitHub Actions workflow (PR 279)
- Test AES-XTS non-streaming fallback with
--disable-aesxts-streamin GitHub Actions (PR 268) - Enable AES Key Wrap and raw RSA in Windows Visual Studio GitHub Actions build (PR 269, 280)
- Capture 128-character FIPS v7 core hashes in the Android FIPS Ready workflow (PR 289)
- Add known-answer and interop tests for the new AES modes, SHAKE, and EdDSA (PR 268, 269, 272, 274, 279)
- Add
DhFipsTestandEccFipsTestround-trip tests for the FIPS JNI wrappers (PR 254)
Misc Changes:
- Quote
makefile.linuxinstall paths soDESTDIRandPREFIXcan contain spaces (PR 260) - Fix the
rpmtarget cleanup pattern and remove its environment dump (PR 282, 286)
The wolfCrypt JNI/JCE Manual is available at: https://www.wolfssl.com/documentation/manuals/wolfcryptjni/. For build instructions and more details, please check the manual.