Skip to content

Commit a2ce39a

Browse files
committed
Add blake3 as a registered/supported hash algorithm
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 <rchincha.dev@gmail.com>
1 parent fbb4662 commit a2ce39a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

descriptor.md

Lines changed: 11 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

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

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

166175
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 +229,5 @@ In the following example, the descriptor indicates the type of artifact it is re
220229
[rfc7230-s2.7]: https://tools.ietf.org/html/rfc7230#section-2.7
221230
[sha256-vs-sha512]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/hsMw7cAwrZE
222231
[iana]: https://www.iana.org/assignments/media-types/media-types.xhtml
232+
[blake3]: https://www.ietf.org/archive/id/draft-aumasson-blake3-00.html
233+
[blake3-vs-sha2]: https://github.com/BLAKE3-team/BLAKE3-specs/blob/master/blake3.pdf

0 commit comments

Comments
 (0)