-
Notifications
You must be signed in to change notification settings - Fork 27
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
expand_message_xmd injectivity #236
Comments
|
(Out of curiosity, any reason not to use HKDF? Different requirements?) Does To that end, if we're lining everything up at the tail end, I think it'd work to just redefine NB: I'm only guessing as to the requirements and am probably making wrong assumptions. I've only just started looking at this draft and have no context as to why any of it looks the way that it does. |
(Ignore this; I missed that |
This is a great question. We discussed at some length in #202.
No, the alignment doesn't really matter per the CDMP05 analysis.
This is a great suggestion! Thank you. |
Unfortunately, this doesn't work. We're enforcing domain separation with a trailing DST, and this would break that. |
(I clearly didn't phrase "Does |
Wait, I don't get it. It occurs to me: we would have avoided the injectivity issue entirely if we'd encoded the length of the message in the hash. I suppose we might still consider doing this if we change the input for b_0 anyway (though we'd then have to decide what the longest |
Er, yes. Ignore me, I can't read and missed that b_i's don't have msg in them. |
As pointed out by David Benjamin, Step 6 of expand_message_xmd is not injective! Here are two inputs that will produce the same output (b_0 = H(Z_pad + [0, 16, 0, 4, 0, 16, 0, 0])):
expand_message_xmd(msg=[], DST=[0, 16, 0, 0], len_in_bytes=16)
expand_message_xmd(msg=[0, 16, 0, 4], DST=[], len_in_bytes=16)
We should probably address this, though it's not clear what is the best way.
The text was updated successfully, but these errors were encountered: