What is the correlation between ckey
, mkey
and a private key in bitcoin?
How can I retrieve my lost private key from ckey
and mkey
?
1 Answer
ckey
is an encrypted private key. mkey
is an encryption key for ckey
s that is encrypted using your passphrase.
This answer describes the format of mkey
records.
ckey
have a key of the string ckey
followed by the public key. The value contains the encrypted private key followed by the checksum which is the SHA256 of the encrypted private key. The encrypted private key is 32 bytes. It is AES-256-CBC encrypted, with an IV of the first 16 bytes of the SHA256 of the public key.
-
Thanks you I understand it a bit more now. Please tell me is there a way to found my private key using this knowledge? Commented Aug 27, 2022 at 10:29
-
If have a
ckey
record, themkey
for thatckey
, and the passphrase for themkey
, then yes you can get your private key by doing the decryption.– Ava Chow ♦Commented Aug 27, 2022 at 15:56 -
That's an amazing answer! What is the last sentence about "IV"? Can you extend this sentence?– pbiesCommented Jan 23, 2023 at 1:31
-
1@pbies There isn't much to expand.. IV stands for Initialization Vector, it's one of the parameters to AES for encrypting or decrypting something.– Ava Chow ♦Commented Jan 23, 2023 at 3:40