bc-bizdev
      • 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

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

    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
    1
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- robots: noindex, nofollow --- # SmartCustody for Ethereum ###### tags: `article / in process` This proposal offers a methodology for adopting aspects of Blockchain Commons' Smart Custody to improve the security of Ethereum wallets. ## Problem Statement Ethereum accounts are typically controlled by a single private key. They come in two types. EOAs (Externally Owned Accounts) use traditional key pairs: the account is defined by an address derived from a single public key, and the related private key gives full access to the account. EOAs form the majority of Ethereum accounts. Contract accounts have public addresses that are indistinguishable from those of EOAs, but instead of being controlled by a key, they are controlled by a smart contract. A contract account may or may not have an associated private key used to control the contract, but if it does, it is usually a single private key (the gnosis multiple signature smart contract being an obvious exception). The problem with this setup is that having a single private key to control everything means that you probably have a Single Point of Failure (unless you take individual actions to improve the resilience of your key) and you definitely have a Single Point of Compromise: if someone steals your key, they have access to everything. Even beyond these technological limitations, there isn't much attention paid to the _idea_ of Smart Custody on the Ethereum network. Your single Ethereum account will typically contain your Ethereum assets and your token assets (such as NFTs), your single sign-on authentication for services, and may even be what you use to control Contract Accounts! One theft, and you lose everything. Meanwhile, contract accounts can create problems all their own, since their authentication is usually algorithmic (e.g., looking up a key on a list) rather than cryptographic (e.g. an ECDH or Schorr operation). This has proven a prime vector for attacks, resulting in huge losses. > [@ChristopherA]These are a class of problems sometimes called ["Ambient Authority"](https://en.wikipedia.org/wiki/Ambient_authority) and there exist solutions to address them, such as limiting scope of keys (DIDs), single use keys (Bitcoin), etc. However, these solutions are not part of the current Ethereum wallet architecture. Overall, Ethereum needs better models for security and for key resilience. This proposal suggests a starting place. > TBD, integrate any other adversaries of note from #SC for NFTs https://hackmd.io/CcGwhpVVTXi4nX_MzGZtnQ ## Basic Proposal The first step for improving the resilience of Ethereum keys is to replicate a successful methodology from Bitcoin: key partition. Where Ethereum uses an account based on the same address for _everything_, Bitcoin instead uses different addresses, and thus different keys, for each individual transaction. On Ethereum, we can do this by defining a variety of _proof purposes_, each of which is a different use of the network, and each of which will then be managed by a different key pair. Proof purposes for Ethereum keys that will be partitioned include: 1. Single Sign-on 2. Ethereum Assets 3. Other Assets 4. Smart Contract Control Currently, it is possible to do this manually: a user aware of the resilience and security issues implicit in Ethereum could generate a variety of key pairs by hand and diligently maintain the discipline to use each key only for its intended purpose. But, this approach will not be practical for most users. What's needed to make key partitioning work for Ethereum is wallet support. ### Wallet Design The solution simply requires the development of xpub-based extended wallets for Ethereum, where addresses, and thus accounts, are defined by xpubs (and the related xprvs), each of which includes not just an address, but also a chain code and a seed fingerprint, which together define how the address is descended from a foundational seed. Ethereum addresses are actually already created in this way, the chain code is just currently thrown out, and only a single derivation path is used. New xpub-based Ethereum wallets would go a step further by descending a level deeper in the hierarchy defined by the Ethereum seed. This would open up a whole tree of possible addresses, each used for a different proof purpose. An ideal wallet design would follow Smart Custody procedures by not even maintaining the foundational seed in the wallet, but instead storing it in an offline or closely-held device and revealing new xpubs (and xprvs) to the wallet through airgapped technologies such as QR codes of Blockchain Commons' Uniform Resources. This would be what we define as a _cool_ wallet, and could be additionally protected by Blockchain Commons Smart Custody designs such as SSKR, which supports seed sharding. ### Wallet Connect Design One of the best tools that we have to advance Ethereum's account design is [WalletConnect](https://walletconnect.com/). Wallet Connect has already begun improving Ethereum resilience by partitioning activities, supporting signing that is separate from the apps that are assembling the transactions. We hope to leverage Wallet Connect 2 to support xpub-based accounts and perhaps even to help in the development of Wallet Connect 3, to provide wider interoperability for those accounts. ### Development Path The following development path is currently planned for initial deployment of xpub-based wallets on Ethereum: 1. Sketch out proof-purpose structure. 2. Implement an extended wallet for NFTs using Polygon as a Testbed. * Blockchain Commons incorporates Wallet Connect 2 into Seed Tool. * Blockchain Commons creates prototypes that use Wallet Connect 2 with xpub-based addresses. * Bitmark implements multi-account lookup display tool for xpub-based addresses. 3. Test for both ERC 721 and 1155. 4. If initial tests succeed, continue to extend development to other proof purposes and to the actual Ethereum network. 5. Extend interoperability of new account design with Wallet Connect 3. ## Potential Challenges There are a number of potential challenges for this new design, all of which would need to be resolved as an xpub-based wallet was rolled out. 1. ***Backward compatibility would need to be maintained.*** Moving to an xpub-based wallet is a major architectural change, so careful work will be needed to ensure compatibility with existing Ethereum uses. This will likely require saving the 0th child of any new hierarchical level for auth purposes and might include other backward-looking mechanics. 2. ***Contracts would need to be reviewed for compatibility.*** The biggest challenge will be ensuring that popular legacy smart contracts such as ERC 721 and 1155 work with this new hierarchical design, since defining different proof purposes for NFTs will be one of the immediate wins. In particular, we need to investigate if payment for moving an NFT can come from a different address than where it's being moved to; if not, we may end up needing to move things twice, which may be cost-prohibitive given current gas prices on Ethereum. (Overall, this could be a deal breaker for a fully partitioned design.) 3. ***Chain code uses would need to be reviewed.*** Chain codes used in [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) have to be used carefully to avoid compromise of data, which is the reason for the existence of hardened paths. Overall, security reviews would be required to ensure that nothing untoward is being exposed by a design for extended Ethereum addresses and that hardened paths are being used appropriately. 4. ***Key-hierarchy methods would need to be reviewed.*** Overall, the methodology of chain codes and derivation as defined in [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) (with [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) and [SLIP44](https://github.com/satoshilabs/slips/blob/master/slip-0044.md)) needs to be carefully considered. It has the advantage of being well-understood on Bitcoin and allowing the use of well-tested existing libraries such as [libwally](https://github.com/ElementsProject/libwally-core); it also already has some limited usage on Ethereum. However, even the designer of BIP32 has expressed some regrets in how it's defined. If we're forced to move away from full legacy compatability, that might be an opportunity to consider new styles of key generation, the simplest of which is PBKDF, but which might also include some simple homomorphic approaches. 5. **Other chain compatibility needs to be considered.** The BIP32 methodology does not work for 25519 curve–based wallets such as Cosmos and Tezos, because only a limited number of BIP32-based private keys (around 1 in 8) can generate valid public keys on that curve. In addition, supporting "hardened" vs "non-hardened" derivations, as defined in BIP-32, does not seem to be possible on 25519 without hacks. If compatibility is required for other chains, this might be another reason to reconsider existing key-hierarchy methods. ## Conclusion Partitioned wallets can provide a notable increase in the resilience and security of Ethereum wallets. There are challenges to making this transition, mainly revolving around ensuring compatibilities with existing wallets and contracts, but also in verifying that we are producing the best new specification possible. ### Future Development Ethereum is still in a period of rapid advancement. We hope to use future advances to further develop this methodology, particularly as cryptography is better integrated into smart contracts, supporting more resilient contract accounts and allowing for the creation of SSKR-focused smart contracts for holding accounts of this sort.

    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