So after finding out that when Chrome updates it wipes local storage and that means you need to re-import your MyAlgoWallet. I have realised for some reason I have stupidly written down 23 words and not 25 of my mnemonic phrase.
I have seen a separate thread about the 25th word being a checksum that you can retrieve via Python if you have the 24 but it doesn’t seem that there are any nifty ways to retrieve the 24th word.
I don’t suppose anyone would have any ideas about the best way to go about it? There are over 171,000 words in the English language but that would obviously take a lot of time and then for each of those attempts I’d need to try and get the 25th word using the approach in the thread above.
There’s enough Yieldly in the wallet for it to sting but not enough to sob uncontrollably so if it’s just a case of having to learn a lesson, that’s fair enough.
Indeed, if you don’t know the positions of the two missing words, it looks like it’s about 1B tries.
The check that the key is valid is done in two phases:
first check the checksum (you can do around 1-10M of such checks in 1s on a recent computer with a single core),
then if the checksum is valid (this should happen every 2000 tests or so - even less because there is some redundancy I believe), compute the public key (you can do at least 5,000 such computations in a second)
So overall, in average, you should be able to do at least 0.5M checks per second per CPU core, with optimized enough software.
You should be able to recover your key in less than one hour cpu core, with optimized enough software.
PS: If you assume that one missing word is the 25th, the 25th word does not need to be brute-force, it can be recomputed from the first 24 words.
The hope is that it is the final 2 words that I’ve missed. With the 2,048 words is that minus the 23 I already have or is it possible to have repeated words? Not that 23 words less makes it any easier of course.
I have extremely limited knowledge of Python so it will likely be a bit to get my head around but it at least sounds like it is possible.
Is there a way to iterate through the mnemonic attempts once they are created or is that already part of the Python script?
As another option would a restore on the laptop from a few days back recover the lost LocalStorage?
Not sure how this issue was resolved, but it is certainly possible to retrieve your full phrase if you only know 23 words and the public key.
It does take willingness to learn Python, though. Building the brute-force program would take a bit of effort. If you know 24 of the words, I posted a program for finding the last one at the link in the original post of this thread.
Hi, @ThatTylor , welcome on the Forum.
You miss the last 12 words of the passphrase. The last word is a checksum, so you miss only 11 words.
Every word of the passphrase codes 11 bits, i.e. you miss 11*11=121 bits. That is roughly 10**36 possibility, so the Python script would run till doomsday.
It worked for me Fam. I’m not a developer and didn’t know how to run the script. @lime on the discord helped me with a quick tutorial. There it goes;
‐-----------‐-----------------------‐-----------‐---------------------------------
If what you are missing is the last 2 words you can try this script from algosdk import wordlist, mnemonicfrom base64 import *from nacl.signing - Pastebin.com
save it to your computer, open it and edit the truncated_key = “xxx” line with the words you have, edit the address = “XXX” line to have the address of the account.
Then download and install python I think the App store is the easiest Microsoft Apps .
Next open a terminal in the directory where you saved the fAepNpXp.py script. right click select “Open in terminal”.
Install the Algorand python SDK by running pip install py-algorand-sdk
Hi, @Sakib003 , welcome on the Forum!
If you have 24 words out of 25, it is easy to recover the missing word.
There are only 2048 possible words. See them here: word list
With a suitable program it is a matter of a jiffy.
# recover.py
# written by danger_dave
# updated by Ludovit Scholtz
#
# This code searches for one missing word in 25 mnemonic algorand phrase with known address
from algosdk import mnemonic
from algosdk import wordlist
# Write in Public Key here
address = "JU73IC5WZRS2AF4LN6WBAY5ZFDWMNNRXU6O5VIPZIFRLLT53VHDOBYP3HQ"
# 24 words go here (single space seperated)
confirmed = "youth journey spot increase action robust teach rubber direct world turn blouse camp hundred vessel pottery ozone brain hard risk quiz window abstract include"
word_list = wordlist.word_list_raw().split("\n")
wordscheck = confirmed.split(" ")
check = True
for word in wordscheck:
if word in word_list:
print(word+" is ok")
else:
print(word+" IS WRONG")
check = False
if not check:
print("!!!!!Some words are wrong .. try to find error in the allowed words: https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt")
raise
curr = 0
first_part = ""
second_part = confirmed
for location in range(25):
print(location)
if location != 0:
curr = confirmed.index(" ", curr + 1)
first_part = confirmed[:curr]
second_part = confirmed[curr:]
for word in word_list:
test_phrase = first_part + " " + word +" "+ second_part
try:
test_address = mnemonic.to_public_key(test_phrase)
except:
continue
if test_address == address:
print(test_phrase)
raise
First, you should install Py-Algorand-sdk. Run $ pip3 install py-algorand-sdk in a Linux OS to install the package. Then you should edit the above file, and substitute your address in the code to address, and also the 24 words you know to confirmed. Finally, run python3 yourfile.py