Bitcoin Forum
May 21, 2024, 06:20:29 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Question regarding encrypted private key  (Read 522 times)
jamesny (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
May 31, 2017, 09:18:58 AM
 #1

I have an encrypted  (was encrypted by MultiBit) private key file my_private_key.key.

I am trying to decrypt it but i'm not sure i am using the correct password.

The command:
Quote
openssl enc -d -p -aes-256-cbc -a -in my_private_key.key -out decoded.key -pass pass:<MY PASSWORD>

exists with status 0.

Does that indicates that I've used the correct password for decryption?

When trying to import/sweep it i get that it's invalid, so i guess something is not right...

Any help?

Thanks.
mocacinno
Legendary
*
Offline Offline

Activity: 3402
Merit: 4983


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
May 31, 2017, 09:30:15 AM
 #2

I have an encrypted  (was encrypted by MultiBit) private key file my_private_key.key.

I am trying to decrypt it but i'm not sure i am using the correct password.

The command:
Quote
openssl enc -d -p -aes-256-cbc -a -in my_private_key.key -out decoded.key -pass pass:<MY PASSWORD>

exists with status 0.

Does that indicates that I've used the correct password for decryption?

When trying to import/sweep it i get that it's invalid, so i guess something is not right...

Any help?

Thanks.

have you followed this tutorial:
https://github.com/keepkey/multibit/wiki/Export%20and%20limited%20import%20of%20private%20keys
?

exit code 0 usually means successfull..

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
May 31, 2017, 09:57:53 AM
 #3

How exactly are you trying to import it?

The key file is simply a text file, you should be able to open it in a text editor like notepad and read the key. So your decode.key file should look something like like this:
Quote
# KEEP YOUR PRIVATE KEYS SAFE !
# Anyone who can read this file can spend your bitcoin.
#
# Format:
#   <Base58 encoded private key>[<whitespace>[<key createdAt>]]
#
#   The Base58 encoded private keys are the same format as
#   produced by the Satoshi client/ sipa dumpprivkey utility.
#
#   Key createdAt is in UTC format as specified by ISO 8601
#   e.g: 2011-12-31T16:42:00Z . The century, 'T' and 'Z' are mandatory
#
KyRmhgasglarh389hskhqkhrkhakhskfafsfsdfsfhf3hhhsfkjhszhjfT 2009-10-27T22:04:57Z
# End of private keys

if however you see something like:
Quote
U2FsdGVkX1+F2I5kp4D+8Hf1xUzasfh39rf13hfhkjsahkjkdsafsdg32eVYkNy5hJD+pCu0qxY3
kTGafssafsafasfsafsyM//sPCejwafsdsdgsfsn+gu3tgsdghsfdfdA
Then the file is still encrypted.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
HI-TEC99
Legendary
*
Offline Offline

Activity: 2772
Merit: 2846



View Profile
May 31, 2017, 07:48:31 PM
Last edit: May 31, 2017, 08:02:01 PM by HI-TEC99
 #4

Can you find a file called decoded.key after you run the quoted command? If you can find it, and open it in notepad it should look like the example HCP posted.

If you can't find decoded.key then try this command instead of the one you were using, but swap 111111111111111 for your password.

openssl enc -d -aes-256-cbc -a -in my_private_key.key -pass pass:111111111111111 > decoded.key

If a file called decoded.key appears in the openssl folder after you run it then it worked.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!