Skip to content

Openssl key agreement instances and consumers #19632

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 4 commits into
base: main
Choose a base branch
from

Conversation

bdrodes
Copy link
Contributor

@bdrodes bdrodes commented May 30, 2025

No description provided.

bdrodes added 4 commits May 27, 2025 15:23
…ound through tests, and updating CODEOWNERS for quantum tests
…l apache license and a readme for future stub creation. Modify existing test case to reference stubs location.
…eowners on any `test/stubs/crypto`. Minor fix to HashAlgorithmValueConsumer (remove library detector logic).
…Y_EXCH). Fix for raw algorithm names in all current instances. Update constants to include key agreement algorithms, previously missing. Note added in model for the possibility of ESDH.
private import experimental.quantum.OpenSSL.AlgorithmInstances.OpenSSLAlgorithmInstanceBase
private import AlgToAVCFlow

predicate knownOpenSSLConstantToKeyAgreementFamilyType(

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase. Warning

Acronyms in knownOpenSSLConstantToKeyAgreementFamilyType should be PascalCase/camelCase.
)
}

class KnownOpenSSLHashConstantAlgorithmInstance extends OpenSSLAlgorithmInstance,

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase. Warning

Acronyms in KnownOpenSSLHashConstantAlgorithmInstance should be PascalCase/camelCase.
this instanceof Literal and
exists(DataFlow::Node src, DataFlow::Node sink |
// Sink is an argument to a CipherGetterCall
sink = getterCall.(OpenSSLAlgorithmValueConsumer).getInputNode() and

Check warning

Code scanning / CodeQL

Redundant cast Warning

Redundant cast to
OpenSSLAlgorithmValueConsumer
.
this instanceof DirectAlgorithmValueConsumer and getterCall = this
}

override OpenSSLAlgorithmValueConsumer getAVC() { result = getterCall }

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase. Warning

Acronyms in getAVC should be PascalCase/camelCase.
@@ -67,6 +67,10 @@
KnownOpenSSLSignatureAlgorithmConstant() { resolveAlgorithmFromExpr(this, _, "SIGNATURE") }
}

class KnownOpenSSLKeyAgreementAlgorithmConstant extends KnownOpenSSLAlgorithmConstant {

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase. Warning

Acronyms in KnownOpenSSLKeyAgreementAlgorithmConstant should be PascalCase/camelCase.
@@ -35,13 +31,12 @@
* The EVP digest algorithm getters
* https://docs.openssl.org/3.0/man3/EVP_DigestInit/#synopsis
*/
class EVPDigestAlgorithmValueConsumer extends OpenSSLAlgorithmValueConsumer {
class EVPDigestAlgorithmValueConsumer extends HashAlgorithmValueConsumer {

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase. Warning

Acronyms in EVPDigestAlgorithmValueConsumer should be PascalCase/camelCase.
private import experimental.quantum.OpenSSL.AlgorithmValueConsumers.OpenSSLAlgorithmValueConsumerBase
private import experimental.quantum.OpenSSL.AlgorithmInstances.OpenSSLAlgorithmInstances

abstract class KEMAlgorithmValueConsumer extends OpenSSLAlgorithmValueConsumer { }

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase. Warning

Acronyms in KEMAlgorithmValueConsumer should be PascalCase/camelCase.

abstract class KEMAlgorithmValueConsumer extends OpenSSLAlgorithmValueConsumer { }

class EVPKEMAlgorithmValueConsumer extends KEMAlgorithmValueConsumer {

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase. Warning

Acronyms in EVPKEMAlgorithmValueConsumer should be PascalCase/camelCase.

abstract class KeyExchangeAlgorithmValueConsumer extends OpenSSLAlgorithmValueConsumer { }

class EVPKeyExchangeAlgorithmValueConsumer extends KeyExchangeAlgorithmValueConsumer {

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase. Warning

Acronyms in EVPKeyExchangeAlgorithmValueConsumer should be PascalCase/camelCase.
@bdrodes bdrodes marked this pull request as ready for review May 30, 2025 16:39
@bdrodes bdrodes requested review from a team as code owners May 30, 2025 16:39
@bdrodes
Copy link
Contributor Author

bdrodes commented May 30, 2025

@nicolaswill , this branch is based on the initial openssl test branch (#19564), so when that's merged the number of changes will decrease.

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.

1 participant