cleanup: stop relying on label injectivity #66
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Builds on #65.
In many proofs, we rely on the injectivity of
principal_label
, via the patternBecause of the injectivity of
principal_label
if we know thatget_sk_label pk == principal_label "Alice"
, then we can use the predicate above withprin == "Alice"
. This is done in both NSL and ISO-DH.I now believe that this is more a hack than an actual feature: the labels are used to prove that two keys are distinct (the private key of Alice and the private key of Bob), whereas the goal of labels is initially to prove secrecy.
Proving that two keys are distinct is the role of usages: we already use them to prove that two keys in distinct protocols are distinct (via the "usage tag", e.g.
"NSL.PublicKey"
), we can also use them to prove that Alice's key is distinct from Bob's key.This PR uses the "usage data" to store the principal owning the key.