Bitcoin Forum
May 17, 2024, 06:53:56 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Paper wallet is encrypted in BIP0038  (Read 1581 times)
thewayshegoes (OP)
Newbie
*
Offline Offline

Activity: 44
Merit: 0



View Profile
December 11, 2013, 12:34:32 AM
 #1

I made a Litecoin paper wallet, and encrypted it in BIP0038.  I just found out that Litecoin-QT doesn't support BIP0038.  How can I then import my paper wallet into Litecoin-QT?  Thanks.
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
December 11, 2013, 01:01:10 AM
 #2

Decrypt it first. Then import the private key normally.

thewayshegoes (OP)
Newbie
*
Offline Offline

Activity: 44
Merit: 0



View Profile
December 11, 2013, 01:06:07 AM
 #3

I guess what I was trying to ask is, how do I decrypt it?

This is what happens when I try to follow the normal directions on how to import a paper wallet into Litecoin-QT:

I opened up the debug window, typed in: walletpassphrase 'my password' '300'

I get the error message: Error: running with an unencrypted wallet, but walletpassphrase was called. (code -15)

I then typed in the debug window: importprivkey 'my private key'

I get the error message: Invalid private key (code -5)
caminilegroup
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile WWW
December 11, 2013, 01:08:07 AM
 #4

I guess what I was trying to ask is, how do I decrypt it?

If you encrypted it, umm decrypt the string with the same program...  Undecided

Maybe I'm losing something here. Let's start with how you encrypted it first, and work our way backwards.
thewayshegoes (OP)
Newbie
*
Offline Offline

Activity: 44
Merit: 0



View Profile
December 11, 2013, 01:09:45 AM
 #5

I used the Piper paper wallet printer to make my paper wallet.  The default setting is BIP0038 encryption.  I didn't realize it was going to be a problem.
caminilegroup
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile WWW
December 11, 2013, 01:17:01 AM
 #6

Here is it's encrypt code

Quote
def encryptBIP0038(pubkey, privkey, secret):
        k = CKey()
        #decode the wallet import format by base58 decoding then dropping the last 4 bytes and the first byte
        decoded = b58decode(privkey)
        decoded = decoded[:-4]
        decoded = decoded[1:]
        k.generate(decoded)
        k.set_compressed(False)
        b = Bip38(k, secret)
        return str(CBase58Data(b.get_encrypted(), 0x01))       

So, it uses the public key, private key, and a secret key you gave it.

First it decodes the wallet, using the pub and priv key then encodes with the secret key you gave it.

Looking for a solution for you, might be able to reverse it.
thewayshegoes (OP)
Newbie
*
Offline Offline

Activity: 44
Merit: 0



View Profile
December 11, 2013, 01:24:58 AM
 #7

Thanks, I really didn't know what I was doing when I encrypted it with BIP0038.  I just did it because it was the default encryption setting.  I was looking for a way to protect my coins but it looks like I protected them too much lol.
caminilegroup
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile WWW
December 11, 2013, 01:37:12 AM
 #8

See if this helps

https://www.bitaddress.org/

Click on the wallet details, input you encrypted private key, click view details, it should ask for the passphrase, enter it, and decrypt, if all goes well it will give you your private key unencrypted.

This is using the same source that piper uses, just gives you the option to do it in reverse.
caminilegroup
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile WWW
December 11, 2013, 02:51:07 AM
 #9

Did this work for you?
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
December 11, 2013, 03:08:49 AM
 #10

But he is using Litecoin, so ... there is a litecoin version of bitaddress that should work for him.

caminilegroup
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile WWW
December 11, 2013, 03:18:30 AM
 #11

Good point,

https://liteaddress.org/


Oh, and this is where I got the info from: http://piperwallet.com/faq.php
Quote
How do we know that the Piper isn't generating keys in an insecure fashion, like using a specific random seed or a bad source of entropy?
You can see the full source code for yourself and build your own Piper if you wish. You can load your own address generation software on to Piper. You can plug Piper into your TV/Monitor and Mouse and Keyboard and use the BitAddress.org client which is included with Piper and the source is cleartext since it's javascript. Piper also has a hardware random number generator built in, and it has passed all 26 of the "good" Dieharder tests for secure random number generation. Test Info - Results
thewayshegoes (OP)
Newbie
*
Offline Offline

Activity: 44
Merit: 0



View Profile
December 11, 2013, 03:58:06 AM
 #12

Well, I did what you said and when I entered the private key, it then asked for the BIP38 passphrase.  I entered the passphrase that I put into the Piper and it says "incorrect passphrase".  Lol, I know it's correct.  It's not even that long of a password and I literally typed it letter by letter twice when I created it.  Ugh, this is so frustrating.  I really appreciate the help, I thought it was finally going to be solved.
caminilegroup
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile WWW
December 11, 2013, 03:58:56 AM
 #13

Did you go to the liteaddress one instead?

If that doesn't decrypt it then you must have your key wrong. Your printer uses the same source to do it's encryption.
caminilegroup
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile WWW
December 11, 2013, 04:00:25 AM
 #14

Is there any coins in the wallet?
caminilegroup
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile WWW
December 11, 2013, 04:06:58 AM
 #15

sent you a pm
caminilegroup
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile WWW
December 11, 2013, 04:23:52 AM
 #16

Did a little testing.

Created an address on liteaddress.org, encrypted it. Went to bitaddress.org, put in encrypted private key, it asked for key, clicked decrypt. It prompted me saying I had entered an incorrect private key.

So good, went back to liteaddress.org, entered encrypted private key but changed a letter. Nope, not a valid key, again good.

Put right key input password, and it decrypted it. Did it again, messed with password, nope no go.

It has to be a password issue, as long as it doesn't throw you a invalid key error, it is definitely a password issue.

There is always the brute force route...
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!