Bitcoin Forum
May 20, 2024, 11:45:48 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why does blockchain.info let me import an invalid WIF private key?  (Read 4447 times)
canton (OP)
Sr. Member
****
Offline Offline

Activity: 261
Merit: 285



View Profile WWW
April 24, 2013, 07:50:28 PM
 #1

Because here's the thing, if I click to import a private wallet, and then type in a valid wallet import key, but then intentionally mess up five or six of the characters, blockchain.info still reassures me that it imported the wallet.

Isn't there supposed to be a WIF wallet import format checksum or something that would alert you if you'd made a typo?

piuk
Hero Member
*****
Offline Offline

Activity: 910
Merit: 1005



View Profile WWW
April 24, 2013, 07:54:56 PM
 #2

It's a bug with the pk format detection. The Key is no longer a valid WIF key however it is still a valid base 58 key so the key is imported as base 58 instead.

canton (OP)
Sr. Member
****
Offline Offline

Activity: 261
Merit: 285



View Profile WWW
May 28, 2013, 07:36:45 PM
 #3

It's a bug with the pk format detection. The Key is no longer a valid WIF key however it is still a valid base 58 key so the key is imported as base 58 instead.

But if I was randomly futzing around with the digits, shouldn't this fail as a valid base 58 of any kind, since the checksums won't add up?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
May 29, 2013, 12:16:32 AM
 #4

It's a bug with the pk format detection. The Key is no longer a valid WIF key however it is still a valid base 58 key so the key is imported as base 58 instead.
But if I was randomly futzing around with the digits, shouldn't this fail as a valid base 58 of any kind, since the checksums won't add up?

WIF has a checksum, Base 58 does not.
canton (OP)
Sr. Member
****
Offline Offline

Activity: 261
Merit: 285



View Profile WWW
May 29, 2013, 02:44:22 PM
 #5

WIF has a checksum, Base 58 does not.

Can anyone point me to the spec on this? I just keep finding Base58 specs that *do* include 4 byte checksums e.g.

https://en.bitcoin.it/wiki/Base58Check_encoding

Are there such things as Base58 checkless keys?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
May 29, 2013, 02:50:54 PM
 #6

WIF has a checksum, Base 58 does not.

Can anyone point me to the spec on this? I just keep finding Base58 specs that *do* include 4 byte checksums e.g.

https://en.bitcoin.it/wiki/Base58Check_encoding

That is Base58Check encoding.  That is Wallet Import Format (WIF).

Base 58 itself (not base58check) is just a numbering system with a radix of 58 (like binary has a radix of 2, octal a radix of 8, hexadecimal a radix of 16, decimal a radix of 10, etc.)

Are there such things as Base58 checkless keys?

Yes.  When it is not in WIF, a private key is just a very big number.  Any number between 0x1 and 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4141 is a valid private key.  Using base 58 simply allows you to represent that number with fewer digits (making it easier to type/write).
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!