Skip to content

Java: Update Encryption.qll in line with NIST.SP.800-131Ar2 - #13830

Closed
unprovable wants to merge 3 commits into
github:mainfrom
unprovable:patch-1
Closed

unprovable wants to merge 3 commits into
github:mainfrom
unprovable:patch-1

Conversation

@unprovable

Copy link
Copy Markdown
Contributor

The fairly recent changes found in NIST.SP.800-131Ar2 deprecate 3TDEA and SKIPJACK. In Java these have a few different names, which I've placed in getAnInsecureAlgorithmName in the file java/ql/lib/semmle/code/java/security/Encryption.qll

This doesn't take full effect until the end of the year, technically, but I've found a need to be flagging it sooner (i.e. now).

Cheers, M.

@unprovable
unprovable requested a review from a team as a code owner July 27, 2023 22:28
@github-actions github-actions Bot added the Java label Jul 27, 2023
@unprovable

Copy link
Copy Markdown
Contributor Author

Also added ChaCha20 and ChaCha20Poly1305 to the list of strong algorithms, and adjusted the list according to availability (blowfish is still much underutilised)

@owen-mc owen-mc changed the title Update Encryption.qll in line with NIST.SP.800-131Ar2 Java: Update Encryption.qll in line with NIST.SP.800-131Ar2 Jul 28, 2023
@atorralba

Copy link
Copy Markdown
Contributor

Hey @unprovable! Thanks for your contribution.

While we can easily accept the changes to getSecureAlgorithmName, since they will only remove FPs (which is a good thing), the same can't be said about getAnInsecureAlgorithmName. The reason is that if we add those algorithms now, we'll be alerting users, and possibly breaking their builds, about algorithms that are not yet deprecated. This is particularly problematic because java/weak-cryptographic-algorithm runs by default in Code Scanning.

So our recommendation is that you split this PR in two: one with the getSecureAlgorithmName changes that we can merge right away, and the other one with the getAnInsecureAlgorithmName changes, that we'd hold off until next year.

@owen-mc

owen-mc commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Superseded by #23224.

@owen-mc owen-mc closed this Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants