Posted on Leave a comment

Fun and Games with the System Shock Puzzle

Coldbit Steel - System Shock Bundle

If you follow us on Twitter you might have noticed the tweet where we put together a puzzle and invited our followers to play. The prize was 1 million satoshi (0.01 BTC) waiting to be swept by anyone who managed to solve it first.

Then we sent a DM to anyone who decided to play:

There’s 1 million Non-KYC satoshis (0.01 BTC) buried in this image in a single P2PKH address waiting to be swept. They’re protected by a single private key which is hidden in this image somewhere. Are you able to find it ?

Hurry up because they’re not going to sit there forever.

When you manage to find and sweep the BTC, reply to the original tweet describing how you did it and how long it took.

Good luck! 🙂

What is it?

The image features 3 metal wallets from our recently released Coldbit Steel – 3x System Shock Bundle. You can use these Coldbit Steel wallets as a backup for your Bitcoin seeds. They’re made of stainless steel, they’re extremely heat and corrosion resistant. Ideal for long term, cold storage of your most valuable Bitcoin stash in geographically distributed locations.

The Game

Solving the puzzle started at around 11 AM CEST. To be honest we expected this puzzle to be solved in less than 2 hours but to our surprise 4 hours had passed and the coins were still there unclaimed.

As more and more people joined we started receiving questions about the way this puzzle was constructed.

At at 5:45 PM we sent out a hint:

This hint revealed 2 things:

  • the public address containing 1 million sats 1Q7QWSMhQWdJ46o6MRPdtr7FLaDbwpaShq
  • the signature confirming that we knew the private key for this address and that this was an actual puzzle and not some crypto Twitter scam

Knowing the public address would make solving this puzzle somewhat easier because one wouldn’t have to scan the entire pool of unused outputs looking for just one special P2PKH address containing 0.01 BTC matching our private key.

Steganography

The other common dillema was whether the solution relied on steganography. Steganography is the practice of concealing a file, a message, image, or video within another file, message, image, or video. In other words was the private key protecting this address concealed somewhere in the binary stream of the image ?

Questions about steganography started popping up, the others were focused on tiny parts of the image thinking the answer is hidden in a tiny area. We didn’t want the players to waste more time figuring out fancy steganographic tools or using magnifying glasses so we tweeted some more hints:

You don’t have to use steganography to find it

The solution

7 hours after the puzzle started and still no winner in sight we decided to release the final hints:

“Call me Ishmael” is an opening line from Herman Melville’s novel “Moby-Dick”. It’s also the title of a blog post by BitMEX Research describing the exact same brainwallet setup used in this puzzle. You could find this blog post by searching for “Call me Ishmael Bitcoin” using your favourite search engine.

The reasoning behind giving out this hint was directing the players towards the exact wallet setup we used instead of letting them wonder about BIP39, wordlists, BIP32 and dozen other ways a Bitcoin wallet can be constructed.

There was another, subtle hint that this was a brainwallet setup:

Still, even knowing the exact setup, which was:

SHA256(‘Some secret passphrase’) = P2PKH compressed private key

wouldn’t guarantee solving this because “Some secret passphrase” was still unknown at this point. Obviously the answer was staring at you from the image, it only took your eyes, a clear head and some basic knowledge about P2PKH address construction to find it 🙂

Fortunately at 7:40 PM CEST we noticed the winning transaction sweeping all the funds to a Bech32 address. Was it the final tip “Call me Ishmael” hint we gave out or was it something else ?

At this point we didn’t know who swept the funds but at 8:02 PM we noticed this tweet from @6102bitcoin that confirmed the winner:

https://twitter.com/6102bitcoin/status/1318251233342332931

You can read more about solving this puzzle, the thought process and tools used from @6102bitcoin’s perspective here.

The solution to this puzzle was:

SHA256(“Cortez Shodan Bionic”) = compressed, private P2PKH key

These are the names of the characters from the System Shock videogame you see in the image. All it took was a little bit of research on the game, the steel wallets we have listed in our shop and some basic P2PKH address construction knowledge.

Wrap up

We love solving puzzles and Bitcoin is a perfect tool for constructing and solving them. Follow us on Twitter if you’d like to play next time we announce something similar. Hopefully you learned a thing or two reading this walk-through. Below are some resources you might find interesting to learn to be better prepared not just for solving puzzles but for making decisions and understanding the pros and cons of your specific wallet setup in general and brainwallets in particular. Personally we don’t use brainwallets, they’re not secure but they are an excellent substrate for constructing puzzles fun and engaging puzzles! 🙂

Resources:

Products featured in this puzzle:

Posted on 10 Comments

Secure Your Trezor: Offline Wallet Setup Guide

Trezor Model T

If you own a Trezor wallet (either Trezor One or Trezor Model T) chances are you’ve used the official web wallet. When you use wallet.trezor.io your xpubs are sent to the third party servers (in this case servers owned and operated by Satoshi Labs). This is not ideal because, although I don’t imply SL do nefarious things with your data, it’s possible at some point they can be coerced by The-Powers-That-Be to release this data at which point your privacy might be in danger.

In this short guide I’ll present an alternative way of using either of the Trezor hardware wallets in such a way that it doesn’t leak your private data to third parties. I think very few Trezor owners know about the method presented in this guide. According to my rough guesstimates 99% of Trezor owners either use the offical web wallet for both initial setup and subsequent transactions or use the web wallet for initial setup (leaking their xpubs) and then switch to using something like Electrum.

Benefits of this method:

  1. You don’t leak your past and future transaction history and your balance to any third party (your xpubs stay private)
  2. You can generate addresses offline without any Internet access (provided the tool is already setup on your computer)
  3. You can generate any type of the address be it a legacy address (1…), a P2SH-wrapped-segwit (3…) or a native segwit (bc1…). You’re not limited to the functionality of the web wallet.
  4. If wallet.trezor.io ever gets compromised or shut down you’ll still be able to use your Trezor hardware device

Things you’ll need:

  1. 1x Trezor One or Trezor Model T + USB cable
  2. A laptop/PC running Linux/Mac OS (or Windows if you can setup Python on it and run a terminal)
  3. A piece of paper and a pen
  4. 0.5 hour of free time

WARNING: It’s best to go through this guide using a wiped device. The point is to start using a wallet that no third party knows about. Make sure you have your seed, your passphrase and your PIN backed up before starting this guide. If you already have coins on your Trezor it’s best to either recover them using a different BIP39 compliant wallet or send them to another wallet so that you can transfer them later to your freshly and privately setup Trezor.

Step 1 – trezorctl

Begin by installing trezorctl. The link contains detailed setup instructions for every major operating system. Then proceed to learn about various commands that are available:

$ trezorctl --help
$ trezorctl device --help
$ trezorctl btc --help

Step 2 – verify the connection

Connect your Trezor to your laptop via the USB cable. If your device is not wiped it’ll ask you for a PIN. Enter it to unlock the device. Check that the link between your laptop and Trezor is working properly by issuing the following in a terminal:

$ trezorctl ping hello
hello

Step 3 – wipe the device

WARNING: It’s best to go through this guide using a wiped device. The point is to start using a wallet that no third party knows about. Make sure you have your seed, your passphrase and your PIN backed up before starting this guide. If you already have coins on your Trezor it’s best to either recover them using a different BIP39 compliant wallet (eg. Electrum) or send them to another wallet so that you can transfer them later to your freshly and privately setup Trezor.

