URNs & Encryption
Normative spec
The byte-exact grammar, the rootless retrieval_key invariant, and the HKDF/GCM-SIV constants are in the Protocol section: URN & addressing and Cryptography.
The URN is the heart of DigStore. It is both the address that locates a resource and the secret that decrypts it.
URN format
urn:dig:<chain>:<storeId>[:<rootHash>][/<resourceKey>]
| Part | Role | Required |
|---|---|---|
urn:dig: | Scheme + namespace | Required (literal) |
<chain> | Chain identifier, e.g. chia | Required |
<storeId> | 64-hex store id | Required |
<rootHash> | Pin a specific generation; omit for the current one | Optional |
<resourceKey> | Which resource (content-root-relative path); omit for store-level | Optional |
Examples:
urn:dig:chia:285539…aade/readme.txt # current generation
urn:dig:chia:285539…aade:1a2b3c…/readme.txt # pinned to a generation
Preview the exact URN a file will have before you commit:
digstore urn readme.txt
digstore urn -A # every staged file