Skip to content

Commit 4bf8149

Browse files
committed
Merge #803: Update binary verification instructions for multiple signers
ca85967 Don't duplicate builder GPG key in bin verify (James O'Beirne) 41ec90e Clean up obtain_release_key and add keys.txt link (James O'Beirne) cdbe711 Add note about importance of binary verification (James O'Beirne) ca4c331 Remove single release key (James O'Beirne) 5c57c61 Update binary verification instructions for multiple signers (James O'Beirne) Pull request description: Fixes #793. This updates the binary verification instructions to account for the new process, which uses multiple builder signatures on the `SHA256SUMS` file. See bitcoin/bitcoin#22634 for more details. ![image](https://user-images.githubusercontent.com/73197/133864620-c6046d0e-34eb-448c-8769-2e22beb4563e.png) ### Possible follow-ups - [ ] include instructions on how to elevate GPG trust of imported public keys. - [ ] include a reference to bitcoin/bitcoin#23020, pending its merge. ACKs for top commit: harding: Mostly tested ACK ca85967 . Built a preview, carefully read the instructions for all three platforms, and ran the Linux instructions. Windows and MacOS instructions not tested, but the only real difference from the instructions I wrote and had reviewed originally is the filenames, so I'm confident in them. Tree-SHA512: 7396660b7b70a91bf023b4fb6b1a0dec73da98081aa149fddea6ba79e450639e840144a8cf861264dbcf22ca39ee3e5253649fe8324e0bd34db5d6a3e16fdabe
2 parents 2aeaa47 + ca85967 commit 4bf8149

File tree

2 files changed

+100
-34
lines changed

2 files changed

+100
-34
lines changed

_includes/templates/download.html

Lines changed: 50 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,23 @@
88
{% assign magnet = VERSION_SORTED_RELEASES[0].optional_magnetlink %}
99
{% capture PATH_PREFIX %}/bin/bitcoin-core-{{CURRENT_RELEASE}}{% endcapture %}
1010
{% capture FILE_PREFIX %}bitcoin-{{CURRENT_RELEASE}}{% endcapture %}
11-
{% assign SIGNING_KEY_FINGERPRINT = "01EA5486DE18A882D4C2684590C8019E36C2E964" %}
12-
{% capture SIGNING_KEY_FINGERPRINT_EXPLODED %}{% include fingerprint-split.html hex=SIGNING_KEY_FINGERPRINT %}{% endcapture %}
11+
{% assign builder_line_arr = page.example_builders_line | split: ' ' %}
12+
{% assign example_builder_key = builder_line_arr[0] %}
13+
{% capture SIGNING_KEY_FINGERPRINT_EXPLODED %}
14+
{% include fingerprint-split.html hex=example_builder_key %}
15+
{% endcapture %}
16+
{% capture SHORT_BUILDER_KEY %}
17+
{{example_builder_key | slice: 0, 4}} {{ example_builder_key | slice: 4, 4 }}..
18+
.{% endcapture %}
19+
{% capture BUILDER_KEYS_TXT_URL %}{{page.builder_keys_url}}/keys.txt{% endcapture %}
20+
21+
{% capture OBTAIN_RELEASE_KEY %}
22+
{{page.obtain_release_key |
23+
replace: '$(BUILDER_KEYS_URL)', page.builder_keys_url |
24+
replace: '$(EXAMPLE_BUILDERS_LINE)', page.example_builders_line |
25+
replace: '$(BUILDER_KEYS_TXT_URL)', BUILDER_KEYS_TXT_URL}}
26+
{% endcapture %}
27+
1328
{% assign GPG_DOWNLOAD_URL = "https://www.gnupg.org/download/index.en.html#binary" %}
1429
{% assign GPG_MACOS_DOWNLOAD_URL = "https://gpgtools.org/" %}
1530
{% assign GPG_WINDOWS_DOWNLOAD_URL = "https://gpg4win.org/download.html" %}
@@ -69,15 +84,14 @@ <h2>{{ page.latestversion }} {{CURRENT_RELEASE}} <a type="application/rss+xml" h
6984
</div>
7085
</div>
7186
<p class="downloadmore">
72-
<a href="{{ PATH_PREFIX }}/SHA256SUMS.asc" class="dl">{{ page.downloadsig }}</a><br>
87+
<a href="{{ PATH_PREFIX }}/SHA256SUMS" class="dl">{{ page.download_sha }}</a><br>
88+
<a href="{{ PATH_PREFIX }}/SHA256SUMS.asc" class="dl">{{ page.download_sig }}</a><br>
7389
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX }}.torrent" class="dl">{{ page.downloadtorrent }}</a>
7490
{% if magnet %} <a href="{{ magnet | replace: '&', '\&amp;'}}" class="magnetlink" data-proofer-ignore></a>{% endif %}<br>
7591
<a href="{{ PATH_PREFIX }}/{{ FILE_PREFIX}}.tar.gz" class="dl">{{ page.source }}</a><br>
7692
<a href="/en/releases">{{ page.versionhistory }}</a>
7793
</p>
7894
<p class="downloadkeys">
79-
<span>{{ page.releasekeys }}</span>
80-
v0.11.0+ <code title="{{page.pgp_key_fingerprint}}">{{SIGNING_KEY_FINGERPRINT}}</code><br>
8195
{% if page.version > 2 %}<i>{{page.key_refresh}}</i><br><code>gpg{{site.strings.gpg_keyserver}} --refresh-keys</code>{% endif %}
8296
</p>
8397
</div>
@@ -87,6 +101,10 @@ <h2>{{ page.latestversion }} {{CURRENT_RELEASE}} <a type="application/rss+xml" h
87101
<h2 style="text-align: center">{{ page.patient }}</h2>
88102
<p>{{ page.notesync | replace: '$(DATADIR_SIZE)', site.data.stats.datadir_gb | replace: '$(PRUNED_SIZE)', site.data.stats.pruned_gb | replace: '$(MONTHLY_RANGE_GB)', site.data.stats.monthly_storage_increase_range_gb }} {{ page.full_node_guide }}</p>
89103

