logos-storage-docs-obsidian/10 Notes/Specs/Content Identifier (CID).md
2025-09-16 18:41:28 +10:00

21 lines
964 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
related-to:
- "[[Multicodec]]"
---
Content Identifiers are central to the Codex protocol.
A CID is a self-describing content-addressed identifier. It uses cryptographic hashes to achieve content addressing. It uses several [[Multiformats|multiformats]] to achieve flexible self-description, namely:
1. [multihash](https://github.com/multiformats/multihash) to hash content addressed, and
2. [multicodec](https://github.com/multiformats/multicodec) to type that addressed content, to form a binary self-contained identifier, and optionally also
3. [multibase](https://github.com/multiformats/multibase) to encode that binary CID as a string.
Concretely:
```
<cidv1> ::= <CIDv1-multicodec><content-type-multicodec><content-multihash>
```
Source: https://github.com/multiformats/cid.
See also: [https://docs.ipfs.tech/concepts/content-addressing/#content-identifiers-cids](https://docs.ipfs.tech/concepts/content-addressing/#content-identifiers-cids).