Limestone City Bitcoin

Technical Resources ▸ Security & Keys

DIY Seed Generation

Roll your own randomness

Your entire wallet grows from one random number (see Private Keys). Normally you trust a device to pick that number for you. This guide shows you how to pick it yourself, with dice, so the randomness provably comes from your own hands. After a 2026 firmware flaw in a popular commercial signing device turned out to have silently weakened device-generated seeds for five years, this stopped being a paranoid hobby and became plain good practice.

Why Not Trust the Device?

When a wallet generates a seed for you, you are trusting three things: that its random number generator is strong, that its code has no bugs or backdoors, and that the device was not tampered with before it reached you. Any one failure can produce a seed an attacker can guess. Dice remove all three trust assumptions at once. You can see the rolls, you can do the math, and nobody can weaken physics.

What You Need

The Method: 256 Rolls to 24 Words

A 24-word seed encodes 256 bits of entropy, and one die roll gives you one honest bit:

Do this 256 times, recording the bits in 23 rows of 11 (a 4-4-3 grouping keeps them readable) plus 3 bits on row 24. Each 11-bit row is a number from 0 to 2047, and each of those numbers maps to one word on the BIP39 word list (2,048 words, in order). Convert each row from binary to decimal, look up the word, and rows 1 through 23 of your seed are done.

This half-and-half mapping is also why dice bias barely matters here: a worn die that favours one face still cannot push a "1, 2, 3 or not" split far from even, and any residual skew is spread across 256 independent rolls.

Writing It Out: Paper and Pencil

Rule a sheet into 24 rows of 11 cells, with small gaps after the fourth and eighth cell so each row reads in a 4-4-3 rhythm that is hard to misread. Fill cells left to right as you roll. Row 24 gets only its first 3 cells; the rest arrive with the checksum.

To turn a finished row into its number (0 to 2047), you have two ways to do the multiplication:

Here is a worked row. The bits 101 1100 0101 light up the 1024, 256, 128, 64, 4, and 1 columns, which sum to 1477, and word 1477 on the BIP39 list is "reward":

A hand-drawn worksheet row: the eleven powers of two written above eleven dice-roll bits, with the columns showing a one circled in orange, summing to 1477 and pointing to the word reward

One gotcha when you look words up: the BIP39 list counts from 0, but most published copies number their lines from 1. Your number 1477 is line 1478 on a 1-numbered list. Off-by-one here means a valid-looking seed with the wrong words, which is exactly the kind of mistake the verification step below exists to catch.

The Last Word: The Checksum

Word 24 is special. Its 11 bits are your 3 remaining rolled bits plus an 8-bit checksum, which is the first 8 bits of the SHA-256 hash of your 256 bits of entropy. The checksum is what lets any wallet detect a mistyped seed later.

Do not compute this step with improvised shell commands, because hashing the wrong representation of your bits produces the wrong checksum. Use a proper BIP39 tool on your air-gapped machine (the well-known open-source BIP39 page works offline), or let a SeedSigner take your dice rolls and derive the words for you. The point of doing it yourself is that you can also check it yourself: run the tool, confirm word 24, and you have verified the whole chain.

Verify Before You Trust

On the air-gapped machine, enter your 24 words into a wallet like Sparrow. If the wallet accepts the phrase, your checksum and conversions are correct. If it rejects it, recheck row 24 first, then your binary-to-decimal conversions. Nothing is at risk during a rejection; there are no funds involved yet.

Then treat it like any new wallet: stamp the words into metal, burn the paper, and run a full backup verification before the seed ever holds serious money.

⚠️ No recovery exists. There is no support line and no password reset. A seed generated sloppily, recorded with one wrong word, or photographed for convenience is a seed that will eventually lose money. Take the two to four hours this deserves, alone, offline, on paper then metal.

Go deeper. Add a passphrase on top of your new seed, load it into a signing device, and verify the backup before funding it. Questions? Bring your dice to a meetup.