Commit e79571fc authored by Nadim Kobeissi's avatar Nadim Kobeissi 💾
Browse files

Merge branch 'equivalence-patch' into 'master'

Equivalence patch

See merge request !12
parents 8ff9e8ee aa1fa9d7
Pipeline #913 passed with stages
in 2 minutes and 41 seconds
......@@ -355,7 +355,7 @@ func queryEquivalence(
}
values := []*Value{}
for i := 0; i < len(query.Constants); i++ {
a, _ := valueResolveConstant(query.Constants[i], valPrincipalState)
a, _ := valueResolveConstantEqv(query.Constants[i], valPrincipalState)
values = append(values, a)
}
brokenEquivalence := false
......
......@@ -474,6 +474,14 @@ func valueResolveConstant(c *Constant, valPrincipalState *PrincipalState) (*Valu
return valPrincipalState.Assigned[i], i
}
func valueResolveConstantEqv(c *Constant, valPrincipalState *PrincipalState) (*Value, int) {
i := valueGetPrincipalStateIndexFromConstant(valPrincipalState, c)
if i < 0 {
return &Value{Kind: typesEnumConstant, Data: c}, i
}
return valPrincipalState.Assigned[i], i
}
func valueResolveValueInternalValuesFromKnowledgeMap(
a *Value, valKnowledgeMap *KnowledgeMap,
) (*Value, []*Value) {
......
attacker[passive]
principal Server[
generates x
generates y
gx = G^x
gy = G^y
gxy = gx^y
gyx = gy^x
]
queries[
equivalence? gxy, gyx
]
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