AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 59 Bitcoin

implement tofu certificate pinning for tls bitcoin core connections

Public commit record

What the developer wrote

Authored by Craig Raw

50/100 · Thin
implement tofu certificate pinning for tls bitcoin core connections
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit adds certificate pinning for secure (TLS) connections to Bitcoin Core in the Sparrow Wallet. Previously, Sparrow trusted any certificate when talking to a user's own Bitcoin Core node over HTTPS, which could allow a network attacker to impersonate that node and intercept or alter wallet traffic. Now Sparrow records the first certificate it sees (a 'trust on first use' or TOFU model) and checks that future connections present the same certificate. It also keeps Electrum server certificates separate from Bitcoin Core ones. This is a security improvement, not a vulnerability being introduced.

Recommended action

No immediate user action required; this is a defensive improvement. Users connecting to Bitcoin Core over TLS should verify the first-seen certificate matches their node's certificate if they have not previously connected. Review whether disabling hostname verification is acceptable for the intended deployment model.

Security signals we found

01

Replaces trust-all X509TrustManager in BitcoindTransport with pinned-certificate trust manager

02

Adds TOFU certificate saving on first successful HTTPS connection to Bitcoin Core

03

Separates Bitcoin Core and Electrum TLS certificate storage by host cert filename suffix

04

Adds SSLHandshakeException handling and TlsServerException reporting for Bitcoin Core TLS failures

05

Fixes unclosed FileInputStream when loading pinned certificate

Risk score

Why this scored 59/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 10/15
Affected reach 8/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.