Bitcoin Forum
May 07, 2024, 01:18:50 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is it the 52 char compressed key, or is this the worst keypair ever? (bounty)  (Read 1849 times)
BitBlitz (OP)
Sr. Member
****
Offline Offline

Activity: 285
Merit: 250


Turning money into heat since 2011.


View Profile
October 31, 2012, 12:10:06 AM
Last edit: April 09, 2014, 03:50:11 AM by BitBlitz
 #1

I have a 52 character private key (starts with 'L').  The wallet.dat was encrypted some time after the block was solved, and became corrupted to the point that the bitcoin.org client would not open with it.  I extracted the keys with pywallet and managed to import and spend all of the block rewards in the wallet except this one.

Here is what is interesting:
1) I can NOT import the key into an unencrypted wallet with pywallet.
2) I can import the key into an encrypted wallet with pywallet, and the balance is shown.
3) If I attempt to send all or part of that amount, the client reports "Transaction creation failed".
4) Nothing shows up in the debug log.
5) I can import the key to a blockchain wallet and the balance is shown (still cannot send).

Is pywallet able to handle 52 character keys correctly?  
Any ideas why this works with encrypted wallets only?


I see the value of Bitcoin, so I don't worry about the price...
1715087930
Hero Member
*
Offline Offline

Posts: 1715087930

View Profile Personal Message (Offline)

Ignore
1715087930
Reply with quote  #2

1715087930
Report to moderator
1715087930
Hero Member
*
Offline Offline

Posts: 1715087930

View Profile Personal Message (Offline)

Ignore
1715087930
Reply with quote  #2

1715087930
Report to moderator
1715087930
Hero Member
*
Offline Offline

Posts: 1715087930

View Profile Personal Message (Offline)

Ignore
1715087930
Reply with quote  #2

1715087930
Report to moderator
Even if you use Bitcoin through Tor, the way transactions are handled by the network makes anonymity difficult to achieve. Do not expect your transactions to be anonymous unless you really know what you're doing.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
October 31, 2012, 12:39:13 AM
 #2

Private keys are 51 characters.

Maybe your key has an invisible character in it. Has caught me by surprise. Hand retype and see if it works.

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
BitBlitz (OP)
Sr. Member
****
Offline Offline

Activity: 285
Merit: 250


Turning money into heat since 2011.


View Profile
October 31, 2012, 03:43:35 AM
 #3

The 52 character private keys are paired with compressed public keys. I've imported and tried this key in 0.3.x, 0.4.x, and more current clients.  Always the same story...  It is a valid key---at least it imports to the right address with the lost block reward.

I see the value of Bitcoin, so I don't worry about the price...
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
October 31, 2012, 03:52:08 AM
 #4

The wallet.dat was encrypted some time after the block was solved, and became corrupted to the point that the bitcoin.org client would not open with it.

The Bitcoin.org client version 0.7.1 has a "-salvagewallet" option.  You might want to try that on a copy of the wallet.dat,
then if that loads, you can use the console from the Debug window to dumpprivkey.

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


BCB
CTG
VIP
Legendary
*
Offline Offline

Activity: 1078
Merit: 1002


BCJ


View Profile
October 31, 2012, 03:58:41 AM
 #5

BitBlitz

I believe I saw a discussion about a similar issue on bitcoin-dev  irc channel recently.  Have you tried there?
BitBlitz (OP)
Sr. Member
****
Offline Offline

Activity: 285
Merit: 250


Turning money into heat since 2011.


View Profile
October 31, 2012, 04:01:23 AM
 #6

The Bitcoin.org client version 0.7.1 has a "-salvagewallet" option.  You might want to try that on a copy of the wallet.dat,
then if that loads, you can use the console from the Debug window to dumpprivkey.
I tried salvagewallet a few times (and I forgot a data point).  Salvagewallet just deletes the key Shocked

I see the value of Bitcoin, so I don't worry about the price...
OpenYourEyes
Full Member
***
Offline Offline

Activity: 238
Merit: 100



View Profile
October 31, 2012, 05:37:16 AM
 #7

This isn't really my area, but have you tried using Armoury to import the key.

I had issues importing private keys before, tried many clients and blockchain.info, but Armoury came to the rescue in the end.

Edit: Post the key Smiley Lol.

takemybitcoins.com: Spend a few seconds entering a merchants email address to encourage them to accept Bitcoin
PGP key | Bitmessage: BM-GuCA7CkQ8ojXSFGrREpMDuWgv495FUX7
Garr255
Legendary
*
Offline Offline

Activity: 938
Merit: 1000


What's a GPU?


View Profile
October 31, 2012, 05:54:32 AM
 #8

