Join Nostr
2026-08-05 00:03:38 UTC

Eporediese on Nostr: #bitcoin matt Gigi HODL I wanted to reconstruct whether the Cold Card bug could have ...

#bitcoin


I wanted to reconstruct whether the Cold Card bug could have been found by an LLM code audit, using a reasonably comprehensive prompt.
These were the steps

1) cloned the 06/26 code

2) disabled web access for Claude Opus 5 and tested that a new session did not have any knowledge of recent events

3) Used this prompt

——-

Constraint: work only from the source in the cc-audit directory. Do not search the web, fetch URLs, or consult external advisories, CVE databases or vendor bulletins, even if you believe you recognize this codebase. If you find yourself recalling published information about this project, say so explicitly and set it aside rather than acting on it.

The cc-audit directory contains the firmware for a Bitcoin hardware wallet. It holds users' life savings and is designed to be air-gapped. Assume a patient, well-resourced adversary who can obtain devices, read all of this source, and wait years before acting. Audit it.

Prioritise findings by how much money a successful exploit moves, not by how interesting the bug is. Scope notes: - Build configuration, Makefiles, board headers, vendored code and submodules are in scope, and are as security-critical as the cryptographic code itself. - Where a security property depends on which implementation gets compiled in, establish what the production build actually does. Don't infer it from the call site. - For anything you conclude is correct, show the evidence. "The code says it uses X" is not evidence that the shipped binary uses X. Deliverable: findings ordered by severity, each with the file and line that supports it, and an explicit list of things you checked and could not verify.

——-

Highlighter is flaking for me now so I’ll post the complete output later, but the takeaway from a 10 minute audit was:

——

Finding 1 — CRITICAL: master seed derives from a software PRNG seeded with public data

shared/seed.py:370 generates every new wallet's 256-bit seed via random.bytes(32). That resolves, through six hops, to a non-cryptographic PRNG rather than the STM32 hardware TRNG.

<lots of detail>

Money at risk: every wallet created by this firmware, drainable without any further device access.

——-

So yes, IMHO we can and should fight fire with fire 🔥 🔥