-
Notifications
You must be signed in to change notification settings - Fork 687
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 blake3 as a registered/supported hash algorithm. #1240
base: main
Are you sure you want to change the base?
Conversation
8faee6e
to
16811ee
Compare
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.
We should specify that implementations "MAY" support the algorithm, and specify the encoded value regexp, similar to the sha512 definition.
2733aae
to
a2ce39a
Compare
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.
A minor typo fix (wrong number of bits in the regex 🙈), a little whitespace pedanticism (that I'm hoping @sudo-bmitch will confirm or reject/deny), and what can probably/hopefully just be a discussion of the URL to link to (not necessarily requesting any change there).
Overall the change looks good and I'm +1; thanks for taking a stab!
descriptor.md
Outdated
[BLAKE3][blake3] is a high performance, highly parallelizable, collision-resistant hash function which [is more performant][blake3-vs-sha2] than | ||
[SHA-256][rfc4634-s4.1]. The hash output length MUST be 256 bits. Implementations MAY implement BLAKE3 digest verification for use in descriptors. | ||
|
||
When the _algorithm identifier_ is `blake3`, the _encoded_ portion MUST match `/[a-f0-9]{128}/`. |
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.
When the _algorithm identifier_ is `blake3`, the _encoded_ portion MUST match `/[a-f0-9]{128}/`. | |
When the _algorithm identifier_ is `blake3`, the _encoded_ portion MUST match `/[a-f0-9]{64}/`. |
👀
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.
Fixed.
descriptor.md
Outdated
[BLAKE3][blake3] is a high performance, highly parallelizable, collision-resistant hash function which [is more performant][blake3-vs-sha2] than | ||
[SHA-256][rfc4634-s4.1]. The hash output length MUST be 256 bits. Implementations MAY implement BLAKE3 digest verification for use in descriptors. |
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 think we normally split-on-sentence here (maybe @sudo-bmitch can confirm; he's been more pedantic/on top of that than I am):
[BLAKE3][blake3] is a high performance, highly parallelizable, collision-resistant hash function which [is more performant][blake3-vs-sha2] than | |
[SHA-256][rfc4634-s4.1]. The hash output length MUST be 256 bits. Implementations MAY implement BLAKE3 digest verification for use in descriptors. | |
[BLAKE3][blake3] is a high performance, highly parallelizable, collision-resistant hash function which [is more performant][blake3-vs-sha2] than [SHA-256][rfc4634-s4.1]. | |
The hash output length MUST be 256 bits. | |
Implementations MAY implement BLAKE3 digest verification for use in descriptors. |
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.
Agree with the split-on-sentence. It makes future PRs a lot easier to review (a one world change doesn't rewrap a paragraph).
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.
Fixed.
@@ -220,3 +229,5 @@ In the following example, the descriptor indicates the type of artifact it is re | |||
[rfc7230-s2.7]: https://tools.ietf.org/html/rfc7230#section-2.7 | |||
[sha256-vs-sha512]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/hsMw7cAwrZE | |||
[iana]: https://www.iana.org/assignments/media-types/media-types.xhtml | |||
[blake3]: https://www.ietf.org/archive/id/draft-aumasson-blake3-00.html |
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.
"Expires: 21 January 2025"
That's a little bit worrying 😅 any idea where discussion of these things usually happens? Would it make sense to link to something like https://blake3.io/ instead, or is this the best reference since https://blake3.io/ just redirects to the GitHub repo in the very next URL?
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.
blake3.io redirects to the blake3 implementation repo. Linking to the https://github.com/BLAKE3-team/BLAKE3-specs or https://github.com/C2SP/C2SP/blob/main/BLAKE3.md would each make sense to me. Not sure if either is more canonical than the other.
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.
https://github.com/BLAKE3-team/BLAKE3-specs
^ probably initial work, far more dated.
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 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.
C2SP has a tagged pointer to their copy of the spec, which has me leaning that direction: https://c2sp.org/[email protected]
Motivations for this PR: 1. Blake3 is a high performance hash and there is growing community interest 2. Blake3 is variable output but mandate 256-bit output Signed-off-by: Ramkumar Chinchani <[email protected]>
Motivations for this PR: