From b176bbeae74a6ecad3a59133ac3230280e998a18 Mon Sep 17 00:00:00 2001 From: Nikolai Vazquez Date: Sun, 26 Jan 2020 02:35:45 -0500 Subject: [PATCH 1/3] Add entry for BLAKE3 with 256-bit output (default) BLAKE3 is a fast cryptographic hash function. It is only one algorithm with no variants. See https://github.com/BLAKE3-team/BLAKE3 for details. --- table.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/table.csv b/table.csv index ca799e4..fa5faec 100644 --- a/table.csv +++ b/table.csv @@ -197,6 +197,7 @@ blake2s-232, multihash, 0xb25d, blake2s-240, multihash, 0xb25e, blake2s-248, multihash, 0xb25f, blake2s-256, multihash, 0xb260, +blake3-256, multihash, 0xb261, BLAKE3 has a default 32 byte output length. The maximum length is (2^64)-1 bytes. skein256-8, multihash, 0xb301, Skein256 consists of 32 output lengths that give different hashes skein256-16, multihash, 0xb302, skein256-24, multihash, 0xb303, From 8b8161834b3661641de5d6b9357e0c89f95c5af4 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 27 Jan 2020 17:53:46 -0800 Subject: [PATCH 2/3] table: update blake3 * Renamed from blake3-256 to blake3. We only need a single code because shorter hashes are just prefixes of longer hashes. * Changed the code to 0x0202. This will turn into a two byte code, the previous code was 3 bytes when encoded. The other blake algorithms are in the 3 byte range because we needed _many_ codes. --- table.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/table.csv b/table.csv index fa5faec..7e37ea8 100644 --- a/table.csv +++ b/table.csv @@ -99,6 +99,7 @@ p2p-websocket-star, multiaddr, 0x01df, http, multiaddr, 0x01e0, json, serialization, 0x0200, JSON (UTF-8-encoded) messagepack, serialization, 0x0201, MessagePack +blake3, multihash, 0x0202, BLAKE3 has a default 32 byte output length. The maximum length is (2^64)-1 bytes. x11, multihash, 0x1100, sm3-256, multihash, 0x534d, blake2b-8, multihash, 0xb201, Blake2b consists of 64 output lengths that give different hashes @@ -197,7 +198,6 @@ blake2s-232, multihash, 0xb25d, blake2s-240, multihash, 0xb25e, blake2s-248, multihash, 0xb25f, blake2s-256, multihash, 0xb260, -blake3-256, multihash, 0xb261, BLAKE3 has a default 32 byte output length. The maximum length is (2^64)-1 bytes. skein256-8, multihash, 0xb301, Skein256 consists of 32 output lengths that give different hashes skein256-16, multihash, 0xb302, skein256-24, multihash, 0xb303, From 713350946be8f83774786bc7b97cec6810014b10 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 27 Jan 2020 18:28:12 -0800 Subject: [PATCH 3/3] switch blake3 to a 1 byte code It's likely secure and people are also likely to use it in content addresses where size really matters. --- table.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/table.csv b/table.csv index 7e37ea8..a6ddb54 100644 --- a/table.csv +++ b/table.csv @@ -15,6 +15,7 @@ keccak-224, multihash, 0x1a, keccak has varia keccak-256, multihash, 0x1b, keccak-384, multihash, 0x1c, keccak-512, multihash, 0x1d, +blake3, multihash, 0x1e, BLAKE3 has a default 32 byte output length. The maximum length is (2^64)-1 bytes. dccp, multiaddr, 0x21, murmur3-128, multihash, 0x22, murmur3-32, multihash, 0x23, @@ -99,7 +100,6 @@ p2p-websocket-star, multiaddr, 0x01df, http, multiaddr, 0x01e0, json, serialization, 0x0200, JSON (UTF-8-encoded) messagepack, serialization, 0x0201, MessagePack -blake3, multihash, 0x0202, BLAKE3 has a default 32 byte output length. The maximum length is (2^64)-1 bytes. x11, multihash, 0x1100, sm3-256, multihash, 0x534d, blake2b-8, multihash, 0xb201, Blake2b consists of 64 output lengths that give different hashes