-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add documentation for the version (v) parameter #4
Conversation
@@ -279,6 +286,8 @@ For Argon2, the following is specified: | |||
|
|||
- The identifier for Argon2ds is `argon2ds`. | |||
|
|||
- The versions are: [16, 19]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be clearer to use 0x10, 0x13
or 16 (for Argon2 1.0), 19 (for Argon2 1.3)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it makes sense.
Actually I think we should completely remove the Argon2 Encoding section.
It does not make a lot of sense to have it here.
More changes to discuss about:
What do you think about them? |
phc-sf-spec.md
Outdated
@@ -35,6 +36,7 @@ The string is then the concatenation, in that order, of: | |||
|
|||
- a `$` sign; | |||
- the function symbolic name; | |||
- optionally, a `$` sign followed by the algortihm version with a `v=version` format; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a typo: algortihm -> algorithm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch thank you!
@@ -48,6 +50,8 @@ case of a function family); identifiers should be explicit (human | |||
readable, not a single digit), with a length of about 5 to 10 | |||
characters. An identifier name MUST NOT exceed 32 characters in length. | |||
|
|||
The value for the version shall be a sequence of characters in: `[0-9]`. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering Argon2 currently uses hex numbers, technically it's [0-9A-Fa-f]
or [[:xdigit:]]
class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the values are decimal encoded as per specs.
Eg:
0x13->19
0x10->16
So the version is digits only.
Should we just create a new "official" repository for that instead of relying on this one? |
Ugh, the whole version business is ugly. |
@@ -21,11 +21,12 @@ string that differs from the format herein described. | |||
|
|||
We define the following format: | |||
|
|||
$<id>[$<param>=<value>(,<param>=<value>)*][$<salt>[$<hash>]] | |||
$<id>[$v=<version>][$<param>=<value>(,<param>=<value>)*][$<salt>[$<hash>]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a somewhat ambiguous case:
$<id>[$v=<version>](,<param>=<value>)+][$<salt>[$<hash>]]
It'd be good to clarify what behavior parsers have for this case:
- MUST NOT interpret the
v
parameter as a version - MUST interpret the
v
parameter as a version
Since a separated [$v=<version>]$...
parameter is already in the wild, I would suggest MUST NOT here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it helps, but you can refer to this implementation:
https://github.com/simonepri/phc-format/blob/master/index.js#L136-L224
If I remember correctly, in the case you mentioned my parser does not interpret v
as the version but as a parameter.
Since a separated [$v=]$... parameter is already in the wild
What are you referring to exactly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm referring to Argon2 having deployed $v=...$<params>
, versus $v=...,<params>
Support for PHC string variant with an additional version field: P-H-C/phc-string-format#4 This is used by Argon2.
Support for PHC string variant with an additional version field: P-H-C/phc-string-format#4 This is used by Argon2.
Support for PHC string variant with an additional version field: P-H-C/phc-string-format#4 This is used by Argon2.
So I notice that as a panel member I can merge this. I'll give it a more thorough review, but perhaps I should. Getting it merged seems very much overdue. |
Feel free to merge
…On Sat, Apr 17, 2021, 07:33 Tony Arcieri ***@***.***> wrote:
So I notice that as a panel member I can merge this.
I'll give it a more thorough review, but perhaps I should.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA767MRRRB3C7OXGXATD4NTTJEFSVANCNFSM4EYP4P6A>
.
|
Sorry that took so long. FYI I'm maintaining an |
The upstream PR to add this to the spec was merged: P-H-C/phc-string-format#4
The upstream PR to add this to the spec was merged: P-H-C/phc-string-format#4
Changes
Add the version (v) parameter to the PHC string format standard
Closes
#1
P-H-C/phc-winner-argon2#248
P-H-C/phc-winner-argon2#199
P-H-C/phc-winner-argon2#157
cc: @philtay @ranisalt @tarcieri @sneves @YetAnotherMinion @tniswong @veorq @josephlr @khovratovich @pornin