Blockchain tutorial 28: Bitcoin Improvement Proposal 39 (BIP-39) mnemonic words
Вставка
- Опубліковано 28 чер 2024
- This is part 28 of the Blockchain tutorial.
In this video series different topics will be explained which will help you to understand blockchain.
It is recommended to watch each video sequentially as I may refer to certain Blockchain topics explained earlier.
WHAT IS A WALLET
--------------------------------
A wallet stores private keys.
The word wallet is misleading, it just stores private keys and not the coins.
The public addresses are automatically derived from the private keys.
If you open your Bitcoin wallet and one of your Bitcoin addresses shows that is has a balance of 5 BTC, than these bitcoins are not actually stored in your wallet.
It means that these 5 bitcoins were transferred to your Bitcoin address during a transaction.
This transaction (TX) information is stored on the blockchain.
Your wallet queries the blockchain and searches for Unspent TX Outputs (UTXO) for all your Bitcoin addresses to display their balances.
The bitcoins on these UTXO can be unlocked and transferred to another Bitcoin address using the private keys stored in the wallet.
NON-DETERMINISTIC WALLET
-------------------------------------------------
Wallets stores private keys but they also create these private keys.
The private keys are randomly generated numbers which are not related to each other.
You can not derive these private keys with an algorithm.
Hence the words "non-deterministic".
If you use a non-deterministic wallet you must make regular backups of these private keys.
If you have problems with your wallet, you can restore your wallet by importing the backupped private keys.
Explaining a non-deterministic wallet (for educational purpose only), see:
www.mobilefish.com/services/c...
DETERMINISTIC WALLET
-----------------------------------------
A deterministic wallet uses 12 - 24 words to create a 512 bit seed.
These words are called mnemonic words, because they are more easily to remember than this long hexadecimal string.
The 512 bit seed is used to create a master private key.
This master private key in turn is used to create private keys and corresponding public addresses.
Generally speaking using these 12 - 24 words will complete restore your wallet with exactly the same private keys and corresponding public addresses.
Hence the word "deterministic".
It is imperative that you safely store these 12 - 24 words, without it you have no access to your private keys.
To see how an Ethereum deterministic wallet works, see UA-cam movie:
• MetaMask: How to resto...
BIP-39
-----------
The acronym BIP means Bitcoin Improvement Proposal.
BIPs are design documents for introducing features or information to Bitcoin.
An overview can be found at:
github.com/bitcoin/bips
BIP-39 describes the implementation of mnemonic words for the generation of deterministic wallets, see:
github.com/bitcoin/bips/blob/...
BIP-39 is becoming an industry standard which is not only used for Bitcoin wallets but it is also used in Ethereum, Dash and other Altcoin wallets.
The wordlist can be found at:
github.com/bitcoin/bips/blob/...
For additional security you can allow users to enter a passphrase.
Use the Password-Based Key Derivation Function 2 (PBKDF2) together with the mnemonic phrase and salt to produce a 512 bits seed.
If an attacker gets its hands on your mnemonic words the passphrase (it you have set it) will prevent the attacker to access the private keys.
PBKDF2 is purposefully made slow to make brute force dictionary attack very difficult.
The 512 bit seed is used to generate deterministic wallets.
How to generate deterministic wallets is explained in BIP-32 and BIP-44.
It is important to know that each time you enter a different passphrase it will generate a valid 512 bit seed and thus a valid wallet with valid public and private key pairs.
This feature can help you limit your loss after a 5$ wrench attack.
You can setup a second deterministic wallet with some coins to satisfy the attacker.
If you do not know what a 5$ wrench attack is watch this comic:
xkcd.com/538/
Storing your passphrase at the same location as your mnemonic words is not recommended and beats the purpose.
But if you lose your passphrase, you have lost access to your coins.
A JavaScript implementation of BIP-39 can be found at:
github.com/bitcoinjs/bip39
How this JavaScript library is used see:
www.mobilefish.com/download/e...
A Mnemonic Code Converter web application can be found at:
iancoleman.github.io/bip39
Check out all my other Blockchain tutorial videos
goo.gl/aMTFHU
Subscribe to my UA-cam channel
goo.gl/61NFzK
The presentation used in this video tutorial can be found at:
www.mobilefish.com/developer/...
#mobilefish #blockchain #bitcoin #cryptocurrency #ethereum - Наука та технологія
Now that I understand BIP-39 I actually feel comfortable using it. Thanks man, great video.
Very clear and detailed, adding some little advices here and there, very good job! Keep going with those videos !
That's absolute perfection, thank you Sir!!!
Thank you very much! Crucial information that is hard to find on the web is explained here so well!
Great video, very detailed. Everyone storing Bitcoin should understand BIP-39.
God bless you for giving us this knowledge
You are a very good teacher. I really like the way you explain it. Keep it up!!!
I really like the way how you explain complex things. Great video!
Very well done! Thanks for sharing this video. I can say now I'm very comfortable with mnemonic words.
I thought this was very informational. Thanks for explaining it so clearly!
it's surprising to see how diverse and detailed your knowledge is.
Thanks for the compliment, but to be honest i just follow the Feynman technique. Anybody can made these videos. If you do not know what the Feynman technique is, just watch ua-cam.com/video/_f-qkGJBPts/v-deo.html
Mobilefish.com Thanks for sharing. You are evidently knowledgeable and humble enough to share your secrets. I'll have a look.
10/10 what an amazing teacher!
This is a brilliant video
great explanation ! Thank you !
very clear and easy to understand, thank!
amazing
that's very useful! thank you
Great explanation! Finally someone gets into the technical details and not the boring high level garbage!
Good explain! thanks a lot.
Great video
Great video as always, thanks very much
Can you please put all videos on Wallet generation and key management in a playlist so they’re easy to reach?
Also, can you do a video on cold storage and deriving child and grandchildren keys for hdwallets
Thanks
I was wondering whether you could go into a video explaining PBKDF2 since there aren;t any good explanations out there. I have in mind something similar to your "13.1:Base58 encoding" video. Thanks!
awesome!!
nice explanation!
Thanks!
good video!
This is the definition of gold
How many private keys are generated on a wallet's instantiation? How are more keys created when all you have is the mnemonic?
How do hardware wallet restore my wallet without internet when I enter the private key?
In your wallet explanation you state public addresses are automatically derived from private keys. I thought public addresses are derived from the hash of a public key of a public/private key pair. This is how it is explained in "Inventing Bitcoin: The Technology Behind The First Truly Scarce and Decentralized Money Explained" by Yan Pritzker. Could you please clarify? Great video though!
Checkout my "Cryptocurrency address generator and validator":
www.mobilefish.com/services/cryptocurrency/cryptocurrency.html
and follow the steps. You can clearly see how the public address is generated.
Hi Mobilefish, how safe is it to trust a hardware wallet to generate a trustworthy 24 seed phrase ? Is it possible for someone to copy the Phrase at the manufacturing factory for later theft after the wallet has been funded by a customer? thank you!
Kev, normally a seed phrase is generated when the user creates one themselves. If you receive a hardware wallet with a pre-generated seed phrase then contact the seller immediately and DO NOT USE THIS SEED PHRASE AND WALLET! Only buy a hardware wallet from a manufacturer/seller with a GOOD reputation.
THE WORDS ETHOS WALLET GAVE DO NOT WORK . WHAT CAN I DO?
how can I get my bitcoin cash coins from electron cash which are on the watch only account as I mistakenly sent them to electrum. I have the seed and private key
Sorry i can not help you with this. I am not familiar with electron cash and electrum.
you can help me sir for restore phrase ronin wallet?
How to find Private key Password
Hello, please help!
i forgot my bip38 passphrase for a wallet is there anything i can do to decrypt the private key passphrase. i have 0.1 bitcoin which is alot for me.
any suggestions Will be greatly appreciated. Thanks.
Sorry, but if you lose your bip39 passphrase there is no way to access your keys.
Joining all words in the list to one string without spaces does not work. I tried the test vectors mentionend in the BIP39 standard. The correct result can only be generated with ASCII-whitespaces between the words. Also i generated two different valid mnemonic sentences which lead to the same string when the whitespace is removed:
youth river unable you thrive run able tip left basket pyramid actress outside unlock enough upon real shoulder coconut flame pottery know outdoor else
you thrive run able youth river unable tip left basket pyramid actress outside unlock enough upon real shoulder coconut flame pottery know outdoor else
Removing whitespace results in the following string for both sentences:
"youthriverunableyouthriverunabletipleftbasketpyramidactressoutsideunlockenoughuponrealshouldercoconutflamepotteryknowoutdoorelse"
but if you enter them there: iancoleman.io/bip39/ they produce different BIP39 Seeds:
e9da2b451d3163e860ce2fe4ba034c359bc5742e0938ea67f528765c4773396a9062f7e1b09d22a9e2d75267ca41ec68bf0684900d7b9257e69c58dc7680e7ee
fd990ba19b39e4bddc84e14d69d167f2cc5fc0190cf35d36cb096f2cae418763800bf80fb176b418eb4763049bd9dd1e931231f921666ebb33f85974d09a9e9d
So a wallet should really be called a keychain?
whoa too much info but good explanation
admin,please how can i get someone's private key
That is not possible.
There are many private key generator is it possible to get others private key
Sorry I do not understand your question.
@@Mobilefish He is referring to the likelihood of a collision given that the generators are public, and so many people would be using them.
Ahh, now I get it. Yes it is theoretically possible but I have personally never seen this before. It all depends on the random number generator used by these tools. It is usually a pseudo random number generator (PRNG). See: ua-cam.com/video/lEDQNZCwxus/v-deo.html
It is very difficult to create a true random number generator (TRNG) as demonstrated in ua-cam.com/video/1cUUfMeOijg/v-deo.html
For a practical understanding why random generators are important, see: ua-cam.com/video/6ecxIJOJ-yg/v-deo.html
Hello #mobilefish Im learning and developing an deterministic wallet in Javascript... So I have multiples clients (Client 1, Client2...) with multiples currencies (Client1Currencies: USD, BTC..., Client2Curriencies: USD,BTC) My question is know what is the best option to save ONLY ONE "seed" and the derivate multiples address.. so always with the MASTER seed I can restore all my coins...Can I used like this: master.derivePath("m/44'/60'/0'") clientMaster.deriveChild(0).deriveChild(CurrencyUSDID); clientMaster.deriveChild(0).deriveChild(CurrencyBTCID); or Im wrong?? Thanks for your videos..
I have lose privat key, how to find my privat key again.
I have passphrase and wallet address, please help me...
If you have your recovery passphrase (usually contains a sequence of 12-24 words), you can always generate all your public and private keys again.
There are two ways to solve this:
1) On an OTHER computer install you wallet software and enter your recovery passphrase. You can generate a new public key with corresponding private key. Keep generating the pub-priv keys until the public key matches the one with the missing private key.
2) Ask a developer to create such a tool for you. PLEASE DO NOT ASK ME!
Sir i have lost my seed how to recover on legal way
Were you able to recover this?
See "the hated one" here on youtube why passwords are useless.
My wallet 12 phrase loss 😢😢 please help 😢😢