$ trezorctl device wipe
Before wiping it clean make sure you can recover your coins on a different wallet.

Step 4 – Setup new seed

The gist of this guide – setting up new seed privately without leaking its xpubs to a third party:

$ trezorctl device setup --help
Usage: trezorctl device setup [OPTIONS]
 Perform device setup and generate new seed.
 Options:
   -e, --show-entropy
   -t, --strength [128|192|256]
   -r, --passphrase-protection
   -p, --pin-protection
   -l, --label TEXT
   -u, --u2f-counter INTEGER
   -s, --skip-backup
   -n, --no-backup
   -b, --backup-type [single|shamir|advanced]
   --help

You have a few options here. I’ll go through the most important ones:

  1. –strength 128|192|256 – this is the length of the private key in bits. The longer the key the more words in the seed. 128 bits corresponds to 12 words in a standard BIP 39 wallet. 256 to 24 words. If you use Shamir Secret Sharing 128 will give you 20 words and 256 will give you 33 words per share. Bear this in mind when deciding on th backup method you want to use. 128 bits is secure and makes backup (especially by stamping on metal) easier. When in doubt pick 128 bits
  2. –passphrase-protection – whether or not the wallet should ask for a passphrase. Recommended
  3. –pin-protection – Whether or not the device should setup a new PIN
  4. –backup-type single|shamir|advanced – Besides a simple type which gives you a single list of mnemonic words to backup you have the option to pick a shamir backup and advanced (shamir with groups) backup. When in doubt pick single but learn more about Shamir Secret Sharing before deciding because it’s a great way to increase the security and recoverability of your backup.
$ trezorctl device setup --strength 128 --passphrase-protection --pin-protection --backup-type shamir
Setting up a new seed using Shamir Secret Sharing
Trezor backup checklist
Trezor backup checklist
To recover the seed you’ll need any 3 of the 5 shares.
Write down the mnemonic words for each share on a piece of paper.

Step 5 – Generate receive addresses

Once you setup a new seed you can generate some receive addresses. Because you’re controlling the device directly you have some options here that aren’t available using the web wallet:

  • You can generate a Bech32 (native segwit):
  • You can use custom derivation paths for your addresses and display xpubs for any given path

Let’s generate a first Bech32 address now. But before we do that brief explanation on how BIP32 derivation paths work.

Derivation paths are specified in BIP32 and BIP44. We define the following 5 levels in BIP32 path:

m / purpose' / coin_type' / account' / change / address_index

Apostrophe in the path indicates that BIP32 hardened derivation is used.

Each level has a special meaning, described in detail here.

The purpose level determines the further structure beneath this node. For example if we want to use legacy address types (beginning with 1…) the purpose level is set to 44' meaning the levels are defined in BIP44. The apostrophe means hardened derivation is used at this level.

If we want to use P2WPKH-nested-in-P2SH address types (beginning with 3…) the purpose level is set to 49'

If we want to use P2WPKH (native segwit, addresses beginning with bc1…) addresses the purpose is set to 84'

coin_type is always set to 0 for Bitcoin.

account – corresponds to “Accounts” in the web wallet (you can have multiple accounts on a single wallet). 0 corresponds with Account #1 in web wallet, 1 with Account #2 and so on

change – 0 means “default receive addresses” and 1 means “change receive addresses”.

address_index – index (starting from 0) of a generated address

Knowing all the above we should be able to generate different address types now.

First legacy address:

$ trezorctl btc get-address --address "m/44'/0'/0'/0/0" --script-type
Please confirm action on your Trezor device
 Passphrase required:
 Confirm your passphrase:
1CEmanepxWEdJC2LBhFvdhWrPHzbTxfW6V

P2SH-wrapped-segwit address:

$ trezorctl btc get-address --address "m/49'/0'/0'/0/0" --script-type p2shsegwit
 Please confirm action on your Trezor device
 Passphrase required:
 Confirm your passphrase:
 3K1VvtdaSMZhZ48mW2Pe5XEayKy9xDUDuh

Native segwit (Bech32) address:

trezorctl btc get-address --address "m/84'/0'/0'/0/0" --script-type segwit
 Please confirm action on your Trezor device
 Passphrase required:
 Confirm your passphrase:
 bc1q3ga68qn3pywxa72vqzytdrv0qd0wm865ene4aj

To generate subsequent addresses you increment the last number. For example to generate a second native segwit address use:

$ trezorctl btc get-address --address "m/84'/0'/0'/0/1" --script-type segwit

Step 6 – Verify your setup

How do we know that the addresses we generated are compatible with other wallets (follow the HD standard defined in BIP32 and related BIPs)? We can export the public key of our wallet (so called xpub) and use this in a different wallet to check that the addresses we just generated match.

Let’s export the public key of your Trezor (the so called xpub) for legacy addresses:

$ trezorctl btc get-public-node --address "m/44'/0'/0'" --script-type address
 Please confirm action on your Trezor device
 Passphrase required:
 Confirm your passphrase:
 node.depth: 3
 node.fingerprint: ca35ef32
 node.child_num: 2147483648
 node.chain_code: 1dae8ac8e284104382998c4b91a6f17e385cfab9ec54d96387bcbbcd4a3d7559
 node.public_key: 03a26a7632b86520e546c4fc8ecbe1db94042e3536c3431876e8566e53b8a40317
 xpub: xpub6D8yQnAtMgSb5biQTYrwzEvhodb1CHsZnvgecPWc8zykuPM61CueevG4EbWjurYstEEvaC2nX3b74od5khrEMqz5unVprSf2dSQHpcX2Ts5

The derivation path follows until all the hardened levels are exhausted and only non-hardened levels are left (default or change address type and the address index) so that we can derive all the available addresses from these levels.

Once we have the xpub we have to import it into a watch-only wallet. The easiest way would be to import it into something like Samourai Sentinel or BlueWallet or Electrum in read-only mode. But doing so leaks your xpub to third parties which we wanted to avoid in the first place. We’re going to use a different approach that doesn’t rely on third party servers but instead on your own Bitcoin node.

Output descriptors

Recent versions of Bitcoin Core support output descriptors which is a handy way of describing the types of addresses and derivation paths we use in our wallet (Trezor in this case).

This is a simple, 2 step process that consists of running two bitcoin-cli commands:

  • bitcoin-cli getdescriptorinfo
  • bitcoin-cli deriveaddresses

The first command analyses an output descriptor and calculates its checksum. The second command derives addresses based on the descriptor and its checksum.

$ bitcoin-cli getdescriptorinfo "pkh(xpub6D8yQnAtMgSb5biQTYrwzEvhodb1CHsZnvgecPWc8zykuPM61CueevG4EbWjurYstEEvaC2nX3b74od5khrEMqz5unVprSf2dSQHpcX2Ts5/0/*)" 
{   "descriptor": "pkh(xpub6D8yQnAtMgSb5biQTYrwzEvhodb1CHsZnvgecPWc8zykuPM61CueevG4EbWjurYstEEvaC2nX3b74od5khrEMqz5unVprSf2dSQHpcX2Ts5/0/)#kkz0hv84",
   "checksum": "kkz0hv84",
   "isrange": true,
   "issolvable": true,
   "hasprivatekeys": false
 }
$ bitcoin-cli deriveaddresses "pkh(xpub6D8yQnAtMgSb5biQTYrwzEvhodb1CHsZnvgecPWc8zykuPM61CueevG4EbWjurYstEEvaC2nX3b74od5khrEMqz5unVprSf2dSQHpcX2Ts5/0/*)#kkz0hv84" "[0,2]"
[
   "1CEmanepxWEdJC2LBhFvdhWrPHzbTxfW6V",
   "13UtN7MfqyvUUijUAM4cGGrRnwMZfyUSNX",
   "1PKecwGghrcdKe2RUJvMZMSV2zxcBAy95b"
 ]

You can see that the first derived address 1CEmanepxWEdJC2LBhFvdhWrPHzbTxfW6V matches with the address generated using trezorctl earlier for this legacy address type. It’s safe to send to this address now. Let’s check the second address:

$ trezorctl btc get-address --address "m/44'/0'/0'/0/1" --script-type address
Please confirm action on your Trezor device
Passphrase required:
Confirm your passphrase:
13UtN7MfqyvUUijUAM4cGGrRnwMZfyUSNX

P2SH-wrapped-Segwit

If you export the xpub of your P2SH-wrapped-Segwit address types it becomes an ypub. I’m not going to dive into why we have xpubs, ypubs and zpubs and where they came from. Suffice to say that xpubs in general refer to legacy addresses (1..), ypubs to P2SH-wrapped-Segwit (3…) and zpubs to native Segwit (bc1…). You can read more about the different types and their purpose here.

$ trezorctl btc get-public-node --address "m/49'/0'/0'" --script-type p2shsegwit
 Please confirm action on your Trezor device
 Passphrase required:
 Confirm your passphrase:
 node.depth: 3
 node.fingerprint: e6ae807d
 node.child_num: 2147483648
 node.chain_code: 55da27527153f63a27b6ddfb98d4f72dd21d1cbdf80002a7b59cdd6372864426
 node.public_key: 023b9017d272609fddaa5878c5a08d021368cb57d7e57a5116ad6f300beae02e76
 xpub: ypub6YBNguLJSNryXbeW9FKJi1UmrvfgceQfdYsknRrG3ynaCUm7Jb8kDqoSEWEZpVJjgZvjir4HpUGPzWMPCJ6q6ZE5S9fophRmb3EqJBf3Twh

Bitcoin Core understands only xpubs so before importing we have to convert this ypub into an xpub. We can use this tool in offline mode (save the page locally, disconnect the Internet and then open the saved page in your browser). If you want you can write your own terminal tool that does the conversion. It’s not difficult, the source code is here. All you need is a Base58 encoding library in your favourite programming language and 1 function.

After conversion our ypub becomes xpub6DM7PEfPHhKVgJTPJtXgVvPGgxXEg2RAiSMY12xNfyQh9Nwt3vyBbn9JDJGypaepGvovyNTjMour7DjpUbgpJKYUZoyPEncHKKBBucqRZEs

$ bitcoin-cli getdescriptorinfo "sh(wpkh(xpub6DM7PEfPHhKVgJTPJtXgVvPGgxXEg2RAiSMY12xNfyQh9Nwt3vyBbn9JDJGypaepGvovyNTjMour7DjpUbgpJKYUZoyPEncHKKBBucqRZEs/0/*))"
{
  "descriptor": "sh(wpkh(xpub6DM7PEfPHhKVgJTPJtXgVvPGgxXEg2RAiSMY12xNfyQh9Nwt3vyBbn9JDJGypaepGvovyNTjMour7DjpUbgpJKYUZoyPEncHKKBBucqRZEs/0/*))#fz5unnpt",

  "checksum": "fz5unnpt",
  "isrange": true,
  "issolvable": true,
  "hasprivatekeys": false
}
$ bitcoin-cli deriveaddresses "sh(wpkh(xpub6DM7PEfPHhKVgJTPJtXgVvPGgxXEg2RAiSMY12xNfyQh9Nwt3vyBbn9JDJGypaepGvovyNTjMour7DjpUbgpJKYUZoyPEncHKKBBucqRZEs/0/*))#fz5unnpt" "[0,2]"
 [
   "3K1VvtdaSMZhZ48mW2Pe5XEayKy9xDUDuh",
   "3Nh8TjCvp3qauFfsjz4dGJffiGphPTWgjc",
   "3DbBaUHRUioWAN1GPzPofTri2z3Vjat23p"
 ]

Native Segwit

$ trezorctl btc get-public-node --address "m/84'/0'/0'" --script-type segwit
Please confirm action on your Trezor device
Passphrase required:
Confirm your passphrase:
node.depth: 3
node.fingerprint: d6087fa9
node.child_num: 2147483648
node.chain_code: 4a505341aea8ebb8cd37a81a403873c7d793ff27a7d13d74c6ee2a5a78f5fdd6
node.public_key: 024e14d597c7b8a4124517489564b0e9d76640e6c4d32bf45af6e407b51f87d371
xpub: zpub6rtYLtJpLzF7thRSjjCkL5NHafkCXNgFjSNjtpJcCjjmxktBQdeteMoCkmeeTPfdmVCZckJNuMuxyahsG6X2jX1fP2BqrpshAgmYR7GYpZB

Our zpub becomes xpub6DE1jYxz3dAAC73D51dVuuBHEjTJe8hFuDLJL2WqSiz1rZFiuKKmQEUviMjUTaMnxCxx7o7Fz3CsD1Ujphh193eTeLnzh1EidEeFdxyWC4R

$ bitcoin-cli getdescriptorinfo "wpkh(xpub6DE1jYxz3dAAC73D51dVuuBHEjTJe8hFuDLJL2WqSiz1rZFiuKKmQEUviMjUTaMnxCxx7o7Fz3CsD1Ujphh193eTeLnzh1EidEeFdxyWC4R/0/*)"
{
  "descriptor": "wpkh(xpub6DE1jYxz3dAAC73D51dVuuBHEjTJe8hFuDLJL2WqSiz1rZFiuKKmQEUviMjUTaMnxCxx7o7Fz3CsD1Ujphh193eTeLnzh1EidEeFdxyWC4R/0/*)#5cfttwry",
  "checksum": "5cfttwry",
  "isrange": true,
  "issolvable": true,
  "hasprivatekeys": false
}
$ bitcoin-cli deriveaddresses "wpkh(xpub6DE1jYxz3dAAC73D51dVuuBHEjTJe8hFuDLJL2WqSiz1rZFiuKKmQEUviMjUTaMnxCxx7o7Fz3CsD1Ujphh193eTeLnzh1EidEeFdxyWC4R/0/*)#5cfttwry" "[0,2]"
 [
   "bc1q3ga68qn3pywxa72vqzytdrv0qd0wm865ene4aj",
   "bc1qy8xmte3spxu3udjmzp3e393jnkmdy0gctzdyxs",
   "bc1qzqs6t3ffgqhdwv0rpmq2uzevktyw65yu9rs3r5"
 ]

Step 7 – Proper backup and reset

This crucial step is often overlooked by Bitcoin users. They often rely on pieces of paper (which can be destroyed or lost quite easily). A much more robust solution is to use a piece of stainless metal that can withstand extreme temperatures, floods and weather as a backup material of your seed.

We offer a range of products aimed at Bitcoin users who would like to securely and privately backup their seeds, passphrases, PIN codes etc. on stainless steel or titanium.

If you’ve followed this guide and find Shamir Secret Sharing Scheme useful in your situation we have a special line of products designed just for that:

Coldbit Hex – 3x Bundle

Coldbit Steel - 3x Hex Bundle
Coldbit Hex – 3x Bundle

A great addition to your 2-of-3 Shamir Secret Sharing Scheme. Let’s you stamp your shamir shares on 3 different steel/titanium rods and store them in separate geographical locations. Such a setup increases the security and recoverability of your funds tremendously.

Coldbit Hex – 5x Bundle

5x Coldbit Steel - Hex Bundle
Coldbit Hex – 5x Bundle. No compromise setup.

No compromise setup for serious, self-sovereign individuals at an affordable price.

Wiping your Trezor

This step is optional but recommended for increased security of your funds and smaller attack vectors. The idea is to wipe your Trezor after you’ve backed up your seed/passphrases and PINs in multiple locations in order minimise the attack surface on the device itself. Trezor is vulnerable to seed extraction provided physical access is possible so wiping your Trezor mitigates this and a whole bunch of other attack types. Remember: The best hardware wallet is a wiped hardware wallet. Make sure your seed is backed up safely and that you can in fact recover your seed before wiping the device!!!

The only drawback of wiping your Trezor after setting it up is that you cannot sign transactions with a wiped device (obviously), you have to recover it first using the backup (and wipe again after use). This method is recommended for a portion of your coins that don’t move very often.

Summary

The method presented above lets you generate receive addresses on your Trezor completely offline, without any Internet access and without leaking your transaction history and balance to any third party. You have total control on the type of addresses generated and you can verify that they are correct by using your own Bitcoin node.

Sending transactions privately requires a few more things. It’s a topic for a future blog post. If you want to learn more about Bitcoin wallet/key security and best practices for safe storage sign up to our newsletter below:

[activecampaign form=3]

Resources:

Posted on Leave a comment

What types of mnemonic seeds are used in Bitcoin?

Coldbit Steel

There are essentially four types of mnemonic seed phrases used in Bitcoin:

  • BIP39
  • Electrum
  • Shamir Shares (SLIP39)
  • LND (AEZEED)

Why do they exist? What makes them different from each other? Can we identify them easily? In this short guide we’ll try to address these questions. 

Coldbit Steel
BIP39 mnemonic seed stamped on Coldbit Steel

What’s the purpose of mnemonic seed phrases?

The main purpose of mnemonic seeds is to convert a very large number (a private key) into a human readable form which can be copied and backed up by humans without using electronic devices. Why is it important? Well, electronic devices and especially Internet connected devices can be hacked into more easily than physical seed backups (for example paper or metal). Internet connected devices and storage enable remote attacks and physical backups require physical access and are much harder to perform.

BIP39

This format was created in 2013 and has since gained the most traction and use. It supports encoding between 128 and 256 bits of entropy, a checksum and an optional passphrase for additional protection of the seed. The word list is fixed and consists of 2048 words. In addition to the English list there are seven other languages but they’re not used commonly.  This format doesn’t support versioning on purpose (simplicity).

Electrum

Electrum uses 2 seed formats. The “old” version from circa 2011 to circa 2014. Starting with version 2.0 Electrum uses a “new” seed format.

  • Electrum old seed format (Electrum versions prior to 2.0): The wordlist contains 1626 English words. There is some overlap between this list and the BIP39 wordlist but they’re not the same This format uses bidirectional encoding between seed phrase and entropy. “Bidirectional” here means that you can turn binary entropy into a mnemonic and vice-versa. This format doesn’t use a checksum. Current versions of Electrum can still recognise this format and import such wallets (the process is automatic upon entry of the seed).
  • Electrum new seed format: Starting with Electrum version 2.0 it introduced a new seed format, the “Seed Version System” to fix some of the perceived shortcomings of BIP39. This format derives keys and addresses from a hash of the UTF8 normalised seed phrase with no dependency on a fixed wordlist. Even though it doesn’t depend on a fixed wordlist it uses the same 2048 English wordlist as BIP39. Another distinctive feature of this format is the version number encoded in the seed. The purpose of the version number is to enable forward compatibility with future releases of the wallet. The version number also encodes the type of output addresses (Legacy, P2SH-Segwit, Native Segwit) , network (mainnet or testnet) used and whether it’s a single or a multisig wallet which makes future recovery easier. The full description of this format is here.

Shamir Secret Sharing aka SLIP39

In 2019 SatoshiLabs released a seed splitting format codenamed SLIP39 based on the idea of secret sharing published by Adi Shamir in 1979. The main purpose of this format is the ability to encode the seed in N lists of words in such a way that to recover the seed only M number of shares is required (where M <= N). It’s a threshold seed splitting scheme where one can encode the seed in for example 3 different shares (seed phrases) where only 2 shares are required to recover the seed. Up to 16 shares are supported.

This encoding scheme supports a robust checksum based on Reed-Solomon code that guarantees detection of any error affecting at most 3 words and has less than a 1 in 10^9 chance of failing to detect more errors. Like BIP39 it also supports an optional passphrase for extra protection/multi account setups.

This format doesn’t support versioning. The wordlist contains 1024 English words. The typical mnemonic seed length is 20 words. 33 words are also possible but no hardware wallet currently supports it. Trezor Model T uses 20 words.

LND (AEZEED)

Neither BIP39 nor the Electrum format was robust enough to cover the needs of the Lightning Network Daemon developers who created a  new format in 2018. The main reasons against using BIP39 were:

  • lack of versioning (so future versions of the wallet may not necessarily know how to derive all the required addresses)
  • lack of wallet birthday (so wallets may not know how far back to look in the chain)

And so LND AEZEED was created. It is a versioned scheme which encodes a birthday. It supports an optional passphrase and uses the same BIP39 wordlist. The mnemonic seed phrase is 24 words long.

Interestingly no other Lightning Network wallet uses AEZEED format. For example Eclair uses BIP39 and C–Lightning uses Bitcoin Core built-in wallet.

There are a few interesting properties of AEZEED which are worth mentioning:

  • The mnemonic itself is a cipher text, meaning leaving it in plaintext is advisable if the user also sets a passphrase. This is in contrast to BIP 39 where the mnemonic alone (without a passphrase) may be sufficient to steal funds.
  • A cipherseed can be modified to change the passphrase. This means that if the users wants a stronger passphrase, they can decipher (with the old passphrase), then encipher (with a new passphrase). The end result is the users upgraded the passphrase but uses the same HD key path as before (same wallet addresses). Compared to BIP 39, where if the users used a passphrase, since the mapping is one way, they can’t change the passphrase of their existing HD key chain (changing the passphrase in BIP39 generates a completely new HD key chain and thus addresses).
  • The downside of the above is you can’t use multiple passphrases with a single mnemonic (like you can with BIP39). Using a new passphrase in AEZEED creates a new mnemonic because the passphrase is used to encode the final mnemonic. In BIP39 the passphrase is used only in the final step of turning the mnemonic into binary seed.

SUMMARY



Direction
Default length Wordlist PassphraseUsed since
BIP39 Unidirectional 12 or 24 words 2048 words Optional 2013
Electrum (old seed) Bidirectional 12 words 1626 words None 2011-2014
Electrum (new seed) Unidirectional 12 words BIP39 wordlist Optional 2014
Shamir Secret Sharing (SLIP39) Bidirectional 20 words 1024 words Optional 2019
LND (AEZEED) Bidirectional 24 words BIP39 wordlist Optional 2018

