MultiversX Tracker is Live!

I learnt about mnemonics while recovering my seed ( successfully recovered) so here's a writeup if you want to recover yours too!

All Cryptocurrencies

by COINS NEWS 290 Views

I learnt about mnemonics while recovering my seed ( successfully recovered) so here's a writeup if you want to recover yours too!

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

0001001011111111100100110100111010000001111010100001010100010011000110001101011000001001100110100110111010100000101000101000100101100101000100011111101101011011010101000100101010100110100101100101100110011110100001110011100000001000101000000111001101000010

https://preview.redd.it/dyiujdgtpch71.png?900&format=png&auto=webp&s=3f797fbae5a1aadf6afa0b30d5c179f4d02bcf8e

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:

00010010111 11111100100 11010011101 00000011110 10100001010 10001001100 01100011010 11000001001 10011010011 01110101000 00101000101 00010010110 01010001000 11111101101 01101101010 10001001010 10100110100 10110010110 01100111101 00001110011 10000000100 01010000001 11001101000 01011000100

This is the binary form of words ranging from 0-2047 ( we have 2048 words in english.txt) which directly translates to the seed

base wish squirrel adult pattern maze globe scorpion omit insect chunk barrel extra world hood matter pledge ready guilt attack letter expand snack flat

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
1) Last word (or checksum) is wrong
2) One of the first 23 words are 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]

https://preview.redd.it/0qwemvf7rch71.png?1190&format=png&auto=webp&s=7eeb521908d2993daf5f9ae80d716eccbab8c17c

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

https://preview.redd.it/qyevpr6brch71.png?836&format=png&auto=webp&s=7f100975b003c3321817e99908365decb6001ed0

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 lift cricket must assist repair dose damp acid notice blade regular mobile pudding rival process hazard anchor meat water current gorilla multiply cruel wrist

I'll be intentionally changing the third word must to music

Now using the program , Ill be running it generates the files seeds, log.log, allnumbers where seeds contains all the possible combinations and allnumbers contains the binary form of seeds and lastly log.log which if successfully finds the seed stores it in the end of the file

https://preview.redd.it/gh9hzqrntch71.png?1919&format=png&auto=webp&s=9041e3d9c6812b5a3e0cbe6b714178e1e9e06f9e

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 :
1) https://learnmeabitcoin.com/technical/mnemonic
2) https://medium.com/mycrypto/the-journey-from-mnemonic-phrase-to-address-6c5e86e11e14

submitted by /u/sonuishaq67
[link] [comments]

Get BONUS $200 for FREE!

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