Correct descriptions of M1 & M2 per RFC 5054 #163
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.
As far as I can tell from the code, what is defined as:
does not include the given hash invocation step. While RFC 5054 is unclearly worded (see comment below), SRP-6 is clear that
M1
should not includeK = H(S)
and thus this description of the protocol is incorrect. As far as I can tell, nobody else uses this computation ofM1
(withK = H(S)
as a parameter) and thus it should be dropped from the tabular and comment descriptions.See also: bcgit/bc-csharp#506 (comment)
Edit to add: regardless of which spec is deemed correct or supported or implemented (SPR-6 or RFC 2945) -- it is clear that
M1 = H(A, B, H(S))
is not aligning with either of those two, and also (I believe) wasn't implemented in the code.