Does it mean having a mnemonic seed might not be enough to recover a Bitcoin wallet?

Correct. In some cases having just a 12 or 24 word seed might not be enough to recover a wallet. You may not remember which wallet you used to create the seed so recovering may mean trying out a few different combinations and formats. Hopefully the list above will guide you.

Coldbit Steel has it covered

Regardless of which type of mnemonic seed you use, our metal wallet Coldbit Steel can backup them all. It provides space to stamp up to 24 words on a 4mm thick stainless steel plate and a line to stamp the wallet ID. The wallet ID can be a name of the wallet used to generate the seed (eg. Mycelium). 

Additionally on the back of the 2mm cover plate there’s space to stamp some of the metadata above to enable easier recovery in the future. The data includes:

  • Type of mnemonic seed (BIP39, Electrum or LND)
  • Whether the seed it’s passphrase protected
  • Types of output addresses used (Legacy, P2SH-Segwit or Native Segwit)
  • Whether the seed is part of a multisig setup or a Shamir share.

Coldbit Steel is the only metal wallet currently available on the market that lets you record this metadata along with the main seed, securely stamped in waterproof, fireproof and acid proof stainless steel and can even withstand 20 tonnes of pressure and store safely for decades.

Coldbit Steel - Spiderweb
Coldbit Steel – Spiderweb

In addition to the main seed backup each wallet comes with a passphrase backup on a stainless steel, hex rod which can store up to 6 passphrases (each up to 4-6 words long):

Coldbit Passphrase - 4 words
Coldbit Passphrase

If you want to learn more about Bitcoin wallet/key security and best practices for safe storage sign up to our newsletter below:

[activecampaign form=3]

Posted on 17 Comments

Can BIP-39 passphrase be cracked ?

Coldbit Passphrase - 4 words

In a recent post about BIP-39 I described how mnemonic sentences in the context of Bitcoin work and what makes them secure. 128 or 256 bit cryptography is considered secure and unbreakable now and for the foreseeable future. It’s the basis on which Bitcoin wallet security depends on. Can the same thing be said about the optional BIP-39 passphrase, the so called 25th word ? Let’s find out.

Here’s a typical scenario: You have your 24 seed words backed up somewhere, ideally stamped on a piece of fireproof, acid-proof and pressure-proof stainless steel. You then decide to enable BIP-39 passphrase support in your hardware wallet and stamp the passphrase(s) on a hexagonal stainless steel rod and store the rod in a separate geographical location to your 24-word seed backup in order to:

  • make it more difficult to steal your funds in case your seed words get compromised
  • have multiple accounts in your wallet (each passphrase corresponding to a separate account)
  • pass on the Bitcoins to the relatives after your death

Then I stumble upon your BIP-39 mnemonic backup stashed in your office drawer, import it into a new Electrum wallet, check the wallet balance but none of the addresses have ever been used. I know you have some Bitcoins though because I also happen to know your Twitter handle, check your tweets and see many references to “HODL” and “TO THE MOON”. I assume you must be using a BIP-39 passphrase.

The question then arises: “How easy is it to crack this extra passphrase?” and “What makes a good, hard to crack passphrase?

While looking for answers I did some research and found some answers although they seemed a bit vague:

What does it mean a complex passphrase exactly? We can do some research ourselves by looking at the BIP-39 spec but this time we start where we finished last time:

The last step of BIP-39 is creating the actual binary seed which is then used as a master key in BIP-32 deterministic wallet or using other methods.

To create a binary seed from the mnemonic, we use the PBKDF2 function with a mnemonic sentence (in UTF-8 NFKD) used as the password and the string “mnemonic” + passphrase (again in UTF-8 NFKD) used as the salt. The iteration count is set to 2048 and HMAC-SHA512 is used as the pseudo-random function. The length of the derived key is 512 bits (= 64 bytes).

The passphrase is used in the final step of the BIP-39 key derivation process. It uses Password-Based Key Derivation Function 2 to turn the mnemonic sentence (the 12 or 24 seed words) + an optional passphrase into a binary seed. Below is a quote from Wikipedia describing the input parameters and the operation of this function (scroll down for a simpler explanation of PBKDF2):

PBKDF2 applies a pseudorandom function, such as hash-based message authentication code (HMAC), to the input password or passphrase along with a salt value and repeats the process many times to produce a derived key, which can then be used as a cryptographic key in subsequent operations. The added computational work makes password cracking much more difficult, and is known as key stretching.

Having a salt added to the password reduces the ability to use precomputed hashes (rainbow tables) for attacks, and means that multiple passwords have to be tested individually, not all at once. The standard recommends a salt length of at least 64 bits.[6] The US National Institute of Standards and Technology recommends a salt length of 128 bits.

The PBKDF2 key derivation function has five input parameters:

DK = PBKDF2(PRF, Password, Salt, c, dkLen)

where:

  • PRF is a pseudorandom function of two parameters with output length hLen (HMAC-SHA512 in BIP-39)
  • Password is the master password from which a derived key is generated (mnemonic words)
  • Salt is a sequence of bits, known as a cryptographic salt (BIP-39 passphrase)
  • c is the number of iterations desired (2048 iterations in BIP-39)
  • dkLen is the desired bit-length of the derived key (512 bits)
  • DK is the generated derived key

A simpler explanation of PBKDF2 is this: It’s a cryptographic function designed to turn some password and an optional passphrase (salt) into a cryptographic hash. This function is designed to run slowly (think 2048 times slower than a single invocation of HMAC-SHA512 in the context of Bitcoin). In the case of BIP-39 final key derivation this is the gist of what PBKDF2 does: it runs HMAC-SHA512 2048 times. This is the only thing that we need to keep in mind for now.

BIP-32 (Hierarchical deterministic wallet)

Once we run PBKDF2 on our mnemonic sentence + a passphrase we end up with a key. This key is then used as a seed to BIP-32 private/public key generation. I’m not going to dive into the details of BIP-32 here, suffice to say that the cost of generating private/public keys and associated addresses and checking them against a database of addresses ever used is negligible compared to the PBKDF2 function above.

Classes of attack

Let’s define a few classes of attack. Each class represents the level of attack on BIP-39 passphrase and requires more and more expensive hardware.

Class A (10,000 hashes/s): My laptop can run about 500 PBKDF2-HMAC-SHA512 hashes per second on a single CPU core. Let’s assume I can run it on all 8 cores and get 4000 hashes/s and I have 2 laptops.

Class B (1,000,000 hashes/s): GeForce GTX 1080 can run approx. 240,000 hashes/s. We have a few gfx cards at our disposal for this kind of attack.

Class C (100,000,000 hashes/s): Hypothetically we can assume cracking BIP-39 passphrases will be profitable in the near future and some company will create a specialised ASIC just for this purpose. Let’s assume it will be 10x faster than the GFX card above so roughly 2,4M hashes/s. A typical attacker will own a few such specialised devices.

Class D: (1,000,000,000 hashes/s): A supercluster of ASIC (like a mining pool but for cracking PBKDF2-HMAC-SHA512)

It’s worth mentioning that no devices of Class C or Class D exist today. It’s possible that such devices might appear one day though so we need to keep this in mind when deciding about the length of our passphrase we want to use.

BIP-39 passphrase cracking times

Let’s consider a few typical dictionaries and charsets people use when generating passwords in general and BIP-39 passphrases in particular:

Let’s bear the following in mind:

  • An attacker doesn’t know what dictionary/charset you used for your passphrase. He/she may start with the easiest dictionaries/combinations (for example 1 or 2 word dictionary lookups) and then move on to more difficult strategies. The actual time it takes to crack your passphrase might be longer than the time given in the tables below.
  • On the other hand on average it’ll take half the time given in the tables below for an attacker to obtain the correct passphrase
  • A general formula for calculating passphrase entropy in bits is log2(no_of_combinations). So for example log2(2048^2) = 22 bits of entropy. Recollect that the PKCS standard recommends a salt length of at least 64 bits.

PBKDF2 weakness (optimisation)

Andrea Visconti, Simone Bossi, Hany Ragab an Alexandro Calò published a paper called “On the weakness of PBKDF2“. The gist of it is that there are a few optimisations in PBKDF2 that can be implemented and the whole scheme gets optimised. The authors mention 50% optimisation in the first case. So we can bear this in mind when reading the cracking times below. (Eg. We can assume the actual optimisation will in fact be 50% in which case instead of 2 milleniums the cracking time will be 1 millenium etc.).

BIP-39 wordlist (2048 words)

BIP-39 wordlistabandon,ability,…,zoo
PasswordClass of Attack
WordsCombinationsEntropyClass AClass BClass CClass D
22048^222 Bits7 Mins4 SecsInstantInstant
32048^333 Bits10 Days2 Hours85 Secs8 Secs
42048^444 Bits55 Years203 Days2 Days4 Hours
52048^555 Bits114 Milleniums1 Millenium11 Years1.5 Years
62048^666 Bits2 Milleniums
72048^777 Bits

Long Diceware Wordlist (7776 words)

Diceware wordlistabacus,…,zoom
PasswordClass of Attack
WordsCombinationsEntropyClass AClass BClass CClass D
27776^226 Bits100 Mins1 MinuteInstantInstant
37776^339 Bits1.5 Years130 Hours1.5 Hours7 Mins
47776^452 Bits11 Milleniums115 Years1.5 Years42 Days
57776^565 Bits9 Milleniums901 Years
67776^676 Bits
77776^790 Bits

Short Diceware Wordlist (1296 words)

Diceware wordlistacid,…,zoom
PasswordClass of Attack
WordsCombinationsEntropyClass AClass BClass CClass D
21296^221 Bits3 Mins1 SecInstantInstant
31296^331 Bits60 Hours36 Mins21 SecsInstant
41296^441 Bits3 Milleniums32 Days8 Hours47 Mins
51296^552 Bits4 Milleniums1.5 Years42 Days
61296^662 Bits1.5 Milleniums150 Years
71296^772 Bits

Numerals

Numerals0123456789
PasswordClass of Attack
LengthCombinationsEntropyClass AClass BClass CClass D
21007 BitsInstantInstantInstantInstant
3100010 BitsInstantInstantInstantInstant
410,00013 BitsInstantInstantInstantInstant
5100,00017 Bits10 SecsInstantInstantInstant
61 Million20 Bits2 Mins1 SecInstantInstant
710 Million23 Bits20 Mins10 SecInstantInstant
8100 Million27 Bits3.5 Hours1.5 MinsInstantInstant
1010 Billion33 Bits15 Days3.5 Hours2 Mins1 Sec
121 Trillion40 Bits3 Years11 Days3 Hours17 Mins
2010^2066 Bits3 Milleniums

Alphabet – 26 characters

Upper Case AlphaABCDEFGHIJKLMNOPQRSTUVWXYZLower Case Alphaabcdefghijklmnopqrstuvwxyz
PasswordClass of Attack
LengthCombinationsEntropyClass AClass BClass CClass D
26769 BitsInstantInstantInstantInstant
317,57614 Bits2 SecsInstantInstantInstant
4456,97619 Bits46 SecsInstantInstantInstant
511.8 Million23 Bits20 Mins12 SecsInstantInstant
6308.9 Million28 Bits8.5 Hours5 Mins3 SecsInstant
78 Billion33 Bits9 Days2 Hours1 Mins8 Secs
8200 Billion38 Bits242 Days2.5 Days35 Mins3.5 Mins
95.4 Trillion42 Bits17 Years63 Days15 Hours1.5 Hours
10141 Trillion47 Bits447 Years4.5 Years16 Days39 Hours
1295 Quadrillion56 Bits302 Milleniums3 Milleniums30 Years3 Years
151.6 Sextillion70 Bits531 Years53 Years
2019.9 Octillion94 Bits

Alphanum – 36 characters

Upper Case AlphaABCDEFGHIJKLMNOPQRSTUVWXYZor Lower Case Alphaabcdefghijklmnopqrstuvwxyzand Numerals0123456789
PasswordClass of Attack
LengthCombinationsEntropyClass AClass BClass CClass D
21,29610 BitsInstantInstantInstantInstant
41.6 Million21 Bits2.5 Mins1.5 SecsInstantInstant
62 Billion31 Bits2.5 Days36 Mins21 SecsInstant
836^841 Bits9 Years32 Days7 Hours47 Mins
1036^1052 Bits11 Milleniums115 Years423 Days42 Days
1236^1262 Bits150 Milleniums1500 Years150 Years
1536^1577 Bits
2036^20103 Bits

Is my passphrase SAFU ?

Coldbit Passphrase - 4 words
Coldbit BIP39 Passphrase – 4 words
  • If your passphrase is a 1 word from a dictionary (aka the 25th word) it is NOT SAFE. Change it to at least a 4 word passphrase as soon as possible
  • lonelypumpkins is a better passphrase than hodl but it’s not a passphrase than can withstand a few hours of cracking on regular hardware (too short)
  • For the Long Diceware dictionary – use at least 4 words
  • For the Short Diceware dictionary – use at least 6 words
  • If you want to use BIP-39 wordlist as your dictionary use at least 6 words.
  • You don’t have to limit yourself to dictionary words. The more uncommon word you use the more difficult it is to crack and the harder to remember.
  • Don’t make the common mistakes people make when coming up with a passwords. Don’t use your birthday, people’s names, pets’ names and favourite places as your passphrases.
  • When in doubt roll the dice and pick 6 random words from the short diceware list.
  • Don’t rely on your memory or paper or electronic devices to store your passphrases. Order Coldbit Passphrase coupled with Coldbit Steel to have a durable, fireproof, waterproof and pressure-proof backup of your seed words and passphrases.
Coldbit 7 Word Passphrase
Coldbit 7-Word Passphrase from the short diceware list

BTCRecover

You can see a practical example of using BTCRecover to recover a forgotten password below. In these examples the public address is known and there is no need to look it up in the blockchain (which will slow the process down).

If you want to learn more about Bitcoin wallet/key security and best practices for safe storage sign up to our newsletter below:

How I checked over 1 trillion mnemonics in 30 hours to win a bitcoin

1 year later after publishing this article John Cantrell brute-forced the missing 4 words from a 12-word mnemonic and swept 1 BTC using a rented farm of powerful gfx cards. We estimated a Class C attack (a farm of powerful gfx cards or ASICs) to take ~ 2 days to crack 4 missing BIP-39 words. Very close to John’s result.

Posted on Leave a comment

