Skip to content

Commit

Permalink
Merge pull request #11 from btcguide/master
Browse files Browse the repository at this point in the history
Merge upstream changes
  • Loading branch information
holgern authored Jan 18, 2021
2 parents 95dbdf1 + c4ece88 commit af9552a
Show file tree
Hide file tree
Showing 20 changed files with 145 additions and 135 deletions.
2 changes: 2 additions & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
AML
Analytics
Andreas
Antonopolous
AWG
Altcoin
BIP
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ For regular users, just visit <https://btcguide.github.io/> to see GitHub Pages

---

For advanced users, you can host this locally with [jekyll](https://jekyllrb.com/) (setup instructions [here](https://jekyllrb.com/docs/installation/ubuntu/)):
For advanced users, you can host this locally with [jekyll](https://jekyllrb.com/) (setup instructions: [Ubuntu](https://jekyllrb.com/docs/installation/ubuntu/); [macOS](https://jekyllrb.com/docs/installation/macos/)):
```bash
$ bundle exec jekyll serve
```
Expand Down
87 changes: 45 additions & 42 deletions _includes/breadcrumbs.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,48 @@
{% endcomment %}

{% assign crumbs = page.url | remove:'/index.html' | split: '/' %}
<a href="/">Home</a>
{% for crumb in crumbs offset: 1 %}
{% if forloop.last %}
{% if crumb == "advanced" %}
&lt;&lt;
Advanced
{% elsif crumb contains "-advanced" %}
&lt;&lt;
<a href="{{ crumb | split: "-advanced" | first }}">
{% assign words = crumb | split: "-advanced" | first | replace:'-',' ' | remove:'.html' | split: ' ' %}
{% for word in words %}
{{ word | capitalize }}
{% endfor %}
</a>
&lt;&lt;
Advanced
{% else %}
&lt;&lt;
{{ page.title }}
{% endif %}
{% else %}
&lt;&lt;
{% if crumb == "known-issues" %}
Known Issues
{% elsif crumb == "hosted" %}
Hosted
{% elsif crumb == "hardware" %}
Hardware
{% elsif crumb == "software" %}
Software
{% elsif crumb == "protocols" %}
Protocols
{% else %}
<a href="{% assign crumb_limit = forloop.index | plus: 1 %}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' | replace:'without-plugin/','without-plugins/' }}{% endfor %}">
{% assign words = crumb | replace:'-',' ' | remove:'.html' | split: ' ' %}
{% for word in words %}
{{ word | capitalize }}
{% endfor %}
</a>
{% endif %}
{% endif %}
{% endfor %}
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">Home</a></li>
{% for crumb in crumbs offset: 1 %}
{% if forloop.last %}
{% if crumb == "advanced" %}
<li class="breadcrumb-item active" aria-current="page">Advanced Considerations</li>
{% elsif crumb contains "-advanced" %}
<li class="breadcrumb-item">
<a href="{{ crumb | split: "-advanced" | first }}">
{% assign words = crumb | split: "-advanced" | first | replace:'-',' ' | remove:'.html' | split: ' ' %}
{% for word in words %}
{{ word | capitalize }}
{% endfor %}
</a>
</li>
<li class="breadcrumb-item active" aria-current="page">Advanced Considerations</li>
{% else %}
<li class="breadcrumb-item active" aria-current="page">{{ page.title }}</li>
{% endif %}
{% else %}
{% if crumb == "known-issues" %}
<li class="breadcrumb-item active" aria-current="page">Known Issues</li>
{% elsif crumb == "hosted" %}
<li class="breadcrumb-item active" aria-current="page">Hosted</li>
{% elsif crumb == "hardware" %}
<li class="breadcrumb-item active" aria-current="page">Hardware</li>
{% elsif crumb == "software" %}
<li class="breadcrumb-item active" aria-current="page">Software</li>
{% elsif crumb == "protocols" %}
<li class="breadcrumb-item active" aria-current="page">Protocols</li>
{% else %}
<li class="breadcrumb-item">
<a href="{% assign crumb_limit = forloop.index | plus: 1 %}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' | replace:'without-plugin/','without-plugins/' }}{% endfor %}">
{% assign words = crumb | replace:'-',' ' | remove:'.html' | split: ' ' %}
{% for word in words %}
{{ word | capitalize }}
{% endfor %}
</a>
</li>
{% endif %}
{% endif %}
{% endfor %}
</ol>
</nav>
26 changes: 21 additions & 5 deletions _includes/next_steps.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
{% unless page.url contains "advanced" or page.no_advanced_link == true %}
## Advanced Configuration
Click
[here]({% if page.url contains "index" %}advanced{% else %}{{ page.url | split: '.' | first }}-advanced{% endif %})
for advanced details on how to improve your security at this step.

<br />


<div class="alert alert-primary mb-4">
<h4 class="alert-heading mb-3">Advanced Considerations</h4>
<p>
Comfortable with the concepts in this step?
</p>
<p class="mb-1">
Read the
<a href="{% if page.url contains "index" %}advanced{% else %}{{ page.url | split: '.' | first }}-advanced{% endif %}">advanced considerations</a>
that can potentially improve your security here.
</p>
</div>



{% endunless %}

{% if include.next_url and include.next_name %}

---
\>\>

&raquo;
Next Section: [{{ include.next_name }}]({{ include.next_url }})
{% comment %}TODO: pull-right somehow? {% endcomment %}
{% endif %}
10 changes: 7 additions & 3 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,16 @@
<h1>
{% if page.url contains "known-issues/" %}Known Issues:{% endif %}
{{page.title}}
{% if page.url == "advanced" or page.url contains "-advanced" %} - Advanced{% endif %}
{% if page.url == "advanced" or page.url contains "-advanced" %} &raquo; Advanced Considerations{% endif %}
</h1>

<hr />

{{ content }}
<br /><br /> {% comment %}FIXME{% endcomment %}
<div class="mb-5">
{{ content }}
</div>

<br /><br /><br /> {% comment %}FIXME{% endcomment %}

</main>

Expand Down
2 changes: 1 addition & 1 deletion _pages/backup-wallet/public-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Make many copies and store in many locations.
We recommend you keep a copy of *all* public keys (and related metadata) with *each* seed.

#### Save on Your Computer
TODO: add instructions on how to save this with Specter-Desktop.
On Specter-Desktop, select your multisig wallet (e.g. `Redundant Multisig`) > `Settings` > `Export` > `Save Backup PDF`

#### Save Online
Save this data to various cloud providers (Dropbox, Google Drive, iCloud) or backup services (Mozy, Carbonite, Backblaze, etc.) that you may already use.
Expand Down
2 changes: 0 additions & 2 deletions _pages/emergency-recovery/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ Tails strongly recommended.
#### Verify Validity of Electrum Software
You can read instructions on how to do this [here](https://www.reddit.com/r/Bitcoin/comments/aa3l6n/how_to_check_if_your_electrum_wallet_is_legit/).


{% include next_steps.md %}
12 changes: 0 additions & 12 deletions _pages/known-issues/hardware/coldcard.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,10 @@
title: Coldcard
---

#### Verifying a Receiving Address Breaks Airgap
[Coldcard doesn't currently support address exploration with an airgap](https://github.com/Coldcard/firmware/pull/25).
In order to verify a receive address on a coldcard you must significantly weaken your airgap and plug the Coldcard into your laptop via USB port!

We expect they'll release this feature in the future, but the recommendation for now is to use Cobo Vault as the primary device when it comes to [verifying receive addresses](/verify-receive-address/).
Advanced users can pursue [various mitigation strategies](/verify-receive-address/coldcard-advanced).

#### SD Card "Airgap"
While better than a USB port, SD cards are not a perfect airgap.
[Stuxnet](https://en.wikipedia.org/wiki/Stuxnet) proved that the NSA was capable of jumping a USB-drive airgap to harm the Iranian nuclear reactor program.

{% include hw/wired_airgap.md %}Coldcard requires a USB connection only to perform address verification (see above for related issues).

#### Small Screen
This makes it hard to manually verify addresses / public key info, and impossible to display QR codes (to minimize using the SD card).

Expand All @@ -32,9 +23,6 @@ That said, Coldcard firmware is fully open so users can compile it themselves if
This hardware wallet was launched by forking some of Trezor's open-source code.
That said, it is very actively maintained and has many new features since then (some that Trezor has not been updated to support).

{% include hw/udev.md %}
Fixing the airgap on receive address verification would eliminate this issue altogether.

{% include hw/python.md %}

{% include hw/encouragement.md %}
2 changes: 1 addition & 1 deletion _pages/known-issues/hosted/unchained.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ As Trezor is stateless, these steps will only confirm that `1` of your keys is p
[`3-of-5` would be better](/quorum-advanced), especially when using a hosted service that already:

* Abstracts away a lot of multisig's complexity
* Holds 1 (or more) of your seeds
* Holds `1` (or more) of your seeds

{% include hosted/benefits.md %}
Some noteworthy benefits of using Unchained:
Expand Down
39 changes: 25 additions & 14 deletions _pages/known-issues/verify-receive-address.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,43 @@ title: Verifying a Receive Address
---

## Confirm You Control the Wallet
Because multisig schemes require `m-of-n` signatures, you must verify a new receive address on `m-of-n` trusted devices before receiving funds.
Because multisig schemes require `m-of-n` signatures, you must verify a new receive address on **at least** `m` trusted devices before receiving funds.
Otherwise, you could fall prey to a clever attack.

#### Example Attack
## Example Attack

Let's say you have a `2-of-3` multisig (with seeds A, B, and C), and your host computer is infected with malware (we always assume this to be true and it's the reason for using hardware wallets in the first place).
Unfortunately for you, one of your hardware wallets is compromised/fake.
Here is how you could be tricked into using an address you don't actually control to receive funds:
Let's say you have a `2-of-3` multisig (with seeds A, B, and C), and your host computer is infected with malware.
Remember that we always assume your host computer running Specter-Desktop is infected with malware as this is the problem hardware wallets exist to solve.

#### Simple Attack
Unfortunately for you, `1` of your hardware wallets is also compromised/fake.
When you use Specter-Desktop to lookup one of your bitcoin addresses (to receive funds on) a clever attacker could replace it with one that they control.
Here is how the attack work:

1. Specter-Desktop on your host computer (assumed to be malware infected) displays a `2-of-3` receiving address, where *none* of your hardware wallets are actually part of the multisig scheme.
1. You pull out hardware wallet A (also malware infected!) and it (falsely) confirms the same receive address on its trusted display.
1. You then deposit funds to this address, and are confused when they magically vanish :(
1. You pull out hardware wallet A (also malware infected) and it falsely confirms the same receive address on its trusted display.
1. You then deposit funds to this address **without checking on any other hardware wallet displays**.
1. You discover that the bitcoin you thought was sent to you was sent to your attacker :(

A similar attack is possible where < `m` of our keys are part of the multisig, but your attacker still controls at least `m` keys and can steal your funds as soon as they arrive.
For example, you might verify a `3-of-5` address on the trusted display of 2 hardware wallets, but your attacker could still control the other 3 keys and rob you remotely.
#### Complex Attack
A similar attack is possible where < `m` of your seeds are part of the multisig wallet, but your attacker controls `>= m` seeds.
If your hardware wallets are stateless (like Trezor), then this attack is possible even if none of your hardware wallets are compromised!

Smart hardware wallets implement a defense against this where they register all extended public key information when the wallet is setup, which can make this attack **much** harder to pull off.
1. Specter-Desktop on your host computer (assumed to be malware infected) displays a `2-of-3` receiving address, where only `1` of your hardware wallets are actually part of the multisig scheme.
1. You pull out hardware wallet A and it falsely confirms the same receive address on its trusted display, as it really is `1` hardware wallet (seed A) in your `2-of-3` (which also includes B and C).
1. You then deposit funds to this address **without checking on any other hardware wallet displays** (B and C).
1. You discover that the bitcoin you thought was sent to you was sent to your attacker, as they control B and C (which is `2-of-3` of the seeds needed to spend your bitcoin without your permission).

#### How Bad Is This
#### Defense
Smart hardware wallets implement a defense against this where they register all extended public key information when the wallet is setup, which can make this attack **much** harder to pull off.
If you're willing to trust one of those hardware wallets exclusively (potentially creating a single point of failure), you can choose to accept the result on your hardware wallet's trusted display.

The bullet-proof solution is to verify your receive addresses on a quorum of trusted displays.
If you have a large-value transaction, you should always confirm the address on *at least* `m` trusted displays.
If you have a very large-value transaction, you may want to confirm the address on *all* `n` trusted displays.
Not only does this eliminate the risk, but it serves as a redundant check when making a deposit.

While perhaps a little counter-intuitive, this is an excellent safety feature as redundant verification applies to single-key signature users as well.
Verification in single-key schemes adds new issues due to the inherent single point of failure in single-key signature schemes;
you now have your seed floating around in multiple places for verification, and suffering a breach in any one of these is enough to lose all your funds!
Verification in single-key schemes adds new issues due to the inherent single point of failure in single-key signature schemes; you now have your seed floating around in multiple places for verification, and suffering a breach in any one of these is enough to lose all your funds!

#### Potential Mitigation
This guide spells out a [less secure approach](/verify-receive-address/advanced) that is available for users who choose to sacrifice some convenience for security.
Expand Down
12 changes: 9 additions & 3 deletions _pages/send-bitcoin/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ Fortunately, your wallet software will abstract this away for you.
[TODO]: add link with more details explaining this.

#### Sign on Coldcard via SD Card
SD Card is a better airgap.

TODO: add instructions
SD Card is a better airgap, and preferable over signing through USB.

1. On the previous page, at Step 9, choose "Sign with SD Card file" instead of choosing "Sign with USB"
2. Click Save transaction, and save to your SD card
3. Eject the SD card from computer, and load into Coldcard
4. Click "Ready to sign" on Coldcard and confirm transaction details
5. Coldcard will save the signed transaction back to the SD card, but with the `-part` suffix at the end of the filename
6. Back in Specter, click "Load transaction from file", and choose the file on the SD card with the `part` suffix
7. Broadcast


#### Inspect Signed Transactions Before Broadcasting
Expand Down
13 changes: 1 addition & 12 deletions _pages/setup-wallets/coldcard-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,7 @@ Note that the whole benefit of this option (vs the previous one) is that you act
## Improve Coldcard Airgap

#### Power Source
Instead of connecting the Coldcard to your laptop for power:

* Use a portable battery pack (best)
* Use a wall outlet
* Use a [charge-only (no-data) USB cable](https://www.amazon.com/PortaPow-Specialised-3-3ft-20AWG-Charge/dp/B00RQ5AZ6Q)
* Use a [USB condom](https://www.amazon.com/PortaPow-3rd-Gen-Data-Blocker/dp/B00QRRZ2QM) on a regular USB cable

#### Use A Dedicated Device for Address Exploration
[Coldcard doesn't currently support address exploration with an airgap](https://github.com/Coldcard/firmware/pull/25).
In order to verify a receive address on a coldcard you must significantly weaken your airgap and plug the Coldcard into your laptop via USB port.

For more mitigations see [Coldcard Advanced Address Verification](/verify-receive-address/coldcard-advanced).
If the only available power source is a computer or a [possibly compromised charging port](https://en.wikipedia.org/wiki/Juice_jacking), using a [charge-only (no-data) USB cable](https://www.amazon.com/PortaPow-Specialised-3-3ft-20AWG-Charge/dp/B00RQ5AZ6Q) or a [USB condom](https://www.amazon.com/PortaPow-3rd-Gen-Data-Blocker/dp/B00QRRZ2QM) on a regular USB cable can help mitigate the risk of weakening the airgap.

#### SD Card Interactivity
Each time an SD card is taken from your computer to your Coldcard it can theoretically introduce malware onto the Coldcard (a failure where the malware is said to have "jumped your airgap").
Expand Down
16 changes: 10 additions & 6 deletions _pages/setup-wallets/coldcard.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,30 @@
title: Setup Coldcard
---

We recommend powering your Coldcard using a portable battery pack (best) or a wall outlet, instead of a computer, because we want to maintain as much of an "airgap" as possible.

Communication between your computer and Coldcard should only happen by manually transferring data over a microSD card.

## Update Your Firmware
Follow the steps on Coldcard's website:
Follow the steps on Coldcard's website:
<https://coldcardwallet.com/docs/upgrade>

## Setup Wallet
Follow the steps on Coldcard's website:
Follow the steps on Coldcard's website:
<https://coldcardwallet.com/docs/quick>

[TODO]: add more instructions for generating seed, setting PIN, etc

## Export Public Key Info to Computer via MicroSD
1. Insert a microSD into Coldcard and then select: `Settings` > `Multisig Wallets` > `Export XPUB`.
1. Insert a microSD into Coldcard and then select: `Settings` > `Multisig Wallets` > `Export XPUB`.
![](/assets/img/setup-coldcard-export-pubkey.jpg){:width="70%" class="border_image"}

1. Remove the microSD card from your Coldcard and put it in your computer's card reader.
1. Remove the microSD card from your Coldcard and put it in your computer's card reader.

1. On Specter-Desktop: Click `+ Add new device` > `Choose files` and select the exported file from the SD card:
1. On Specter-Desktop: Click `+ Add new device` > `Choose files` and select the exported file from the SD card:
![](/assets/img/setup-coldcard-specter-scan.jpg){:width="70%" class="border_image"}

1. Give your device a name (e.g. `Coldcard`) and click `Continue`.
1. Give your device a name (e.g. `Coldcard`) and click `Continue`.
![](/assets/img/setup-coldcard-specter-scanned.jpg){:width="70%" class="border_image"}


Expand Down
2 changes: 1 addition & 1 deletion _pages/setup-wallets/coordinate-multisig-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You can verify this when [setting up your Cobo](../setup-wallets/cobo), or go to
On your Coldcard, go to: `Settings` > `Multisig Wallets` > `Your Wallet Name` > `View Details`:
![](/assets/img/coordinate-multisig-view-policy-coldcard.jpeg){:width="35%" class="border_image"}

Because Coldcard uses `xpub...` while Specter-Desktop/Cobo use the newer `Zpub...` standard, the easiest way to do this in practice is to [verify a single receive address on the Coldcard](../verify-receive-address/coldcard).
Newer Coldcard firmware will display the same `Zpub...` standard that Specter-Desktop/Cobo use. However, older Coldcard firmware only shows `xpub...`, so an alternative is to [verify a single receive address on the Coldcard](../verify-receive-address/coldcard).

Expert users may be able to convert between `xpub` and `Zpub` with a tool like [Jameson Lopp's XPub Converter](https://jlopp.github.io/xpub-converter/) to verify extended public keys.
RTFM for more info: <https://coldcardwallet.com/docs/multisig>
Expand Down
Loading

0 comments on commit af9552a

Please sign in to comment.