Skip to content

Commit 85080b6

Browse files
celeducdaviddias
authored andcommitted
Add MD4,MD5; add warning about obsolete hash functions (#76)
* Add MD4 and MD5 * add note about obsolete hash functions MD4, MD5, SHA-1 * changed MD4 and MD5 values as per multiformats/multicodec#41 * use 0xd4 and 0xd5 for MD4 and MD5
1 parent fbeb671 commit 85080b6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ They disagree. :(
114114

115115
Warning: **obviously multihash values bias the first two bytes**. Do not expect them to be uniformly distributed. The entropy size is `len(multihash) - 2`. Skip the first two bytes when using them with bloom filters, etc. Why not _ap_pend instead of _pre_pend? Because when reading a stream of hashes, you can know the length of the whole value, and allocate the right amount of memory, skip it, or discard it.
116116

117+
**Obsolete and deprecated hash functions are included** in this list. [MD4](https://en.wikipedia.org/wiki/MD4), [MD5](https://en.wikipedia.org/wiki/MD5) and [SHA-1](https://en.wikipedia.org/wiki/SHA-1) should no longer be used for cryptographic purposes, but since many such hashes already exist they are included in this specification and may be implemented in multihash libraries.
118+
117119
## Visual Examples
118120

119121
These are visual aids that help tell the story of why Multihash matters.

hashtable.csv

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
,, Note: all values are defined in multiformats/multicodecs
12
codec, description, code
23
identity, , 0x00
4+
md4, , 0xd4
5+
md5, , 0xd5
36
sha1, , 0x11
47
sha2-256, , 0x12
58
sha2-512, , 0x13
@@ -112,4 +115,4 @@ blake2s-224,,0xb25c
112115
blake2s-232,,0xb25d
113116
blake2s-240,,0xb25e
114117
blake2s-248,,0xb25f
115-
blake2s-256,,0xb260
118+
blake2s-256,,0xb260

0 commit comments

Comments
 (0)