Hugo Dias
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- title: Connecting IPFS users and permissions to DIDs with UCAN tags: IPFS, DID, UCAN, IPNS description: How can we make IPFS more powerful and flexible with DIDs and UCANs - IPFS þing - July 13, 2022 type: slide slideOptions: spotlight: enabled: true --- ## Connecting IPFS users and permissions to DIDs with UCAN ![](https://i.imgur.com/HzloABo.png =300x) <span style="color: #5E81AC"> IPFS þing - July 13, 2022 </span> Note: How many of you know UCAN and DIDs? How can we bridge dids and ipfs data (CIDs) with UCANs --- ![](https://i.imgur.com/AdNzrbo.jpg =100x100) ### Hugo Dias #### <span style="color: #5E81AC">*@hugomrdias* </span> - Software Engineer at Protocol Labs - Team <span style="color: #D08770">DAG House</span> - Working on <span style="color: #BF616A ">nft.storage</span> and <span style="color: #BF616A ">web3.storage</span> - Previously js-ipfs, js-libp2p, js-multiformats ![dag house](https://i.imgur.com/PzFKUBN.png =40x40) --- ## DID <span style="color: #EBCB8B ">Identity</span> 1. Authentication/proof of control 2. Decentralized/self issued 3. Guaranteed unique identifier 4. No call home 5. Associated cryptographic material Note: Who you are --- DID 1.0 just got the 👍🏼 to advance to W3C Recommendation after years of effort from many contributing organizations. <span style="font-size: 12px"> > The Director concludes that the balance lies in favor of the DID developer community, encouraging it to continue its work and search for consensus on standard DID methods. > The objections are overruled. -- Tim Berners-Lee https://www.w3.org/2022/06/DIDRecommendationDecision.html </span> Note: Sir Tim Berners-Lee AKA The Director (Ralph Swick) --- ### The did:key Method A DID Method for Static Cryptographic Keys <span style="font-size: 30px"> ```abnf did:key:MULTIBASE(base58-btc, MULTICODEC(public-key-type, raw-public-key-bytes)) ``` </span> <span style="font-size: 12px"> https://w3c-ccg.github.io/did-method-key/ </span> Note: most of security and privacy considerations can be addressed but UCANs --- ![](https://i.imgur.com/MaEVDXu.jpg =300x) ### UCAN #### User Controlled Authorization Networks <span style="color: #EBCB8B; font-size: 32px"> Transfer authority without transferring keys </span> <div style="color: #81A1C1; font-size: 24px"> <br/> https://github.com/ucan-wg <br/> https://ucan.xyz/ </div> Note: What you can do --- | ![](https://i.imgur.com/z6wAnEh.png =100x100) | UCAN | | -------- | -------- | | Trustless | Verifiable | | Secure | Delegable | | Local-First | Expressive | | Attenuation | Extensible | | Revocation | Capabilities | Note: Achieve Inversion of Control back to the user. UCANs are all that we need to sign into multiple machines, delegate access for service providers to do things while we’re offline, securely collaborate on documents with a team, and more. We get the flexibility of fine- or coarse-grained control, all controlled by the one who cares about the data the most: the user. UCANs achieve public verifiability with chained certificates and decentralized identifiers (DIDs). Verifiable chain compression is enabled via content addressing. --- Permission delegation is something traditional centralized services can’t easily offer. But UCAN ! --- DID + UCAN 💞 Note: who you are what you can do --- ![](https://i.imgur.com/4M7e6Lx.png) --- ![](https://i.imgur.com/JKY0yl3.png) --- ![](https://i.imgur.com/8KXqIrT.png =600x) --- ```mermaid sequenceDiagram Note over Service,Marketplace: Service needs to know Marketplace Marketplace->>Service: Request UCAN for did:market Service->>Service: Signs UCAN for did:market Service->>Marketplace: UCAN upload/* loop Every time UCAN expires Alice->>Marketplace: Request UCAN for did:alice Marketplace->>Marketplace: Signs UCAN for did:alice Marketplace->>Alice: Short lived UCAN upload/IMPORT end Alice->>Alice: Signs UCAN for did:service Alice->>Service: UCAN+Car ``` Note: ucan.storage prototype, kinda centralized all capabilities are issued by the service. signature chain direct upload from Alice to Service --- ### dag-ucan >An implementation of UCANs in IPLD via Advanced Data Layout (ADL), designed for use with multiformats. > -- Irakli Gozalishvili @gozala <span style="font-size: 12px"> https://github.com/ipld/js-dag-ucan </span> --- IPLD schema encoded as DAG-CBOR ```text type UCAN struct { version String issuer SigningKey audience SigningKey signature Signature capabilities [Capability] proofs [&UCAN] expiration Int facts [Fact] nonce optional String notBefore optional Int } representation map { field facts default [] field proofs default [] } ``` Note: With schema we can encode to JWT and others. Also supports raw JWT to DAG-UCAN with some whitespaces and key order magic. Export full UCAN chain into a CAR file. --- ucanto - framework for UCAN based RPC (you can too) oh yeah we can 💪🏼 1. A declarative system for defining capabilities. 2. Capability invocations routing and execution. 3. UCAN validation system. 4. A pluggable transport layer. 5. Client supporting batched invocations and full type inference. Note: 2. Capability routing and execution - A system for binding capability handles (a.k.a providers) to form services with built-in routing. 4. it can work over pubsub, libp2p etc with pluggable codecs for request/response. --- <span style="color: #BF616A">DIDs</span> + <span style="color: #D08770 ">DAG-UCAN</span> + <span style="color: #EBCB8B ">UCANTO</span> \= <span style="color: #A3BE8C ">Identity + Permissions + Operations </span> Packaged as CAR files Note: Services/Actors then are just interpreters of these operations. Because all of the information is captured in the IPLD structure in the CAR, HTTP is just dumb pipe and any other transport could be used in it’s place. We are already using this to build up protocols to upload data to Elastic IPFS. --- ## w3name with UCAN Delegated "IPNS" mutation Note: - because we can package multiple operations in one CAR file, one of the cool things we can do is upload data and mutate an "IPNS" record at the same time. - Transfer of large DAGs in shards (of desired size) across multiple network request and/or sessions. - Uncoordinated multiplayer DAG creation/transfer - Revocation How can we make it really IPNS !?!? --- ## What if IPFS could talk UCAN 🫶🏼 </br> - Delegated IPNS mutation - Delegate IPFS operations to remote nodes - Writable Gateways - Gateway routed operations - bitswap ? What else ? Note: we find UCANs really useful but they would be even more cool if ipfs could understand them. --- ### Future Work - Key Management - More tooling - UCAN transport specs --- ### Thank you! 🙏🏼 ![](https://i.imgur.com/HzloABo.png =300x) - https://github.com/hugomrdias - https://twitter.com/hugomrdias - hugomrdias@gmail.com Note: UCAN Join Building Apps on IPFS track, 01:00pm Subconscious & Noosphere: WWW over IPFS

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully