Interplanetary Linked Data (IPLD) for DIDs

Jonathan Holt, DO, MS, FACMG


Invited expert @ W3C DID WG January 21th, 2020

Problems with JSON-LD

  • URLs represent mutable resources
  • Relies on HTTP baggage, i.e. MIME types in headers
  • Suseptible to DNS MITM attacks

Concept of linking data by the hash of the content

IPLD with links
  • Content addressable web
  • hash({ "key" : "value" }) = 🔐 secured
  • Censorship-proof by design
  • Future-proof by design
  • self-describing payload by pre-pending bytes
  • Semantic interoperability

Enter the Merkle forest

IPLD

  • Identifier is simply the hash of the content
  • NOT location/protocol that you are using
  • NOT really about dereferencing, resolving or retrieving the resource
  • IPLD is a state of being ☯

Components of IPLD

  • CID - a format for hash-links
  • Data Model - for storage/resolution
  • Deterministic Serialization Formats
  • IPLD selectors - for selecting sub-graphs
  • IPLD tranformations - for computing

What is CID and IPLD?

Concept of a link in IPLD

{
"@context": {
  "/": "bafyreiauq2tulhnkrktu6brs4jfe472cvgbf2gvvmd6gjjzxy2lyedrmyq"
},  

Or alternate transformation as proper URI with IANA scheme

{ 
  "@context": "ipld:bafyreiauq2tulhnkrktu6brs4jfe472cvgbf2gvvmd6gjjzxy2lyedrmyq" 
},  
  
Note no "//" as there is no authority!

IPLD content identifiers (CIDs) in CBOR *ietf


  Tag: 42 (*) 
  Data item: byte string
  Semantics: IPLD content identifier
  Created: 2019-08-20  

> bafyreie74tgmnxqwojhtumgh5dzfj46gi4mynlfr7dmm7duwzyvnpw7h7m
D8                # tag(42)
  2A                               
58 
  25              # bytes(37)
  00017112209FE4CCC6DE16724F3A30C7E8F254F3C6471986ACB1F8D8CF8E96CE2AD7DBE7FB  
  • cryptographically published as IPLD to IPNS
  • public permissionless "microledger" with "sidetree"
  • Blockchain aqnostic and off-line first approach

IPLD selectors for subgraph

CBOR-signed IPLD CID using cbor-tags

98(
[
  protected / h'a10300' / {
  }  , 
  unprotected  {}, 
  payload  42: bstr 'bafyreibtkfbzqiwdhd5bv53wrag43jbz4ytyixigde6wa5zuddxciq7s2m', 
  signatures  [
  [
    protected  h'a10126'  {
      alg  1:-7            \ ECDSA 256 \
    }  , 
    unprotected  {
      kid  4: bstr 'did:ipid:12D3KooWDXDEZtLW5k16DjeHWkFZEeTKUF7PnzzY7m2UocmduhZV;key-id=abc123'
    }, 
    signature h'e2aeafd40d69d19dfe6e52077c5d7ff4e408282cbefb5d06cbf414af2e19d982ac45ac98b8544c908b4507de1e90b717c3d34816fe926a2b98f53afd2fa0f30a'
    ]
  ]
]
)

Questions?

"THE PILLARS OF A NEW ECOSYSTEM"

Twitter@transendx
TranSendX