AES and DESede SecretKeyFactory and SecretKey support#164
AES and DESede SecretKeyFactory and SecretKey support#164rlm2002 merged 1 commit intowolfSSL:masterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for AES and DESede (3DES) SecretKeyFactory implementations to the wolfJCE provider. The key additions include a new WolfCryptSecretKey class that implements SecretKey interface with support for key validation, destruction, and proper encapsulation. The factory classes have been extended to handle non-PBE key generation, translation, and retrieval.
- New
WolfCryptSecretKeyclass implementingSecretKeywith AES and DESede support - Extended
WolfCryptSecretKeyFactoryto handle AES and DESede key operations - Comprehensive test coverage for both new classes
- Provider registration for new SecretKeyFactory implementations
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| WolfCryptSecretKey.java | New SecretKey implementation with key validation, destruction support, and proper encapsulation for AES and DESede algorithms |
| WolfCryptSecretKeyFactory.java | Extended to support AES/DESede key generation, translation, and spec retrieval via new factory types and helper methods |
| WolfCryptSecretKeyTest.java | New comprehensive test suite covering key creation, validation, destruction, equality, and isolation |
| WolfCryptSecretKeyFactoryTest.java | Extended tests for AES SecretKeyFactory operations including generation, translation, and cipher integration |
| WolfCryptProvider.java | Registered new AES and DESede SecretKeyFactory services |
| WolfJCETestSuite.java | Added WolfCryptSecretKeyTest to test suite |
| infer.sh | Added WolfCryptSecretKey.java to static analysis |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/test/java/com/wolfssl/provider/jce/test/WolfCryptSecretKeyFactoryTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/wolfssl/provider/jce/test/WolfCryptSecretKeyTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/wolfssl/provider/jce/test/WolfCryptSecretKeyFactoryTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/wolfssl/provider/jce/test/WolfCryptSecretKeyFactoryTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/test/java/com/wolfssl/provider/jce/test/WolfCryptSecretKeyTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR add support for AES and 3DES (DESede)
SecretKeyFactoryandSecretKeyin wolfJCE.New
WolfCryptSecretKeyclass for AES (16/24/32 byte keys) and 3DES (DESede) 24-byte keys. ExtendsWolfCryptSecretKeyFactoryfor AES/DESede support.Adds JUnit test coverage for new functionality.