Michael Lodder
    • 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

      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
    • 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 Note Insights 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

    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
    1
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Anoncreds 2.0 Data Models Data models can be encoded in human friendly text formats (json, yaml) and binary formats (cbor, bare). Unless otherwise noted, data types are encoded the same for both. Human friendly text formats are denoted as `text`. Binary formats are denoted as `bin`. ### Claim Schemas Properties: - **claim_type**(required): The type of data the claim represents. - Enumeration \[Hashed, Numeric, Scalar\] - String(text) - Unsigned Byte(bin) - **Hashed**: claim data is hashed before signing. - Properties: - **alg**(required): The hash algorithm that converts the claim data to a cryptographically signable value. - String(text) - Unsigned Byte(bin) - **Numeric**: claim data is zero centered before signing. - Properties: - **zero**(required): The value that represents zero. Used for zero centering to allow for negative numbers - Unsigned 64-bit Integer - **Scalar**: claim data is already a cryptographic value. Equivalent to a null hash. - **label**(required): Human friendly text label for the claim. - String - Must match the regular expression `^[a-zA-Z]\w*$`. - **human_friendly**(optional): Is the claim data human readable. - Boolean - `True` or `False` - Default: `True` - **validators**(optional): A list of validators the claim data must pass before signing is allowed. - List\[ClaimValidators\] ### Claim Validators Validators determine data validity in order to be signed. #### TODO: Add blindly signed claim validators Properties: - **type**(required): The claim validator type - Enumeration \[Length, Range, Regex, AnyOne\] - String(text) - Unsigned Byte(bin) - **Length** - Properties: - **min**(optional): The minimum length for the claim data. - Unsigned 64-bit Integer - Default: 0 - **max**(optional): The maximum length for the claim data. - Unsigned 64-bit Integer - Default: u64::MAX - **Range** - Properties: - **min**(optional): The minimum inclusive value for the claim data. - Signed 64-bit Integer - Default: i64::MIN - **max**(optional): The maximum inclusive value for the claim data. - Signed 64-bit Integer - Default: i64::MAX - **Regex** - Properties: - **pattern**(required): The regular expression the claim data must match. - String - **AnyOne** - Properties: - **values**(required): A list of expected claim values that the claim data must match. - List\[ClaimData\] ### Claim Data The type of claim data that can be signed Properties: - **type**(required): The claim data type - Enumeration: \[Hashed, Numeric, Scalar\] - **value**(required): The claim data - Hashed - String(text) - HexString or Base64UrlString(text but not human friendly) - List\[Byte\](bin) - Numeric - Signed 64-bit Integer - Scalar - HexString or Base64UrlString(text) - List\[Byte\](bin) ### Credential Schema A credential schema is composed of one or more ordered claim schemas and metadata surrounding it. Properties: - **label**(optional): Human friendly text label for the schema. - String - Must match the regular expression `^[a-zA-Z]\w*$`. - **description**(optional): A human friendly longer text description for the schema. - **blindly_signed_claims**(required): The claims allowed to be signed blindly - List\[String\] - The claim schema labels as entries - **claims**(required): The ordered list of claim schemas - List\[ClaimSchema\] ### Credential Definition A credential schema and the associated verification keys for the issuer. Properties: - **verifying_key**(required): The issuer's verifying key for validating signatures. - HexString or Base64UrlString(text) - List\[Byte\](bin) - **revocation_verifying_key**(required): The issuer's verifying key for checking revocation. - HexString or Base64UrlString(text) - List\[Byte\](bin) - **verifiable_encryption_key**(optional): The issuer's key for encrypting verifiable ciphertexts. - HexString or Base64UrlString(text) - List\[Byte\](bin) - **schema**(required): The credential schema associated with this definition - CredentialSchema - **revocation_registry**(required): The revocation registry information. ### Revocation Registry Depending on the use case, the revocation registry data model can come in different forms. This section only covers the privacy respecting version as implemented by accumulators. Properties: - **type**(required): - Enumeration: \[Accumulator, PKI, List\] - String - **value**(required): The accumulator digest value - HexString or Base64UrlString(text) - List\[Byte\](bin) ### Credential A credential represents the signed claims and cryptographic material bundled together. This design should map easily to W3C Verifiable Credentials Spec. Properties: - **claims**(required): - List\[ClaimData\] - **signature**(required): - Object - **revocation_handle**(optional): - Object For anonymous credentials a signature can look like the following #### CL Properties: - **type**(required): CL - String - **value**(required): - **a**: - String(text) - List\[Byte\](bin) - **e** - String(text) - List\[Byte\](bin) - **v** - String(text) - List\[Byte\](bin) #### PS Properties: - **type**(required): PS - String - **value**(required): - **s1**: - String(text) - List\[Byte\](bin) - **s2**: - String(text) - List\[Byte\](bin) ### Statements Statements are used to define what requirements a prover must satisfy and how. Each statement provides all the public information necessary to indicate to a prover how it is satisfied and computed. #### Signature Signature statements require a prover to demonstrate they possess a signature from a specific issuer. Depending on the signature type, it may or may not support selective disclosure and zero-knowledge signature proofs of knowledge. Properties: - **id**(required): The statement unique identifier. - String - **disclosed**(required): A list of claim labels found in the credential schema. These claims are revealed to the verifier in plain text. - List\[String\] - **issuer**: Object - Issuers Public Key - Revocation Information - Credential Schema #### Equality Equality statements are a zero-knowledge proof that proves claims across multiple signatures are the same without revealing them. Properties: - **id**(required): The statement unique identifier - **reference_statement_id_to_claim**(required): - List\[(String, List\[String\])\] - 1st: Statement Id - 2nd: Claim Label(s) #### Membership / Nonmembership This can be computed in two ways in zero-knowledge: Accumulators or R1CS. The result is a proof that demonstrates a value is in a set (or not) without revealing the set element. **Accumulator** based Properties - **id**(required): The statement unique identifier - **type**(required): - Enumeration: \[Membership, Nonmembership\] - String - **reference_signature_statement_id**(required): The signature statement to reference for the claim value - String - **claim_label**(required): The claim label from the signature statement to use for matching the claim value. - String - **accumulator**(required): The accumulator value - HexString or Base64UrlString(text) - List\[Byte\](bin) - **verification_key**(required): The accumulator verification key - HexString or Base64UrlString(text) - List\[Byte\](bin) - **parameters**(optional): Any other parameters that might be necessary - Object #### Commitment Proves two commitments hide the same value. For example, the first commitment might be a signature like CL, BBS+, or PS, and the other in stand alone commitment. The result is a proof that shows the same secret is equal in both. One use case is to attach a claim value to a Bulletproof which requires commitments as input instead of schnorr proofs. Properties: - **id**(required): The statement unique identifier - String - **reference_signature_statement_id**(required): The signature statement to reference for the claim value - String - **claim_label**(required): The claim label from the signature statement to use for matching the claim value. - String - **claim_generator**: The generator used for the claim value - HexString or Base64UrlString(text) - List\[Byte\](bin) - **randomizer_generator**: The generator used for the commitment randomizer - HexString or Base64UrlString(text) - List\[Byte\](bin) #### Verifiable Encryption Creates a verifiable ciphertext that proves the the ciphertext was done using a specified public key and the value encrypted is the same as in a commitment similar to the `Commitment` statement. Properties: - **id**(required): The statement unique identifier - String - **reference_signature_statement_id**(required): The signature statement to reference for the claim value - String - **claim_label**(required): The claim label from the signature statement to use for matching the claim value. - String - **claim_generator**: The generator used for the claim value - HexString or Base64UrlString(text) - List\[Byte\](bin) - **encryption_key**: The encryption key used to encrypt this verifiable ciphertext - HexString or Base64UrlString(text) - List\[Byte\](bin) #### Range Proves a claim value lies between a lower and upper bound. Here is an example done for Bulletproofs Properties: - **id**(required): The statement unique identifier - String - **reference_signature_statement_id**(required): The signature statement to reference for the claim value - String - **claim_label**(required): The claim label from the signature statement to use for matching the claim value. - String - **reference_commitment_statement_id**(required): The commitment statement to reference for the commitment value to be used by the circuit - String - **lower**(optional): The lower bound to test against if set - Number - **upper**(optional): The upper bound to test against if set - Number ### PresentationRequestSchema The collection of statements that must all be satisfied. Properties: - **statements**(required) - List\[Statement\] ### Proofs Proofs are cryptographic material that demonstrate zero-knowledge about known or hidden values. #### Signature Properties: - **id**(required): The statement id that this proof satisfies. - String - **disclosed_claims**(required): The disclosed claims - List\[ClaimData\] - **proof**(required): The signature proof of knowledge and hidden claims - HexString or Base64UrlString(text) - List\[Byte\](bin) ### Equality, Properties: - **id**(required): The statement id that this proof satisfies. - String ### SetMembership, Commitment, VerifiableEncryption, Range Properties: - **id**(required): The statement id that this proof satisfies. - String - **proof**(required): The cryptographic proof material - HexString or Base64UrlString(text) - List\[Byte\](bin) ### Presentation The collected proofs and data for a full presentation. Properties: - ****

    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