Commit 0d24442c authored by Nadim Kobeissi's avatar Nadim Kobeissi 💾
Browse files

Forbid queries with identical senders and recipients

parent e451fdeb
Pipeline #816 passed with stages
in 1 minute and 29 seconds
......@@ -226,6 +226,12 @@ func sanityQueriesAuthentication(query Query, valKnowledgeMap *KnowledgeMap) err
prettyQuery(query),
)
}
if query.Message.Sender == query.Message.Recipient {
return fmt.Errorf(
"authentication query (%s) has identical sender and recipient",
prettyQuery(query),
)
}
c := query.Message.Constants[0]
return sanityQueriesCheckKnown(query, query.Message, c, valKnowledgeMap)
}
......
......@@ -89,12 +89,5 @@ principal Alice [
]
queries[
confidentiality? m1
confidentiality? m2
confidentiality? longTermAPub
authentication? Alice -> Bob: secretBox1Alice
authentication? Alice -> Bob: secretBox2Alice
authentication? Bob -> Alice: secretBox1Bob
authentication? Alice -> Bob: secretBoxM1Alice
authentication? Bob -> Alice: secretBoxM2Bob
]
\ No newline at end of file
]
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