chris-wood / draft-bar-cfrg-spake2plus

Other
5 stars 1 forks source link

SPAKE2 comparison #8

Closed chris-wood closed 2 years ago

chris-wood commented 2 years ago

From @cjpatton

Comparison to the SPAKE2 spec

chris-wood commented 2 years ago

@cjpatton I don't understand your comment about the key confirmation being less prescriptive than SPAKE2. Is the generation of each confirmation message not clear? Something else?

The other comment about shared fixed points makes sense. I think generating different points is the way to go. @ttaubert, thoughts?

cjpatton commented 2 years ago

From draft-04 (maybe I should be looking at the latest, unpublished version?):

[In case a MAC is used for key confirmation], KcA and KcB are symmetric keys used to compute tags cA and cB over data shared between the participants. That data could for example be an encoding of the key shares exchanged earlier, or simply a fixed string.

cA = MAC(KcA, ...) cB = MAC(KcB, ...)

I.e, this draft doesn't tell you what to MAC, whereas the SPAKE2 draft tells you exactly what to MAC (TT).

chris-wood commented 2 years ago

Got it -- thanks for clarifying!

chris-wood commented 2 years ago

@ttaubert I suggest we simply MAC the entire transcript for the confirmation message. If you agree, could you please send a PR?

chris-wood commented 2 years ago

Also, regarding M and N, we can update their generation method (and test vectors) by domain separating the hash for SPAKE2+ and SPAKE2. @ttaubert would you be OK with this change?

ttaubert commented 2 years ago

@ttaubert I suggest we simply MAC the entire transcript for the confirmation message. If you agree, could you please send a PR?

As proposed in #20, I think we should stick to MAC-ing the key shares as shown in our test vectors.

See also #3, encoding the transcript TT can be done incrementally. That would likely be harder for the key confirmation as I think most MAC APIs will require the confirmation key upfront, which itself is derived from TT.

ttaubert commented 2 years ago

Also, regarding M and N, we can update their generation method (and test vectors) by domain separating the hash for SPAKE2+ and SPAKE2. @ttaubert would you be OK with this change?

This should be covered by the change in #23 as well.