Multihash

__Multihash__ is a protocol for differentiating outputs from various well-established hash functions, addressing size + encoding considerations. It is useful to write applications that future-proof their use of hashes, and allow multiple hash functions to coexist.

> Self-describing hashes

Multihash is particularly important in systems which depend on cryptographically secure hash functions. Attacks may break the cryptographic properties of secure hash functions.

> Safer, easier cryptographic hash function upgrades

# Current problems with hashing

These cryptographic breaks are particularly painful in large tool ecosystems, where tools may have made assumptions about hash values, such as function and digest size.

Upgrading becomes a nightmare, as all tools which make those assumptions would have to be upgraded to use the new hash function and new hash digest length. Tools may face serious interoperability problems or error-prone special casing. - How many programs out there assume a git hash is a sha1 hash? - How many scripts assume the hash value digest is exactly 160 bits? - How many tools will break when these values change? - How many programs will fail silently when these values change?

This is precisely where Multihash shines. It was designed for upgrading.

# Links

- What’s really happening... - medium.com - Decentralized Identifiers... - w3.org - Multihash - multiformats.io - The Multihash Data Format - ietf.org - Use Cases for Decentralized... - github.io - MultiHash | IPFS Core... - github.io - Multihash –... - ycombinator.com - Content addressing | IPFS Docs - ipfs.io