Author: Pieter Wuille 2012-01-09 13:53:51
Published on: 2012-01-09T13:53:51+00:00
Pieter, a developer, has posted on the Bitcoin development mailing list about a new pull request (pull #649) that defines an import/export format for private keys whose public key is compressed. This format includes a marker that states whether the corresponding compressed or uncompressed public key should be used as they have different addresses. The format for an uncompressed key is 0x80 + [32-byte secret] + [4 bytes of Hash() of previous 33 bytes], base58 encoded. Meanwhile, the format for a compressed key is 0x80 + [32-byte secret] + 0x01 + [4 bytes of Hash() previous 34 bytes], base58 encoded. Pieter then included three cases to test implementations with. Each case includes a secret (in hex), an uncompressed and compressed secret (in base58), a pubkey (in hex), and an address (in base58). The first case, which uses a secret of 1111...1111, has an uncompressed and compressed address of 1MsHWS1BnwMc3tLE8G35UXsS58fKipzB7a and 1Q1pE5vPGEEMqRcVRMbtBK842Y6Pzo6nK9, respectively. The second case, which uses a secret of dddd...dddd, has an uncompressed and compressed address of 1JyMKvPHkrCQd8jQrqTR1rBsAd1VpRhTiE and 1NKRhS7iYUGTaAfaR5z8BueAJesqaTyc4a, respectively. Finally, the third case includes a secret of 47f7616ea6f9b923076625b4488115de1ef1187f760e65f89eb6f4f7ff04b012 and an uncompressed and compressed address of 1PM35qz2uwCDzcUJtiqDSudAaaLrWRw41L and 19ck9VKC6KjGxR9LJg4DNMRc45qFrJguvV, respectively. Pieter invites comments or suggestions regarding this new format.
Updated on: 2023-05-18T22:55:09.306668+00:00