That's right: if you aim for a secure self-custody long term solution, you might not even need a hardware signing device.
In fact, hardware wallets are just very convenient devices to store you keys.
If we consider how critical is the security of keys and how important is the randomness that generates them, we can deduce that using a dedicated device will introduce some uncertainity: you need to trust the vendor if the firmware is not open-sourced, you have to trust third party reviewers if the firmware is open-sourced but you can't review it yourself, and even if everything looks good, some exploitable weaknesses might be discovered in the future or the vendor itself might become a possible threat.
Trust is unavoidable when using a device provided by third parties, unless you can verify yourself how it does work, and more specifically: how it generates entropy, how it generates randomness for transactions signatures, what kind of data it transfers to its native network enabled application (for example Ledger Live, Trezor suite, etc)
And this is hard to do all by yourself.
What could be the safest and trustless solution then?
Create the seed yourself, write it somewhere safe, and deposit your holdings on the derived addesses in the safest and most trustless way possible.
DISCLAIMER:
- before following any istructions, be absolutely certain that you completely understand what you are doing (i bet that top comment will be: i have no idea what i am doing)
- my native language is not english, i hope to spell correctly and write understandable concepts
- cryptography is extremely complex, and apart from the basic concepts we'll cover in this post, it might be well above my comprehension: if any cypherpunk wants to add some important advices or details, it would be extremely appreciated
BASIC REQUIREMENTS:
You should already know that a wallet, hardware or software, does not contain your cryptoassets, and does not encrypt any kind of file representing you holdings.
A wallet, or more specifically, a Hierarchical Deterministic wallet, is instead a software application that has some very simple purposes:
- store you keys: potentially millions of them, all derived from your seed. imagine a seed and a plant growing from it, every leaf is a keypair.
Those keys are kept safe from physical threats using Secure Elements chips (Ledger Nano series, Coldcard...), or local encryption (software wallets like Metamask Exodus or MCU-only hardware wallets like Trezor) - compute the signatures: generate cryptographic proof of ownership based on private-public keypairs, using different algorithms, for example Secp256k1 elliptic curve for Bitcoin
- build the raw transaction to be broadcast: every chain has its standard, and some chains have more than one, for example bitcoin uses different interoperable standards, legacy, segwit or taproot (to be precise, standards are even more P2PKH, P2SH, P2WPKH.... and it's awesome to learn how devs implemented them in soft-forks)
If you had to explain to a 5 years old kid how keypairs, or more in general how blockchain transaction signatures work without exposing secrets, you could say that they are based on extremely large random numbers getting multiplied:
If you have a very large random number A you can multiply it by another random number R, and get a different number B.
This is very easy to do, but it gets harder to accurately reverse the process and guess your initial number A, if you only know B and ignore R.
Now imagine using complex algorithms instead of just a simple multiplication, it gets absolutely impossible to guess the original number A.
Things are much more complex than this in reality, but once realized that all our crypto holdings security is based on randomness and secrets, we already have a good starting point to indipendently generate our seed, derive keypairs and addresses.
Let's do this then!
you'll need a die, or some dice for convenience.
you could also use a coin, but it will be a very cumbersome process requiring a lot of coin tosses: a 6 sided die can generate 2.585 bits of entropy every throw, a coin will generate only 1 bit every toss instead.
you'll need at least 256bit of entropy to generate a quality 24 words seed: this means at least 100 throws with a 6 sided die, 256 tosses with a coin, 10 throws if you have 10 dice.
well balanced casino grade dices are advised to ensure real random results (they cost as much as a hardware device tho)
start throwing and write the results somewhere.
i got those results: 4, 3, 1, 3, 1, 4, 1, 5, 5, 3, 6, 5, 2, 4, 4, 2, 5, 4, 6, 6, 3, 2, 6, 5, 6, 2, 4, 5, 2, 3, 6, 4, 3, 6, 5, 6, 5, 3, 4, 3, 6, 4, 5, 4, 2, 2, 2, 6, 1, 6, 5, 1, 3, 3, 6, 5, 5, 5, 5, 6, 2, 4, 6, 5, 1, 6, 6, 3, 6, 2, 5, 4, 3, 5, 2, 6, 3, 3, 3, 1, 6, 3, 2, 2, 6, 6, 3, 6, 1, 1, 2, 2, 4, 3, 5, 6, 5, 2, 1, 1
for convenience, i used a pseudo random number generator, not a die.
pseudo random number generators are not good sources of randomness because computer programs cannot generate real randomness without a source of entropy (a video, random mouse movements, microphone recordings, micro fluctuations of voltage....)
humans are even worse when it comes to generate entropy, so please, don't just type random values
Your 24 word seedphase will be generated starting from this random sequence of numbers
Words will be taken from a list that includes 2048 words.
Every word is a human easily readable representation of a binary number, starting from 00000000000 (abandon) to 11111111111 (zoo)
23 words will be random, choosen based on our entropy, the 24th will be a checksum and will be calculated based on the first 23 words.
Now, we need to do some operations that will create a seed from the generated entropy, and convert it in a human friendly seedphrase.
I'll use this tool: https://iancoleman.io/bip39/ because it's web based and easily accessible and will allow anyone to effortlessly test this method and play around with it, but you can, an should, compare the results using other available scripts and command line programs. You should get the same results.
we'll select the first little square "show entropy details"
insert our dice throw results in the "entropy" field
scroll down and select "mnemonic lenght": 24 words
and finally select the source of entropy we used, in this case: Dice[1-6]
Here is our seed:
faf80593ee3586ce9849bfe4a2753098e956c8f2540e8279f3f39aba6f029ac5006d84d18252ac94571e931e394b8f9dd71ffcf85e0e85468cf6867337bc7764
and our friendly 24 words mnemonic seed:
section radio combine olympic truly early sort skin erode gas slide index good hole toast task melody wing quote exact doctor sphere million animal
We won't use a passphrase in this case, but it is also possible to add a BIP39 passphrase, which is an added cryptographic salt, and then we are ready to select derivation paths
Select the coin, we'll use Bitcoin, and select the derivation standard. we'll use BIP84 to generate some native Segwit keypairs and addresses
Here we are, our first address will be bc1qqqrkfsjrtxlduchg4e84xrr5d0wjtpg8fcxw50
And the extended public key will be zpub6r4f5SnBDLfJL9kKNCVh7LTw6gCzYVxgoPyW1Shs2nkWJ6W4GRNMdFn3zaBpuTJNde9f84F9s57Yo6MsYgbqo1s3Nb8hymvV7Cr7kRguKjt
This key can be safely imported in a watch-only wallet application to easily generate thousands of receiving addresses we own, and we can spend from.
In fact, we already have our precious seed that ''contains'' all the keypairs needed to spend the funds locked in all our addresses.
In 2030, after sleeping tight for years knowing our seed is safe, we could restore our paper/metal backed up seedphrase using a software or hardware wallet and finally spend our BTC to pay for a mansion or just trade it for some fiat.
WARNING: Ian Coleman tool is widely used and trusted, but if you mean to generate a real seed to actually store your funds DON'T USE THIS WEBPAGE
Your seed may leak in every possible way (malware, mitm, unsecure local network...)
Download the HTML standalone version instead an use it on a offline trusted system:
https://github.com/iancoleman/bip39/releases/latest/
This HTML file can be loaded on any offline computer's browser, allowing you to safely generate your seed:
- download the tool on a USB drive
- disconnect any network cable and wireless adapter from your laptop/desktop
- wipe your existing installation and reinstall a fresh trusted linux distro, or use an agnostic system running live from a USB drive, for example tails https://tails.net/
- generate your seed, back it up on paper/metal, create a text file containing your extended public key or just scan the QR code and then wipe again your computer or just shut down tails if you used a live USB
bonus:
some hardware wallet have dice method embedded, and will allow you to verify independently they are giving out legit seeds based on your own entropy:
https://coldcard.com/docs/verifying-dice-roll-math
https://blog.keyst.one/how-to-verify-the-recovery-phrase-created-by-dice-rolling-af01c16b765e
[link] [comments]
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments