Animo Solutions
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • 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
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • 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 Note Insights Sharing URL Help
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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • 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
    # Aries RFC XXXX: W3C Verifiable Credential Attachment format for requesting and issuing credentials - Authors: Timo Glastra (Animo Solutions) - Status: [ACCEPTED](/README.md#accepted) - Since: 2023-12-13 - Status Note: Included as part of the JSON-LD verifiable credentials subtarget of [AIP v2.0](../../concepts/0302-aries-interop-profile/README.md). - Supersedes: [Aries RFC 0593: JSON-LD Credential Attachment](https://github.com/hyperledger/aries-rfcs/blob/main/features/0593-json-ld-cred-attach/README.md) - Start Date: 2023-12-13 - Tags: [feature](/tags.md#feature), [protocol](/tags.md#protocol), [credentials](/tags.md#credentials), [test-anomaly](/tags.md#test-anomaly) ## Summary This RFC registers an attachment format for use in the [issue-credential V2](../0453-issue-credential-v2/README.md) protocol based on W3C Verifiable Credentials from the [VC Data Model](https://www.w3.org/TR/vc-data-model/#linked-data-proofs). It aims to support both JSON-LD and JWT based proof formats. ## Motivation The Issue Credential protocol needs an attachment format to be able to exchange W3C verifiable credentials. It is desirable to make use of specifications developed in an open standards body, such as the [Credential Manifest](https://identity.foundation/credential-manifest/) for which the attachment format is described in [RFC 0511: Credential-Manifest Attachment format](../0511-dif-cred-manifest-attach/README.md). However, the _Credential Manifest_ is not finished and ready yet, and therefore there is a need to bridge the gap between standards. ## Tutorial Complete examples of messages are provided in the [reference section](#reference). ## Reference ## Credential Offer Attachment Format ```json { "format": "<format>" // jwt_vc or di_vc "crypto_suites_supported": ["Ed25519Signature2018", "AnonCredsProof2023", "EdDSA"], // Q: do we need to specify which algs are supported for the didcomm_signed_attachment // Q: do we only support did for the binding in a didcomm_signed_attachment, or should that be flexible? // Q: should we allow to specify which did methods are supported by the issuer for the didcomm_signed_attachment? "binding_methods_supported": ["anoncreds_link_secret", "didcomm_signed_attachment"], "credential": { // contents of VC // May omit credentialSubject.id if this is bound to the request }, "request_nonce": "", "options": { "credentialStatus": { "type": "AnonCredsCredentialStatusList2023" } } // TODO: add anoncreds specific options somewhere? } ``` - `format` - String indicating the format of w3c credential that will be issued. See [Proof Formats](#proof-formats) for supported proof formats. - `crypto_suites_supported` - Array of strings indicating which crypto suites are supported by the issuer offering the credential. The specific values that are allowed in this array are dependant on the format. E.g. for the `ldp_vc` format, entries must be signature suite types, while for `jwt_vc` entries must be JWAs. - `binding_methods_supported` - Array of strings indicating which binding methods are supported by the issuer offering the credential. A binding method allows a credential to be bound to a holder. See [Binding Methods](#binding-methods) for supported binding methods. - `credential` - The W3C credential contents without proof. It is allowed for the issuer offering the credential to omit some values from the credential in the offer (such as specific `id`), that will be in the finally issued credential. The `credential` in the offer message is to indicate to the receiver of the credential the intentions about which credential will be issued, and to allow negotiation to occur. - `options` - TODO - `request_nonce` - String that should be used in the request for the binding proof. ### Credential Request Attachment Format Format identifier: `didcomm/w3c-vc-request@v0.1` This format is used to request a verifiable credential. The JSON structure might look like this: ```json { "format": "<format>", "binding_proof": { "method": "<binding-proof-method>", // binding method specific properties } } ``` - `format` - String indicating the format being requested. MUST match the format from the offer. - `binding_proof` - Object containing the proof to bind the credential to a holder. Besides the `method`, other attributes in the `binding_proof` object are defined by the specific binding method used. See [Binding Methods](#binding-methods) for supported binding methods. - `method` - String indicating the method used for the binding proof. Must match an entry from the `binding_methods_supported` array from the offer. ### Credential Attachment Format Format identifier: `didcomm/w3c-vc@v0.1` This format is used to transmit a verifiable credential. The JSON structure might look like this: ```json { "format": "<format>" "credential": "<signed-credential>" } ``` - `format` - The format of issued credential. MUST match the `format` from the request. - `credential` - The signed credential. Can be either a string (e.g. in case of JWT VC) or an object (e.g. in case of W3C credential with `proof`) A complete [`issue-credential` message from the Issue Credential protocol 2.0](../0453-issue-credential-v2/README.md#issue-credential) might look like this: ```json { "@id": "284d3996-ba85-45d9-964b-9fd5805517b6", "@type": "https://didcomm.org/issue-credential/2.0/issue-credential", "comment": "<some comment>", "formats": [ { "attach_id": "5b38af88-d36f-4f77-bb7a-2f04ab806eb8", "format": "didcomm/w3c-vc@v0.1" } ], "credentials~attach": [ { "@id": "5b38af88-d36f-4f77-bb7a-2f04ab806eb8", "mime-type": "application/ld+json", "data": { "base64": "ewogICAgICAgICAgIkBjb250ZXogWwogICAgICAg...(clipped)...RNVmR0SXFXZhWXgySkJBIgAgfQogICAgICAgIH0=" } } ] } ``` ### Proof Formats This section describes different methods for securing the integrity of a W3C verifiable credential. Each format #### Data Integrity Proof Format identifier: `di_vc` Secure a W3C verifiable credential using a Data Integrity Proof, as defined in [Section 6.3.2 Data Integrity Proofs](https://www.w3.org/TR/vc-data-model/#data-integrity-proofs) from the Verifiable Credential Data Model. > NOTE: > The VC Data Model used to point to Linked Data Proofs, but now points to the new Data Integrity VC specification. The data integrity VC spec > has more strict requirements it seems on how the `proof` object should look (e.g. multibase `proofValue` is required). I'm not sure if we need > to add `ldp_vc` as a format as well to support older signature suites not conforming to the new data integrity spec. But it feels weird that the > LDPs have been renamed, and now pointing to a spec that is not compatible (and thus a breaking change it seems?). When `format` is `di_vc` the following applies: - The values in the `cryptographic_suites_supported` MUST be valid ?? types as defined in XXX - The `credential` property in the credential message MUST be an object containing a W3C verifiable credential with `proof` property - The `credenital` in the credential message MAY contain multiple proofs #### Json Web Token Format identifier: `jwt_vc` Secure a W3C verifiable credential using a JSON Web Token, as defined in [Section 6.3.1 JSON Web Token](https://www.w3.org/TR/vc-data-model/#json-web-token) from the Verifiable Credential Data Model. When `format` is `jwt_vc` the following applies: - The values in the `cryptographic_suites_supported` MUST be valid JSON Web Algorithms as defined in XXX - `anoncreds_link_secret` MUST NOT be used for the `binding_proof` - The `credential` property in the credential message MUST be a string containing a compact JWT securing the W3C verifiable credential ### Binding Methods The attachment format supports different methods to bind the credential to the receiver of the credential. In the offer message the issuer can indicate which binding methods are supported in the `binding_methods_supported` array. This section defines a set of binding methods supported by this attachment format, but other binding methods may be used. Based on the binding method, the request needs to include a `binding_proof` object where the `method` defines the specific binding method that is chosen. #### AnonCreds Link Secret Identifier: `anoncreds_link_secret` This binding method is intended to be used in combination with a credential containing an AnonCreds proof. The structure of the `binding_proof` in the request MUST match the structure of the [Credential Request](https://hyperledger.github.io/anoncreds-spec/#credential-request) as defined in the AnonCreds specification, with the addition of the `method` key. ```json { "method": "anoncreds_link_secret", "entropy": "<random-entropy>", "blinded_ms": {}, "blinded_ms_corectness_proof": {}, "nonce": "<random-nonce>" } ``` #### DIDComm Signed Attachment Identifier: `didcomm_signed_attachment` This binding method leverages [DIDComm signed attachments](https://github.com/hyperledger/aries-rfcs/blob/main/concepts/0017-attachments/README.md#signing-attachments) to bind a credential to a specific key and/or identifier. The attachment MUST be signed by including a signature in the `jws` field of the attachment. The data MUST be a JSON document encoded in `base64` field. The structure of the signed attachment is described below. ```json { "method": "didcomm_signed_attachment", "attachment_id": "<@id of the attachment>" } ``` - `attachment_id` - The id of the appended attachment included in the offer message that contains the signed attachment. ##### Signed Attachment Content **JWS Payload** ```json { "nonce": "<request_nonce>", "aud": "did:web:example.com" } ``` - `nonce` - The `request_nonce` from the credential offer - `aud` - Intended audience of the signed attachment. MUST be the same as the issuer identifier in the `credential` from the offer **Signed JWS Header** - `alg`: REQUIRED. A digital signature algorithm identifier such as per IANA "JSON Web Signature and Encryption Algorithms" registry. MUST NOT be none or an identifier for a symmetric algorithm (MAC). - `kid`: OPTIONAL. JOSE Header containing the key ID. If the Credential shall be bound to a DID, the kid refers to a DID URL which identifies a particular key in the DID Document that the Credential shall be bound to. ## Drawbacks While it has a similar setup and structure compared to OpenID for Verifaible Credential Issuance, this attachment format only focuses on issuance of W3C Verifiable Credentials. Therefore another (but probably quite similar) attachment format needs to be defined to support issuance of non-W3C VCs ## Rationale and alternatives [RFC 0593: JSON-LD Credential Attachment](https://github.com/hyperledger/aries-rfcs/blob/main/features/0593-json-ld-cred-attach/README.md), [W3C VC API](https://w3c-ccg.github.io/vc-api/) allows issuance of credentials using only linked data signatures, while [RFC 0592: Indy Attachment](https://github.com/hyperledger/aries-rfcs/blob/main/features/0592-indy-attachments/README.md) supports issuance of AnonCreds credentials. This attachment format aims to support issuance of both previous attachment formats (while for AnonCreds it now being in the W3C model), as well as supporting additional features such as issuance W3C JWT VCs, credentials with multiple proofs, and cryptographic binding of the credential to the holder. ## Prior art The attachment format in this RFC is heavily inspired by [RFC 0593: JSON-LD Credential Attachment](https://github.com/hyperledger/aries-rfcs/blob/main/features/0593-json-ld-cred-attach/README.md), [W3C VC API](https://w3c-ccg.github.io/vc-api/) and [OpenID for Verifiable Credential Issuance](https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html). ## Unresolved questions - Should we support multi-credential offers? - It may be desirable to have multi-format (so jwt or ldp_vc), or should that also be handled by multiple attachment formats? - Should we support `jwk` as well, in addition to `kid` in the header? Would allow a credential to be bound to a JWK rather than a did - With VCDM 2.0 being mostly ready for usage, it might be worth to support both v1.x and v2.x versions of the VCDM in this attachment format. Version support could be indicated in the proposal/offer/request messages using a `data_model_version` property. An implementer is not required to support all versions, but we would define both `v1.1` and `v2.0` as currently recognized data model versions. - Do we need to support multiple binding methods for a single credential? - Relevant in case of W3C VC with AnonCreds + Ed22519 - Wondering whether AnonCreds should be a separate format? Ideally not, but in that case we need to define some properties that can be included for specific proof.type values. - Is it required for the receiver to know upfront which proof type(s) the issuer will use to secure the integrity of the VC?

    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