Daira Emma Hopwood
    • 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
    • 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
    • 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 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
  • 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
    # Notes on Namada's airdrop protocol ## Authentication issue In Zcash Sapling (and Orchard), spend authority is demonstrated by signing with a randomized key that is linked to the proof via the randomization factor $\alpha$. The proposed airdrop protocol does not do this, and so does not directly show that the claimant holds the relevant Sapling notes. In the case of Sapling, the holder of spend authority also knows a "proof authorizing key" $\mathsf{nsk}$. Under normal circumstances this would *only* be known by a holder of spend authority, but the separation between the actual spending key $\mathsf{ask}$ and the proof authorizing key $\mathsf{nsk}$ was intentional: it was designed to support use cases in which a more trusted device would hold $\mathsf{ask}$, with $\mathsf{nsk}$ being held by a more computationally powerful but less trusted device. > Although there was little deployment of this facility of the protocol, some prototypes were built (one by @str4d allowing proof delegation, and one demonstrated at Zcon3 for the Trezor hardware wallet). It is still intended to deploy hardware wallets using it in future. The effect of not authenticating by signature would be that for shielded funds held in a hardware wallet using this feature, the airdrop would be claimable *without* the user authorizing it on the hardware wallet, instead only requiring the keys from the host computer (or the party to which proofs are delegated). > We also considered whether there could also have been a security problem due to the way "extended child full viewing keys" [are derived from](https://zips.z.cash/zip-0032#deriving-a-child-extended-full-viewing-key) "extended parent full viewing keys" in [ZIP 32](https://zips.z.cash/zip-0032). We were concerned because the $I_{\mathsf{nsk}}$ value that relates parent and child keys can be computed just from the "extended parent *full viewing key*", not the "extended parent *spending key*". However, we've analysed this issue and determined that there is no such security problem when using the claim protocol with Sapling and ZIP 32: in particular, it is not possible to obtain $\mathsf{nsk}$ of the child key without having it for the parent key. ### Inapplicability to Orchard For Orchard, the key derivation was simplified so that there is no $\mathsf{nsk}$. This means that an Orchard counterpart of Namada's protocol would be insecure, because it does not bind to the spending key, and therefore a full viewing key would be sufficient information to make a claim. That would be a flaw because it is intended to be possible to give a full viewing key to an untrusted auditor. This issue is not fatal to the protocol's use with Sapling, but it would be preferable for the airdrop functionality (which is also potentially useful for other applications requiring proof of holding funds) to be applicable to both Sapling and Orchard. ## Trust model issues The airdrop protocol depends on sending the secret value $\mathsf{rcv^{Sapling}}$ for each note to the Namada wallet. If this value is intercepted, the intercepting party could claim the airdrop. Consider the situation of a Zcash user who is using Namada for the first time in order to claim their airdrop. They trust their Zcash wallet, but they might be vulnerable to social engineering attacks that result in them sending $\mathsf{rcv^{Sapling}}$ via a third-party "helper" who is actually trying to steal the airdropped funds. If the Zcash wallet could display the Namada destination address and create a claim that is only valid for that address, then such users would be much less vulnerable. They are assumed to already have a Zcash wallet which will show them the destination address via UI that they trust. The circuit on the Namada chain would enforce that the claim can only go to the destination address that is associated with it, i.e. the one that was displayed by the Zcash wallet. If this is considered a useful improvement, we recommend one of two approaches to implement it: 1. Require the Zcash wallet to create a signature specific to a Namada address. (This could also address the claim authentication issues in the previous sections, by doing claim authentication more similarly to spend authentication.) 2. Tie the Spend proof to a Namada address by making $\mathsf{rcv}$ a (randomized) commitment to the Namada address. This works because $\mathsf{cv}$ is a binding commitment to $\mathsf{v}$ even if $\mathsf{rcv}$ is known. (It is required to check that $\mathsf{rcv}$ is canonically encoded on the scalar field.) Using either of these approaches is inherently safer than the original protocol, because it's less dependent for claim authentication on the secure channel used to transfer $\mathsf{rcv}$. ## Wallet support issues The protocol requires every Zcash wallet for which the airdrop can be claimed to support it. * We have no intention of implementing new features of this complexity in zcashd. But, recovering from seed in a `zcash_client_backend`-based wallet would be sufficient if the latter supported the claim protocol. * The Zcash wallet does not need the nullifier set, but it needs the anchor at the airdrop height and enough information to reconstruct witnesses at that height. This probably requires rescanning. ECC does not have the capacity to implement the Zcash side of the claim protocol given other commitments. Namada would have to implement it for `zcash_client_backend` in a way that satisfies ECC's review policy for robustness and security. It would be preferable for this to be done in a way that could be generalized beyond this particular airdrop. ## Minor limitations The number of Sapling zatoshi needs to be a multiple of $V_{Sapling}$. ## Cofactor usage We have not analysed the use of the cofactor $\mathsf{h}_{\mathbb{J}}$ in the statement on the Namada side. In general cofactors introduce difficult-to-analyse hazards in cryptographic protocols. ## Privacy considerations for the Zcash wallet Creating a spend proof for a note reveals its nullifier (which, in this protocol, becomes effectively public as part of the airdrop's nullifier set). If is done naively then this would leak information that would link Zcash transactions. To mitigate this privacy leak, the Zcash wallet should inspect its past transactions, to determine the groupings for which the notes that were unspent at the airdrop height have been subsequently spent, i.e.: * $k$ sets of notes that remain unspent, split so that both Zcash and Namada transaction size constraints are met; * $n$ sets of notes, each previously spent within a single Zcash transaction. There will create $n+k$ Namada claim transactions, as well as $k$ Zcash transactions that explicitly spend all remaining unspent notes on the Zcash side (so that they don't get spent in a different way allowing linkage across future transactions). At the end of the process, none of the notes in the airdrop set remain unspent. The fee required to do this on the Zcash side is the fee required to spend all the unspent notes. ## Nitpicks * "the nullifier set associated with NoteCommit^Sapling at [the airdrop height]" should be "the nullifier set associated with the Sapling treestate at [the airdrop height]". * The information sent for each note needs to include the corresponding value $\mathsf{v^{Sapling}}$. * In the [Within the zcash wallet](https://github.com/anoma/namada-shielded-airdrop/blob/main/PROTOCOL.md#within-the-zcash-wallet) section, $\mathsf{vb^{Sapling}}$ should be $\mathcal{V}^{\mathsf{Sapling}}$. * "the MASP VP would have implemented inside a Sapling verifier" => "a MASP VP corresponding to the Sapling Spend proof needs to be used". ## Open questions * What if the Namada transactions are too large? * Will the claims on the Namada side be in the same transaction, or in one transaction per claimed Sapling note? * Is the airdrop time-limited?

    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