12

Monero addresses are very long and are supposed to be random, but I have noticed that all of them start with the number 4. Are there any other similarities shared by all Monero addresses?

14

A more technical answer on how addresses are generated is provided below, as found here. Any similarities between the addresses are a consequence of how they're created. As you can see, the first byte is always the same which, when encoded to base58, results in addresses starting with "4".

To create the actual Public Address, the following is performed:

  1. The pair of public keys are prepended with one network byte (the number 18, 0x12, for Monero). It looks like this: (network byte) + (32-byte public spend key) + (32-byte public view key).
  2. These 65 bytes are hashed with Keccak-256.
  3. The first four bytes of the hash from 2. are appended to 1., creating a 69-byte Public Address.
  4. As a last step, this 69-byte string is converted to Base58. However, it's not done all at once like a Bitcoin address, but rather in 8-byte blocks. This gives us eight full-sized blocks and one 5-byte block. Eight bytes converts to 11 or less Base58 characters; if a particular block converts to <11 characters, the conversion pads it with "1"s (1 is 0 in Base58). Likewise, the final 5-byte block can convert to 7 or less Base58 digits; the conversion will ensure the result is 7 digits. Due to the conditional padding, the 69-byte string will always convert to 95 Base58 characters (8 * 11 + 7).
  5. This 95-character result is the (obscenely long) Cryptonote Public Address!
  6. If you're creating an integrated address, simply append the 64-bit payment ID to step 1 and continue; everything else is the same except for the lengths (77 bytes total, 106 Base58 digits) and the prepended byte (19, 0x13).
11

According to http://monero.wikia.com/wiki/Address_validation:

Monero addresses may seem random, but they have the following details in common:

  • They consist of 95 characters

  • They start with a 4

  • The second character can only be a number (0-9), or letters A or B

1

@JollyMort Thank you.

For someone who make a very simple validate API...

Integrated address is 106 characters. So it should be "They consist of 95 or 106 characters."

Also the second character of integrated address can be a character. "The second character can only be a number (0-9), or letters A or B" is not right.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.