Hi,
I take a look into the encryptionUtils file and find the usage of PBKDF2WithHmacSHA1. Did not found many information specific on the differences of PBKDF2WithHmacSHA1 and PBKDF2WithHmacSHA256 but as far as I know SHA1 is unsecure. I also read more often that CBC algorithms should be used.
SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256");
KeySpec spec = new PBEKeySpec(password, salt, 65536, 256);
SecretKey tmp = factory.generateSecret(spec);
SecretKey secret = new SecretKeySpec(tmp.getEncoded(), "AES");
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, secret);
AlgorithmParameters params = cipher.getParameters();
byte[] iv = params.getParameterSpec(IvParameterSpec.class).getIV();
byte[] ciphertext = cipher.doFinal("Hello, World!".getBytes("UTF-8"));
Has communote weaknesses in security?
Hi,
I take a look into the encryptionUtils file and find the usage of
PBKDF2WithHmacSHA1. Did not found many information specific on the differences ofPBKDF2WithHmacSHA1andPBKDF2WithHmacSHA256but as far as I know SHA1 is unsecure. I also read more often that CBC algorithms should be used.Has communote weaknesses in security?