Extreme stress test of Coldbit Steel – will it survive?

Coldbit Steel extreme stress test.

Last year (2018) Jameson Lopp performed an extreme stress testing of a few Bitcoin metal wallets (BIP-39 seed backup). At that time Coldbit Steel was in the design phase and I took the first test results into consideration when designing it. This year I’m happy to announce that both Coldbit Steel and Coldbit Passphrase survived extreme heat, corrosion (acid) and 20 tons of pressure – all performed by Mr. Lopp. They both scored A on the A-F scale (A being the best and F being a catastrophic failure):

I appreciate the time, money and effort put into testing all these metal wallets. I can see that Mr. Lopp tried hard to be as objective as possible and I believe these results reflect that. For example, when ordering Coldbit Steel + Coldbit Passphrase he used his opsec skills and didn’t reveal his identity to me (knowing that this could potentially influence the quality of the product I’d send – I could prepare a special version of the metal wallet with extra durability features to withstand the extreme conditions for example).

As a sidenote I should mention that I wasn’t very impressed with the quality of stamping on Coldbit Steel to be honest. This is how it looked like in the test:

Hand/template etching and stamping on Coldbit Steel.

This is how it looked like when I stamped the seed words and a wallet ID using a 1.5kg (3 lbs) club hammer:

Stamping on Coldbit Steel using a 1.5kg (3 lbs) club hammer and Gravurem stamp set.

There are 2 possible reasons I can think of that can explain such poor quality stamping:

  1. Using a hammer lighter than 1.5kg (3 lbs). I recommend using at least 1.5kg (3 lbs) or 2 kg (4 lbs) club hammers. When you swing it it has enough momentum to leave deep marks on the first try. In practice you can stamp the words using a 1kg (2 lbs) hammer but it requires a little bit longer swing and using more muscle force than just relying on gravity and momentum. I don’t know the weight of the hammer Mr. Lopp used but I can assume it was a lighter version.
  2. Unstable stamping surface/support. Examples include a wobbly table and surfaces that bend when hit with a hammer. The best stamping surfaces are: concrete, metal or hard wood.

Stamping with a hammer is best learned by practice – that’s why every Coldbit Steel comes with a testing plate on which you can practice stamping for as long as required until you get deep and clearly visible words.

The stress test consisted of 3 parts:

  1. Extreme heat 2000°F / 1093°C (2x the house fire temperature)
  2. Corrosion – muriatic (hydrochloric) acid for 12 hours
  3. Crushing with a 20 ton hydraulic press

Heat:

Coldbit Steel: “Discoloration but no data loss“:

Coldbit Steel after exposure to 2000°F / 1093°C (propane torch)

Coldbit Passphrase: “Performed admirably; while the freehand etching was barely readable, the stamping was quite readable other than the fact that they were partial stamps.”:

Coldbit Passphrase after exposure to 2000°F / 1093°C (propane torch)

Corrosion (hydrochloric acid):

Coldbit Steel: “No data loss; even the freehand etchings were legible.”:

Coldbit Steel after exposure to hydrochloric acid for 12 hours.

Coldbit Passphrase: “Freehand etching was wiped clean. Template based etching was readable, as was stamping.”:

Coldbit Passphrase after exposure to hydrochloric acid for 12 hours.

Crushing

Coldbit Steel: “Hard to read, but no data loss.”:

Coldbit Steel after crushing with a 20 ton hydraulic press.

Coldbit Passphrase: “No additional data loss (the acid caused the freehand etched words to disappear.)”:

Coldbit Passphrase after crushing with a 20 ton hydraulic press.

Conclusions

  • Data stamped on Coldbit Steel and Coldbit Passphrase is safe from environmental damage (extreme heat, corrosion and crushing)
  • Stamping with a hammer is vastly superior to hand engraving or etching. A 1.5 kg (3 lbs) hammer and a stamping set make the deepest marks in the metal and thus the letters can survive the most abuse (fire, scratching, crushing, corrosion etc.)
  • Rail-based metal wallets like Cryptosteel and all its clones (Billfodl, Blockstream Metal, The HODL Wallet, Steeldisk) don’t do well in such extreme conditions.

Happy stamping!

[activecampaign form=3]

Posted on 18 Comments

BIP-39 basics. From randomness to mnemonic words.

Bitcoin Seed Stamped on Coldbit Steel

Have you ever wondered how your Bitcoin wallet seed words (mnemonic words) guard access to your wallet funds and what makes such setup secure ? In this article we’ll dive into the basics of BIP-39 which describe what seed words are and how we can use them to backup our wallet keys in a recoverable way. Let’s go!

In the early days of Bitcoin there were no mnemonic words or easy ways to backup your wallet keys. The default wallet implementation would randomly create private keys which were stored inside a wallet file and you were responsible for backing up that file frequently (by default every 100 transactions). It wasn’t ideal from a user experience point of view to say the least. People would often times forget to backup their wallet file or they did back it up but then the backup would get lost because it was stored on electronic devices which would fail sooner or later. This resulted in a lots of Bitcoins being lost forever.

With time Bitcoin developers came up with better ways to backup private keys. One of the ideas proposed by Pieter Wuille in 2012 in BIP-32 and later widely adopted was called “Hierarchical Deterministic Wallets”. It described a way to generate an unlimited number of private and public keys in a deterministic fashion such that given the same seed (a random list of bytes of certain length) the same list of keys would be generated. This solved the problem of having to backup a list of private keys every 100 transactions. Having a backup of a single seed was enough to take care of the backup of all the private/public keys one would ever need.

Another idea that further simplified the backup of the wallet seed was proposed in BIP-39 by Marek Palatinus, Pavol Rusnak, Aaron Voisine and Sean Bowe. BIP-39 described a method to encode a random list of bytes (a seed) as an easy to remember/write down list of words. Compared to raw binary or hexadecimal representations of the seed (which still required electronic devices to store it) having a human-readable representation enabled much better handling of the seed by humans. From this point forward the seed could be written on paper or spoken over telephone and this opened up new, physical ways of backing up the seed (multiple paper copies in different locations, durable copies on metal plates with extra protection from fire/flood etc.).

In this article we’ll dive into the step-by-step process of transforming a random list of bytes (entropy) into a mnemonic sequence of words according to BIP-39 specification.

Step 1 – Entropy

First we need a good source of randomness. We can flip a coin or roll a dice. If we use a computer (or a hardware wallet) it has a built in random number generator which can act as a source of randomness. To keep things simple we’re going to flip a coin. BIP-32 specifies the entropy length to be between 128 and 256 bits and a multiple of 32 bits. Each coin flip is 1 bit of entropy. We want to have a 24-word seed so let’s toss the coin 256 times and write heads as “0” and tails as “1”.

00110010100001010111110100001011111111111010000010010000010010101101
00010101111001001011000100111100011110001001111011110111011010010100
11001100111011100110001011101101001010110101001111010010011010111111
0001100101011001000110100010000110110001100101110001

The following table describes the relation between the initial entropy length (ENT), the checksum length (CS) and the length of the generated mnemonic sentence (MS) in words. So if we wanted to have 12-word seed we’d generate a 128-bit entropy.

CS = ENT / 32
MS = (ENT + CS) / 11

