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

Consider additional logging whenever ECB or other designated weak cipher modes modes used for encryption / decryption. #718

Open
kwwall opened this issue Jul 16, 2022 · 0 comments

Comments

@kwwall
Copy link
Contributor

kwwall commented Jul 16, 2022

Even with an encrypt-then-MAC approach, using ECB cipher mode is still a really bad idea as it is a very weak cipher mode that reveals patterns in the resulting ciphertext. However, for completeness and support for legacy encrypted data, we need to support it. And while it is not supported as an out-of-the-box standard ESAPI configuration, it still could be done with custom tweaks to ESAPI.properties file.

However, just as we when a log an error when there is an attempt to encrypt something with a key size smaller than the Encryptor.MinEncryptionKeyLength property, there should be a similar error logged when ECB mode (and maybe other cipher modes that are considered weak [which might require a new property to specify them] is used to encryption.

Also, presently, there is nothing logged (except at DEBUG level) if one were to try to decrypt ciphertext using ECB, but perhaps a warning should be logged for that case as well as the use of short keys for decryption purposes.

Related to GitHub issue #651.

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

1 participant