arnaucube
    • 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 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

    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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Anonymous voting in the Vochain without trusted-setup <span style="float:right;font-style:italic;">[AragonZKResearch](https://research.aragon.org), 2022-09-09</span> <br> Note: this document does not focus in the cryptographic neither in the mathematical perspective, it focuses in the engineering perspective. ## Preliminaries zkSNARK proving schemas: - **Cheap-to-verify-in-EVM with TrustedSetup**: Circom uses [Groth16](https://eprint.iacr.org/2016/260.pdf), its benefits is that the proofs are small and cheap to verify in Ethereum, but it needs circuit-specifc trusted-setup. - **Not-so-cheap-to-verify-in-EVM with UniversalTrustedSetup**: Other proving systems such as [Plonk](https://eprint.iacr.org/2019/953.pdf) and original [Marlin](https://eprint.iacr.org/2019/1047.pdf) do not need circuit-specific trusted-setup, but an *universal* trusted-setup (one TS that can be reused among different circuits). The proofs are a big bigger and expensier to verify in Ethereum (compared to Groth16), but still acceptable. - **Not-verifiable-in-EVM without TrustedSetup**: Other proving systems such as [Bulletproofs](https://eprint.iacr.org/2017/1066.pdf) and [Halo](https://eprint.iacr.org/2019/1021.pdf) do not require trusted-setup. Additionally, Marlin can be used with the IPA commitment scheme, which makes it not require neither a trusted-setup. The proofs are bigger and not fitting to be verified in Ethereum. ## Current approach - [Vochain](https://docs.vocdoni.io/architecture/services/vochain.html) uses data structures compatible with *circomlib* - (eg. concrete Poseidon for hashing, concrete MerkleTree for census, concrete BabyJubJub EdDSA for signing) - Use of Circom for the Groth16 zkSNARK proof generation - Requires circuit-specific Trusted Setup <div class="c-row"> <div class="c-column"> #### Pros: - Full solution already implemented in the Vochain - The cryptographic primitives have Go lang implementations (poseidon, babyjubjub, merkletree, etc) integrated in the Vochain Go code </div> <div class="c-column"> #### Cons: - Needs circuit-specific Trusted Setup </div> </div> <br> Current anonymous voting *circom* circuit impl: [vocdoni/zk-franchise-proof-circuit](https://github.com/vocdoni/zk-franchise-proof-circuit) ## Possibility to remove Trusted Setup **Motivation**: As in the Vochain there are not the EVM limitations of the Ethereum-chain, the Vochain zkSNARK proofs are not *limited* to Groth16 (with Trusted Setup), and other schemas could be used (which can not be used in the EVM) that would allow to remove the need of a trusted-setup. - Instead of Circom & Circomlib, use the [arkworks](https://arkworks.rs) stack - Removing the need for Trusted Setup: - In arkworks you can use the same circuits with Groth16, Marlin, etc. - Marlin uses a commitment scheme for the proofs, for example KZG10, which requires only *Universal Trusted Setup* (not circuit-specific, like in Plonk) - Furthermore, Marlin can be used instead of with KZG10, with IPA commitment scheme (the commitment scheme used by ZCash in the future version) - IPA does not need Trusted Setup (but too expensive to verify in Ethereum, but viable in the Vochain) $\Longrightarrow$ With this approach, the Vochain could use Marlin+IPA for anonymous voting inside the Vochain (without Trusted Setup), and then Groth16 for binding Vochain results into Ethereum-chain EVM contract (with Trusted Setup). <div class="c-row"> <div class="c-column"> #### Pros: - Flexibility to use it without Trusted Setup - The same data structures & arkworks code can be used in the Vochain with Marlin+IPA (no trusted setup, but expensive to verify inside ethereum), and also can be used in the Ethereum chain with Groth16 (trusted setup, but cheap to verify inside ethereum) </div> <div class="c-column"> #### Cons: - Vochain data structures are not currently compatible with the arkworks cryptographic primitives (poseidon, ellipticcurve, merkletree, etc) - Two options: A) Vochain data structures are migrated to arkworks compatible B) Implement in arkworks data structures compatible with circomlib (the ones currently used in the Vochain) </div> </div> <br> Anonymous voting *arkworks* circuit & library impl: [aragonzkresearch/ark-anon-vote](https://github.com/aragonzkresearch/ark-anon-vote) ## Circuit impl - Current anonymous voting ***circom*** circuit impl: [github.com/vocdoni/zk-franchise-proof-circuit](https://github.com/vocdoni/zk-franchise-proof-circuit) - Works only with Groth16 (and naive Plonk) - Can be verified in Ethereum & Vochain needing TrustedSetup - New anonymous voting ***arkworks*** circuit & library impl: [github.com/aragonzkresearch/ark-anon-vote](https://github.com/aragonzkresearch/ark-anon-vote) - Can be used with Groth16, Marlin+KZG10, Marlin+IPA, and others. - Can be verified in Ethereum needing TrustedSetup, and in the Vochain without TrustedSetup ## Conclusion This document is not made with the intention to push for a specific approach, but to present a way to have Vochain anonymous voting without trusted setup, while presenting the context and the different benefits and tradeoffs of the mentioned approaches. There might be a 3rd approach that might work also, which would be keep compiling the circuits with `circom` and then using `ark-circom` try to use it in `arkworks` thus being able to use the different zkSNARK proving systems available in arkworks. In this way we could still the current Poseidon hash, babyjubjub keys & merkletree from circomlib (the ones currently being used in the Vochain, but generating the proofs with arkworks and using Marlin+IPA thus no trusted-setup. But is not clear yet if it might be possible or not. <style> .c-row{ background:#f0f0f0; } .c-row:after { content: ""; display: table; clear: both; } .c-column { float: left; width: 50%; padding: 10px; } /* CSS hack to add section numbers to titles, starting from h2.*/ /* Titles numbers */ .markdown-body h1 {counter-reset: h2} .markdown-body h2 {counter-reset: h3} .markdown-body h3 {counter-reset: h4} .markdown-body h2:before {counter-increment: h2; content: counter(h2) ". "} .markdown-body h3:before {counter-increment: h3; content: counter(h2) "." counter(h3) ". "} .markdown-body h2.nocount:before, .markdown-body h3.nocount:before { markdown-body: ""; counter-increment: none } .markdown-body h1:before, .markdown-body h2:before, .markdown-body h3:before { color: #737373!important; } /* TOC numbers */ .toc ul li ul { counter-reset: section; list-style-type: none; } .toc ul li ul li::before { color: #919191!important; counter-increment: section; content: counters(section, ".") " "; } </style>

    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