Jade device laid across a circuit-board shield
Blockstream Jade

Reflections on the Coldcard Fallout from the Jade Team

Blockstream Team

"May you live in interesting times” - Proverb

We have just released Jade firmware version 1.0.41, including new features, fixes, and security updates. This release comes at a tumultuous time in the Bitcoin and hardware wallet space following the recently exploited Coldcard random number generation vulnerability. As the developers of the Jade firmware, we'd like to reassure our users and provide some context on the Coldcard issue and how we work to keep our users safe.

Random Numbers

First, we’d like to reiterate and assure our users that Jade is not affected by the Coldcard vulnerability. At its core, that problem was a programming logic error that downgraded the devices random number generation to the point where generated seeds could be enumerated by an attacker. In other words, the seeds that the wallet generated during a certain period could be guessed with sufficient computing power. The attacker(s) generated the list of possible seeds, checked them for balances and then signed transactions moving the Bitcoin to their own address, stealing them from the rightful owners.

Jade does not have a downgraded random number generation path to fall back to, so this problem cannot occur. Jade fetches random numbers from the device itself, generated from internal hardware chip noise. We add other sources of device entropy depending on the model, such as the internal cycle counter, timing jitter, internal sensor readings and camera noise. We also allow host apps to pass in their own entropy. All of these sources are mixed by SHA512, the same hash function that BIP32 uses to derive wallets from seeds. We return part of the result as random data and use the remainder as the seed for the random generator.

Multiple analyses of the Jade random generator have confirmed its robustness and correctness, showing that it follows best practices for random number generation.

Coldcard Fallout and Security in the Age of AI

As the attack unfolded, it was found that some AI models could identify the bug when given the Coldcard firmware source code. This resulted in a large number of people and groups running AI models over public hardware wallet source code, including Jade. Soon after, other parts of the Bitcoin ecosystem (libraries, wallets, layer 2 projects etc) were also scanned.

All of our client-side code is open source, because our motto is "Don't trust, verify". So we have been receiving and acting on AI reports since AI models first became useful for code scanning. Nonetheless, the amount of new reporting required us to re-tool and increase the staffing around triaging security reports. We also had security researchers and interested third parties investigating the source code for security issues. We analyzed every report for validity, checked for duplicates, and determined its scope and severity before fixing it if necessary. This was a time-consuming task, and our teams have been very busy as a result.

This scanning process is ongoing across the entire software ecosystem, and will eventually result in much safer software for all of us. As a user, right now the most important lesson to take away from the last few weeks is to keep your software up-to-date. Check for updates regularly and apply them. This goes for your applications, operating systems, devices, routers and home appliances, not just your hardware wallet firmware. Maintaining security is an ongoing process, and you as a user must also participate.

The Coldcard bug is an unfortunate case where users could not be made safe by upgrading because the damage occurred at seed generation time. The correct remediation would be to identify the issue and notify users to migrate their wallet seeds. It is unclear whether the bug was identified early enough for this mitigation, or if it was identified at all before the attack occurred. No doubt the picture will become clearer soon.

Jade Development Status

We have fixed a number of reported issues in 1.0.41, and so we encourage users to upgrade as soon as they safely can. We have a number of other, less serious reports which we will address in a 1.0.42 release, likely on a shorter development time frame.

Bug reports from any source vary in type and severity, ranging from feature requests and user interface issues to functionality not working as intended or issues potentially affecting device security. In the event of a serious security issue we will notify users to upgrade immediately across all our communication channels. We don't feel that is warranted for this release, but users should nonetheless always update promptly to maintain the highest level of security.

Some of the measures taken to improve security in 1.0.41 include upgrading the runtime environment to the latest stable version, increasing the level of stack protection, updating dependencies and auditing the clearing of sensitive memory regions. We also improved our automated tests, which has allowed us to find and fix issues more rapidly. These changes were implemented before the Coldcard incident as part of our ongoing commitment to increasing device security whenever possible.

As of today we have received dozens of AI automated scans of the Jade code, and multiple additional human reviews focused on sensitive functionality such as the random generator and signing code. In most cases any suggested changes aimed to improve our defense-in-depth approach to security. That is, to remain secure even if one part of the system does not work as expected. An example of defense-in-depth is our random generator code, which uses multiple sources of entropy to prevent a single failure from compromising its output.

We appreciate the feedback from everyone who provided a review or a report. If you believe you have found a security issue, please check it against the Jade source code at https://github.com/Blockstream/Jade and follow the instructions at https://github.com/Blockstream/Jade/blob/master/SECURITY.md to report it to us.

Development Process

Our development process starts with a four-eyes review of all code changes before they are committed upstream. For sensitive areas all team members and in some cases external developers will also be asked to review. New features are audited before implementation for potential security concerns. Where a new protocol or crypto primitive is involved, we ask our internal research team for a protocol review before implementing.

We work internally on candidate code branches which are tested during the development phase before we commit anything to the public repository. Our testing process includes language and memory safety tests, bad-input testing, functional testing, and manual testing across all device variants and both firmware builds. We also use an internal AI scanning tool to identify potential security problems during development. Features are tested by our QA, product, and app development teams in addition to developer testing.

When we find a bug, we scan the code for other places where the same category of bug can be present. If possible we will make code changes to prevent that class of bug from occurring at all, or allow us to catch it during our automated tests.

Our process evolves as we find new ideas and tools to improve the quality of our software. We welcome suggestions or pull requests for improving the public tests in our GitHub repository.

We'd like to thank our users, the developer community and security researchers for their support as we continue working on improving Jade. A special shout out goes to:

  • Our internal teams for their help during the particularly crazy last few weeks.
  • Jordan Mecom from Spiral for developing Loupe and reporting issues to us for this and previous releases. Read more about the Loupe project.
  • 0xaudron (@0xaudron)for developing Kvazar (@kvazar_ai), an agentic security harness, and reporting issues to us for this release.
  • Damir, odudex, ZatoshiX, @erickcestari, @popodai, and Bitcoin Red Team for help investigating and fixing several important issues for this release.

Thanks,
Jon, Dan, and Mike (Jade firmware developers)

If you have specific preferences, please, mark the topic(s) you would like to read: