Oliver E. Anderson
  • NEW!
    NEW!  Connect Ideas Across Notes
    Save time and share insights. With Paragraph Citation, you can quote others’ work with source info built in. If someone cites your note, you’ll see a card showing where it’s used—bringing notes closer together.
    Got it
      • 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 No publishing access yet

        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.

        Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Explore these features while you wait
        Complete general settings
        Bookmark and like published notes
        Write a few more notes
        Complete general settings
        Write a few more notes
        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 New
      • Engagement control
      • Make a copy
      • 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 Note Insights Versions and GitHub Sync Sharing URL Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Engagement control Make a copy 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 No publishing access yet

    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.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    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
    2
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Considerations about Anonymous credentials # Introduction We give an overview of what we desire from an anonymous credential system, how the desired properties may be in contention with each other, and explore a few known anonymous credential systems discussing their strengths and weaknesses. ## Desired properties of an anonymous credentials system An anonymous credential system should ideally have the following properties: - **Unlinkable & Untraceable:** A verifier learns nothing about the credential holder other than the fact that they hold a valid credential. Furthermore the credential issuer should not know when a (particular) credential they issued is in use. - **Selective disclosure:** The credential may contain several attributes which a holder may disclose only a subset of. - **Predicates:** The holder may disclose that an attribute is less than, equal to, or greater than a specified value without revealing the attribute itself. - **Key binding:** The holder can prove that all of the presented credentials are bound to the same secret that is not known to anyone else. - **Revocability:** There is a way for an issuer to revoke a credential they issued. It should ideally be possible for a holder, a verifier (that the issuer trusts), or the issuer themselves to initiate this revocation process. The revocation mechanism should ideally preserve the privacy of all parties involved (holder, issuer and verifier). - **Interoperability:** It should be possible to issue credentials without having to commit to a particular SSI framework/implementation. - **(Optional identity on demand):** By collaborating with the issuer and/or a revocation authority it is possible to disclose the identity (or at least a recognizable pseudonym) of an (anonymous) credential holder. - **Privacy preserving for the verifier:** The verifier cannot be tracked by the credential issuer upon credential verification. - **Efficient proof generation:** The holder can efficiently compute proof of knowledge with the resources available to them (PC, smart phone, maybe even IoT device) - **Efficient verification:** The verifier can efficiently verify a proof of knowledge with the resources available to them (cluster, server, possibly a PC, smart phone or even IoT devivce). - **Efficient issuance:** Issuing a credential should be fast under realistic hardware constraints for the issuer (and the holder in case of an interactive process). - **Efficient revocation:** Revoking a credential should be a fast process for all parties involved. At a first glance the desire for the *key binding* and *identity on demand* properties may not be entirely clear hence we elaborate a bit more on these now. The *key binding* property is the privacy preserving equivalent of the `CredentialSubject["id"]` property in a standard (non-anonymous) verifiable credential. Normally when verifying a presentation we check that the holder corresponds to the subject on all the credentials in the presentation. Similarly when verifying an anonymous presentation one can prove in zero knowledge that all the anonymous credentials contained in the presentation are bound to the same key. This helps the verifier trust that the presenter is not aggregating credentials issued to different identities. The *identity on demand* property can be desirable if a user starts breaking the terms of use of a service they got access to by presenting anonymous credentials. Note that the entries in the list of desirable properties are not necessarily independent of each other and can be in contention. Selective disclosure should be seen as a privacy enhancing feature, rather than privacy guaranteeing. Revocation can be in conflict with the untraceable property especially if it requires holders and/or verifiers to go online. Finally using a signature scheme that easily supports predicates may lead to significantly less efficient proof generation. ## Zero knowledge signature schemes The anonymous credential systems in use typically rely on proving in zero knowledge that one has a signature on a hidden secret. The two signature schemes mostly discussed in the context of anonymous credentials within SSI are CL02 signatures and BBS+. ### CL02 This signature scheme was introduced in the paper "A signature scheme with efficient protocols" by Jan Camenisch and Anna Lysyanskaya. This is one of the first signature schemes to be used in the context of anonymous credentials in production. #### Properties - Compatible with selective disclosure - Compatible with key binding - Compatible with predicates #### Prior art - [IBM Idemix](https://abc4trust.eu/index.php?option=com_content&view=article&id=187) - [IRMA](https://petsymposium.org/2017/papers/hotpets/irma-hotpets.pdf) - [Hyperledger Indy](https://github.com/hyperledger/indy-hipe/blob/main/text/0109-anoncreds-protocol/README.md) - PoC by a research partner #### Standardization To the best of our knowledge there is no ongoing standardization effort to prescribe how such signatures are to be represented in a verifiable presentation. #### Performance indicators: Idemix (based on CL signatures): Presenting + Verifying a credential with five attributes in zero knowledge using 1024 bit key size takes around 120 ms in total (Intel Core i7 1.8 GHZ, 2 cores, L2 cache/core 256 KB, L3 cache 4 MB, memory 4 GB 1333MHZ DDR3, Mac OS X). This scales linearly with the number of credentials. Disclosing attributes is relatively cheap (just a few ms more per attribute). The effort distribution is about 55% for proving and 45% for verifying. See "Evaluation of Privacy-ABC Technologies - A Study on the Computational Efficiency" by "Fatbardh Veseli and Jetzabel Serna". This paper states that their experiment shows that doubling the key size decreases efficiency by a factor of four on average. IRMA (built around Idemix which is based on CL signatures): Presenting + Verifying with a credential with three attributes in zero knowledge using 4096 bit keys takes about 1.3 seconds (Intel Core i7-8650U CPU with 16 GB of RAM GNU/Linux) according to the paper "EL PASSO: Efficient and Lightweight Privacy-preserving Single Sign On" by Zhiyi Zhang, Michał Król, Alberto Sonnino, Lixia Zhang, and Etienne Rivière. The same paper also measures the performance using a Raspberry PI model 3b (RPI) with an A53 quad-core ARMv8 CPU and 1 GB of RAM. In this case Presenting + Verifying the same credential takes about 34 seconds. Cheapish smartphones and tablets frequently have SoCs (system on chip) containing between 4 and 8 A53-cortex processors thus we still expect proof CL-based proof generation and verification to both take seconds on many popular mobile devices. #### Technical implementation considerations Issuance of anonymous credentials based on CL02 signatures require prime generators and all other relevant operations such as proof generation and verification operate on large integers due to the RSA based nature of this signature scheme. There is limited support for big integers in the Rust ecosystem and finding something that is both portable (i.e. it can be compiled to Wasm) and reasonably performant may be a challenge. On the other hand we have a PoC in Python supplied by a research partner and [Hyperledger Ursa](https://github.com/hyperledger/ursa) has implemented many aspects of CL signatures in Rust that may possibly be adapted to be used in the Iota Identity framework. ### BBS+ signatures The BBS+ signature scheme (inspired by the BBS scheme due to Boneh et al.) was introduced in "Constant-size dynamic k-TAA" by Man Ho Au, Willy Susilo, and Yi Mu. Furthermore the paper "Anonymous Attestation Using the Strong Diffie Hellman Assumption Revisited" by Jan Camenisch , Manu Drijvers and Anja Lehmann introduced a more efficient way to prove knowledge of BBS+ signatures. Although this signature scheme does not directly support predicates and is therefore perhaps somewhat less flexible than CL02 signatures, it is known to be significantly more efficient. #### Prior art - [MATTR](https://github.com/mattrglobal/bbs-signatures) offers (currently experimental) selective disclosure utilizing BBS+ signatures backed by the [bbs crate](https://crates.io/crates/bbs) (from Hyperledger). - [Hyperledger Fabric is now using an implementation of Idemix with BBS+](https://hyperledger-fabric.readthedocs.io/en/release-1.3/idemix.html#underlying-cryptographic-protocols) #### Properties - Compatible with selective disclosure - Compatible with key binding - Does NOT directly support predicates - More efficient than CL02 To overcome the lack of (direct) support for predicates issuers may issue credentials with ambiguous fields such as for instance "older than 18 years". #### Standardization The Credentials Community Group at the W3C is currently working on the [BBS+ Signatures 2020 specification](https://w3c-ccg.github.io/ldp-bbs2020/) which utilizes BBS+ signatures to describes how to derive proofs of possession of anonymous credentials with support for selective disclosure. Moreover [this post](https://www.evernym.com/blog/bbs-verifiable-credentials/) advocates for it to be adopted universally by SSI implementers. On the other hand the aforementioned blog post also points out that there is still work left to be done at this point. Perhaps most importantly one has yet to decide on a privacy preserving revocation strategy. #### Technical implementation considerations We could consider using the [bbs crate](https://crates.io/crates/bbs), but this crate is not yet stable and has to the best of our knowledge not received an audit yet. ## Revocation schemes for Anonymous credentials The article "Scalable Revocation Scheme for Anonymous Credentials Based on n-times Unlinkable Proofs" explains nicely the different categories of revocation schemes available for anonymous credentials with different pros and cons. Let us quickly consider a few of these here: ### Credential identifiers/revocation list Each issued credential has a unique identifier that has to be disclosed. The verifier checks whether this identifier has been added to the issuer/revocation authorities revocation list. This is a simple approach, but it has the downside that the holders transactions then become linkable. #### Prior art - Microsoft U-Prove (TODO: Link citation) - WIP for standard credentials in IOTA Identity (https://github.com/iotaledger/identity.rs/pull/861) ### Credentials with lifetimes The issuer issues credentials that are valid for a short period of time which requires the user to frequently renew their credential with the issuing authority which is in contention with the system being untraceable and unlinkable. This also has the downside that revocation cannot instantaneously take place, but most revocation schemes suffer from this problem. #### Prior art - Some implementations of IBM Idemix (TODO: Add citation). - The solution presented by a research partner offers this kind of revocation. Note that their proposed solution does not require the entire credential to be issued again, one just updates a single attribute. The technical paper we received mmentions that the issuer could alternatively publish updates to the ledger (presumably by updating their DID Document?), but the message size on ledgers are typically rather small (32KB max for the Tangle) hence this alternative way will most likely not be suitable when there are thousands of credential holders. ### Cryptographic accumulators A user proves efficiently in zero knowledge that they are part of an encrypted set of valid users. The downside here is that if any user gets revoked then the accumulator must be recomputed and also a witness per valid user which requires provers to go online to update their witness. A witness file will typically be too large to be stored on-chain. #### Prior art - Hyperledger Indy Anonymous credential revocation: Uses the [CKS accumulator](https://eprint.iacr.org/2008/539.pdf). This scheme has much faster witness updates than other accumulators (see "Performance Analysis of Accumulator-based Revocation Mechanisms" by Jorn Lapon, Markulf Kohlweiss, Bart Decker and Vincent Naessens). On the other hand the size of the public key is linear in the maximum number of values that can be accumulated. Although most protocols do not need the state information contained in the public key, it is necessary for witness updates. Hence in the case of massive deployments witness updates will require special purpose servers. Hyperledger Indy uses Tails files to accommodate for witness updates. See [the explanations in the bcgov/indy-tails-server repository](https://github.com/bcgov/indy-tails-server) and [the RFC here](https://github.com/hyperledger/indy-hipe/tree/main/text/0011-cred-revocation) for further explanations. Note the former of the two aforementioned resources mentions that with a revocation registry size of 32768 (the maximum number of accumulated values) proof generation takes about 7 seconds using the Lissi-Wallet on an iPhone 12 pro. ### Revocation list of private keys This approach is similar to the Credential identifiers approach, except that instead of using an identifier the credential contains an additional field with a private key/revocation handle (known by the issuer (TODO: in all implementations?)) which is never disclosed in an open form (utilizing zero knowledge proofs). When the credential gets revoked this private key gets added to a list which all verifiers have access to and verifiers can check in `O(Number of revoked credentials)` time whether the credential they are presented is revoked. The downside to this approach is that if a credential gets revoked, then all past and future uses of this credential becomes linkable. A somewhat oversimplified explanation of how this works is that verifiers have a one way function which they place each entry of the list of revoked keys into and see if the result matches the proof they were sent from the holder. ### N-times unlinkable proofs: This can be thought of as something in between the cryptographic accumulator and lifetime approach. A benefit over the lifetime approach is that in this case the user does not need to renew their credentials if they are not revoked. The user is also not required to recompute a witness in contrast to the cryptographic accumulator approach and can stay completely offline after receiving their credential. The verifier will however need to go online and fetch an encrypted revocation set each epoch. The size of this revocation set scales linearly with the number of revoked users and is up to 7.5 MB in the case of 10'000 revoked users, hence it can unfortunately not be stored on-chain. Furthermore the N-times unlinkable proofs offers identity on demand, as well as issuer, verifier and user driven revocation. Another interesting property is that the user may only anonymize themselves N-times per epoch which could be seen as a feature or a bug depending on the application. The implementation by Camenisch et al. uses weak Boneh-Boyen signatures, but they mention that it also works with other signature schemes. Note the various trade offs involved with the different revocation schemes. Either the holder's transactions become linkable, or the issuer needs to frequently reissue credentials, or some encrypted revocation set needs to be fetched by either the user or verifier. If the issuer/revocation authority needs to be contacted by either the prover or verifier then this can have privacy implications as the issuer/revocation authority may decide to store ip addresses. Hence we need to decide on which trade offs we want in order to implement revocation.

    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
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    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