Bitcoiners turn to dice throws as self-custody setups are re-evaluated

1 hour ago

In airy of the catastrophic low-entropy bug successful Coldcard hardware wallets, linked to publically observed thefts opening connected July 30, Bitcoin holders person started to re-evaluate the spot assumptions successful their hardware wallet setups. 

How Coldcard’s entropy flaw worked

The Coldcard devices were equipped with seemingly functional STM32 “true random fig generators” (TRNGs) that trust connected carnal processes to nutrient an unguessable effect phrase.

However, aft Coldcard creator NVK decided to initiate a firmware rewrite to power from a GPL-licensed escaped bundle exemplary to a read-only model, a superior vulnerability appears to person been introduced.

Starting with firmware mentation 4.0.1, released successful March 2021, the instrumentality utilized MicroPython’s Yasmarang PRNG alternatively of decently utilizing the STM32 hardware RNG.

Random fig procreation is an unsolvable occupation successful machine science, which is wherefore the procreation of secure, unguessable backstage keys ever has to trust connected outer carnal processes to a degree. 

The usage of the Yasmarang PRNG was wide characterized by analysts successful the abstraction arsenic a pre-programmed fallback. However, Coinkite has present disputed this characterization successful a caller X post: 

 The conjecture that Coldcards were programmed to default to an evidently unsecured method of effect procreation has besides sparked speculation connected X astir whether this was a deliberately placed backdoor. 

Investigative Bitcoin writer Hodlnaut speculated that the bug stemmed from careless improvement practices and efforts to suppress errors done random changes.

Coinkite estimated that Mk2 and Mk3 devices generated seeds with 40 bits of entropy, portion the Mk4, Mk5 and Q achieved astir 70 bits. Both are good abbreviated of the 128 bits required for a unafraid 12-word effect phrase.

Ever since then, attackers person been successfully brute-forcing backstage keys, stealing implicit $100 cardinal worthy of BTC. How apt a wallet is to beryllium recovered depends connected whether oregon not further dice entropy was added, oregon a BIP-39 passphrase and non-standard way were used. 

Related: Coldcard hackers transportation 64 BTC and 200 ETH to cryptocurrency mixers

Since then, James O’Beirne has acceptable up a website with honeypot addresses, titled cktripwire,  successful bid to estimation which types of wallets attackers are efficaciously sweeping.

Honeypots tracked by cktripwire. Source: cktripwire.com

How carnal entropy saved immoderate wallets

The Coldcard exploit has erstwhile again painfully driven location 1 of the community’s halfway principles: Don’t trust, verify.

Those users who did not trust connected an opaque portion of engineering to make entropy for the astir information captious portion of the process, but utilized a capable fig of dice throws, saved their coins from the exploit. 

Rolling dice is simply a simple, visibly transparent process an mean idiosyncratic tin audit themselves and recognize intuitively. Verifying the TRNG, connected the different hand, would necessitate elaborate carnal inspection of the electronics and introspection of the firmware.   

While immoderate person utilized caller events arsenic a pretext to state the extremity of self-custody, pursuing this champion signifier leaves precise fewer options for a distant attacker.

If the seedphrase is generated done carnal entropy without relying connected the information of the hardware wallet, the lone existent azygous constituent of nonaccomplishment successful wallet procreation is removed.

Related: Do the Coldcard attacks mean each hardware wallets are present insecure?

The xpub and receiving addresses derived from the effect tin beryllium cross-checked by importing it into different devices.

Nonce exfiltration done an airgap tin besides beryllium caught by checking if 2 devices make the aforesaid RFC 6979-compliant signature erstwhile fixed an identical unsigned transaction. 

Secure entropy procreation is frankincense the implicit prerequisite for a unafraid wallet. Various methods and proposals for generating it person been making the rounds connected X since the Coldcard exploit was made public. 

The astir fashionable method is to cross-check the device’s quality to correctly person dice faces into a BIP-39 seedphrase by applying a SHA-265 hash. Using upwards of 100 dice throws past suffices to make entropy for a 24-word seed. 

Simple insubstantial methods, specified arsenic the table published by Bitbox, partition the abstraction of BIP-39 effect words truthful that a operation of six dice rolls and a coinflip tin straight beryllium assigned a effect connection without utilizing electronics. 

More blase templates specified arsenic the codex32 dice de-biasing worksheet usage a van Neumann extractor that tin beryllium computed by manus to make a unafraid effect operation adjacent with biased dice.

An alternate to throwing dice is to people retired the BIP-39 effect words, chopped them up into arsenic sized tiny pieces of paper, shuffle them thoroughly and past gully random 24 words. Products specified arsenic Seedsticks oregon Entropia marque this much convenient and robust.

Specialised hardware specified arsenic Frostsnap attempts to verifiably administer entropy procreation crossed devices.  

Some users person taken to designing their ain carnal entropy devices that tin make a seedphrase astir arsenic rapidly arsenic a portion of physics hardware. 

Related: Do the Coldcard attacks mean each hardware wallets are present insecure?

View source