-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[master] JCEEncryptor default encryption algorithm upgrade #2004
Conversation
…adding to AES/GCM/NoPadding . Plus extended unit test. Signed-off-by: Radek Felcman <[email protected]>
…atic one. Signed-off-by: Radek Felcman <[email protected]>
…s static context Signed-off-by: Radek Felcman <[email protected]>
…d to re-encrypt password. Signed-off-by: Radek Felcman <[email protected]>
DBWS builder test fix Signed-off-by: Radek Felcman <[email protected]>
...e.persistence.core/src/main/java/org/eclipse/persistence/internal/security/JCEEncryptor.java
Outdated
Show resolved
Hide resolved
...e.persistence.core/src/main/java/org/eclipse/persistence/tools/security/JCEEncryptorCmd.java
Outdated
Show resolved
Hide resolved
SecretKey sk = JCEEncryptorCmd.Synergizer.getAESCBCMultitasker(); | ||
IvParameterSpec iv = JCEEncryptorCmd.Synergizer.getIvSpec(); | ||
decryptCipherAES_CBC = Cipher.getInstance(AES_CBC); | ||
decryptCipherAES_CBC.init(Cipher.DECRYPT_MODE, sk, iv); |
Check failure
Code scanning / CodeQL
Using a static initialization vector for encryption High
static initialization vector
private final Cipher decryptCipherAES_CBC; | ||
|
||
public JCEEncryptorCmd() throws Exception { | ||
decryptCipherDES_ECB = Cipher.getInstance(DES_ECB); |
Check failure
Code scanning / CodeQL
Use of a broken or risky cryptographic algorithm High
DES/ECB/PKCS5Padding
decryptCipherDES_ECB = Cipher.getInstance(DES_ECB); | ||
decryptCipherDES_ECB.init(Cipher.DECRYPT_MODE, JCEEncryptorCmd.Synergizer.getDESMultitasker()); | ||
|
||
decryptCipherAES_ECB = Cipher.getInstance(AES_ECB); |
Check failure
Code scanning / CodeQL
Use of a broken or risky cryptographic algorithm High
AES/ECB/PKCS5Padding
|
||
SecretKey sk = JCEEncryptorCmd.Synergizer.getAESCBCMultitasker(); | ||
IvParameterSpec iv = JCEEncryptorCmd.Synergizer.getIvSpec(); | ||
decryptCipherAES_CBC = Cipher.getInstance(AES_CBC); |
Check failure
Code scanning / CodeQL
Use of a broken or risky cryptographic algorithm High
AES/CBC/PKCS5Padding
private static class Synergizer { | ||
|
||
private static SecretKey getDESMultitasker() throws Exception { | ||
SecretKeyFactory factory = SecretKeyFactory.getInstance("DES"); |
Check failure
Code scanning / CodeQL
Use of a broken or risky cryptographic algorithm High
DES
...e.persistence.core/src/main/java/org/eclipse/persistence/tools/security/JCEEncryptorCmd.java
Show resolved
Hide resolved
JCEEncryptor default encryption algorithm upgrade from AES/CBC/PKCS5Padding to AES/GCM/NoPadding . Plus extended unit test. - for AES/GCM/NoPadding random initialization vector (IV) instead of static one. - shell scripts added, resource strings moved to localization bundle DBWS builder test fix Signed-off-by: Radek Felcman <[email protected]> (cherry picked from commit 149e9ce) Signed-off-by: Radek Felcman <[email protected]>
JCEEncryptor default encryption algorithm upgrade from AES/CBC/PKCS5Padding to AES/GCM/NoPadding . Plus extended unit test. - for AES/GCM/NoPadding random initialization vector (IV) instead of static one. - shell scripts added, resource strings moved to localization bundle DBWS builder test fix (cherry picked from commit 149e9ce) Signed-off-by: Radek Felcman <[email protected]>
JCEEncryptor default encryption algorithm upgrade from AES/CBC/PKCS5Padding to AES/GCM/NoPadding .
Plus extended unit test to verify backwards compatibility.