Explaining why a hardware wallet is the way to go for storing Cryptocurrency

Juan Cortés
5 min readJan 21, 2018

--

I’m solely focused on the Ledger Nano S but most if not all of what I say applies to the Trezor and other hardware wallets. Some use 24-word lists, some 12, but since I can’t defend something I don’t own, I’m focusing on the ledger.

When you first initialize your device you are given a 24-word list that is called a seed. This seed is generated using an implementation of BIP39 which in layman's terms, creates a list of words that when passed through some magic algorithm will always generate the same wallets. This mnemonic seed is converted to a binary seed and stored inside the device. You will never need it unless you want to reset your device or clone it onto a new one.

It only uses the first 4 letters of each word

When you want a Bitcoin/Ethereum/XRP or any other of the supported cryptocurrencies, which at the time of writing are 24 in total, the device will bring up the wallets that are generated from the seed. You don’t add your own wallet, you don’t change the wallets. The wallets are determined from the seed.

A given mnemonic seed will 𝗮𝗹𝘄𝗮𝘆𝘀 generate the same wallets. Your mnemonic is your one and only secret.

You might be wondering what are the odds of someone getting their random mnemonic key and, since they will always derive the same wallets, granting them access to all your funds. BIP39 has a wordlist of 2048 words from which it chooses 24, with or without repeats, contrary to what you might expect, it’s not 2048²⁴ but rather 2²⁵⁶ which is:

one in 115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,457,584,007,913,129,639,936 combinations

To put this into perspective I tried making a nice chart but there are no relatable events I could use to compare it with that could be represented together. But let's just say that the odds of winning the Powerball, are 1 in 292,201,338 and the number of atoms in the whole planet is 1.33E50 which is 8,706,172,122,999,999,466,307,584 times smaller than the number of combinations available. Let’s just let that sink.

There are eight septillion, seven hundred six sextillion, one hundred seventy-two quintillion, one hundred twenty-two quadrillion, nine hundred ninety-nine trillion, nine hundred ninety-nine billion, four hundred sixty-six million, three hundred seven thousand, five hundred eighty-four times more valid combinations of 24 words from the 2048 word list than atoms in our planet.

I’m going to pretend this made it easier to understand, but if you want my tl;dr version of what I just said, the odds of running into any issues are not zero, but so close to zero you shouldn’t have to worry about that.

The coins are not inside the device, if you lose the device you don’t lose the coins, you lose… well, the device. It might be difficult to understand this concept for some people, you get a fancy device that is called a wallet, a physical wallet, yet it holds no coins. Remember what I said a couple paragraphs back? It holds your mnemonic, your one and only key.

The problem comes when you lose the device and the seed. If you only lose the seed, you can send your coins to another set of wallets, if you only lose the device, you can restore your wallets on a new one from the seed.

Lose both, gameover.

The company never has access to your mnemonic seed, which means even if they go under, you will still be able to access your coins. This might seem trivial but it isn’t. When you are typing your private key anywhere (a website or an app for example) you are trusting that platform with the ability to operate on your wallets.

If you follow the green flow, you’ll see what happens when you connect the ledger nano s to your computer and launch the respective app. The computer connects via the appropriate Ledger API to a full node of the cryptocurrency you are checking and it returns your balance and transactions.

If you follow the red flow, you’ll see what happens when you request to send money, the transaction is generated on the app, then sent for validation (signing) on the device, which will show you the details on the screen with the current version, then sent to their server who push it to the blockchain.

With the Nano, all the transactions need to be physically verified by clicking the OK on the device itself. And turning the device ON relies on you providing a valid PIN Code. I’m not going to get into that, it’s very well covered in the guide

Example of a confirmation screen.

All their software is open-source which means someone could take over if the disappear and you wouldn’t even notice, but also means if you are tech savvy you can contribute to improving their ecosystem of apps, their integrations and fix vulnerabilities.

The biggest flaw, having only one seed to grant access to all your wallets is inevitable. If someone gets access to your mnemonic, and transfers your funds out, you are out of luck. I for one prefer to only have to secure one thing and not worry about 10 different private keys.

If you want to buy one... I can shamelessly provide you with my referral link

What if when my device breaks Ledger company no longer exists

You would be able to retrieve back your public/private key from the mnemonic, you’d have to do it for each cryptocurrency you had, but it’s a minor issue considering the odds. You just need to google “Hierarchical Deterministic Wallet CryptocurrencyName”

--

--

Juan Cortés

I love building beautiful things and breaking code. Here I mostly rant about tech, code craftsmanship, paranoia, and wariness. www.linkedin.com/in/juancross