mlswg / mls-protocol Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split LeafNode from KeyPackage #575
Conversation
|
I haven't done a full review yet, but one thing to note is that if a member commits an Update proposal by another member, there should be a |
|
@kkohbrok I think this is already taken into account:
Maybe it would be clearer to say |
|
After the virtual interim today, I did a little thinking on how to structure these objects to take into account @TWal's point about having the signature be lifetime-constrained in the prepublished case. I think we all agree on which fields should appear in which cases:
(Where the Credential/Capabilities in KeyPackage might be indirect, via containing a pre-pub LeafNode.) So it's mainly a question of how we lay this out syntactically. A couple of options follow. I have not split the Update and Commit cases; they would differ only in whether the Option 1: Variant field within leaf nodeOption 2: Two types of leaf nodeOpinion below this linePersonally, I feel pretty strongly that Option 1 will be easier to work with. Option 2 basically means that there are three types of tree node, and two different algorithms for verifying leaf signatures. (!) That seems like a bigger distinction than is merited here, given that the two types of leaf have mostly the same content. Having selects here is helpful, though. (Once again In either case, we will need to be clear about how the |
|
I think I also prefer the first option! I think we should advise to reject expired LeafNode when adding them to the tree (and also check that they have the same lifetime as the corresponding KeyPackage?) |
|
@TWal - Thanks for the feedback. With regard to when expired LeafNodes should be rejected -- With the scheme you propose, why does the Lifetime need to be in the LeafNode instead of the KeyPackage? Since the KeyPackage is in the Add, having the lifetime there would still allow it to be validated at add time. And if you're not going to do anything with the lifetime after add time, why do you need it to still be in the tree? |
|
The latest commit updates the PR to match Option 1. It still seems awkward to have the Lifetime in the LeafNode. |
|
I think I also prefer the first option. On lifetimes: Lifetimes are the only thing that allow us to get some degree of PCS for pre-published key material. If Alice is compromised and Bob won't check lifetimes if he is invited into a group that includes Alice, then the adversary can impersonate Alice towards Bob indefinitely after compromise: He creates a group using Alice's KeyPackage and invites Bob. Of course there are a few caveats to this attack:
|
|
Given the two options, I also prefer option 1. That being said, it still bothers me that we now have two signatures instead of one, which doubles the creation time for large groups. |
|
@raphaelrobert note that Option 2 does avoid double signature. But in my experience, the slow thing about MLS in large groups is not so much the cryptography (signature or otherwise), but the moving around of the large tree. |
|
@kkohbrok - To refine your analysis a bit -- the interesting case here is when the Alice's HPKE private key is compromised, but not her signature key. If her signature key is compromised, then all bets are off; the attacker can impersonate Alice in any way, until the AS invalidates the signature key (e.g., via credential expiry/revocation). If we take on that constraint, then your attack actually doesn't work. The attacker can't create sign a GroupInfo message that Bob will accept. The best the attacker could do is create a group with the attacker, Alice, and Bob, such that if Bob removes the attacker, the attacker still has access to the group via knowledge of Alice's HPKE private key (since Bob's UpdatePath will TreeKEM-encrypt to Alice's compromised HPKE key). And here the attacker is pretty limited, since they can't send any MLSPlaintext/MLSCiphertext signatures. But at that point, it seems like you're in the same posture for pre-published keys as for keys in the group. Any leaf signed by Alice can be used in that attack in the same way. So it seems like the answer for PCS in any case is "Update/Commit"? |
|
@bifurcation you're right, the attack doesn't quite work the way I thought it would. It all depends a bit on what the AS does.
Good point also about the adversary being able to just pluck key packages from any given group at the time of compromise. Those would have to be fitted with lifetimes as well to make this work. I still like lifetimes as a conservative, defense-in-depth approach in case the AS is very minimal or just not very good. I think as a general rule, it's good to attach an expiration date to key material that is not single-use. That being said, I understand that due to the asynchronicity in many use-cases it's going to be hard to enforce in a meaningful way that doesn't impede usability too much. |
|
Discussion at virtual interim:
|
Depends on #573
Fixes #539
This PR implements the suggestion from @TWal in #539, taking into account the discussion on the issue and on the call last week. There are a bunch of small changes (e.g., changing a lot of
KeyPackageReftoLeafNodeRef), but the critical change is the following split of KeyPackage into LeafNode and KeyPackage:This does a few things we had discussed:
group_idwhen possible. (This PR takes the chattiest approach, replicating thegroup_idin each leaf.)Add continues to refer to KeyPackage. Update and Commit use LeafNode directly.
I did a walk through the document grepping for KeyPackage, and I think I found all the instances that needed to be changed. But some review to make sure I didn't miss anything would be appreciated.