I generated a paper wallet back in 2018 and now I want to move the Zcash on it to better wallet. When I go to import the private key I get a “Invalid private key encoding” error and I have no clue what steps I need to take the fix this.
Make sure the syntax is correct, the whole key includes the secret-extended words at the beginning and no quotes (I think)
A successful import requires a rescan so if it doesnt automatically (dont know if it will) simply add
to the conf and restart then just remove that line so it doesn’t rescan the subsequently next time you restart
I have double checked the key and I have even tried scanning in the QR code for the private key and still get the error. Was there a wallet conversion sometime after 2018 I am not aware of? This was the wallet generator I used back in march of 18 (https://walletgenerator.net/?currency=Zcash). I tested the importing process with a new wallet from the same site and it worked. The only think I can think of that might be a problem is that there is password on the one I am trying to import.
Ill try and see what I can see, it does have a BIP38 passphrase option
T import works, z import fails with invalid spending key but the code repository was last updated 2 1/2 years ago so yeah maybe…rescanning now
Importing a z address using an up to date paper wallet works
The addresses created with walletgenerator[dot]net dont and that website shoyld NOT be used
If you used a browser based key generator, then your compressed key should start with the letters L or K.
If it starts 6P, it is BIP38 encrypted and the key must first be decrypted first and then use the L or K address (compressed).
If it starts with a 5, it is an uncompressed key - use the wallet details to see the compressed version.
When you import a compressed key into ZecWallet, just enter the key by itself.
Here is an example created from walletgenerator.net (used random generated address).
In addition, if you do have the private key, it would probably be a faster and safer idea to sweep the keys to another wallet. This is not something Zecwallet has a UI for. Assuming the key is a T transparent address, you can use a third party wallet like Coinomi to move all funds from the private key to a new wallet in a few seconds (at the cost of a network fee).
If your key is a shielded one, then you should import the key and rescan. Using the Lite client might be faster if you know around what block the key was made as the lite client will start scanning from that block.
Please do some research on importing keys vs sweeping along with possible issues with change addresses.
How long did it take to decrypt the address? I am trying on my end with what I am 90% sure is the passphrase and walletgenerator.net just spins it little thinking wheel forever.
Update: Tested that you can use either compressed or uncompressed WIF keys. You cannot use BIP38 (6P) encrypted keys. Decrypt it first.
It takes an 3-5 year old Core i5 about 5-10 seconds at longest to decrypt. You should NOT be using the live web site for this function.
Download the version from Github, extract the files to a secure computer, and open the index.html from your computer’s file system in a browser.
Yeah, the decode only works when its downloaded. I was going to move the Zcash immediately to a new wallet so I was not really concerned about security. So I tried the password that I even wrote “Zcash” next to and incorrect phrase. Just my luck, I’ll keep trying in the morning. Thanks for helping point out what I have been doing wrong so far. There is only like 0.2 Zcash in the wallet so if its gone its not a big deal to me, its just a point of principle to me now. If I cant guess it might look into smart brute forcing it.
Brute forcing BIP38 is NOT feasible unless you have a really good idea of what the password was already or if it was really short. The methods used in the cryptography are designed to be slow to thwart such attacks. There have been challenges online where someone posted their passworded key with 1 - 10+ BTC with no success.
Example from BitcoinTalk Forums - 2015 - 2017
First wallet was cracked in under 3 hours. [pwd: BarT]
Second wallet was cracked in under 10 hours. [pwd: grAce]
Fourth wallet was cracked in under 2 days. [pwd: pxrmg]
Third wallet was NOT CRACKED in two years. [pwd: zLwMiR]
Also, make sure Zcash is the Coin type in the top right. The BIP38 will be wrong if it’s for the wrong currency.
IM IN. Your comment about making sure I was on Zcash was the final piece I needed.Now I really need to go to sleep or my boss will put me through the rigger haha. Thanks a ton man. Its the little things that lock people out of there wallets XD. Though it is interesting that each coin does bip38 differently. Was kinda looking forward to hardware acceleration a brute force algo but now I dont need to anymore.
Glad I could help and you got access. FYI I think the BIP38 encryption fails because it checks the output to match the coin key scheme.