104+
105+
<h2 style="text-align: center">{{ page.verify_title }}</h2>
106+
<p>{{ page.verify_steps }}</p>
107+
90108
{% if page.version > 4 %}
91109
<h2 style="text-align: center" id="{{page.verify_download | slugify}}">{{page.verify_download}}</h2>
92110
<p>{{page.verification_recommended}}</p>
@@ -96,7 +114,9 @@ <h2 style="text-align: center" id="{{page.verify_download | slugify}}">{{page.ve
96114
<ol>
97115
<li><p>{{page.download_release}}</p></li>
98116

99-
<li><p>{{page.download_checksums}} <a href="{{ PATH_PREFIX }}/SHA256SUMS.asc">SHA256SUMS.asc</a></p></li>
117+
<li><p>{{page.download_checksums}} <a href="{{ PATH_PREFIX }}/SHA256SUMS">SHA256SUMS</a></p></li>
118+
119+
<li><p>{{page.download_checksums_sigs}} <a href="{{ PATH_PREFIX }}/SHA256SUMS.asc">SHA256SUMS.asc</a></p></li>
100120

101121
<li><p>{{page.cd_to_downloads}}</p>
102122

@@ -111,19 +131,21 @@ <h2 style="text-align: center" id="{{page.verify_download | slugify}}">{{page.ve
111131

112132
<li><p>{{page.ensure_checksum_matches}}</p>
113133

114-
<pre class="highlight"><code>type SHA256SUMS.asc</code></pre></li>
134+
<pre class="highlight"><code>type SHA256SUMS</code></pre></li>
115135

116136
<li><p>{{page.install_gpg}} <a
117137
href="{{GPG_WINDOWS_DOWNLOAD_URL}}">{{page.gpg_download_page}}</a>
118138
{{page.gpg_download_other}}
119139
<a href="{{GPG_DOWNLOAD_URL}}">{{page.gpg_download_options}}</a></p></li>
120140

121-
<li><p>{{page.obtain_release_key}}</p>
141+
<li><p>{{OBTAIN_RELEASE_KEY}}</p>
122142

123-
<pre class="highlight"><code>{{GPG}}{{site.strings.gpg_keyserver}} --recv-keys {{SIGNING_KEY_FINGERPRINT}}</code></pre>
143+
<pre class="highlight"><code>{{GPG}}{{site.strings.gpg_keyserver}} --recv-keys {{example_builder_key}}</code></pre>
124144

125145
<p>{{page.release_key_obtained}}</p></li>
126146

147+
<li><p>{{page.choosing_builders | replace: '$(BUILDER_KEYS_URL)', page.builder_keys_url }}</p></li>
148+
127149
<li>{{page.verify_checksums_file}}
128150

129151
<pre class="highlight"><code>{{GPG}} --verify SHA256SUMS.asc</code></pre></li>
@@ -133,7 +155,7 @@ <h2 style="text-align: center" id="{{page.verify_download | slugify}}">{{page.ve
133155
<li><p>{{page.complete_line_saying}} <code>{{page.localized_gpg_primary_fingerprint}} {{SIGNING_KEY_FINGERPRINT_EXPLODED}}</code></p></li>
134156
</ol>
135157

136-
<p>{{page.gpg_trust_warning}}</p></li>
158+
<p>{{page.gpg_trust_warning | replace: '$(SHORT_BUILDER_KEY)', SHORT_BUILDER_KEY }}</p></li>
137159

138160
</ol>
139161
</details>
@@ -143,7 +165,9 @@ <h2 style="text-align: center" id="{{page.verify_download | slugify}}">{{page.ve
143165
<ol>
144166
<li><p>{{page.download_release}}</p></li>
145167

146-
<li><p>{{page.download_checksums}} <a href="{{ PATH_PREFIX }}/SHA256SUMS.asc">SHA256SUMS.asc</a></p></li>
168+
<li><p>{{page.download_checksums}} <a href="{{ PATH_PREFIX }}/SHA256SUMS">SHA256SUMS</a></p></li>
169+
170+
<li><p>{{page.download_checksums_sigs}} <a href="{{ PATH_PREFIX }}/SHA256SUMS.asc">SHA256SUMS.asc</a></p></li>
147171

148172
<li><p>{{page.cd_to_downloads}}</p>
149173

@@ -153,7 +177,7 @@ <h2 style="text-align: center" id="{{page.verify_download | slugify}}">{{page.ve
153177

154178
<li><p>{{page.verify_download_checksum}}</p>
155179

156-
<pre class="highlight"><code>shasum -a 256 --check SHA256SUMS.asc</code></pre>
180+
<pre class="highlight"><code>shasum -a 256 --check SHA256SUMS</code></pre>
157181

158182
<p>{{page.checksum_warning_and_ok | replace, "$(SHASUMS_OK)", page.localized_checksum_ok}} <code>{{FILE_PREFIX}}{{site.data.binaries.macdmg}}: {{page.localized_checksum_ok}}</code></p></li>
159183

@@ -162,12 +186,14 @@ <h2 style="text-align: center" id="{{page.verify_download | slugify}}">{{page.ve
162186
{{page.gpg_download_other}}
163187
<a href="{{GPG_DOWNLOAD_URL}}">{{page.gpg_download_options}}</a></p></li>
164188

165-
<li><p>{{page.obtain_release_key}}</p>
189+
<li><p>{{page.obtain_release_key | replace: '$(BUILDER_KEYS_URL)', page.builder_keys_url | replace: '$(EXAMPLE_BUILDERS_LINE)', page.example_builders_line}}</p>
166190

167-
<pre class="highlight"><code>gpg{{site.strings.gpg_keyserver}} --recv-keys {{SIGNING_KEY_FINGERPRINT}}</code></pre>
191+
<pre class="highlight"><code>gpg{{site.strings.gpg_keyserver}} --recv-keys {{example_builder_key}}</code></pre>
168192

169193
<p>{{page.release_key_obtained}}</p></li>
170194

195+
<li><p>{{page.choosing_builders | replace: '$(BUILDER_KEYS_URL)', page.builder_keys_url }}</p></li>
196+
171197
<li>{{page.verify_checksums_file}}
172198

173199
<pre class="highlight"><code>gpg --verify SHA256SUMS.asc</code></pre></li>
@@ -177,7 +203,7 @@ <h2 style="text-align: center" id="{{page.verify_download | slugify}}">{{page.ve
177203
<li><p>{{page.complete_line_saying}} <code>{{page.localized_gpg_primary_fingerprint}} {{SIGNING_KEY_FINGERPRINT_EXPLODED}}</code></p></li>
178204
</ol>
179205

180-
<p>{{page.gpg_trust_warning}}</p></li>
206+
<p>{{page.gpg_trust_warning | replace: '$(SHORT_BUILDER_KEY)', SHORT_BUILDER_KEY }}</p></li>
181207
</ol>
182208
</details>
183209

@@ -186,7 +212,9 @@ <h2 style="text-align: center" id="{{page.verify_download | slugify}}">{{page.ve
186212
<ol>
187213
<li><p>{{page.download_release}}</p></li>
188214

189-
<li><p>{{page.download_checksums}} <a href="{{ PATH_PREFIX }}/SHA256SUMS.asc">SHA256SUMS.asc</a></p></li>
215+
<li><p>{{page.download_checksums}} <a href="{{ PATH_PREFIX }}/SHA256SUMS">SHA256SUMS</a></p></li>
216+
217+
<li><p>{{page.download_checksums_sigs}} <a href="{{ PATH_PREFIX }}/SHA256SUMS.asc">SHA256SUMS.asc</a></p></li>
190218

191219
<li><p>{{page.cd_to_downloads}}</p>
192220

@@ -196,16 +224,18 @@ <h2 style="text-align: center" id="{{page.verify_download | slugify}}">{{page.ve
196224

197225
<li><p>{{page.verify_download_checksum}}</p>
198226

199-
<pre class="highlight"><code>sha256sum --ignore-missing --check SHA256SUMS.asc</code></pre>
227+
<pre class="highlight"><code>sha256sum --ignore-missing --check SHA256SUMS</code></pre>
200228

201229
<p>{{page.checksum_warning_and_ok | replace, "$(SHASUMS_OK)", page.localized_checksum_ok}} <code>{{FILE_PREFIX}}-{{site.data.binaries.lin64}}: {{page.localized_checksum_ok}}</code></p></li>
202230

203-
<li><p>{{page.obtain_release_key}}</p>
231+
<li><p>{{page.obtain_release_key | replace: '$(BUILDER_KEYS_URL)', page.builder_keys_url | replace: '$(EXAMPLE_BUILDERS_LINE)', page.example_builders_line}}</p>
204232

205-
<pre class="highlight"><code>gpg{{site.strings.gpg_keyserver}} --recv-keys {{SIGNING_KEY_FINGERPRINT}}</code></pre>
233+
<pre class="highlight"><code>gpg{{site.strings.gpg_keyserver}} --recv-keys {{example_builder_key}}</code></pre>
206234

207235
<p>{{page.release_key_obtained}}</p></li>
208236

237+
<li><p>{{page.choosing_builders | replace: '$(BUILDER_KEYS_URL)', page.builder_keys_url }}</p></li>
238+
209239
<li>{{page.verify_checksums_file}}
210240

211241
<pre class="highlight"><code>gpg --verify SHA256SUMS.asc</code></pre></li>
@@ -215,7 +245,7 @@ <h2 style="text-align: center" id="{{page.verify_download | slugify}}">{{page.ve
215245
<li><p>{{page.complete_line_saying}} <code>{{page.localized_gpg_primary_fingerprint}} {{SIGNING_KEY_FINGERPRINT_EXPLODED}}</code></p></li>
216246
</ol>
217247

218-
<p>{{page.gpg_trust_warning}}</p></li>
248+
<p>{{page.gpg_trust_warning | replace: '$(SHORT_BUILDER_KEY)', SHORT_BUILDER_KEY }}</p></li>
219249

220250
</ol>
221251
</details>

_posts/en/pages/2017-01-01-download.md

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ permalink: /en/download/
44
type: pages
55
layout: page
66
lang: en
7-
version: 4
7+
version: 5
88

99
## These strings need to be localized. In the listing below, the
1010
## comment above each entry contains the English text. The key before the
@@ -21,8 +21,10 @@ latestversion: "Latest version:"
2121
download: "Download Bitcoin Core"
2222
# downloados: "Or choose your operating system"
2323
downloados: "Or choose your operating system"
24-
# downloadsig: "Verify release signatures"
25-
downloadsig: "Verify release signatures"
24+
# download_sha: "SHA256 binary hashes"
25+
download_sha: "SHA256 binary hashes"
26+
# download_sig: "SHA256 hash signatures"
27+
download_sig: "SHA256 hash signatures"
2628
# downloadtorrent: "Download torrent"
2729
downloadtorrent: "Download torrent"
2830
# source: "Source code"
@@ -50,37 +52,72 @@ notesync: >
5052
full_node_guide: "For more information about setting up Bitcoin Core, please read the <a href=\"https://bitcoin.org/en/full-node\">full node guide</a>."
5153
# patient: "Check your bandwidth and space"
5254
patient: "Check your bandwidth and space"
53-
# releasekeys: "Bitcoin Core Release Signing Keys"
54-
releasekeys: "Bitcoin Core Release Signing Keys"
5555

5656
pgp_key_fingerprint: "PGP key fingerprint"
5757
verify_download: "Verify your download"
58-
verification_recommended: "Download verification is optional but highly recommended. Click one of the lines below to view verification instructions for that platform."
58+
59+
verification_recommended: >
60+
<p>Download verification is optional but highly recommended. Performing the
61+
verification steps here ensures that you have not downloaded an unexpected or
62+
tampered version of Bitcoin, which may result in loss of funds.</p>
63+
64+
<p>Click one of the lines below to view verification instructions for that
65+
platform.</p>
66+
5967
windows_instructions: "Windows verification instructions"
6068
macos_instructions: "MacOS verification instructions"
6169
linux_instructions: "Linux verification instructions"
6270
snap_instructions: "Snap package verification instructions"
6371
download_release: "Click the link in the list above to download the release for your platform and wait for the file to finish downloading."
6472
download_checksums: "Download the list of cryptographic checksums:"
73+
download_checksums_sigs: "Download the signatures attesting to validity of the checksums:"
6574
cd_to_downloads: "Open a terminal (command line prompt) and Change Directory (cd) to the folder you use for downloads. For example:"
6675
cd_example_linux: "cd Downloads/"
6776
cd_example_windows: >
6877
cd %UserProfile%\Downloads
6978
7079
verify_download_checksum: "Verify that the checksum of the release file is listed in the checksums file using the following command:"
7180
checksum_warning_and_ok: 'In the output produced by the above command, you can safely ignore any warnings and failures, but you must ensure the output lists "$(SHASUMS_OK)" after the name of the release file you downloaded. For example:'
72-
obtain_release_key: "Obtain a copy of the release signing key by running the following command:"
81+
82+
example_builders_line: "E777299FC265DD04793070EB944D35F9AC3DB76A Michael Ford (fanquake)"
83+
builder_keys_url: "https://github.com/bitcoin/bitcoin/tree/master/contrib/builder-keys"
84+
85+
obtain_release_key: >
86+
<p>Bitcoin releases are signed by a number of individuals, each with a unique public
87+
key. In order to recognize the validity of signatures, you must use GPG to load these
88+
public keys locally. You can find many developer keys listed in the <a
89+
href='$(BUILDER_KEYS_URL)'>bitcoin/bitcoin repository</a>, which you can then load
90+
into your GPG key database.</p>
91+
92+
<p>For example, given the <a href='$(BUILDER_KEYS_TXT_URL)'><code>
93+
builders-key/keys.txt</code></a> line
94+
<pre class='highlight'><code>$(EXAMPLE_BUILDERS_LINE)</code></pre>you could load that
95+
key using this command:</p>
96+
97+
choosing_builders: >
98+
It is recommended that you choose a few individuals from this list who you find
99+
trustworthy and import their keys as above, or import all the keys per the
100+
instructions in the <a href="$(BUILDER_KEYS_URL)"><code>contrib/builder-key</code>
101+
README</a>. You will later use their keys to check the signature attesting to the
102+
validity of the checksums you use to check the binaries.
103+
73104
release_key_obtained: "The output of the command above should say that one key was imported, updated, has new signatures, or remained unchanged."
105+
74106
verify_checksums_file: "Verify that the checksums file is PGP signed by the release signing key:"
75-
check_gpg_output: "Check the output from the above command for the following text:"
107+
108+
check_gpg_output: >
109+
The command above will output a series of signature checks for each of the public
110+
keys that signed the checksums. Each signature will show the following text:
111+
76112
line_starts_with: "A line that starts with:"
77113
complete_line_saying: "A complete line saying:"
114+
78115
gpg_trust_warning: >
79-
The output from the verify command may contain a warning that
80-
the "key is not certified with a trusted signature." This means that
81-
to fully verify your download, you need to ask people you trust to
82-
confirm that the key fingerprint printed above belongs to the Bitcoin
83-
Core Project's release signing key.
116+
The output from the verify command may contain warnings that the "key is not
117+
certified with a trusted signature." This means that to fully verify your download,
118+
you need to confirm that the signing key's fingerprint (e.g.
119+
<code>$(SHORT_BUILDER_KEY)</code>) listed in the second line above matches what
120+
you had expected for the signers public key.
84121
85122
localized_checksum_ok: "OK"
86123
localized_gpg_good_sig: "Good signature"
@@ -140,4 +177,3 @@ key_refresh: "Refresh expired keys using:"
140177
---
141178

142179
{% include templates/download.html %}
143-

0 commit comments

Comments
 (0)