Crypto: Adding a proof of concept bad mac ordering predicate that takes in an ArtifactNode to be used for graph generation to intercept nodes with known mac ordering issues, in order to format the node and output error messages in the graph.

This commit is contained in:
REDMOND\brodes
2025-10-20 16:24:31 -04:00
parent eff94ef91f
commit 22c0f9fa91

View File

@@ -17,6 +17,13 @@ predicate isDecryptToMacFlow(ArtifactFlow::PathNode src, ArtifactFlow::PathNode
)
}
predicate isDecryptToMacNode(Crypto::ArtifactNode node) {
exists(ArtifactFlow::PathNode src, ArtifactFlow::PathNode sink |
isDecryptToMacFlow(src, sink) and
node.asElement() = src.getNode().asExpr()
)
}
/**
* Holds when the src node is used as plaintext input to both
* an encryption operation and a mac operation, via the