Client-Side Proving R&D
      • 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 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
    • 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 Help
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
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 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
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Private AA and Client-Side Proving ## Introduction In [this tweet](https://x.com/VitalikButerin/status/1992115191278964752) Vitalik Buterin describes a vision of using an Ethereum account for "private account abstraction" (or "private AA" further on). Currently, both privacy and account abstraction can already be achieved on Ethereum, but only a few projects try to combine them. However, the key point in the original tweet is the ability to control the private AA account using an existing Ethereum account. Why is this important and what are the challenges? *Short answer: Ethereum-controlled private AA allows to reuse the existing signing infrastructure (from browser wallets to multisigs and hardware wallets), but ZK-enabled privacy doesn't go well with the cryptography of Ethereum signing.* Ethereum is using ECDSA over secp256k1 curve for signing which is not ZK-friendly. > [!Warning] This is not about ERC-4337/ERC-7702 > The term account abstraction here is used in its most general meaning, which is controlling the actual transacting account indirectly (and in this particular case by means of another Ethereum account). ## Why signing is important? In a typical "private pool" you control your funds with a private key [that is "exotic" to Ethereum](https://ethereum-magicians.org/t/thoughts-on-privacy-adoption-via-shielded-pools/26559/2), but is ZK-friendly. The problems with that are the following: - you need to manage that key alongside with your existing Ethereum private key; - even if you don't mind the former, you won't be able to re-use the existing signing infrastructure (software/hardware wallets, multisigs) to manage that key. ## What would change if the controlling key was an Ethereum key? Let's consider a simple example of you trying to swap on Uniswap. Let's first take a look at the case when you're using your EOA directly: ### Using conventional EOA ```mermaid sequenceDiagram participant U as User participant D as Uniswap UI participant W as Wallet (EOA) participant C as Uniswap Pool U->>D: choose swap D->>W: eth_sendTransaction W->>U: show tx details U-->>W: approve tx W->>W: sign tx (ECDSA) W->>C: send signed tx C-->>D: transaction receipt D-->>U: show result ``` You are signing the transaction with you Ethereum key - as intended by the system, but without any privacy. However, you can use any wallet to do that, including multisigs and hardware wallet. ### Using "conventional" private pools Imagine you wanted to use your private (shielded) funds to conduct a swap. Why do most of the existing private pools don't have it, and only a few have it built-in in a special section of their UI? Because you cannot "connect your private pool" to Uniswap in a similar way you "connect" your EVM wallet. As in the normal tx (diagram above), at some point the transacting account would have to sign the transaction. To transact on behalf of a private pool, you would need to authorize the spending with your *exotic private pool key* - this cannot happen in your EVM wallet. If this is happening somewhere else, it becomes an extra attack vector: are you sure you are really signing this EVM transaction, or a malicious UI has modified it? will a 3rd party implement a wallet you can trust for signing with exotic keys? - probably no because it's privatepool-specific. Will a 3rd party implement a hardware wallet for signing and managing the exotic private pool key? - even less likely. Even if we don't view it as an attack surface, manual key management is simply a big UX disadvantage - where do you store the exotic private pool key? Why can't you do everything with a single EVM key instead of requiring both the EVM key and the exotic pool key? ### Using a private AA wallet controlled by an EVM key Consider a private AA wallet built on top of a privacy pool. A potential architecture of such pool+wallet is described [here](https://ethresear.ch/t/smart-contract-or-eoa-spend-authority-for-private-accounts/23422). Let's see what the swap would look like when using such system: ```mermaid sequenceDiagram participant U as User participant D as Uniswap UI participant PW as Private Wallet participant P as Prover participant R as Relayer participant PA as PrivateAA participant C as Uniswap Pool U->>D: choose swap D->>PW: provide swap params PW->>U: request EIP-712 signature U-->>PW: sign authorization PW->>P: send auth and params P-->>PW: return zk proof PW->>R: prepare tx for PrivateAA R->>PA: call swap(proof) PA->>C: call Uniswap swap C-->>PA: swap executed PA-->>R: tx success R-->>PW: included PW-->>U: show private result ``` > *TODO worth unpacking the architecture from https://ethresear.ch/t/smart-contract-or-eoa-spend-authority-for-private-accounts/23422, but with accent on client-side proving and on the approach of deriving the proving key from the EVM key* When you hit "Swap", Uniswap sends an EIP-712 intent payload to your browser. Instead of signing it with your EOA (as in the first diagram), your private-AA middleware would intercept it and ask you to sign a [SpendAuthorization message](https://ethresear.ch/t/smart-contract-or-eoa-spend-authority-for-private-accounts/23422) for the private-AA pool using a standard EVM signature - you can do it with any existing wallet, including multisigs and hardware wallets. This signature is never broadcast; it is used inside a ZK proof to show that your EVM account privately authorized this exact action. Next, the private-AA middleware generates a ZK proof that: - you own sufficient private notes, - the SpendAuthorization hash is committed in the PrivateAA Merkle tree, - the signature is valid (without revealing your address), - the calldata matches the authorization, - nullifiers prevent double-spending. The proof is sent to a relayer, which submits an Ethereum transaction to the PrivateAA contract. PrivateAA contract verifies the proof and executes the Uniswap swap on-chain on your behalf. The result is a full Uniswap swap with normal UX ("connect wallet -> sign -> swap") - check out [this Bermuda demo](https://x.com/bermudabayzk/status/1992288803982110746?s=20). ## Off-Chain App Interaction Imagine an offchain app (Zupass, a forum, a chatroom, a DEX offchain matcher, etc.) 1. App sends an "authorization challenge" ``` op = { domain: app.example.com, action: "login", timestamp: 2025-01-01, nonce: 123, } ``` 2. PrivateAA wallet signs this challenge with EVM control key (This signature stays private.) 3. Wallet generates a ZK proof of: - "I have a valid SpendAuthorization for this challenge" - "Signed by a valid Ethereum account" Without revealing the account 4. App verifies proof. The app now knows: - "This user controls some Ethereum account" - "This account authorized this login" - "I don’t know which one” - "I can’t link this login to any other login unless the user wants that" This transforms your Ethereum key into a private, non-linkable root-of-trust for offchain auth. ```mermaid sequenceDiagram participant U as User participant A as Offchain App participant PW as Private Wallet participant P as Prover A->>PW: send challenge {domain, action, timestamp, nonce} PW->>U: display login request U-->>PW: approve (EIP-712 signature via PW) PW->>P: generate ZK proof (auth bound to challenge) P-->>PW: return zk proof PW-->>A: submit zk proof A->>A: verify proof (authorize user) ``` ## What about client-side proving? According to our benchmarks, performant ECDSA proving is possible on the client-side today [in sub-seconds (e.g., with Barretenberg)](https://ethproofs.org/csp-benchmarks), to the contrary of ~10 minutes that [some researchers are stating](https://ethereum-magicians.org/t/thoughts-on-privacy-adoption-via-shielded-pools/26559). Therefore, building private AA wallets controlled by an EVM account is feasible today. ## References - https://ethereum-magicians.org/t/thoughts-on-privacy-adoption-via-shielded-pools/26559 - https://ethresear.ch/t/smart-contract-or-eoa-spend-authority-for-private-accounts/23422

    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