Skip to content
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

Initialization vectors should be randomly generated for proper security guarantees. #76

Open
naskovai opened this issue Apr 14, 2018 · 0 comments
Assignees

Comments

@naskovai
Copy link

naskovai commented Apr 14, 2018

As part of some research about the common crypto mistakes that developers make, I noticed that your application has one of them.

In EncryptionUtil.getCipher you're initializing a Cipher instance with a static IV which is insecure.

One possible solution would be to generate the initialization vector using SecureRandom:

byte[] iv = new byte[16];
new SecureRandom().nextBytes(iv);
@janithb janithb self-assigned this Apr 24, 2018
@ghost ghost mentioned this issue Oct 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants