-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Crypto: Add JCA signatures, RNG, and unit tests #20583
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
Conversation
… operation is also used for signatures.
…own" or "other" for unrecognized types.
…tions for openssl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive modeling for JCA (Java Cryptography Architecture) signatures, random number generation, and unit tests to the quantum experimental cryptography library. The main focus is on implementing signature models for various algorithms while updating type naming conventions throughout the shared quantum infrastructure.
Key changes include:
- Addition of comprehensive JCA signature models and unit tests with over 1,500 test cases covering various cryptographic operations
- Improved naming consistency in quantum standardization types (replacing "Unknown" with "Other" prefixes)
- Addition of random number generator modeling within the crypto infrastructure
- Bug fix in MAC operation classification logic
Reviewed Changes
Copilot reviewed 31 out of 33 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
shared/quantum/codeql/quantum/experimental/Standardization.qll | Updates type naming from "Unknown" to "Other" for consistency |
shared/quantum/codeql/quantum/experimental/Model.qll | Fixes MAC operation classification logic bug |
java/ql/test/experimental/library-tests/quantum/nodes.ql | Adds test query for crypto nodes |
java/ql/test/experimental/library-tests/quantum/nodes.expected | Contains expected test results with 1,512 crypto operation nodes |
java/ql/test/experimental/library-tests/quantum/node_properties.ql | Adds test query for node properties |
java/ql/test/experimental/library-tests/quantum/node_edges.ql | Adds test query for node relationships |
java/ql/test/experimental/library-tests/quantum/jca/*.java | Multiple comprehensive test files covering JCA cryptographic operations |
…hm literal sources to include signatures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One change as well as clarification needed around toUpperCase()
Co-authored-by: Nicolas Will <[email protected]>
Executing check script: ascii-check.py
File "ql/java/ql/test/experimental/library-tests/quantum/jca/MACOperation.java" contains a non-ASCII character at the location marked with
File "ql/java/ql/test/experimental/library-tests/quantum/jca/SymmetricAlgorithm.java" contains a non-ASCII character at the location marked with
File "ql/java/ql/test/experimental/library-tests/quantum/jca/SignatureOperation.java" contains a non-ASCII character at the location marked with
File "ql/java/ql/test/experimental/library-tests/quantum/jca/SignEncryptCombinations.java" contains a non-ASCII character at the location marked with
File "ql/java/ql/test/experimental/library-tests/quantum/jca/KeyDerivation1.java" contains a non-ASCII character at the location marked with
ASCII check failed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-ASCII characters are causing a CI job to fail.
Adding initial JCA signature models. We still need to address RSASSA-PSS, but that will be in a separate PR. Adding comprehensive JCA unit tests. Also modeled the JCA random number generator within the crypto model. Note it is already modeled generally in CodeQL Java, but to be consistent, we have modeled it within the crypto infrastructure as well.