Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Quantum: Add initial qltests for OpenSSL modeling #19564

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
Loading
from

Conversation

bdrodes
Copy link
Contributor

@bdrodes bdrodes commented May 22, 2025

No description provided.

bdrodes added 9 commits May 21, 2025 18:15
… and known algorithm literals to improve dataflow performance.
… now relying on the charpred of OpenSSLAlgorithmCandidateLiteral.
…ltering all constants, not just for algorithms.
# Conflicts:
#	cpp/ql/lib/experimental/quantum/Language.qll
#	cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/KnownAlgorithmConstants.qll
#	cpp/ql/lib/experimental/quantum/OpenSSL/OpenSSL.qll
Squashed commits:

[417734c] Crypto: Fixing typo (+1 squashed commits)

Squashed commits:

[1ac3d5c] Crypto: Fixing typo caused by AI auto complete.
… constraints for generic input sources are heuristics to filter sources, and other constraints narrow the literals to a general type (ints). Also adding fixes in KnownAlgorithmConstants to classify some algorithms as key exchange and signature correctly, and added support for a signature constant wrapper.
…d signature mapping for ED and X elliptic curve variants.
…he current expected file in this commit is empty, i.e., tests will fail.
@github-actions github-actions bot added the C++ label May 22, 2025
}
}

class KnownOpenSSLSignatureAlgorithmConstant extends KnownOpenSSLAlgorithmConstant {

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase. Warning

Acronyms in KnownOpenSSLSignatureAlgorithmConstant should be PascalCase/camelCase.
//Heuristics for distinguishing int literals from other literals
exists(this.getValue().toInt()) and
not this instanceof CharLiteral and
not this instanceof StringLiteral

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase. Warning

Acronyms in isOpenSSLStringLiteralGenericSourceCandidate should be PascalCase/camelCase.
* Note: this predicate should only consider restrictions with respect to integers only.
* General restrictions are in the OpenSSLGenericSourceCandidateLiteral class.
*/
private predicate isOpenSSLIntLiteralGenericSourceCandidate(IntLiteral l) {

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase. Warning

Acronyms in isOpenSSLIntLiteralGenericSourceCandidate should be PascalCase/camelCase.
* Literals are filtered, for example, if they are used in a way no indicative of an algorithm use
* such as in an array index, bitwise operation, or logical operation.
* Note a case like this:
* if(algVal == "AES")

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase. Warning

Acronyms in OpenSSLGenericSourceCandidateLiteral should be PascalCase/camelCase.
bdrodes added 2 commits May 22, 2025 15:22
…s are tied to the operation to address a bug in the design, propagated the analgous change to ciphers.
@bdrodes bdrodes marked this pull request as ready for review May 22, 2025 20:15
@bdrodes bdrodes requested review from a team as code owners May 22, 2025 20:15
@jketema
Copy link
Contributor

jketema commented May 22, 2025

Just a quick drive-by comment: the tests should preferably go into the tests/experimental/library-tests sub-directory to match what is being done for the library itself.

@nicolaswill nicolaswill requested review from nicolaswill and removed request for a team May 22, 2025 22:14
@nicolaswill
Copy link
Contributor

Just a quick drive-by comment: the tests should preferably go into the tests/experimental/library-tests sub-directory to match what is being done for the library itself.

@jketema Would tests/library-tests/experimental/quantum/* also work? I do not have any preference, but we will need to update CODEOWNERS to specify whatever directory the tests eventually live in. If we use the structure I suggest, the existing CODEOWNERS entries should cover those test directories already.

@nicolaswill nicolaswill changed the title Initial openssl tests Quantum: Add initial qltests for OpenSSL modeling May 22, 2025
@jketema
Copy link
Contributor

jketema commented May 23, 2025

@nicolaswill How about changing the pattern in the code owners file to **/experimental/**/quantum/ @github/ps-codeql. I believe that should work?

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

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.