greenaddress / garecovery

GreenAddress recovery tool for 2of2 and 2of3 wallets
MIT License
109 stars 53 forks source link

_fernet_decrypt exception running running 2of2 recovery #19

Closed DavidVeksler closed 6 years ago

DavidVeksler commented 6 years ago

I am trying the 2of2 recovery, but getting an exception from garecovery-cli.

I have the mnemonic and the latest nlocktimes.zip. I'm running on Ubuntu 16.04.3 and following the README. Here's the error:

(venv) david@david-virtual-machine:~/Downloads/garecovery-master$ garecovery-cli 2of2 --nlocktime-file ./nlocktimes.zip -o garecovery.csv mnemonic/hex seed:[I paste the 12 seed words here] Traceback (most recent call last): File "/home/david/Downloads/garecovery-master/venv/bin/garecovery-cli", line 7, in sys.exit(recoverycli.main(sys.argv)) File "/home/david/Downloads/garecovery-master/venv/local/lib/python2.7/site-packages/garecovery/recoverycli.py", line 101, in main recovery = get_recovery(clargs.args, mnemonic, seed) File "/home/david/Downloads/garecovery-master/venv/local/lib/python2.7/site-packages/garecovery/recoverycli.py", line 79, in get_recovery return TwoOfTwo(mnemonic, seed, options.nlocktime_file) File "/home/david/Downloads/garecovery-master/venv/local/lib/python2.7/site-packages/garecovery/two_of_two.py", line 28, in init zipdata = gacommon._unzip(self.compressed_zip, chaincode) File "/home/david/Downloads/garecovery-master/venv/local/lib/python2.7/site-packages/gaservices/utils/gacommon.py", line 39, in _unzip all_data.extend(_unzip(_fernet_decrypt(key, encrypted), key)) File "/home/david/Downloads/garecovery-master/venv/local/lib/python2.7/site-packages/gaservices/utils/gacommon.py", line 15, in _fernet_decrypt assert hmac_sha256(key[:16], data[:-32]) == data[-32:] AssertionError

jkauffman1 commented 6 years ago

Hi, This is the error I would expect to see if the mnemonic was incorrect. Please double check what you are pasting. I notice you said "I paste the 12 seed words here". There should be 24 words in the mnemonic.

DavidVeksler commented 6 years ago

@jkauffman1 Thanks for the quick reply. Sorry, I am bad at math. I am using 24 words and I'm certain it is correct (I'm comparing to a screenshot of the new account screen).

Would I get this error if the nlocktimes.zip was not the latest? Any other cases where I'd get it?

Do my parameters seem correct below?

(venv) david@david-virtual-machine:~/Downloads/garecovery-master$ garecovery-cli 2of2 --nlocktime-file ./nlocktimes2.zip --mnemonic-file ./seed.txt -o garecovery9.csv Traceback (most recent call last): File "/home/david/Downloads/garecovery-master/venv/bin/garecovery-cli", line 7, in sys.exit(recoverycli.main(sys.argv)) File "/home/david/Downloads/garecovery-master/venv/local/lib/python2.7/site-packages/garecovery/recoverycli.py", line 101, in main recovery = get_recovery(clargs.args, mnemonic, seed) File "/home/david/Downloads/garecovery-master/venv/local/lib/python2.7/site-packages/garecovery/recoverycli.py", line 79, in get_recovery return TwoOfTwo(mnemonic, seed, options.nlocktime_file) File "/home/david/Downloads/garecovery-master/venv/local/lib/python2.7/site-packages/garecovery/two_of_two.py", line 28, in init zipdata = gacommon._unzip(self.compressed_zip, chaincode) File "/home/david/Downloads/garecovery-master/venv/local/lib/python2.7/site-packages/gaservices/utils/gacommon.py", line 39, in _unzip all_data.extend(_unzip(_fernet_decrypt(key, encrypted), key)) File "/home/david/Downloads/garecovery-master/venv/local/lib/python2.7/site-packages/gaservices/utils/gacommon.py", line 15, in _fernet_decrypt assert hmac_sha256(key[:16], data[:-32]) == data[-32:] AssertionError

DavidVeksler commented 6 years ago

Nevermind. I did mistype the seed. Sorry.