Stephen Curran
    • 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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # A Practical Implementation of ALLOSAUR Revocation That Might Be Privacy Preserving This document outlines a proposed "practical" implementation of the [ALLOSAUR](https://eprint.iacr.org/2022/1362) verifiable credential (VC) revocation scheme based on cryptographic accumulators for scaled use cases. "Practical" in this context means that is manageable from a deployment and governance perspective, and sufficiently performant for all participants. We then consider the privacy characteristics of the design -- what do the participants learn about one another in processing the data? The goal is to determine if there is sufficient unlinkability and privacy in the approach. Is the approach practical and safe? ## \<tl;dr\> For those with a knowledge of VCs, revocation, and the use of cryptographic accumulators, here is a quick summary of the idea, and participants and a diagram of the flow: ![Revocation Participants and Data Flow](https://www.plantuml.com/plantuml/img/VPFVJi8m58VlznGdU3CIUO5fJ0mgcYWXu9-RtfJj08tRAVQq46DyTxkrZ87etTB--frpldQvhjQQa2myC3iqy9K0a2uGUg_3kDO3oQ2OsvqfRdGkhT8aw4cINCQCmGsSFQhboeuC8hNvYPkNAXVKFJV5fM9hFWNTI2lXJfN8lNtrwpntbIkbrOPhjCppK-WzaMC3V13xJfhOlIuBFvjFh9gliDfxKvQGMT0CpIREi7Nh0q9qWKOjL8puQ99u7p0ON4LW5bG9IaDIpak4eS72crMoF1VKQHLkIwpyHh-1NDOKttXMvwN5HfEt8nf9rXdYJ537XuSzgmhPocfzHAXhl7SB-zdIM8tx7UB5_yG8v0oQg-DLZ9SknaEXGj0EVXBXB-rFmZxjTOOHTYed1japWwifVZWVFBG1Oqs3Zj29qNeXI5huXGrDZD0UJ7oK3PL35_u1PF2oBlnLGFj0qg4pflvBuWhCLj8KAVVhcztjjRp-KRSd3ernswbVFxgwr-3ykDckhLFka-G7) - The issuer issues credentials that reference a revocation registry (a URL resolving to a couple of data files), and includes for the holder a unique revocation element (a GUID) their current witness, and the timestamp of that witness. - The holder gets a wallet from a wallet vendor. - The wallet vendor (or other parties) operate Witness Servers, purpose built for this scheme that allow holders to get regular updates to their revocation witnesses. The holders get updates regularly, ideally **NOT** at the time they create a verification for presentation. Further, the holder **MAY** update their witness independent of the witness server. - The issuer publishes files that include batches of revocations with a given accumulator and timestamp. One of the files lists all of the elements (GUIDs) of the revoked credentials in each batch. - Holders request that a Witness Server(s) update their witnesses, providing the RevRegId and witness for each witness to be updated. This is not a one time request-response, but an ongoing activity by the WS to keep all of the witnesses for all holders update across multiple batches. - A Witness Server monitors all of the Revocation Registries for all of its client holders, retrieves the batches of revocations for each, and updates each of the witnesses. - Periodically, such as in the background or on app startup, the holder requests from the Witness Server all of their updated witnesses. The goal is to separate getting updated witnesses from the generation of a proof using those witnesses. - On request from a verifier, the holder uses their updated witnesses to generate a non-revocation proof as part of a verifiable presentation. - This assumes that their on-hand updated witness is "fresh enough" for the verifier. If not, at presentation time the holder could retrieve the data needed to update the witness themselves (no Witness Server involvement), or could get another update from the Witness Server. The remainder of this document describes in greater detail the approach, participants, data models, and flow. ## The Cryptography The revocation scheme is based on the use of Accumulators, as first described in [Nyugen (2005)](https://link.springer.com/chapter/10.1007/978-3-540-30574-3_19). The layman's description of the process, without getting into the math, is as follows: - The issuer generates a private key for a revocation registry (RevReg), and as it issues VCs, it includes in each credential an element, and a resolvable identifier for the RevReg. The RevReg includes the information needed for all holders to generate non-revocation proofs about their VC. - Peridocially, the issuer revokes a batch (1 or more) of VCs. To do so, it calculates a new accumulator (using its private key) to include the elements of the newly revoked VCs, and publishes an update to the published RevReg. - To prove their (unrevoked) VC is not revoked at a given point in time, the holder must get a list of all revoked elements and generate from those a `witness` (a number) for their VC. Given their element and witness, the holder can generate a proof that their credential is not revoked without sharing either their element or witness. - The verifier gets the accumulator for the point in time used by the holder, and uses the accumulator and public key to verify the proof from the holder. The challenging part of this process is the calculation of the holder's witness. For a sufficiently scaled use case (millions of credentials with many revocations), the calculation of a witness is beyond the capabilities of a mobile wallet. When the issuer publishes the accumulator and list of elements of newly revoked credentials, holders using that accumulator must update their witness based on all the revocation elements since their last witness update. If that list is large, the calculation could take a long time -- many seconds to minutes -- on a mobile phone. As such, ALLOSAUR proposes the use of a "Witness Service" (WS in this article) to do the witness calculations on behalf of the holder. The Holder provides the WS with their witness and the timestamp it was last updated, and the WS returns a new witness and timestamp based on the revocations done between the two timestamps. ## ALLOSAUR Features ALLOSAUR defines key two enhancements to the core approach, one for security, and one for privacy. For security, the private key used for a Revocation Registry can be generated and used by multi-parties using a multi-party computation (MPC). That way, no individual holds the private key, and multiple parties must be compromised to get the key. For privacy, the ALLOSAUR WS can be implemented such that instead of the holder giving its entire witness, it shards the witness and makes a set of calls to one or more WS instances, passing to each a shard and its last update timestamp. The holder receives back a set of responses (shard of new witness and timestamp) and from those, can assemble a new witness at a new timestamp. In this article, we are neutral on whether the security feature is used (irrelevant for the discussion) and only consider the case of **not** using the privacy feature. The use of the privacy features changes the timing and flow of the process, and so requires a significant recalculation of the process. ## A Practical Unlinkable Revocation Scheme The proposed design is summarized in the earlier diagram that shows a single instance of each participant. ### The Participants - There are many VC Issuers. - A VC Issuer may issue 1 or more types of VCs. - Each type of VC issued by a VC issuer may have 0 or more revocation registries. If the population is sufficiently large (many million) with a sufficiently high revocation rate, a Issuer may choose to have multiple RevRegs for that type of VC. - There are many Holders. - Holders hold many revocable (and non-revocable) credentials. - A holder may have the ability to update a witness themselves, and in some cases can (and should) do so instead of calling a WS. - There can be many Witness Servers (WS) - A WS may handle many witnesses for a set of holders. - A holder should use one WS for all their witnesses, but they could use several WS's. - The most likely operator of a WS is a wallet vendor, since they (in theory) are already "entrusted" with lots of credentials (and embedded attributes) about the holder. - Others could operate WS instances, and holders could even self-host their WS. ### Details of the Process #### Issuer Details The issuer creates a RevReg as needed, and publishes it as two data files (`revocations` and `accumulators`). The RevReg identifier is resolvable to the location of the RevReg files. Both files grow over time, as the issuer revokes batches of credentials. The formats of the two files are defined below. In creating a RevReg, the Issuer generates a key pair. The public key will go into the `accumulators` file as the first record in the file. The issuer must interact with the Revocation Manager (which it will likely operate) as follows: - Create the RevReg -- including defining it's location, initial parameters. The Revocation Manager generates a keypair for the RevReg and returns the public key to the Issuer, and the initial timestamp and accumulator for the RevReg. - Register a batch of credentials to be issued. Each credential is represented as a GUID (16-byte string) from which the credential element is generated. The Revocation Manager calculates and returns for each the Witness for the element. Calculating the witness requires access to the private key for the RevReg. GUID and corresponding witness to the holder. - The credentials from the batch are issued as new credentials are created. The issuer requests more credentials periodically (up to the planned size of the entire RevReg) to make sure they don't run out of credentials to issue. - Revoke a batch of credentials. The GUID for each revoked credential is passed in by the Issuer, and the Revocation Manager calculates a `delta` for each revoked credential, returning the batch of deltas, the timestamp, and new accumulator at that timestamp. - Each delta is 48 bytes long, and is base64 encoded into a string 64 characters long. On issueance of a credential to a holder, the issuer includes in the issued VC the revocation GUID for the credential, plus the calculated witness and its corresponding timestamp. The `accumulators` file contains: - an initial record with metadata about the revocation registry, including at least the public key of the RevReg (e.g. `{ "pk" : "<mulitkey public key>" }`). - Likely additional fields will be defined and included -- such as the expected frequency of batch revocations and perhaps the expected average revocation batch sizes. Such information is useful to the Witness Servers in determing how often to check for updates to the registry, and for the verifier requesting sufficiently fresh non-revocation proofs. - additional records each containing the timestamp (`ts`) for the batch (matching the batch's`ts` value in the `revocations` file), the number of revoked credentials in the batch, and the accumulator for that batch. The `accumulators` file is needed by the verifier to verify the presentations from holders whose credentials are in the RevReg. ```json { "ts": "<timestamp>", "metadata": [ "ver" : "1.0", "pk" : "<multikey>" ], "accumulator": "<base64 accum>" } ``` The `revocations` file contains a record for each batch (1 or more) credential revocations. Each record contains the timestamp (`ts`) of the batch, and an array containing the GUIDs and`deltas` from the credentials revoked in this batch. Each `guid` is 16 characters, then a literal `-`, and each delta is a 64-character base64 value, for a total of 65 bytes per revoked credential. ```json { "ts": <timestamp>, "revoked": [ "<guid>-<delta>", "<guid>-<delta>", ... ] } ``` The `revocations` file is used to update holder witnesses, either by the holders themselves, or by Witness Servers. The revocations file **might** also have a specially defined signal to indicate that **all** of the credentials in the Revocation Registry have been revoked. That can be accomplished by an update to the accumulator such that all non-revocation proofs fail to verify, but an indicator in the `revocations` file would notify all of the holders of the situation without each having to check to see if their proof could be verified. A record for a new batch is appended to the end of the two data files, using [JSON Lines](https://jsonlines.org). An interesting optimization is that instead of using time-based (using Unix Time) timestamps, the value of `ts` could be the length of the `revocations` file at the end of the current record. Given such a "timestamp", a witness updater could make an HTTP request to retrieve the file starting from the next record to the end of the file, reducing the transmitted data. We'll see where that might come into play shortly. #### Holder Details The holder retrieves an issued VC from the issuer. In addition to storing the VC, the holder stores the RevReg data it needs: - The RevReg ID. - Their RevReg GUID from which can be derived their Revocation element. - Their current witness. - The `ts` associated with their current witness. When presenting a revokable credential, the holder must have a witness for a sufficiently recent (ideally, the most recent) batch of revocations. Ideally, the verifier will tell the holder how fresh their proof of non-revocation must be based on the business case. We'll get to how the holder stays up to date with its witness later. #### Verifier Details The verifier sends a presentation request to the holder. The verifier may or may specify what specific credential (type and/or issuer) they will accept, and may or may not know what RevReg the holder will need to use. The verifier may not even know if a holder will respond with credentials that are revokable, non-revokable or a combination of both. Ideally, the verifier provides an indicator of how fresh any non-revocation proofs need be. Only the most mission critical use cases should need "up to the minute" revocation proofs, and the more lenient the verifier can be, the better for all. For example, a week would be ideal. #### Witness Server Details A Witness Server (WS) serves one more holders, each of whom may be in one or more RevRegs. We propose that the WS be designed to continually monitor all of the RevRegs asked for by its holder clients, and update the witnesses for those clients. This might work as follows: - A holder requests that the WS update its witnesses, getting back a token for future identity. - At the same time or later, the holder can request that the WS update one or more witnesses, providing for each the RevRegID and the holder's most recent timestamp and witness. Over time, the holder can request other witnesses be monitored. - The WS updates each new witness to the latest batch it has for that RevReg (if any). - Peridocially, the holder requests updates to its witnesses. The WS responds with the list of monitored RevRegs and for each, the new witness and timestamp for the holder. The WS updates all the of the witnesses for all of its holders. It does something like: - For each RevReg it knows about, retrieve all batches it has not previously processed from the RevReg (if any). - Record the timestamp of the latest batch. - For each witness within that RevReg, update the witness and the timestamp using the set of deltas in the batches not previously processed. ### Holder - Witness Server Interactions As part of the installation process of a holder's wallet, it would request the services of one or more WSs. It might want to use several Witness Servers so that each only knows about some of the credentials it holds. That said, the use of multiple WS might create UX challenges. On receiving a revokable credential, a holder would decide if and which WS will be used to update its witness. - It could check the metadata of the RevReg (from the `defintion`) and learn that the rate of revocations is low enough that it doesn't need the services of a WS for that credential. - If a WS is needed, it sends a request to a WS to monitor and update its witness for that credential. Periodically, it updates its witnesses.

    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