diff --git a/guide/private-key-management/backups.md b/guide/private-key-management/backups.md index 3b0ebaa97..c3d34fbd5 100644 --- a/guide/private-key-management/backups.md +++ b/guide/private-key-management/backups.md @@ -2,7 +2,7 @@ layout: guide title: Bitcoin backups description: A beginner's guide to Bitcoin backups. -nav_order: 4 +nav_order: 8 parent: Private key management permalink: /guide/private-key-management/backups/ main_classes: -no-top-padding @@ -17,7 +17,7 @@ A guide meant to lower the barrier for first time users of self-custody wallets. Illustration sources -// +// --> @@ -57,7 +57,7 @@ The main risks that backups need to protect against are: ## Backup levels, basic to advanced -A basic backup can be done in a few minutes, while more advanced setups can require more time and effort, like the purchase of dedicated material. +A basic backup can be done in a few minutes, while more advanced setups can require more time and effort, like the purchase of dedicated material. Let’s look at some real life examples of backup methods for single-key wallets and what they protect against. @@ -83,7 +83,7 @@ Level 2, 3 or 4 are recommended for storing larger amounts.
#### Level 0 -## Encrypted cloud backup +## Encrypted cloud backup By storing the recovery-phrase in an online location that is encrypted (not in plain text) and hard to access by anyone other than yourself, you are protected against *loss of wallet*. This is the absolute minimum you should do and only takes a few minutes. @@ -99,12 +99,12 @@ By storing the recovery-phrase in an online location that is encrypted (not in p - Use an encrypted password manager like 1Password, LastPass, iCloud Keychain - Alternatively, use a wallet application with automatic cloud backup -**Don’t** +**Don’t** - Screenshot the recovery-phrase and save it in Google Photos, iCloud photos - Write down the recovery-phrase in plain text on your device, Google Docs etc. **Suitable for** -- For small amounts (less than a months salary) +- For small amounts (less than a months salary) - When you can't wait to set up a new wallet until you are at home
@@ -129,7 +129,7 @@ By storing the recovery-phrase written down on paper in your own home you have p - Store it in a location where it is unlikely to be found by a bad actor - Document or tell next-of-kin where the backup can be found -**Don’t** +**Don’t** - Scribble the recovery-phrase on a scrap of paper using a pencil - Stick it on the fridge, or other visible locations @@ -142,7 +142,7 @@ By storing the recovery-phrase written down on paper in your own home you have p #### Level 2 ## Single metal backup -By storing the recovery-phrase on metal in your own home you have protected against *loss of wallet*, *remote theft* and *physical damage*. +By storing the recovery-phrase on metal in your own home you have protected against *loss of wallet*, *remote theft* and *physical damage*. The best metal backup solutions are resistant to most physical damage, including fire, acid and high pressure. @@ -156,13 +156,13 @@ The best metal backup solutions are resistant to most physical damage, including %} -**Do** +**Do** - Order a dedicated metal backup product, recommendations can be found [here](https://jlopp.github.io/metal-bitcoin-storage-reviews/) - Follow the instructions and make sure the phrase is indented, etched, engraved or set properly - Store it in a location where it is unlikely to be found by a bad actor - Document or tell next-of-kin where the backup can be found -**Don’t** +**Don’t** - Skip ordering a dedicated product, invent your own metal backup solution **Suitable for** @@ -172,13 +172,13 @@ The best metal backup solutions are resistant to most physical damage, including #### Level 3 ## Single backup with discovery protection -The previous offline backups have one flaw in common - if discovered by a bad actor, your funds can be stolen. +The previous offline backups have one flaw in common - if discovered by a bad actor, your funds can be stolen. -To protect against this *theft on discovery* risk, a *pass-phrase* can be added to the recovery-phrase. This pass-phrase is sometimes called an extra word, or the 13th/25th word. +To protect against this *theft on discovery* risk, a *pass-phrase* can be added to the recovery-phrase. This pass-phrase is sometimes called an extra word, or the 13th/25th word. While this level provides more protection, it also adds complexity to your backup setup. For most beginners storing small amounts it might not be worth the effort from the start and can be a later consideration should the funds grow. -Technically, all recovery-phrases have a pass-phrase. If it's not set by the user, an empty string (“”) will be used by default. This means that using the recovery-phrase with or without the user-defined pass-phrase will recover two DIFFERENT wallets. +Technically, all recovery-phrases have a pass-phrase. If it's not set by the user, an empty string (“”) will be used by default. This means that using the recovery-phrase with or without the user-defined pass-phrase will recover two DIFFERENT wallets. If a bad actor discovers only the recovery-phrase, they will find an empty wallet. Alternatively, one can deliberately leave a small amount of bitcoin in this wallet as a honey-pot, and monitor it for any withdrawals to know if it has been discovered. @@ -197,12 +197,12 @@ It's worth noting that most hardware wallets support pass-phrases, while most so %} -**Do** +**Do** - Use a secure pass-phrase, it is case sensitive and can include numbers and special characters - Have redundant and secure backups of both the recovery-phrase and the pass-phrase, they are equally important for successful wallet recovery -- Understand you now have two distinct wallets, (one each from the recovery-phrase with or without the pass-phrase), this can be useful to fool a bad actor, or a risk if next-of-kin is unaware of the pass-phrase +- Understand you now have two distinct wallets, (one each from the recovery-phrase with or without the pass-phrase), this can be useful to fool a bad actor, or a risk if next-of-kin is unaware of the pass-phrase -**Don’t** +**Don’t** - Store the recovery-phrase and pass-phrase together - Forget to document your setup for next-of-kin @@ -216,13 +216,13 @@ Set up a hardware wallet from the recovery and pass-phrase that uses a PIN to pr
-#### Level 4 +#### Level 4 ## Multiple backups with discovery protection One remaining flaw with the single offline backup levels is that severe damage to the one location where they are stored, could lead to the backup not being usable. This could be a fire, flood, earthquake or similar, all more or less likely depending on where you live. -To protect against such a *catastrophic event* we can create multiple backups, and distribute them to other locations. This could be a second home, trusted family and friends or a safe deposit box. +To protect against such a *catastrophic event* we can create multiple backups, and distribute them to other locations. This could be a second home, trusted family and friends or a safe deposit box. -As the risk of discovery increases with the multiplying backups, it's best to maintain the protection against theft on discovery with a pass-phrase, or hardware wallets with a PIN. +As the risk of discovery increases with the multiplying backups, it's best to maintain the protection against theft on discovery with a pass-phrase, or hardware wallets with a PIN. {% include image.html image = "/assets/images/guide/private-key-management/backups/multiple-discoveryprotection.jpg" @@ -232,11 +232,11 @@ As the risk of discovery increases with the multiplying backups, it's best to ma height = 420 %} -**Do** +**Do** - Make sure you have reduntant copies of all parts of the backup in several locations - Document your setup well for next-of-kin now that complexity has increased -**Don’t** +**Don’t** - Forget to safely store the pass-phrases or PINs **Suitable for** @@ -248,9 +248,9 @@ As the risk of discovery increases with the multiplying backups, it's best to ma --- ## Inheritance instructions -For any backup setup, sufficient information and understandable instructions for recovering the wallet should be available to next-of-kin. +For any backup setup, sufficient information and understandable instructions for recovering the wallet should be available to next-of-kin. -Even though it might feel uncomfortable (or unnecessary if you are young and single), it is never too early to document your wallets. If you don’t, there is a very high chance that next-of-kin will not be able to inherit your funds. +Even though it might feel uncomfortable (or unnecessary if you are young and single), it is never too early to document your wallets. If you don’t, there is a very high chance that next-of-kin will not be able to inherit your funds. At a minimum, document each wallet with a given name (Bob’s Bitcoin wallet 1), how to recover it, when it was created and what application was used to create the wallet. Ideally this document has all the instructions required to recover the wallet, but not the information itself (*recovery-phrase*, *pass-phrase* etc.), as that might expose you to theft on discovery risks. diff --git a/guide/private-key-management/cloud-backup.md b/guide/private-key-management/cloud-backup.md new file mode 100644 index 000000000..ea8258524 --- /dev/null +++ b/guide/private-key-management/cloud-backup.md @@ -0,0 +1,86 @@ +--- +layout: guide +title: Automatic cloud backup +description: An overview of personal private key management schemes. +nav_order: 2 +parent: Private key management +permalink: /guide/private-key-management/cloud-backup/ +main_classes: -no-top-padding +image: https://bitcoin.design/assets/images/guide/private-key-management/schemes/page-personal-schemes.jpg +--- + +{% include picture.html + image = "/assets/images/guide/private-key-management/personal.jpg" + retina = "/assets/images/guide/private-key-management/personal@2x.jpg" + mobile = "/assets/images/guide/private-key-management/personal-mobile.jpg" + mobileRetina = "/assets/images/guide/private-key-management/personal-mobile@2x.jpg" + alt-text = "Shared schemes header illustration" + width = 1600 + height = 600 + layout = "full-width" +%} + +# Automatic cloud backup + +By using an automatic cloud backup for the private key the user is NOT required to manually backup anything when setting up a new [bitcoin wallet]({{ '/guide/glossary/#bitcoin-wallet' | relative_url }}). This is sometimes also called *seedless*, as the user is never exposed to the traditional *seed*, or [recovery phrase]({{ '/guide/glossary/#recovery-phrase' | relative_url }}) that is used to initiate a wallet. + +This scheme can be used for those new to bitcoin, or novices who would find manually backing up a recovery phrase during onboarding confusing, possibly leading to unsafe backups. It could also be a starting point for a progressive security model that lets customers upgrade when they start accumulating more funds. + +The automatic cloud backup scheme gives users reasonable security against theft, while providing low risk for self-inflicted losses. + +{% include image.html + image = "/assets/images/guide/private-key-management/schemes/cloud-backup.jpg" + retina = "/assets/images/guide/private-key-management/schemes/cloud-backup@2x.jpg" + alt-text = "Automatic cloud backup illustration" + caption = "Private keys are encrypted and stored in the cloud." + width = 800 + height = 400 +%} + +### How it works +First the application generates a wallet with a keypair. Then, the key is encrypted and backed up to a location convenient and safe for the user, yet hard for a malicious third-party to gain access to. + + +With most implementations so far, the location will be the keychain or a user-specific key-value-store on a mobile device that is also backed up by the OS provider. The most common would be iOS (iCloud) and Android (Google Drive) which both have secure data storage that is backed up and synced between a user's devices. + +This makes the backup accessible by the user on a new device, should they lose the original, but only accessible by someone that can log into the user’s Apple or Google account. + +{% include fact/pros.html %} + +- Low onboarding friction +- Low risk of self-inflicted loss due to the automatic nature + +{% include fact/close.html %} + +{% include fact/cons.html %} + +- Private key in cloud storage increases risk of malicious third party access +- User needs to trust their OS and cloud storage provider +- Unless the backup includes the recovery phrase users will not be able to export their wallet to another product + +{% include fact/close.html %} + +### Best practice + +**When to use** +- When risk of self-inflicted loss is higher than loss from theft +- For beginners, or products with progressive security +- For lower values + +**When not to use** +- When storing high values +- When risk of loss from theft is higher than self-inflicted loss +- When complete self-sovereignty is important to the target audience + +**Variations** +- Storage location (keychain, iCloud, Google Drive, One Password etc.) +- Additional user authentication (biometrics, pin) + +**Products that use this scheme** +- [Photon SDK](https://photonsdk.org) - for use by other wallets, in development +- [Casa](https://keys.casa) +- [Pine](https://pine.pm ) - Lightning, beta + +--- + +Next, let's look at [manual backups]({{ '/guide/private-key-management/manual-backup/' | relative_url }}). diff --git a/guide/private-key-management/external-signing-device.md b/guide/private-key-management/external-signing-device.md new file mode 100644 index 000000000..2a457ac9c --- /dev/null +++ b/guide/private-key-management/external-signing-device.md @@ -0,0 +1,83 @@ +--- +layout: guide +title: External signing device +description: An overview of personal private key management schemes. +nav_order: 4 +parent: Private key management +permalink: /guide/private-key-management/external-signing-device/ +image: https://bitcoin.design/assets/images/guide/private-key-management/schemes/page-personal-schemes.jpg +--- + + + +# External signing device + +The most common external signing devices are hardware wallets who’s makers often provide their own software to pair with. But, there are also third party wallet applications that support external signing, or software, that can be run on offline on airgapped computers to perform the same function. + +A wallet application that supports external signing can remove the need for the private key to be readable by the wallet software, thereby decreasing the risk of keeping keys on a device that is likely always connected to the internet. + +{% include image.html + image = "/assets/images/guide/private-key-management/schemes/signing-devices.jpg" + retina = "/assets/images/guide/private-key-management/schemes/signing-devices@2x.jpg" + alt-text = "External signing device illustration" + caption = "Hardware wallets are the most common external signing devices." + width = 800 + height = 400 +%} + +### How it works +The external device can generate and store a keypair offline. Therefore, the private key has never been known outside the device. A software wallet can connect to the signing device and act as an interface, or handle transactions air gapped from the device. + +When a transaction needs to be signed, the software submits a partially signed bitcoin transaction (PSBT, defined in [BIP174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki)) to the device. The user confirms on the device and the PSBT state of the transaction returned to the software wallet application is now fully signed and can be transmitted to the blockchain. This process can also happen fully air gapped by using memory cards instead of cables or wireless connections, to keep the device offline at all times. + +{% include fact/pros.html %} + +- Removes private key from online devices +- Can provide very high security if used correctly + +{% include fact/close.html %} + +{% include fact/cons.html %} + +- Purchase of specialized hardware required +- Requires further effort and knowledge to setup correctly +- Still requires a good manual backup for redundancy + +{% include fact/close.html %} + +### Best practice + +**When to use** +- When storing medium to large amounts +- When risk of loss from theft is higher than loss from negligence +- When target audience is likely to be very knowledgeable or motivated to learn good manual backup schemes + +**When not to use** +- When most users are new to bitcoin and unlikely to implement good backup schemes +- When transactions are likely to be frequent and low value + +**Variations** +- Interfaces (bluetooth, USB, microSD card, camera, NFC) +- Platform compatibility +- Additional user authentication (pin or password) + +**Products that use this scheme** +- [Electrum]({{ 'https://electrum.org'}}) +- [Wasabi]({{ 'https://wasabiwallet.io'}}) +- [Bluewallet]({{ 'https://bluewallet.io'}}) + +**Hardware wallets** +- [Trezor]({{ 'https://trezor.io'}}) +- [Ledger]({{ 'https://www.ledger.com'}}) +- [Keepkey]({{ 'https://shapeshift.com/keepkey'}}) +- [Coldcard]({{ 'https://coldcardwallet.com'}}) + +--- + +Next, let's look at [key sharing]({{ '/guide/private-key-management/key-sharing/' | relative_url }}). diff --git a/guide/private-key-management/manual-backup.md b/guide/private-key-management/manual-backup.md new file mode 100644 index 000000000..b861ea371 --- /dev/null +++ b/guide/private-key-management/manual-backup.md @@ -0,0 +1,88 @@ +--- +layout: guide +title: Manual backup +description: An overview of personal private key management schemes. +nav_order: 3 +parent: Private key management +permalink: /guide/private-key-management/manual-backup/ +image: https://bitcoin.design/assets/images/guide/private-key-management/schemes/page-personal-schemes.jpg +--- + + + +# Manual backup / Recovery phrase + +Manual backup of the [recovery phrase]({{ '/guide/glossary/#recovery-phrase' | relative_url }}) has been the most common private key management scheme by far since its proposal with [BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) in 2013. If you have used any [non-custodial]({{ '/guide/glossary/#non-custodial--custodial-wallet' | relative_url }}) bitcoin application you are likely to have experienced the onboarding requirements of manual backups. + +When creating a new wallet, you will be asked to manually backup a 12 or 24 word recovery phrase to a *safe place*. Often, as the next step it will ask you to verify that you did save it by having you input the phrase in the correct order. + +This scheme is suitable for users who are already familiar with bitcoin and procedures for secure offline backups of their recovery phrase. It is not suited for complete beginners. When told to store the backup in a safe way offline, bitcoin-beginners in reality often take a screenshot, write it down in plain text somewhere on their mobile device, computer or a piece of paper on the fridge, or simply don’t back it up at all. This has the risk of achieving the opposite of what we want - high risk of self-inflicted loss and low to medium security in terms of third party theft. + +{% include image.html + image = "/assets/images/guide/private-key-management/schemes/recovery-phrase.jpg" + retina = "/assets/images/guide/private-key-management/schemes/recovery-phrase@2x.jpg" + alt-text = "Recovery phrase illustration" + caption = "Recovery phrases should be stored offline on metal or paper backups." + width = 800 + height = 400 +%} + +### How it works +The wallet application will generate a 12 or 24 word phrase (seed / [recovery phrase]({{ '/guide/glossary/#recovery-phrase' | relative_url }})) from which all the wallet’s [keys]({{ '/guide/glossary/#keys' | relative_url }}) can be derived. This means the user can have access to the wallet from any compatible wallet application with the phrase, even if they lose the device or software. + +This can be an effective way to reduce the risk of loss from theft if the backup is offline in a safe place, but puts more of the burden on the individual user. The security and risk will only be as good as how they backup the recovery phrase. + +Safe backups can be made fairly simple, take a look at our [Bitcoin backups]({{ '/guide/private-key-management/backups/' | relative_url }}) guide as a good starting point. + +{% include fact/pros.html %} + +- Manual backups done well can provide very high security +- Good interoperability + +{% include fact/close.html %} + +{% include fact/cons.html %} + +- Requires significant effort from users to achieve safe backups +- High onboarding friction + +{% include fact/close.html %} + +### Best practice + +**When to use** +- When target audience is likely to be knowledgeable and implement good manual backup schemes +- When storing medium amounts +- When risk of loss from theft is higher than self-inflicted loss + +**When not to use** +- When users are new to bitcoin and unlikely to implement good manual backups +- For use-cases with small amounts +- When onboarding is likely to happen outside of users' homes + +**Variations** +- 12 or 24 word phrase +- Additional user authentication (biometrics use, pin or password) +- Cloud backup options + +**Do's** +- Explain what a recovery phrase is, and provide a guide how to do *safe offline backups* BEFORE the user is exposed to the phrase or can start using the wallet + +**Products that use this scheme** +Most bitcoin wallets, including; +- [Bluewallet](https://bluewallet.io) +- [Electrum](https://electrum.org) +- [Wasabi](https://wasabiwallet.io) +- [Blockstream Green](https://blockstream.com/green/) +- [Coinbase Wallet](https://wallet.coinbase.com) +- [Rise](https://www.risewallet.com) + +--- + +Next, let's look at [external signing devices]({{ '/guide/private-key-management/external-signing-device/' | relative_url }}). diff --git a/guide/private-key-management/multi-key.md b/guide/private-key-management/multi-key.md new file mode 100644 index 000000000..a409b1240 --- /dev/null +++ b/guide/private-key-management/multi-key.md @@ -0,0 +1,81 @@ +--- +layout: guide +title: Multi-key +description: An overview of personal private key management schemes. +nav_order: 6 +parent: Private key management +permalink: /guide/private-key-management/multi-key/ +image: https://bitcoin.design/assets/images/guide/private-key-management/schemes/page-personal-schemes.jpg +--- + + + +# Multi-key + +All of the above schemes have relied on a single private key to control the wallet. This presents an all-or-nothing risk for loss of funds from both theft and negligence. To counter this a wallet can have several private keys attached of which all or a subset need to sign any transactions. In the personal use case, one person will control all the keys but hold them on different devices, or in different places. + +This is often called multi-signature, or multisig for short, but is also sometimes referred to as a *vault*. A multi-key setup is described as *n-of-n* to indicate how many keys are needed to sign a transaction out of the issued number. For example a *2-of-3* setup requires two of the three private keys to sign a transaction for it to be valid. + +Multi-key schemes can raise the security, since anyone needs access to more than one key to move any funds. But clearly it also increases complexity and the requirements on the user to keep even more keys securely stored and/or backed up. + +{% include image.html + image = "/assets/images/guide/private-key-management/schemes/multi-key.jpg" + retina = "/assets/images/guide/private-key-management/schemes/multi-key@2x.jpg" + alt-text = "Multi-key illustration" + caption = "Several keys are required to control the wallet." + width = 800 + height = 400 +%} + +### How it works +A software wallet application or coordination software initiates a multi-sig wallet, choosing the number of total keys, and the number required to sign transactions. The user then adds private keys from other wallets generated elsewhere to the multisig after which the software wallet can complete the creation process. For any future transaction from the multi-sig wallet the required amount of co-signers need to sign (using Partially Signed Bitcoin Transactions - PSBT from [BIP174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki)) before any transaction is valid. + +{% include fact/pros.html %} + +- Significantly increases security against theft + +{% include fact/close.html %} + +{% include fact/cons.html %} + +- Adds complexity and op-sec burden for multiple private keys + +{% include fact/close.html %} + +### Best practice + +**When to use** +- When storing large amounts +- When target audience is likely to own hardware wallets +- When most users are likely to implement good backup schemes for multiple keys + +**When not to use** +- For small amounts +- When users are likely to be new to bitcoin + +**Variations** +- Number of total and co-signing keys +- Key locations and distribution +- Managed or completely sovereign + +**Do's** +- Make sure the multi-key setup itself is backed up properly, including [extended public keys]({{ '/guide/glossary/#extended-public-key-xpub-ypub-zpub' | relative_url }}) for all the participating keys, fingerprint and derivation. + +**Products that use this scheme** +- [Casa](https://keys.casa) co-managed 2-of-3, or 3-of-5 +- [Electrum](https://electrum.org) +- [Bluewallet](https://bluewallet.io) +- [Unchained Capital/Caravan](https://unchained-capital.com) co-managed +- [Specter](https://specter.solutions) +- [Armory](https://btcarmory.com) +- [Guarda](https://guarda.com) + +--- + +Next, let's look at [shared multi key]({{ '/guide/private-key-management/shared-multi-key/' | relative_url }}). diff --git a/guide/private-key-management/schemes.md b/guide/private-key-management/overview.md similarity index 71% rename from guide/private-key-management/schemes.md rename to guide/private-key-management/overview.md index ecf055b1e..d13acb095 100644 --- a/guide/private-key-management/schemes.md +++ b/guide/private-key-management/overview.md @@ -1,10 +1,10 @@ --- layout: guide -title: Private key schemes +title: Overview description: An overview of personal and shared schemes, and how to pick one for your product depending on your use case. nav_order: 1 parent: Private key management -permalink: /guide/private-key-management/schemes/ +permalink: /guide/private-key-management/overview/ main_classes: -no-top-padding image: https://bitcoin.design/assets/images/guide/private-key-management/schemes/page-private-key-schemes.jpg --- @@ -90,16 +90,33 @@ Or you can follow this flow chart to find a suitable scheme for your use case. We can divide the options up into personal and shared wallet schemes. The following pages explain each one in more detail: -### [Personal schemes]({{ '/guide/private-key-management/single-user-schemes/' | relative_url }}) -- **Automatic cloud backup** - no user action required for backup -- **Manual backup / Recovery phrase** - manual backup of a phrase of words -- **External signing device** - keys are held on a separate device -- **Threshold signatures / Key-sharing** - one key is split and distributed -- **Multi-key** - several keys jointly control the wallet +### Personal schemes -### [Shared schemes]({{ '/guide/private-key-management/multi-user-schemes/' | relative_url }}) -- **Multi-key** - several keys and several people control the wallet +Now let's dive in and look at the various schemes that might be suitable for a personal wallet application with a single user to understand the differences at a high level. + +{% include image.html + image = "/assets/images/guide/private-key-management/schemes/personal-schemes.jpg" + retina = "/assets/images/guide/private-key-management/schemes/personal-schemes@2x.jpg" + alt-text = "" + caption = "Cloud backup, manual backup , signing-device, threshold-signatures and multi-key." + width = 2012 + height = 400 +%} + +- [Automatic cloud backup](/guide/private-key-management/automatic-cloud-backup) - no user action required for backup +- [Manual backup / Recovery phrase](/guide/private-key-management/manual-backup) - manual backup of a phrase of words +- [External signing device](/guide/private-key-management/external-signing-device) - keys are held on a separate device +- [Threshold signatures / Key-sharing](/guide/private-key-management/threshold-signatures) - one key is split and distributed +- [Multi-key](#multi-key) - several keys jointly control the wallet + +### Shared schemes + +While multi-key setups can be used for personal use, if several people need to share funds multiple keys become a necessity. You will often see this referred to as *multi-sig* setups, stemming from the fact that multiple keys are needed to sign a transaction in order for it to go through and be valid. + +The use cases for shared schemes include spouses managing a joint account, groups, organizations or companies managing their funds, as well as inheritance planning. It can also be used for governance of an organization, with transactions used not to transfer funds but to record, or vote, for decisions. + +- [Shared multi-key](/guide/private-key-management/shared-multi-key) - several keys and several people control the wallet --- -Let's continue by looking at [personal schemes]({{ '/guide/private-key-management/single-user-schemes/' | relative_url }}). +Let's start by looking at the [automatic cloud backup](/guide/private-key-management/automatic-cloud-backup) scheme. diff --git a/guide/private-key-management/multi-user-schemes.md b/guide/private-key-management/shared-multi-key.md similarity index 84% rename from guide/private-key-management/multi-user-schemes.md rename to guide/private-key-management/shared-multi-key.md index 0bc841e74..b1c5bdf6e 100644 --- a/guide/private-key-management/multi-user-schemes.md +++ b/guide/private-key-management/shared-multi-key.md @@ -1,10 +1,10 @@ --- layout: guide -title: Shared schemes +title: Shared multi-key description: An overview of shared private key management schemes. -nav_order: 3 +nav_order: 7 parent: Private key management -permalink: /guide/private-key-management/multi-user-schemes/ +permalink: /guide/private-key-management/shared-multi-key/ main_classes: -no-top-padding image: https://bitcoin.design/assets/images/guide/private-key-management/schemes/page-shared-schemes.jpg --- @@ -28,13 +28,7 @@ Description of schemes suitable for multi-user scenarios. layout = "full-width" %} -# Shared schemes - -While multi-key setups can be used for personal use, if several people need to share funds multiple keys become a necessity. You will often see this referred to as *multi-sig* setups, stemming from the fact that multiple keys are needed to sign a transaction in order for it to go through and be valid. - -The use cases for shared schemes include spouses managing a joint account, groups, organizations or companies managing their funds, as well as inheritance planning. It can also be used for governance of an organization, with transactions used not to transfer funds but to record, or vote, for decisions. - -## Shared multi-key +# Shared multi-key As we saw with multi-key setups for personal use, a multi-key wallet has several controlling keypairs attached, or what is often called co-signers. The number of keys and required co-signers will depend on the use case. With spouses sharing a *joint account*, a simple 1-of-2 multi-key setup might suffice, meaning there are two keys but only one is required to sign for a transaction to be valid. At the other end of a spectrum a company might require a more complex 3-of-5 setup, requiring three of the five co-signers to approve any transaction. diff --git a/guide/private-key-management/single-user-schemes.md b/guide/private-key-management/single-user-schemes.md deleted file mode 100644 index 2135bbaf3..000000000 --- a/guide/private-key-management/single-user-schemes.md +++ /dev/null @@ -1,364 +0,0 @@ ---- -layout: guide -title: Personal schemes -description: An overview of personal private key management schemes. -nav_order: 2 -parent: Private key management -permalink: /guide/private-key-management/single-user-schemes/ -main_classes: -no-top-padding -image: https://bitcoin.design/assets/images/guide/private-key-management/schemes/page-personal-schemes.jpg ---- - - - -{% include picture.html - image = "/assets/images/guide/private-key-management/personal.jpg" - retina = "/assets/images/guide/private-key-management/personal@2x.jpg" - mobile = "/assets/images/guide/private-key-management/personal-mobile.jpg" - mobileRetina = "/assets/images/guide/private-key-management/personal-mobile@2x.jpg" - alt-text = "Personal schemes header illustration" - width = 1600 - height = 600 - layout = "full-width" -%} - -# Personal schemes - -Now let's dive in and look at the various schemes that might be suitable for a personal wallet application with a single user to understand the differences at a high level. - -{% include image.html - image = "/assets/images/guide/private-key-management/schemes/personal-schemes.jpg" - retina = "/assets/images/guide/private-key-management/schemes/personal-schemes@2x.jpg" - alt-text = "" - caption = "Cloud backup, manual backup , signing-device, threshold-signatures and multi-key." - width = 2012 - height = 400 -%} - -- [Automatic cloud backup](#automatic-cloud-backup) -- [Manual backup / Recovery phrase](#manual-backup--recovery-phrase) -- [External signing device](#external-signing-device) -- [Threshold signatures / Key-sharing](#threshold-signatures--key-sharing) -- [Multi-key](#multi-key) - -*** - -## Automatic cloud backup - -By using an automatic cloud backup for the private key the user is NOT required to manually backup anything when setting up a new [bitcoin wallet]({{ '/guide/glossary/#bitcoin-wallet' | relative_url }}). This is sometimes also called *seedless*, as the user is never exposed to the traditional *seed*, or [recovery phrase]({{ '/guide/glossary/#recovery-phrase' | relative_url }}) that is used to initiate a wallet. - -This scheme can be used for those new to bitcoin, or novices who would find manually backing up a recovery phrase during onboarding confusing, possibly leading to unsafe backups. It could also be a starting point for a progressive security model that lets customers upgrade when they start accumulating more funds. - -The automatic cloud backup scheme gives users reasonable security against theft, while providing low risk for self-inflicted losses. - -{% include image.html - image = "/assets/images/guide/private-key-management/schemes/cloud-backup.jpg" - retina = "/assets/images/guide/private-key-management/schemes/cloud-backup@2x.jpg" - alt-text = "Automatic cloud backup illustration" - caption = "Private keys are encrypted and stored in the cloud." - width = 800 - height = 400 -%} - -### How it works -First the application generates a wallet with a keypair. Then, the key is encrypted and backed up to a location convenient and safe for the user, yet hard for a malicious third-party to gain access to. - - -With most implementations so far, the location will be the keychain or a user-specific key-value-store on a mobile device that is also backed up by the OS provider. The most common would be iOS (iCloud) and Android (Google Drive) which both have secure data storage that is backed up and synced between a user's devices. - -This makes the backup accessible by the user on a new device, should they lose the original, but only accessible by someone that can log into the user’s Apple or Google account. - -{% include fact/pros.html %} - -- Low onboarding friction -- Low risk of self-inflicted loss due to the automatic nature - -{% include fact/close.html %} - -{% include fact/cons.html %} - -- Private key in cloud storage increases risk of malicious third party access -- User needs to trust their OS and cloud storage provider -- Unless the backup includes the recovery phrase users will not be able to export their wallet to another product - -{% include fact/close.html %} - -### Best practice - -**When to use** -- When risk of self-inflicted loss is higher than loss from theft -- For beginners, or products with progressive security -- For lower values - -**When not to use** -- When storing high values -- When risk of loss from theft is higher than self-inflicted loss -- When complete self-sovereignty is important to the target audience - -**Variations** -- Storage location (keychain, iCloud, Google Drive, One Password etc.) -- Additional user authentication (biometrics, pin) - -**Products that use this scheme** -- [Photon SDK](https://photonsdk.org) - for use by other wallets, in development -- [Casa](https://keys.casa) -- [Pine](https://pine.pm ) - Lightning, beta - -*** - -## Manual backup / Recovery phrase - -Manual backup of the [recovery phrase]({{ '/guide/glossary/#recovery-phrase' | relative_url }}) has been the most common private key management scheme by far since its proposal with [BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) in 2013. If you have used any [non-custodial]({{ '/guide/glossary/#non-custodial--custodial-wallet' | relative_url }}) bitcoin application you are likely to have experienced the onboarding requirements of manual backups. - -When creating a new wallet, you will be asked to manually backup a 12 or 24 word recovery phrase to a *safe place*. Often, as the next step it will ask you to verify that you did save it by having you input the phrase in the correct order. - -This scheme is suitable for users who are already familiar with bitcoin and procedures for secure offline backups of their recovery phrase. It is not suited for complete beginners. When told to store the backup in a safe way offline, bitcoin-beginners in reality often take a screenshot, write it down in plain text somewhere on their mobile device, computer or a piece of paper on the fridge, or simply don’t back it up at all. This has the risk of achieving the opposite of what we want - high risk of self-inflicted loss and low to medium security in terms of third party theft. - -{% include image.html - image = "/assets/images/guide/private-key-management/schemes/recovery-phrase.jpg" - retina = "/assets/images/guide/private-key-management/schemes/recovery-phrase@2x.jpg" - alt-text = "Recovery phrase illustration" - caption = "Recovery phrases should be stored offline on metal or paper backups." - width = 800 - height = 400 -%} - -### How it works -The wallet application will generate a 12 or 24 word phrase (seed / [recovery phrase]({{ '/guide/glossary/#recovery-phrase' | relative_url }})) from which all the wallet’s [keys]({{ '/guide/glossary/#keys' | relative_url }}) can be derived. This means the user can have access to the wallet from any compatible wallet application with the phrase, even if they lose the device or software. - -This can be an effective way to reduce the risk of loss from theft if the backup is offline in a safe place, but puts more of the burden on the individual user. The security and risk will only be as good as how they backup the recovery phrase. - -Safe backups can be made fairly simple, take a look at our [Bitcoin backups](https://blog.keys.casa/the-dos-and-donts-of-bitcoin-key-management/) guide as good starting point. - -{% include fact/pros.html %} - -- Manual backups done well can provide very high security -- Good interoperability - -{% include fact/close.html %} - -{% include fact/cons.html %} - -- Requires significant effort from users to achieve safe backups -- High onboarding friction - -{% include fact/close.html %} - -### Best practice - -**When to use** -- When target audience is likely to be knowledgeable and implement good manual backup schemes -- When storing medium amounts -- When risk of loss from theft is higher than self-inflicted loss - -**When not to use** -- When users are new to bitcoin and unlikely to implement good manual backups -- For use-cases with small amounts -- When onboarding is likely to happen outside of users' homes - -**Variations** -- 12 or 24 word phrase -- Additional user authentication (biometrics use, pin or password) -- Cloud backup options - -**Do's** -- Explain what a recovery phrase is, and provide a guide how to do *safe offline backups* BEFORE the user is exposed to the phrase or can start using the wallet - -**Products that use this scheme** -Most bitcoin wallets, including; -- [Bluewallet](https://bluewallet.io) -- [Electrum](https://electrum.org) -- [Wasabi](https://wasabiwallet.io) -- [Blockstream Green](https://blockstream.com/green/) -- [Coinbase Wallet](https://wallet.coinbase.com) -- [Rise](https://www.risewallet.com) - -*** - -## External signing device - -The most common external signing devices are hardware wallets who’s makers often provide their own software to pair with. But, there are also third party wallet applications that support external signing, or software, that can be run on offline on airgapped computers to perform the same function. - -A wallet application that supports external signing can remove the need for the private key to be readable by the wallet software, thereby decreasing the risk of keeping keys on a device that is likely always connected to the internet. - -{% include image.html - image = "/assets/images/guide/private-key-management/schemes/signing-devices.jpg" - retina = "/assets/images/guide/private-key-management/schemes/signing-devices@2x.jpg" - alt-text = "External signing device illustration" - caption = "Hardware wallets are the most common external signing devices." - width = 800 - height = 400 -%} - -### How it works -The external device can generate and store a keypair offline. Therefore, the private key has never been known outside the device. A software wallet can connect to the signing device and act as an interface, or handle transactions air gapped from the device. - -When a transaction needs to be signed, the software submits a partially signed bitcoin transaction (PSBT, defined in [BIP174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki)) to the device. The user confirms on the device and the PSBT state of the transaction returned to the software wallet application is now fully signed and can be transmitted to the blockchain. This process can also happen fully air gapped by using memory cards instead of cables or wireless connections, to keep the device offline at all times. - -{% include fact/pros.html %} - -- Removes private key from online devices -- Can provide very high security if used correctly - -{% include fact/close.html %} - -{% include fact/cons.html %} - -- Purchase of specialized hardware required -- Requires further effort and knowledge to setup correctly -- Still requires a good manual backup for redundancy - -{% include fact/close.html %} - -### Best practice - -**When to use** -- When storing medium to large amounts -- When risk of loss from theft is higher than loss from negligence -- When target audience is likely to be very knowledgeable or motivated to learn good manual backup schemes - -**When not to use** -- When most users are new to bitcoin and unlikely to implement good backup schemes -- When transactions are likely to be frequent and low value - -**Variations** -- Interfaces (bluetooth, USB, microSD card, camera, NFC) -- Platform compatibility -- Additional user authentication (pin or password) - -**Products that use this scheme** -- [Electrum]({{ 'https://electrum.org'}}) -- [Wasabi]({{ 'https://wasabiwallet.io'}}) -- [Bluewallet]({{ 'https://bluewallet.io'}}) - -**Hardware wallets** -- [Trezor]({{ 'https://trezor.io'}}) -- [Ledger]({{ 'https://www.ledger.com'}}) -- [Keepkey]({{ 'https://shapeshift.com/keepkey'}}) -- [Coldcard]({{ 'https://coldcardwallet.com'}}) - -*** - -## Threshold signatures / Key-sharing - -A threshold signature scheme can require n-of-n signatures from parts of a single private key to make a valid transaction. By sharing parts of the private key among several parties or locations, greater resistance to theft can be achieved since access to more than one share is required. Depending on the setup, resistance to self-inflicted loss can be similar or worse than with a single key (2-of-2) or better (2-of-3 or more). - -Some benefits over a multikey setup include greater privacy, as a transaction using threshold signatures will appear equal to a single key transaction and not expose details about the different key shares. Transactions will also incur lower fees than a multikey setup as only one signature will be recorded on-chain. The big caveat here however is that these advantages are true only with the current ECDSA signatures of bitcoin, while with the forthcoming Schnorr signature scheme multikey signatures will be indistinguishable from single key. - -{% include image.html - image = "/assets/images/guide/private-key-management/schemes/threshold-signatures.jpg" - retina = "/assets/images/guide/private-key-management/schemes/threshold-signatures@2x.jpg" - alt-text = "Threshold signatures illustration" - caption = "One key is split into several pieces, more than one are required for controlling the wallet." - width = 800 - height = 400 -%} - -### How it works -A single private key is split into n key-shares that are distributed to several parties, devices or locations. When signing a transaction the required number of shares need to be coordinated into one valid signature. This relies on a cryptographic algorithm called [Shamir's Secret Sharing](https://en.wikipedia.org/wiki/Shamir's_Secret_Sharing) after its creator. - -{% include fact/pros.html %} - -- Can provide higher resistance to loss from theft -- Transactions look identical and have same cost as single key wallets on chain - -{% include fact/close.html %} - -{% include fact/cons.html %} - -- Requires precise coordination of key-shares when signing -- Few advantages over multi-key setups with Schnorr signatures -- Individual product implementations not interoperable - -{% include fact/close.html %} - -### Best practice - -**When to use** -- When target audience is well-versed with bitcoin -- When risk of theft is higher than self-inflicted loss - -**When not to use** -- When Schnorr signatures are available, enabling multi-key setups with similar benefits - -**Variations** -- Number of signatures required -- Location and distribution of pieces -- Signing procedure - -**Products that use this scheme** -- [ZenGo](https://zengo.com) -- [Hexa](https://hexawallet.io) -- [Spatium](https://spatium.net) -- [Bitfreeze](https://medium.com/@bitfreeze/threshold-signatures-multisig-is-not-enough-e1ba468f6102) - No longer in active development - -*** - -## Multi-key -All of the above schemes have relied on a single private key to control the wallet. This presents an all-or-nothing risk for loss of funds from both theft and negligence. To counter this a wallet can have several private keys attached of which all or a subset need to sign any transactions. In the personal use case, one person will control all the keys but hold them on different devices, or in different places. - -This is often called multi-signature, or multisig for short, but is also sometimes referred to as a *vault*. A multi-key setup is described as *n-of-n* to indicate how many keys are needed to sign a transaction out of the issued number. For example a *2-of-3* setup requires two of the three private keys to sign a transaction for it to be valid. - -Multi-key schemes can raise the security, since anyone needs access to more than one key to move any funds. But clearly it also increases complexity and the requirements on the user to keep even more keys securely stored and/or backed up. - -{% include image.html - image = "/assets/images/guide/private-key-management/schemes/multi-key.jpg" - retina = "/assets/images/guide/private-key-management/schemes/multi-key@2x.jpg" - alt-text = "Multi-key illustration" - caption = "Several keys are required to control the wallet." - width = 800 - height = 400 -%} - -### How it works -A software wallet application or coordination software initiates a multi-sig wallet, choosing the number of total keys, and the number required to sign transactions. The user then adds private keys from other wallets generated elsewhere to the multisig after which the software wallet can complete the creation process. For any future transaction from the multi-sig wallet the required amount of co-signers need to sign (using Partially Signed Bitcoin Transactions - PSBT from [BIP174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki)) before any transaction is valid. - -{% include fact/pros.html %} - -- Significantly increases security against theft - -{% include fact/close.html %} - -{% include fact/cons.html %} - -- Adds complexity and op-sec burden for multiple private keys - -{% include fact/close.html %} - -### Best practice - -**When to use** -- When storing large amounts -- When target audience is likely to own hardware wallets -- When most users are likely to implement good backup schemes for multiple keys - -**When not to use** -- For small amounts -- When users are likely to be new to bitcoin - -**Variations** -- Number of total and co-signing keys -- Key locations and distribution -- Managed or completely sovereign - -**Do's** -- Make sure the multi-key setup itself is backed up properly, including [extended public keys]({{ '/guide/glossary/#extended-public-key-xpub-ypub-zpub' | relative_url }}) for all the participating keys, fingerprint and derivation. - -**Products that use this scheme** -- [Casa](https://keys.casa) co-managed 2-of-3, or 3-of-5 -- [Electrum](https://electrum.org) -- [Bluewallet](https://bluewallet.io) -- [Unchained Capital/Caravan](https://unchained-capital.com) co-managed -- [Specter](https://specter.solutions) -- [Armory](https://btcarmory.com) -- [Guarda](https://guarda.com) - ---- - -Next, let's look at [shared schemes]({{ '/guide/private-key-management/multi-user-schemes/' | relative_url }}). diff --git a/guide/private-key-management/threshold-signatures.md b/guide/private-key-management/threshold-signatures.md new file mode 100644 index 000000000..77a2ce2ba --- /dev/null +++ b/guide/private-key-management/threshold-signatures.md @@ -0,0 +1,74 @@ +--- +layout: guide +title: Key sharing +description: An overview of personal private key management schemes. +nav_order: 5 +parent: Private key management +permalink: /guide/private-key-management/key-sharing/ +image: https://bitcoin.design/assets/images/guide/private-key-management/schemes/page-personal-schemes.jpg +--- + + + +# Threshold signatures / Key-sharing + +A threshold signature scheme can require n-of-n signatures from parts of a single private key to make a valid transaction. By sharing parts of the private key among several parties or locations, greater resistance to theft can be achieved since access to more than one share is required. Depending on the setup, resistance to self-inflicted loss can be similar or worse than with a single key (2-of-2) or better (2-of-3 or more). + +Some benefits over a multikey setup include greater privacy, as a transaction using threshold signatures will appear equal to a single key transaction and not expose details about the different key shares. Transactions will also incur lower fees than a multikey setup as only one signature will be recorded on-chain. The big caveat here however is that these advantages are true only with the current ECDSA signatures of bitcoin, while with the forthcoming Schnorr signature scheme multikey signatures will be indistinguishable from single key. + +{% include image.html + image = "/assets/images/guide/private-key-management/schemes/threshold-signatures.jpg" + retina = "/assets/images/guide/private-key-management/schemes/threshold-signatures@2x.jpg" + alt-text = "Threshold signatures illustration" + caption = "One key is split into several pieces, more than one are required for controlling the wallet." + width = 800 + height = 400 +%} + +### How it works +A single private key is split into n key-shares that are distributed to several parties, devices or locations. When signing a transaction the required number of shares need to be coordinated into one valid signature. This relies on a cryptographic algorithm called [Shamir's Secret Sharing](https://en.wikipedia.org/wiki/Shamir's_Secret_Sharing) after its creator. + +{% include fact/pros.html %} + +- Can provide higher resistance to loss from theft +- Transactions look identical and have same cost as single key wallets on chain + +{% include fact/close.html %} + +{% include fact/cons.html %} + +- Requires precise coordination of key-shares when signing +- Few advantages over multi-key setups with Schnorr signatures +- Individual product implementations not interoperable + +{% include fact/close.html %} + +### Best practice + +**When to use** +- When target audience is well-versed with bitcoin +- When risk of theft is higher than self-inflicted loss + +**When not to use** +- When Schnorr signatures are available, enabling multi-key setups with similar benefits + +**Variations** +- Number of signatures required +- Location and distribution of pieces +- Signing procedure + +**Products that use this scheme** +- [ZenGo](https://zengo.com) +- [Hexa](https://hexawallet.io) +- [Spatium](https://spatium.net) +- [Bitfreeze](https://medium.com/@bitfreeze/threshold-signatures-multisig-is-not-enough-e1ba468f6102) - No longer in active development + +--- + +Next, let's look at [multi key]({{ '/guide/private-key-management/multi-key/' | relative_url }}).