Difference between revisions of "Public key to bitmessage address"
Jump to navigation
Jump to search
Burntbrunch (talk | contribs) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
The variable after the list is used to refer to the step later | The variable after the list is used to refer to the step later | ||
− | # | + | # Create a private and a public key for encryption and signing (resulting in 4 keys) |
+ | # Merge the public part of the signing key and the encryption key together. (encoded in uncompressed X9.62 format) (A) | ||
# Take the SHA512 hash of A. (B) | # Take the SHA512 hash of A. (B) | ||
# Take the RIPEMD160 of B. (C) | # Take the RIPEMD160 of B. (C) | ||
− | # Repeat step | + | # Repeat step 1-4 until you have a result that starts with a zero (Or two zeros, if you want a short address). (D) |
# Remove the zeros at the beginning of D. (E) | # Remove the zeros at the beginning of D. (E) | ||
− | # Put the stream number ( | + | # Put the stream number (as a [[Protocol specification#Variable length integer|var_int]]) in front of E. (F) |
− | # Put the address version ( | + | # Put the address version (as a [[Protocol specification#Variable length integer|var_int]]) in front of F. (G) |
# Take a double SHA512 (hash of a hash) of G and use the first four bytes as a checksum, that you append to the end. (H) | # Take a double SHA512 (hash of a hash) of G and use the first four bytes as a checksum, that you append to the end. (H) | ||
# base58 encode H. (J) | # base58 encode H. (J) | ||
Line 16: | Line 17: | ||
K is your full address | K is your full address | ||
+ | |||
+ | Note: Bitmessage's base58 encoding uses the following sequence (the same as Bitcoin's): "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz". Many existing libraries for base58 do not use this ordering. |
Revision as of 17:01, 19 October 2013
This page is a stub, you can help by expanding it.
This page briefly describes, how to generate a Bitmessage Address from a public key. The variable after the list is used to refer to the step later
- Create a private and a public key for encryption and signing (resulting in 4 keys)
- Merge the public part of the signing key and the encryption key together. (encoded in uncompressed X9.62 format) (A)
- Take the SHA512 hash of A. (B)
- Take the RIPEMD160 of B. (C)
- Repeat step 1-4 until you have a result that starts with a zero (Or two zeros, if you want a short address). (D)
- Remove the zeros at the beginning of D. (E)
- Put the stream number (as a var_int) in front of E. (F)
- Put the address version (as a var_int) in front of F. (G)
- Take a double SHA512 (hash of a hash) of G and use the first four bytes as a checksum, that you append to the end. (H)
- base58 encode H. (J)
- Put "BM-" in front J. (K)
K is your full address
Note: Bitmessage's base58 encoding uses the following sequence (the same as Bitcoin's): "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz". Many existing libraries for base58 do not use this ordering.