Skip to content

Commit 0270fac

Browse files
committed
Crypto: Update model to have a mac operation instance that extends the signature or mac operation instance.
1 parent d32e09a commit 0270fac

File tree

1 file changed

+2
-17
lines changed
  • shared/quantum/codeql/quantum/experimental

1 file changed

+2
-17
lines changed

shared/quantum/codeql/quantum/experimental/Model.qll

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -690,23 +690,6 @@ module CryptographyBase<LocationSig Location, InputSig<Location> Input> {
690690
predicate shouldHavePaddingScheme() { any() }
691691
}
692692

693-
// abstract class SignatureOrMacAlgorithmInstance extends KeyOperationAlgorithmInstance {
694-
// SignatureOrMacAlgorithmInstance() {
695-
// this.getAlgorithmType() = KeyOpAlg::TSignature(_)
696-
// or
697-
// this.getAlgorithmType() = KeyOpAlg::TMac(_)
698-
// }
699-
// override predicate shouldHaveModeOfOperation() { none() }
700-
// /**
701-
// * Gets the hash algorithm used by this signature algorithm.
702-
// */
703-
// abstract AlgorithmValueConsumer getHashAlgorithmValueConsumer();
704-
// }
705-
// abstract class SignatureAlgorithmInstance extends SignatureOrMacAlgorithmInstance {
706-
// SignatureAlgorithmInstance() { this.getAlgorithmType() = KeyOpAlg::TSignature(_) }
707-
// }
708-
abstract class MacOperationInstance extends KeyOperationAlgorithmInstance { }
709-
710693
abstract class HmacAlgorithmInstance extends KeyOperationAlgorithmInstance {
711694
HmacAlgorithmInstance() { this.getAlgorithmType() = KeyOpAlg::TMac(KeyOpAlg::HMAC()) }
712695

@@ -832,6 +815,8 @@ module CryptographyBase<LocationSig Location, InputSig<Location> Input> {
832815
abstract ConsumerInputDataFlowNode getSignatureConsumer();
833816
}
834817

818+
abstract class MacOperationInstance extends SignatureOrMacOperationInstance { }
819+
835820
abstract class EllipticCurveInstance extends AlgorithmInstance {
836821
/**
837822
* Gets the isolated name as it appears in source

0 commit comments

Comments
 (0)