diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/EllipticCurveAlgorithmInstance.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/EllipticCurveAlgorithmInstance.qll index ef7186d07a0..76746eceba4 100644 --- a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/EllipticCurveAlgorithmInstance.qll +++ b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/EllipticCurveAlgorithmInstance.qll @@ -40,7 +40,7 @@ class KnownOpenSslEllipticCurveConstantAlgorithmInstance extends OpenSslAlgorith result = this.(Call).getTarget().getName() } - override Crypto::EllipticCurveFamilyType getEllipticCurveFamilyType() { + override Crypto::EllipticCurveType getEllipticCurveType() { if Crypto::ellipticCurveNameToKnownKeySizeAndFamilyMapping(this.getParsedEllipticCurveName(), _, _) diff --git a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/HashAlgorithmInstance.qll b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/HashAlgorithmInstance.qll index 55b2dcd7af4..0facc99519d 100644 --- a/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/HashAlgorithmInstance.qll +++ b/cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/HashAlgorithmInstance.qll @@ -72,7 +72,7 @@ class KnownOpenSslHashConstantAlgorithmInstance extends OpenSslAlgorithmInstance override OpenSslAlgorithmValueConsumer getAvc() { result = getterCall } - override Crypto::THashType getHashFamily() { + override Crypto::THashType getHashType() { knownOpenSslConstantToHashFamilyType(this, result) or not knownOpenSslConstantToHashFamilyType(this, _) and result = Crypto::OtherHashType() diff --git a/java/ql/lib/experimental/quantum/JCA.qll b/java/ql/lib/experimental/quantum/JCA.qll index 8b27409410a..a599823ff11 100644 --- a/java/ql/lib/experimental/quantum/JCA.qll +++ b/java/ql/lib/experimental/quantum/JCA.qll @@ -426,7 +426,7 @@ module JCAModel { override string getRawHashAlgorithmName() { result = super.getPadding() } - override Crypto::THashType getHashFamily() { result = hash_name_to_type_known(hashName, _) } + override Crypto::THashType getHashType() { result = hash_name_to_type_known(hashName, _) } override int getFixedDigestLength() { exists(hash_name_to_type_known(hashName, result)) } } @@ -859,7 +859,7 @@ module JCAModel { override string getRawHashAlgorithmName() { result = super.getValue() } - override Crypto::THashType getHashFamily() { + override Crypto::THashType getHashType() { result = hash_name_to_type_known(this.getRawHashAlgorithmName(), _) } @@ -1302,7 +1302,7 @@ module JCAModel { override string getRawHashAlgorithmName() { result = this.(StringLiteral).getValue() } - override Crypto::THashType getHashFamily() { result = hash_name_to_type_known(hashName, _) } + override Crypto::THashType getHashType() { result = hash_name_to_type_known(hashName, _) } override int getFixedDigestLength() { exists(hash_name_to_type_known(hashName, result)) } } @@ -1770,7 +1770,7 @@ module JCAModel { override string getRawHashAlgorithmName() { result = this.(StringLiteral).getValue() } - override Crypto::THashType getHashFamily() { result = hashType } + override Crypto::THashType getHashType() { result = hashType } override int getFixedDigestLength() { result = digestLength } } @@ -1905,7 +1905,7 @@ module JCAModel { override string getRawEllipticCurveName() { result = super.getValue() } - override Crypto::EllipticCurveFamilyType getEllipticCurveFamilyType() { + override Crypto::EllipticCurveType getEllipticCurveType() { if Crypto::ellipticCurveNameToKnownKeySizeAndFamilyMapping(this.getRawEllipticCurveName(), _, _) then diff --git a/shared/quantum/codeql/quantum/experimental/Model.qll b/shared/quantum/codeql/quantum/experimental/Model.qll index 5ee0d1eb298..43ffc0ffb69 100644 --- a/shared/quantum/codeql/quantum/experimental/Model.qll +++ b/shared/quantum/codeql/quantum/experimental/Model.qll @@ -825,20 +825,20 @@ module CryptographyBase Input> { */ abstract string getRawEllipticCurveName(); - abstract TEllipticCurveFamilyType getEllipticCurveFamilyType(); + abstract TEllipticCurveType getEllipticCurveType(); abstract int getKeySize(); /** * The 'parsed' curve name, e.g., "P-256" or "secp256r1" - * The parsed name is full name of the curve, including the family, key size, and other + * The parsed name is full name of the curve, including the type, key size, and other * typical parameters found on the name. * * In many cases this will be equivalent to `getRawEllipticCurveAlgorithmName()`, * but not always (e.g., if the curve is specified through a raw NID). * * In cases like an NID, we want the standardized name so users can quickly - * understand what the curve is, while also parsing out the family and key size + * understand what the curve is, while also parsing out the type and key size * separately. */ string getParsedEllipticCurveName() { result = this.getRawEllipticCurveName() } @@ -854,7 +854,7 @@ module CryptographyBase Input> { /** * Gets the type of this digest algorithm, e.g., "SHA1", "SHA2", "MD5" etc. */ - abstract THashType getHashFamily(); + abstract THashType getHashType(); /** * Gets the isolated name as it appears in source, e.g., "SHA-256" in "SHA-256/PKCS7Padding". @@ -2293,13 +2293,13 @@ module CryptographyBase Input> { * * When modeling a new hashing algorithm, use this predicate to specify the type of the algorithm. */ - HashType getHashFamily() { result = instance.asAlg().getHashFamily() } + HashType getHashType() { result = instance.asAlg().getHashType() } - override string getAlgorithmName() { result = this.getHashFamily().toString() } + override string getAlgorithmName() { result = this.getHashType().toString() } int getDigestLength() { result = instance.asAlg().getFixedDigestLength() or - fixedImplicitDigestLength(instance.asAlg().getHashFamily(), result) + fixedImplicitDigestLength(instance.asAlg().getHashType(), result) } final override predicate properties(string key, string value, Location location) { @@ -2340,9 +2340,7 @@ module CryptographyBase Input> { override string getAlgorithmName() { result = this.getRawAlgorithmName() } - EllipticCurveFamilyType getEllipticCurveFamilyType() { - result = instance.asAlg().getEllipticCurveFamilyType() - } + EllipticCurveType getEllipticCurveType() { result = instance.asAlg().getEllipticCurveType() } override predicate properties(string key, string value, Location location) { super.properties(key, value, location)