PM me the privkey (and wallet if you'd like) and I'll try my hand at it.

“First they ignore you, then they laugh at you, then they fight you, then you win.”  -- Mahatma Gandhi

Average time between signing on to bitcointalk: Two weeks. Please don't expect responses any faster than that!
flatfly
Legendary
*
Offline Offline

Activity: 1078
Merit: 1016

760930


View Profile
October 31, 2012, 07:15:54 AM
 #9

Private keys are 51 characters.

Maybe your key has an invisible character in it. Has caught me by surprise. Hand retype and see if it works.

Actually compressed private keys are 52 characters, so the length is not the issue here. 

Also bitcoind releases prior to 0.6.0 do not support compressed keys so I'm not surprised you couldn't spend it from older releases.

There is a new python patch for Electrum (not merged in the release code yet) that supports importing of such keys - perhaps you could give that a try? It would probably work.  If you're willing to try this out and need some help, I'll be available to guide you through getting and merging the patch later today.
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
October 31, 2012, 07:22:05 AM
 #10

I just updated my Casascius Bitcoin Address Utility to fully support compressed private keys.  So yeah, now I definitely agree, 52 characters for a private key if it's compressed...

There is no way to use a compressed private key with a client that doesn't support it.  There is no "uncompressed equivalent" (well, there is, but it will have a different bitcoin address so it's useless).

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
November 02, 2012, 06:25:02 AM
 #11

I'd try the raw transaction API and see if I could move it that way.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
BitBlitz (OP)
Sr. Member
****
Offline Offline

Activity: 285
Merit: 250


Turning money into heat since 2011.


View Profile
November 04, 2012, 04:14:48 AM
 #12

Still working on this one... Angry   I can get compressed key compatible clients to show the balance, but they all fail when I try to send them. Huh

Mike, The Casascius Address tool confirms that the 'other address' that I see in some tools or clients is an import of the private key without compressing the public key. 

I see the value of Bitcoin, so I don't worry about the price...
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
November 04, 2012, 05:06:10 AM
 #13

Have you tried the importprivkey RPC call on a normal bitcoin 0.7.1 node?

Sounds to me like the WIF is incorrect, but the tools you are using aren't checking the checksum, so they happily import it, but since it isn't right, they can't actually make a valid signature for it.

It would be hard to know more without seeing it, and you probably don't want to hand a stranger on the internet what could be $500.  That said, I'd be willing to take a look at it if you'd like.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
November 05, 2012, 02:10:54 PM
 #14

https://casascius.com/btcaddress-alpha.zip is the only version that recognizes compressed public keys.

My utility can ignore a bad checksum if you put a ? after the address. Converting it back from hex to WIF will give you one with a recalculated checksum.

Perhaps you can share the public key (starts with 02, 03, or 04). This is safe to share and may help.

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
J-Norm
Newbie
*
Offline Offline

Activity: 56
Merit: 0



View Profile
November 23, 2012, 01:29:29 AM
 #15

I had a funny private key that the client would not accept.

I went to my blockchain.info wallet, then imported it as a private key. It worked, then I went to the "paper wallet" page and it gave me a normal private key that would import to the regular client.

If this works sent the bounty to: 1JNv6WZsh8rPfXYaKXXMnuKvsjZKhnoL5d
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
November 23, 2012, 01:34:59 AM
 #16

An example of a potential "funny" private key is one that starts with "y".

These are formed when pywallet misbehaves when encountering a private key that starts with a 00 byte. It is malformed but many utilities will still accept it. Others won't.  I believe mine will, since I am aware of the problem and likely would have accommodated it.  It can be converted to the proper format with no loss of funds. 

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
BitBlitz (OP)
Sr. Member
****
Offline Offline

Activity: 285
Merit: 250


Turning money into heat since 2011.


View Profile
November 30, 2012, 04:38:36 AM
Last edit: April 09, 2014, 03:53:13 AM by BitBlitz
 #17


Circling back to this... (I've been way too busy)
--By the way Mike, I missed the chance to meet you at DefCon.  Maybe next time.

J-Norm: paper wallet or key exports just issue the same privkey.   Sad

Anyways, I think I just need to find a client that can sign a transaction with this key.  


I see the value of Bitcoin, so I don't worry about the price...
sunnankar
Legendary
*
Offline Offline

Activity: 1031
Merit: 1000



View Profile WWW
November 30, 2012, 05:14:59 AM
 #18

I went to my blockchain.info wallet, then imported it as a private key. It worked, then I went to the "paper wallet" page and it gave me a normal private key that would import to the regular client.

That should work. Using BrainWallet.org and BitAddress.org tools may be a shorter method.

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!