Before approximately 2 days my ledger was reset. So naturally I took out the seed and typed it out on my ledger and it kept saying invalid phrase I tried the same on hot wallets , same thing Then I realised that maybe its something that I'm doing isn't right so I started reading upon mnemonics and how they're generated A mnemonic sentence (“mnemonic code”, “seed phrase”, “seed words”) is a way of representing a large randomly-generated number as a sequence of words, making it easier for humans to store. For the creation of a mnemonic phrase, we need at least 128 bits of entropy, and at most 256 bits. Depending on the length of the initial entropy, the mnemonic phrase will be 12 to 24 words long. Let’s say we want to create a 24-word-long mnemonic phrase. We start off by generating 256 bits of entropy. This is an example of 256 bits of entropy
We then take the first entropy length / 32 bits of the SHA-256 hash of the entropy. So, in our case, we take 264 / 32 = 8 bits, which results in 11000100. This is the checksum for our mnemonic phrase. Then, we append the checksum to the entropy, resulting in bits (264 bits of entropy and 8 bits of the checksum). We split the 264 bits into groups of 11 bits, which looks like this:
This is the binary form of words ranging from 0-2047 ( we have 2048 words in english.txt) which directly translates to the seed
These are the basics of mnemonics Now to the part where you can "recover" your seed considering you have all of your words and one or two went wrong while noting them down ( If you see my previous posts you'll know I lost mine hence made this program to recover) There's two possibilities in where you got one word wrong FIRST CASE For the first case it's really easy to recover just Enter your 24 words in the mnemonic box in this website [ Warning do not enter your seeds on any websites unless they're absolutely trusted] Just copy and paste the same entropy and you'll get the right mnemonic , Try to recover using that if it doesn't work its second case SECOND CASE Considers checksum (or last word) is right It takes all the words closest to the seed words using the Levenstein's distance and tries all possible conditions where only one word is wrong and gets the seed Example : The 24 words I'm using here as example are I'll be intentionally changing the third word Now using the program , Ill be running it generates the files With this I end my write up with the links Source code for recovery : https://github.com/sonuishaq67/recover-ledger-seed Sources for write up on mnemonics : [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