5

I wrote down a mnemonic seed that is missing one word, the position of which is unknown. I was able to locate this recovery tool which is very helpful. However it assumes a 13 word mnemonic seed formatted for mymonero instead of 25 word monero-wallet-cli seeds.

  • How can I adapt this tool for a 25 word seed?
  • In addition to the partial mnemonic seed I also wrote down the complete view key and address. Therefore, I have no need to scan the entire blockchain in order to know if the recovered mnemonic is accurate or not. How can I codify the automatic comparison of my address and/or view key to those generated from a recovered mnemonic to verify the match?
user1414
  • 85
  • 1
  • 6

3 Answers3

5

It will not matter if it is 13 or 25 words seed since the script will just need to add another word in the first, last or in between your seed and create the wallet. Your problem is implementing it for the real monero-wallet-cli/monero wallet since it will take longer to scan compared to mymonero. In mymonero a single query would return that the wallet is new or old but in real monero wallet you need to scan the whole blockchain to find if there was a transaction.

This is not impossible to implement but you need to create a script on top of monero-wallet-cli and be able to automate the creation of wallet using the --restore-deterministic-wallet command or just create a new program based on monero-wallet-cli which automates the wallet creation and scanning of the blockchain.

Lastly, you can't trivially find the transaction hash knowing only the monero address and view key. You have to scan each transaction in the blockchain.

Edit: In the case that you have the view key you don't need to scan the blockchain you just need to compare it with the view key of your new created wallet.

Edit 2: Actually the address is enough and there are three ways you can implement this.

  1. Use the javascript code found in mymonero.com. The same source can be found here and the specific file
  2. Modify the cli wallet which is in github to just create wallet address base on given seed and looping to all possible combination.

  3. Use your favorite scripting language and automate the monero-wallet-cli --restore-deterministic-wallet. It will return the address.

Edit 3: I implemented it in javascript. The seed is missing the word older in the end. http://jsfiddle.net/gundamlancer/9jvdkrat/1/

Gundamlancer
  • 1,026
  • 7
  • 15
5

I made one very simple recovery tool a while ago, by modifying Luigi's tools: https://github.com/JollyMort/xmr.llcoins.net/blob/master/README.md

This one can recover any 2 missing words, provided that you know the address and the checksum word is known.

JollyMort
  • 20,004
  • 3
  • 49
  • 105
4

The last word is a checksum for the first 24 words.

  • if you miss the last word, you can easily find it deterministically and there's only one solution
  • if you miss another word, you can brute force all the possibilities that are valid based on the last word. You then need to test these possibilities against a wallet to see if transactions are found. That step takes time but hopefully you will only have a handful of valid combinations at that point.
Jonathan Cross
  • 643
  • 5
  • 19
assylias
  • 2,218
  • 12
  • 28