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

Cryptographic API misuse detected #15

Closed
anam-dodhy opened this issue Nov 12, 2018 · 1 comment
Closed

Cryptographic API misuse detected #15

anam-dodhy opened this issue Nov 12, 2018 · 1 comment

Comments

@anam-dodhy
Copy link

Hi, I am currently looking into projects on github which are parametrically misusing cryptographic APIs for my research and I came across a few instances in your project where I found such misuses. These misuses have been highlighted in research papers such as

In your source code file DesEncrypter.java there is a function "DesEncrypter(String, byte[])" and at line 44:

KeySpec keySpec = new PBEKeySpec(passPhrase.toCharArray(), salt, iterationCount);

where the iterationCount defined is 17 which is not the recommended value i.e. 1000

In another file AES.java there are two functions encrypt(byte[], string) and decrypt(byte[], string) with following misuses at line 34 and 49:

Cipher cipher = Cipher.getInstance(AES);

First parameter (with value "AES") should be any of AES/{CBC, GCM, PCBC, CTR, CTS, CFB, OFB}

In another file MD5Util.java there are two functions encrypt(byte[], string) and decrypt(byte[], string) with following misuses at line 50:

MessageDigest md = MessageDigest.getInstance("MD5");

First parameter (with value "MD5") should be any of {SHA-256, SHA-384, SHA-512}

I believe fixing these issues would help your product be more secure.

@jwpttcg66
Copy link
Owner

thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants