Skip to content

Commit 64294bd

Browse files
authored
Merge pull request #1240 from rchincha/blake3
Add blake3 as a registered/supported hash algorithm.
2 parents c05acf7 + 4fecf47 commit 64294bd

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

descriptor.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ Some example digest strings include the following:
9595
| `sha512:401b09eab3c013d4ca54922bb802bec8fd5318192b0a75f201d8b372742...` | [SHA-512](#sha-512) | Yes |
9696
| `multihash+base58:QmRZxt2b1FVZPNqd8hsiykDL3TdBDeTSPX9Kv46HmX4Gx8` | Multihash | No |
9797
| `sha256+b64u:LCa0a2j_xo_5m0U8HTBBNBNCLXBkg7-g-YpeiGJm564` | SHA-256 with urlsafe base64 | No |
98+
| `blake3:6c3c624b58dbbcd3c0dd82b4c53f04194d1247c6eebdaab7c610cf7d66709b3b` | [BLAKE3](#blake3) | Yes |
9899

99100
Please see [Registered Algorithms](#registered-algorithms) for a list of registered algorithms.
100101

@@ -142,6 +143,7 @@ The following algorithm identifiers are currently defined by this specification:
142143
|----------------------|---------------------|
143144
| `sha256` | [SHA-256](#sha-256) |
144145
| `sha512` | [SHA-512](#sha-512) |
146+
| `blake3` | [BLAKE3](#blake3) |
145147

146148
If a useful algorithm is not included in the above table, it SHOULD be submitted to this specification for registration.
147149

@@ -161,6 +163,16 @@ Implementations MAY implement SHA-512 digest verification for use in descriptors
161163
When the _algorithm identifier_ is `sha512`, the _encoded_ portion MUST match `/[a-f0-9]{128}/`.
162164
Note that `[A-F]` MUST NOT be used here.
163165

166+
#### BLAKE3
167+
168+
[BLAKE3][blake3] is a high performance, highly parallelizable, collision-resistant hash function which [is more performant][blake3-vs-sha2] than
169+
[SHA-256][rfc4634-s4.1].
170+
The hash output length MUST be 256 bits.
171+
Implementations MAY implement BLAKE3 digest verification for use in descriptors.
172+
173+
When the _algorithm identifier_ is `blake3`, the _encoded_ portion MUST match `/[a-f0-9]{64}/`.
174+
Note that `[A-F]` MUST NOT be used here.
175+
164176
## Embedded Content
165177

166178
In many contexts, such as when downloading content over a network, resolving a descriptor to its content has a measurable fixed "roundtrip" latency cost.
@@ -220,3 +232,5 @@ In the following example, the descriptor indicates the type of artifact it is re
220232
[rfc7230-s2.7]: https://tools.ietf.org/html/rfc7230#section-2.7
221233
[sha256-vs-sha512]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/hsMw7cAwrZE
222234
[iana]: https://www.iana.org/assignments/media-types/media-types.xhtml
235+
[blake3]: https://github.com/C2SP/C2SP/blob/BLAKE3/v1.0.0/BLAKE3.md
236+
[blake3-vs-sha2]: https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf

0 commit comments

Comments
 (0)