|  ENT  | CS | ENT+CS |  MS  |
+-------+----+--------+------+
|  128  |  4 |   132  |  12  |
|  160  |  5 |   165  |  15  |
|  192  |  6 |   198  |  18  |
|  224  |  7 |   231  |  21  |
|  256  |  8 |   264  |  24  |

Step 2 – Split entropy into groups

Next we split the entropy binary into groups and end up with 23 groups each 11-bit long and 24th group having just 3 leftover bits:

00110010100 00101011111 01000010111 11111111010 00001001000
00100101011 01000101011 11001001011 00010011110 00111100010
01111011110 11101101001 01001100110 01110111001 10001011101
10100101011 01010011110 10010011010 11111100011 00101011001
00011010001 00001101100 01100101110 001

Step 3 – Encode

Each group (except for the last 24th group which only has 3 bits) contains a 11-bit number (0-2047 in decimal) and this number describes an index into a BIP-39 wordlist.

The first binary number is 00110010100. This binary number converted to decimal is 404. We can convert the binary sequence above into a decimal sequence (you can use a calculator, a web tool or do it by hand on paper if you have time).

404 351 535 2042 72
299 555 1611 158 482
990 1897 614 953 1117
1323 670 1178 2019 345
209 108 814

The words in the wordlist are 0-indexed meaning you start counting from 0. The number 404 corresponds to the word “crater”. Converting the full list of decimal numbers to words gives us:

crater cloud drill young animal
century earth siren because detail
knock unfold error jaguar merry
pistol fatigue nation wise clinic
boss assault grape

Step 4 – Checksum (24th word)

The last step is to calculate a checksum. The purpose of a checksum is to quickly verify if the list of words is correct (valid) or not. It can detect errors like using a wrong word, missing a word or having it in the wrong position.

To calculate the checksum we take all the 256 entropy bits we started with in Step 1 and calculate a SHA256 digest from them.

$ echo 0011001010000101011111010000101111111111101000001001000001001010110100010101111001001011000100111100011110001001111011110111011010010100110011001110111001100010111011010010101101010011110100100110101111110001100101011001000110100010000110110001100101110001 | shasum -a 256 -0

f3f06d74b794b20645460aa0b17d4e7a77eaaea283ee55344adbfcece4a63432
NB: shasum calculates the SHA digest from the input. Option -a 256 means using the 256 algorithm, -0 means reading the input in BITS mode where each ASCII '0' is interpreted as 0-bit and ASCII '1' is interpreted as 1-bit.

This is a number in hexadecimal format. We need the first 8 leftmost bits (1 byte) from this hash. We can use this online hex to binary converter:

f3 (hex) -> 1111 0011 (binary) 

Next we add these bits to the 3 leftover bits from 24th group from Step 2 and end up with:

00111110011

This is the last word (499 – dinosaur)

The full 24-word list is now:

crater cloud drill young animal
century earth siren because detail
knock unfold error jaguar merry
pistol fatigue nation wise clinic
boss assault grape dinosaur

We can verify that this is indeed a correct BIP-39 seed using this excellent BIP-39 tool created by Ian Coleman.

Step 5 – The seed

The last step of BIP-39 is creating the actual binary seed which is then used as a master key in BIP-32 deterministic wallet or using other methods. We’re not going to dive into the details of what this step involves but only quote from the BIP-39 spec:

To create a binary seed from the mnemonic, we use the PBKDF2 function with a mnemonic sentence (in UTF-8 NFKD) used as the password and the string “mnemonic” + passphrase (again in UTF-8 NFKD) used as the salt. The iteration count is set to 2048 and HMAC-SHA512 is used as the pseudo-random function. The length of the derived key is 512 bits (= 64 bytes).

You can read more about the PBKDF2 function in the context of cracking the passphrase here.

BONUS:

If you followed the steps above now you should be able to create and verify the correctness of BIP-39 seeds yourself (with minimal assistance from tools like binary to hex to decimal converters).

In the video below you can watch the seed stamping process where I punch all the 24 words onto 4mm thick stainless steel Coldbit Steel plate using a 1.5kg hammer and a A-Z letter stamping set:

You should be able to check if the last word of the seed in the video above is correct or not. You have to assume the first 256 bits of entropy are correct and calculate the missing 8 bits. The first person who comments on this post with a correct answer (the last word) and a little bit of description on how they did it can receive 1x Coldbit Steel + 1x Coldbit Passphrase + a Stamping Set + 1.5kg (3 lbs) hammer for free and create a long lasting, corrosion and fire resistant backup of their BIP-39 seed.

Posted on Leave a comment

Introducing Coldbit Passphrase – your BIP39 passphrase backup on stainless steel

Coldbit Passphrase for BIP39 passphrase backup

Since we have the seed word metal backup covered wouldn’t it be nice to be able to backup your BIP39 passphrase(s) as well on a piece of meta that lasts a very long time and is resistant to fire and flood ?

The fact that we were offering a product that let you stamp your seed words and store safely but there was no way to actually do the same with the passphrase bothered me greatly. Coldbit Steel has an additional line at the bottom:

Coldbit Steel – Wallet ID line

That line in theory could be used for stamping the passphrase but in practice it’s a very bad idea to store the passphrase together with the seed and I advise anyone to NOT DO THAT. Instead this line can be used to label your wallet (useful if you have multiple hardware wallets and thus seeds), say eg. “TREZOR A” or “LEDGER B” etc.

Because, unlike the seed, the passphrases change fairly often so I wanted to be able to store more than just one passphrase and decided to use a stainless steel hex rod. A hex rod has 6 sides which means you can store up to 6 different passphrases. It’s 10 cm (4”) long and will fit a maximum of ~ 28 characters per side.

Coldbit Passphrase for BIP39 passphrase backup
Coldbit Passphrase for BIP39 passphrase backup

The hexagonal rod form and small size allows for creative ways to hide it in your house or the area where you live. For example you can drill a hole in your door frame and hide it there (you need a 16mm (0.63”) drill.

Coldbit Passphrase is available for €9.00 but if you buy Coldbit Steel you get 1 passphrase rod included in the price.

IMPORTANT: Never store the passphrase rod together with your seed backup. It should be kept in a different location.

I don’t know of anyone else offering a passphrase metal backup. If you do know please let me know in the comments.

Happy stamping!

Posted on Leave a comment

Introducing Coldbit – Bitcoin metal wallet

Coldbit Steel Wallet

If you own any cryptocurrencies like Bitcoin you probably know how important it is to write down your seed words on something durable that can survive a flood or a house fire.

After evaluating current cold storage seed backup solutions, I must say I wasn’t thoroughly pleased with their quality and design.

So I decided to create my own metal wallet. After months of testing I came up with a design that I’m very satisfied with and would like to share it with you.

Coldbit Steel Wallet
Coldbit Steel Wallet

It is called COLDBIT. It’s made of thick, 4mm stainless steel that can withstand extreme temperatures of up to 1200 C. This type of stainless steel is also waterproof, shockproof and doesn’t corrode. Instead of assembling individual letters (like in Cryptosteel or Billfodl) you stamp the words from the seed onto Coldbit metal plate using the most reliable and bulletproof technique known to man – a hammer and a letter stamp set. The letters will not scramble even if a heavy log from the roof of your house hits it during a house fire. The steel plates are securely bound with nickel binding posts.

I believe this wallet will survive the most catastrophic events. I know that my seed words are safer inside COLDBIT than in any other cold storage solution available on the market today.

Stay tuned & Happy Stamping