Verified Commit 8a853bdf authored by Nadim Kobeissi's avatar Nadim Kobeissi 💎

Smarter skeletons

parent 2c069928
Pipeline #557 passed with stages
in 57 seconds
......@@ -140,7 +140,14 @@ func injectPrimitiveSkeleton(p Primitive) Primitive {
}
skeleton.Arguments[i] = aa
case "equation":
skeleton.Arguments[i] = valueN
switch len(a.Equation.Values) {
case 1:
skeleton.Arguments[i] = valueG
case 2:
skeleton.Arguments[i] = valueGN
case 3:
skeleton.Arguments[i] = valueGNN
}
}
}
return skeleton
......@@ -175,8 +182,8 @@ SkeletonSearch:
}
if attackerStatePutWrite(known) {
InfoMessage(fmt.Sprintf(
"Constructed skeleton %s.",
prettyPrimitive(skeleton),
"Constructed skeleton %s based on %s.",
prettyPrimitive(skeleton), prettyPrimitive(p),
), "analysis", true)
}
}
......
......@@ -39,6 +39,13 @@ var valueGN = Value{
},
}
var valueGNN = Value{
Kind: "equation",
Equation: Equation{
Values: []Value{valueG, valueN, valueN},
},
}
func valueIsGOrNil(c Constant) bool {
switch strings.ToLower(c.Name) {
case "g", "nil":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment