upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/release-verification.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/release-verification.md')
-rw-r--r--docs/release-verification.md94
1 files changed, 67 insertions, 27 deletions
diff --git a/docs/release-verification.md b/docs/release-verification.md
index ecacd5f..b8eaf5e 100644
--- a/docs/release-verification.md
+++ b/docs/release-verification.md
@@ -3,60 +3,100 @@
3Bitflash releases publish binaries and a `SHA256SUMS` file. The checksum file 3Bitflash releases publish binaries and a `SHA256SUMS` file. The checksum file
4proves that the file you downloaded matches the file the release page names. 4proves that the file you downloaded matches the file the release page names.
5A detached signature, `SHA256SUMS.asc`, proves that the checksum file itself was 5A detached signature, `SHA256SUMS.asc`, proves that the checksum file itself was
6signed by a trusted release key. 6signed by the Bitflash release key.
7 7
8That gives users two separate checks: 8That gives users two separate checks:
9 9
101. `gpg --verify SHA256SUMS.asc SHA256SUMS` checks who signed the checksums. 101. `gpg --verify SHA256SUMS.asc SHA256SUMS` — who signed the checksums.
112. `sha256sum -c SHA256SUMS` checks the binaries against those checksums. 112. `sha256sum -c SHA256SUMS` — the binaries against those checksums.
12 12
13## User Check 13But the first check is only worth something if you require a **specific** key.
14A good signature by *some* key proves nothing; anyone can make one.
14 15
15From a shell with `curl` or `wget` and `sha256sum`: 16## The release signing key
17
18```text
19fingerprint 910A 2B4C CA87 9E81 FB4B 2AEA 1D4A 53D3 B78A A4B8
20uid Bitflash Releases (bitflash.network release signing)
21 <releases@bitflash.network>
22```
23
24The public key is published at
25`https://releases.bitflash.network/bitflash-release-key.asc` and embedded in
26`scripts/verify-release.sh`, so the tool's trust anchor lives in this
27repository rather than on the server it verifies.
28
29## User check
30
31From a shell with `curl` or `wget`, `sha256sum` and `gpg`:
16 32
17```bash 33```bash
18scripts/verify-release.sh latest 34scripts/verify-release.sh latest
19``` 35```
20 36
21For a specific release: 37The public release host should expose latest-file aliases for convenience:
22 38
23```bash 39```text
24scripts/verify-release.sh v1.2.13 40https://releases.bitflash.network/SHA256SUMS
41https://releases.bitflash.network/SHA256SUMS.asc
25``` 42```
26 43
27For release audits, require the signature: 44Those aliases must point at the current versioned directory. They do not replace
45signature verification; they only make the common manual path shorter.
46
47For a specific release:
28 48
29```bash 49```bash
30scripts/verify-release.sh v1.2.13 --require-signature 50scripts/verify-release.sh v1.2.15
31``` 51```
32 52
33Older releases may not have `SHA256SUMS.asc`. In that case the script warns and 53The script downloads the release, imports the pinned key into a throwaway
34still checks file integrity. New release audits should use `--require-signature`. 54keyring, and **refuses anything that is not a valid signature by the key above**
35 55before checking the hashes. Releases from before signing was introduced ship
36## Maintainer Flow 56only `SHA256SUMS`; without `--require-signature` those are checked for integrity
57and reported as unsigned.
37 58
38After building release assets in the repository root: 59By hand, if you would rather not run the script:
39 60
40```bash 61```bash
41scripts/make-release-checksums.sh --sign --local-user RELEASE_KEY_ID 62curl -O https://releases.bitflash.network/bitflash-release-key.asc
63gpg --import bitflash-release-key.asc
64gpg --verify SHA256SUMS.asc SHA256SUMS # must name the fingerprint above
65sha256sum -c SHA256SUMS
42``` 66```
43 67
44Upload all built assets plus: 68## Maintainer flow
45 69
46```text 70The signing key lives on a dedicated location, not in the build tree. After
47SHA256SUMS 71building the release assets in the repository root, write and sign the
48SHA256SUMS.asc 72checksums:
73
74```bash
75sha256sum Bitflash-*.zip Bitflash-*.AppImage bitflash-node-* > SHA256SUMS
76gpg --armor --detach-sign --output SHA256SUMS.asc SHA256SUMS
49``` 77```
50 78
51Keep the private signing key offline or on a dedicated release machine. Publish 79Publish, alongside the assets, `SHA256SUMS` and `SHA256SUMS.asc`, and update
52the public key fingerprint in the release notes and keep using the same key for 80`latest.txt` on the releases host to the new tag. Keep using the same key; if it
53future releases unless there is a clearly announced rotation. 81is ever rotated, announce the new fingerprint clearly and update the embedded
82key in `verify-release.sh`.
83
84For Windows releases with managed Tor built in, run `make windows-tor`. It
85creates `Bitflash-*-windows-with-tor.zip` by downloading the Tor Expert Bundle,
86checking the pinned SHA256 in `scripts/package-windows-tor.sh`, optionally
87verifying the Tor Project `.asc` signature, and placing `tor/tor.exe` next to
88`Bitflash.exe`. For release builds, run `TOR_VERIFY_GPG=required make
89windows-tor` so the signature check is mandatory. Include that zip in
90`SHA256SUMS` like any other release asset.
54 91
55## Why This Matters 92## Why this matters
56 93
57`SHA256SUMS` alone protects against a broken download, but not against someone 94`SHA256SUMS` alone protects against a broken download, but not against someone
58replacing both a binary and the checksum file. Signing `SHA256SUMS` means an 95replacing both a binary and the checksum file. Signing `SHA256SUMS`, and
59attacker must also have the release signing key to make the replacement verify. 96requiring a pinned key, means an attacker must also hold the release signing key
97to make the replacement verify. Serving from bitflash.network makes this the
98guarantee that matters: without a pinned key, "trust the site" is the only
99thing standing behind a download.
60 100
61This is not reproducible builds yet. It is the smaller, immediate step that 101This is not reproducible builds yet. It is the smaller, immediate step that
62makes every release asset auditable by users before they run it. 102makes every release asset auditable before anyone runs it.