Skip to content

Security: Random21m/blindsig

SECURITY.md

Security policy

Reporting a vulnerability

Please report security problems privately, not in a public issue:

  1. Open the Security tab of this repository.
  2. Choose Report a vulnerability.

Include what you found, how to reproduce it, and what an attacker could do with it. Reports about anything that could leak a seed phrase, lose or double-spend ecash, or reveal who pays whom are the most valuable.

Fixes ship to the live wallet at https://random21m.github.io/blindsig/ as soon as they're ready.

How blindsig is built

  • No server of its own. blindsig is a static site served by GitHub Pages. Your seed phrase, ecash and history stay in your browser's storage and are never uploaded anywhere.
  • Strict Content Security Policy. Only code from the site itself can run. No inline scripts, no eval, no third-party scripts.
  • Nothing loaded from other sites at startup. Fonts and the optional debug console are served from this site.
  • No referrer. Requests to mints and other services don't reveal which page they came from.
  • One tab at a time. Two open copies of the wallet can't spend the same ecash.

Who the app talks to

Service When Can turn off
The mints you add Balances, payments, token checks No (that's how ecash works)
Coinbase price API Showing fiat values, the price chart, and estimating older payments' value (the same price-history requests as the chart; no payment dates are sent) Settings → Privacy
Cashu auditor (audit.8333.space) Opening mint details Settings → Experimental
Nostr relays Only when you use Nostr features (payment requests, NWC, backup, discovery, Nostr wallet sync) Yes, by not enabling them
npub.cash Only if you turn on the Lightning address Yes
LNURL services Only when you pay or withdraw with an LNURL or Lightning address you entered Yes, by not using them
Cloudflare DNS-over-HTTPS (cloudflare-dns.com) Only when you pay a ₿user@domain name (BIP-353), or a user@domain that isn't a Lightning address. The DNSSEC signatures are checked in the app, so Cloudflare isn't trusted for the answer, but it sees which name you looked up Yes, by not using such names
A mint's login provider Only for mints that require an account (NUT-21), when you log in and when the login is renewed Yes, by not using such mints

Known limits

  • Opening a token link (#token=…) makes the wallet ask the mint named in the token for its lock information, so that mint (a stranger's, if you don't use it yet) can see your IP address and when you opened the link. The wallet does not check its signatures or keep what it says unless you receive. Addresses to look up (LNURL, user@domain, ₿name) in a link or QR are never contacted until you tap Continue.
  • The Android share target uses a GET request, so a shared token can appear in the query string of the first page load before the service worker is controlling the page. Links with #token= keep the token in the fragment, which is never sent to a server; prefer those.
  • Only one tab runs the wallet. A tab that was asleep or sat on the PIN pad while another tab saved will notice the newer save and give way instead of overwriting it.
  • The Content Security Policy is delivered in a <meta> tag, because GitHub Pages can't set headers. Browsers ignore frame-ancestors there, so the app checks for itself: when it finds it is inside another page's frame it refuses to start and offers a link to open it on its own. A server that sends the real header would be stronger. connect-src allows any https:/wss: host (mints and relays are chosen by you, so it can't be narrower) and plain http:///ws:// only to localhost for local mints and relays. style-src allows inline styles.
  • The optional debug console (eruda) opens and works under the policy (checked in Chromium), but it contains eval, which the policy blocks, so anything that evaluates typed code in its console can't run. The wallet's own code never uses eval.
  • Without the PIN lock, your seed phrase and ecash are stored unencrypted in the browser, and anyone with your unlocked device can spend them. With the PIN lock on (Settings → PIN lock), the wallet is encrypted with AES-256-GCM under a key derived from the PIN (PBKDF2-SHA256, 600,000 rounds). Only the theme, language, PIN length, lock delay, and the sound, vibration, sounds-on-silent and motion choices stay readable, so the lock screen can be drawn. A 4- or 6-digit PIN protects against someone picking up the phone. An attacker who copies the browser's storage can still try every PIN offline, so write the seed down and keep it offline either way.
  • Face ID / Touch ID unlock uses a passkey kept by your phone (WebAuthn with the PRF extension). The passkey's secret, released only after Face ID or Touch ID, seals a copy of your PIN; that sealed copy sits next to the encrypted wallet. No server is involved, and changing the PIN turns it off.
  • A decoy PIN opens a second, separate wallet that's sealed the same way under its own key. The PIN you type decides which wallet opens, and both checks run every time so neither PIN is slower. It's meant for someone looking over your shoulder or forcing you to unlock the app, not for forensics: someone who copies the browser's storage can see that a second sealed wallet exists, though not what's in it. Face ID always opens the real wallet. "Forgot PIN" resets both.
  • A time vault locks ecash (NUT-11) to a key whose private half is thrown away, with your refund key allowed only after the unlock date. The mint enforces the date. The keys are blinded (P2BK, NUT-28), so the mint can't link your vaults to each other through the refund key. The refund key and the locked token live in the wallet's storage, not in your seed phrase, so a seed restore can't bring a vault back: keep a backup file.
  • Receiving nutzaps publishes a public note (kind 10019) tied to your nostr identity, listing your mints, your relays and a P2PK key used only for nutzaps. Anyone can see which mints you accept. Sent nutzaps are public events too: the amount, the mint and who you sent to are visible on the relays, though the ecash is locked so only the recipient can redeem it.
  • Nostr wallet sync (NIP-60) puts your ecash on your relays, encrypted (NIP-44) to your nostr identity. Anyone with that nostr key, and any app you give it to, can spend the ecash, so treat the key like your seed. Relays see when your wallet changes and roughly how big its events are, not what's in them. Relays can also drop data: the seed phrase and backup file are still your backup.
  • Ecash you send carries the mint's signature proofs (NUT-12 DLEQ) so the receiver can check it offline; turn this off under Settings → Privacy. The proofs include the blinding factor, so a receiver who shared them with the mint could let it link the token back to when it was issued.
  • ₿user@domain names (BIP-353) are only paid when their DNSSEC signatures check out all the way from the DNS root's published key, verified in the app (RSA/SHA-256 or SHA-512, ECDSA P-256/P-384, Ed25519/Ed448; SHA-1 and RSA keys under 1024 bits are refused). The checker is loaded only the first time a name is looked up.
  • Code-locked ecash (HTLC, NUT-14) uses a 20-character code (100 bits; shorter 12-character codes from older versions still work) from which the lock's preimage is derived. Anyone with both the token and the code can claim it, so send them by different routes.
  • For mints that require an account (NUT-21/22), the wallet keeps the login's refresh token and a few spare blind auth tokens with the rest of the wallet (encrypted with the PIN lock). The login token is only used to get blind tokens, so the mint can't tie individual requests to the account.
  • Tapping a shop terminal (Web NFC, Android Chrome) writes an ecash token to it after you confirm the payment. If that write fails the token stays in your history, where you can reclaim it.
  • Backup files are encrypted with AES-256-GCM under a key from your password (PBKDF2-SHA256, 600,000 rounds). The file holds the whole wallet, including the seed phrase, so its safety rests on the password: use a long one. Anyone with the file and the password can spend your ecash.
  • Mints are custodians. A mint can refuse to redeem ecash or go offline. Use small amounts and mints you trust.
  • GitHub Pages controls the hosting. If you want to remove that trust, build the site yourself (see the README) and host it on your own domain.

There aren't any published security advisories