The chain-bootstrap download was authenticated only by a same-origin SHA-256,
which anyone who can replace the archive (CDN/server compromise or a TLS break)
can also replace. The RCE half of the original report is already closed — extract
skips every *.conf/wallet*/.dat entry, so DRAGONX.conf/blocknotify can't be
overwritten — but the archive itself was unauthenticated.
Verify a detached ed25519 signature over the published .sha256 file (the archive
is multi-GB; its checksum already binds the bytes, so signing the small checksum
authenticates the whole download) against a pinned key. A present-but-invalid
signature always fails closed; a missing one is gated by
kBootstrapRequireSignature (false until bootstrap.dragonx.is publishes .sig
files, then flip to true). Adds scripts/sign-bootstrap-release.sh; the secret key
stays offline.
Also adds regression tests: testBootstrapSignatureInterop (known-answer verify
against the pinned key, fails closed on tamper/wrong-key — F5) and
testEphemeralPortPick (F13).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>