Skip to content

Commit

Permalink
Revert "Add support for PBKDF2 algorithms (#432)"
Browse files Browse the repository at this point in the history
This reverts commit 37a2ba0.
  • Loading branch information
jasonkatonica committed Feb 6, 2025
1 parent 37a2ba0 commit ce31dcf
Show file tree
Hide file tree
Showing 20 changed files with 16 additions and 1,317 deletions.
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ KeyFactory | X25519 | |X
KeyFactory | X448 | |X |
KeyFactory | XDH | |X |
KeyGenerator | AES |X |X |
KeyGenerator | ChaCha20 | |X |
KeyGenerator | ChaCha20 | |X |
KeyGenerator | DESede | |X |
KeyGenerator | HmacMD5 | |X |
KeyGenerator | HmacSHA1 | |X |
Expand Down Expand Up @@ -314,11 +314,6 @@ MessageDigest | SHA3-512 |X |X
SecretKeyFactory | AES |X |X |
SecretKeyFactory | ChaCha20 | |X |
SecretKeyFactory | DESede | |X |
SecretKeyFactory | PBKDF2WithHmacSHA1 | |X |
SecretKeyFactory | PBKDF2WithHmacSHA224 |X |X |
SecretKeyFactory | PBKDF2WithHmacSHA256 |X |X |
SecretKeyFactory | PBKDF2WithHmacSHA384 |X |X |
SecretKeyFactory | PBKDF2WithHmacSHA512 |X |X |
SecureRandom | SHA256DRBG |X |X |
SecureRandom | SHA512DRBG |X |X |
Signature | Ed25519 | |X |
Expand Down
37 changes: 2 additions & 35 deletions src/main/java/com/ibm/crypto/plus/provider/OpenJCEPlus.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright IBM Corp. 2023, 2025
* Copyright IBM Corp. 2023, 2024
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
Expand Down Expand Up @@ -46,7 +46,7 @@ public final class OpenJCEPlus extends OpenJCEPlusProvider {
+ "Message authentication code (MAC) : HmacMD5, HmacSHA1, HmacSHA224, HmacSHA256, HmacSHA384, HmacSHA512\n"
+ " , HmacSHA3-224, HmacSHA3-256, HmacSHA3-384, HmacSHA3-512\n"
+ "Message digest : MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256, SHA3-224, SHA3-256, SHA3-384, SHA3-512\n"
+ "Secret key factory : AES, ChaCha20, DESede, PBKDF2WithHmacSHA1, PBKDF2WithHmacSHA224, PBKDF2WithHmacSHA256, PBKDF2WithHmacSHA384, PBKDF2WithHmacSHA512\n"
+ "Secret key factory : AES, ChaCha20, DESede\n"
+ "Secure random : HASHDRBG, SHA256DRBG, SHA512DRBG\n"
+ "Signature algorithms : NONEwithDSA, SHA1withDSA, SHA224withDSA, SHA256withDSA,\n"
+ " SHA3-224withDSA, SHA3-256withDSA, SHA3-384withDSA, SHA3-512withDSA,\n"
Expand Down Expand Up @@ -597,39 +597,6 @@ private void registerAlgorithms(Provider jce) {
putService(new OpenJCEPlusService(jce, "SecretKeyFactory", "AES",
"com.ibm.crypto.plus.provider.AESKeyFactory", aliases));

aliases = null;
putService(new OpenJCEPlusService(jce,
"SecretKeyFactory",
"PBKDF2WithHmacSHA1",
"com.ibm.crypto.plus.provider.PBKDF2Core$HmacSHA1",
aliases));

aliases = null;
putService(new OpenJCEPlusService(jce,
"SecretKeyFactory",
"PBKDF2WithHmacSHA224",
"com.ibm.crypto.plus.provider.PBKDF2Core$HmacSHA224",
aliases));

aliases = null;
putService(new OpenJCEPlusService(jce,
"SecretKeyFactory",
"PBKDF2WithHmacSHA256",
"com.ibm.crypto.plus.provider.PBKDF2Core$HmacSHA256",
aliases));
aliases = null;
putService(new OpenJCEPlusService(jce,
"SecretKeyFactory",
"PBKDF2WithHmacSHA384",
"com.ibm.crypto.plus.provider.PBKDF2Core$HmacSHA384",
aliases));
aliases = null;
putService(new OpenJCEPlusService(jce,
"SecretKeyFactory",
"PBKDF2WithHmacSHA512",
"com.ibm.crypto.plus.provider.PBKDF2Core$HmacSHA512",
aliases));

aliases = new String[] {"TripleDES", "3DES"};
putService(new OpenJCEPlusService(jce, "SecretKeyFactory", "DESede",
"com.ibm.crypto.plus.provider.DESedeKeyFactory", aliases));
Expand Down
29 changes: 2 additions & 27 deletions src/main/java/com/ibm/crypto/plus/provider/OpenJCEPlusFIPS.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright IBM Corp. 2023, 2025
* Copyright IBM Corp. 2023, 2024
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
Expand Down Expand Up @@ -48,7 +48,7 @@ public final class OpenJCEPlusFIPS extends OpenJCEPlusProvider {
+ " HmacSHA384, HmacSHA512\n"
+ " HmacSHA3-224, HmacSHA3-256, HmacSHA3-384, HmacSHA3-512\n"
+ "Message digest : SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256, SHA3-224, SHA3-256, SHA3-384, SHA3-512\n"
+ "Secret key factory : AES, PBKDF2WithHmacSHA224, PBKDF2WithHmacSHA256, PBKDF2WithHmacSHA384, PBKDF2WithHmacSHA512\n"
+ "Secret key factory : AES\n"
+ "Secure random : HASHDRBG, SHA256DRBG, SHA512DRBG\n"
+ "Signature algorithms : NONEwithDSA, SHA224withDSA, SHA256withDSA,\n"
+ " NONEwithECDSA, SHA224withECDSA,\n"
Expand Down Expand Up @@ -510,31 +510,6 @@ private void registerAlgorithms(Provider jce) {
putService(new OpenJCEPlusService(jce, "SecretKeyFactory", "AES",
"com.ibm.crypto.plus.provider.AESKeyFactory", aliases));

aliases = null;
putService(new OpenJCEPlusService(jce,
"SecretKeyFactory",
"PBKDF2WithHmacSHA224",
"com.ibm.crypto.plus.provider.PBKDF2Core$HmacSHA224",
aliases));

aliases = null;
putService(new OpenJCEPlusService(jce,
"SecretKeyFactory",
"PBKDF2WithHmacSHA256",
"com.ibm.crypto.plus.provider.PBKDF2Core$HmacSHA256",
aliases));
aliases = null;
putService(new OpenJCEPlusService(jce,
"SecretKeyFactory",
"PBKDF2WithHmacSHA384",
"com.ibm.crypto.plus.provider.PBKDF2Core$HmacSHA384",
aliases));
aliases = null;
putService(new OpenJCEPlusService(jce,
"SecretKeyFactory",
"PBKDF2WithHmacSHA512",
"com.ibm.crypto.plus.provider.PBKDF2Core$HmacSHA512",
aliases));

/* Not yet supported in FIPS mode
* aliases = null;
Expand Down
177 changes: 0 additions & 177 deletions src/main/java/com/ibm/crypto/plus/provider/PBKDF2Core.java

This file was deleted.

Loading

0 comments on commit ce31dcf

Please sign in to comment.