-
Notifications
You must be signed in to change notification settings - Fork 474
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
CipherWithNoIntegrityDetector throws exception on algorithm-only cipher lookups #24
Comments
…uate by CipherWithNoIntegrityDetector. #24 Tested with EcbModeDetectorTest
It should be fix. You can test it with the latest version or wait a week or two for the new release. |
New version fixes it, thanks. According to the comments, though, RSA/ECB/* ciphers are OK, and yet this detector rejects them? |
This means there is a bug and a test case is missing. |
Our affected code is a Guice module that looks like this:
Changing the mode to ECB didn't help (and ECB isn't really a recommended mode anyway; what does the 'NONE' mode do?). |
I would be happy to help with this, but I'm not entirely clear on which RSA ciphers are in fact safe. I notice, however, that the 'no padding' bug description suggests that 'RSA/ECB/OAEPWithMD5AndMGF1Padding' is a good choice. |
The detector that trigger ECB mode usage target Symetric cipher only. The The only weak RSA cipher that I am aware is the The fix |
We're still seeing this bug detector fire on our code, along with the EcbModeDetector. |
javax.crypto.Cipher.getInstance permits lookups using only the algorithm name; however, CipherWithNoIntegrityDetector expects a slash to be present in the argument, leading to an ArrayIndexOutOfBoundsException at line 94 when code like the following is used:
Cipher cipher = Cipher.getInstance("RSA");
The text was updated successfully, but these errors were encountered: