Difference between revisions of "Public key to bitmessage address"

From Bitmessage Wiki
Jump to navigation Jump to search
Line 1: Line 1:
First the public part of the signing key and the encryption key are merged together.
+
{{stub}}
  
Then you take the SHA512 hash of that.
+
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
  
Then you take the RIPEMD160 of that.
+
# The public part of the signing key and the encryption key are merged together. (A)
 +
# Take the SHA512 hash of A. (B)
 +
# Take the RIPEMD160 of B. (C)
 +
# Repeat step 3 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 (in big endian) in front of E. (F)
 +
# Put the address version (in big endian) 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)
  
This is repeated until you have a result that starts with a zero (Or two zeros, if eighteen byte ripe is required)
+
K is your full address
 
 
Then you remove the zeros at the beginning.
 
 
 
Then you slap the stream number (in big endian) in front of that.
 
 
 
Then you slap the address version (in big endian) in front of that.
 
 
 
Then you take a double SHA512 of that and use the first four bytes as a checksum, that you slap on at the end.
 
 
 
Then you base58 encode this.
 
 
 
Then you slap "BM-" in front of it all.
 

Revision as of 12:20, 21 August 2013

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

  1. The public part of the signing key and the encryption key are merged together. (A)
  2. Take the SHA512 hash of A. (B)
  3. Take the RIPEMD160 of B. (C)
  4. Repeat step 3 until you have a result that starts with a zero (Or two zeros, if you want a short address). (D)
  5. Remove the zeros at the beginning of D. (E)
  6. Put the stream number (in big endian) in front of E. (F)
  7. Put the address version (in big endian) in front of F. (G)
  8. 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)
  9. base58 encode H. (J)
  10. Put "BM-" in front J. (K)

K is your full address