First of all, I know the altcoin section might be more appropriate for my questions, but I have already asked my question there, but there wasn't anybody able to help me, so hopefully I'm allowed to ask for help here.
Now on to my problem! I saved a wallet with about ~1600-1700 Yacoin which is worth over 0.25 BTC. I wanted to sell these, but upon opening my wallet, I'm getting the following error:
![](https://ip.bitcointalk.org/?u=http%3A%2F%2Fi42.tinypic.com%2F11gj4pe.png&t=665&c=zF-vWRFQziV2VQ)
What I've tried:
1) Deleting everything in the Yacoin folder except the wallet.dat. Same thing.
2) Use the -salvagewallet option. This resulted in the following error:
![](https://ip.bitcointalk.org/?u=http%3A%2F%2Fi42.tinypic.com%2F2ikxkwn.png&t=665&c=fx7Mnbuf-kdIHw)
3) Pywallet. It takes a bit of fiddling to get it to work on Yacoin via the otherversion switch, but I managed to get it to work with a fresh Yacoin wallet. No success with my corrupted version
![Sad](https://bitcointalk.org/Smileys/default/sad.gif)
It threw the following errors:
Traceback (most recent call last):
File "C:\Users\Jaap\Desktop\pywallet.py", line 2059, in parse_wallet
d['txIn'].append(parse_TxIn(vds))
File "C:\Users\Jaap\Desktop\pywallet.py", line 2028, in parse_TxIn
d['sequence'] = vds.read_uint32()
File "C:\Users\Jaap\Desktop\pywallet.py", line 1942, in read_uint32
def read_uint32(self): return self._read_num('<I')
File "C:\Users\Jaap\Desktop\pywallet.py", line 1981, in _read_num
(i,) = struct.unpack_from(format, self.input, self.read_cursor)
error: unpack_from requires a buffer of at least 4 bytes
4) I used an old Yacoin client, which I used during the time I mined those Yacoin. Didn't work either.
5) I inspected the wallet.dat with an Hex Editor. I managed to find the label of the address which holds my Yacoin and I found the address in plaintext. Looking on the Block Explorer, my Yacoin are still there.
I also managed to find a lot of instances of "63 6B 65 79 21 02" or in ASCII "ckey!.", which presumably indicates an encrypted private key follows, correct?
My main questions:
1) How long (in bytes) is the encrypted private key that follows?
2) What algorithm is used to encrypt these private keys and how can I manually decrypt these? (I know the passphrase)
3) I found 244 instances of "63 6B 65 79 21 02" or in ASCII "ckey!.". Is there any way how I can find out which of those belongs to the address which I found in plaintext in the wallet, or will I have to try them all to find the correct one?
4) Once I find the decrypted private key, I can import these via the console with importprivkey, correct?
Thank you very much in advance!