Some exchanges use integrated addresses, but what are they, and what are they useful for? Should they be used over regular addresses?
3 Answers
Integrated address is just your normal address with some extra data bundled with it (the 64-bit payment ID).
Standard public address is made of:
network byte 18 + public spend key + public view key + checksum
Integrated public address is made of:
network byte 19 + public spend key + public view key + 64-bit payment ID + checksum
While the resulting address looks different, the purpose is not to hide your actual address, but to pack it and the payment ID together to avoid errors and to communicate it easily. Anyone can open it and see the 2 pieces of information (that's exactly what your sender's wallet does when sending to it).
Even if you don't care for paymenet ID, it does have one benefit. If you post different integrated addresses publicly, someone can't just google your standard address and see where you've posted it. One would instead have to decode all suspect integrated addresses and compare the underlying standard address.
The 64-bit payment ID uses the stealth payment ID scheme, and it's use is encouraged over the usual plain-text 256-bit payment ID. This is because 64-bit PIDs are encrypted on the blockchain, ie they appear to be different for each transaction while only you can see the actual one being used.
Considering the above, it would be better if all exhanges used integrated addresses for receiving user funds.
How it works - detailed
To create a standard public address, the following is performed:
- 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).
- These 65 bytes are hashed with Keccak-256.
- The first four bytes of the hash from 2. are appended to 1., creating a 69-byte Public Address.
- 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).
- This 95-character result is the (obscenely long) Cryptonote Public Address!
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).
-
anything special re: b58 encoding when paymentID is added? I was able to replicate upto step3 here, meaning(first four bytes of)my Keccak hash (are) correct, but my b58 encoded result doesn't match what Luigi's tool yields. FYI, I was also able to arrive at the correct b58 encoded standard address(i.e. without pymtID)– kumarzCommented Feb 14, 2017 at 17:24
-
did you change the network byte to 0x13 for integrated address? should be (0x13) + (32-byte public spend key) + (32-byte public view key) + (8-byte payment ID) and then steps 2 through 5. I suggest looking into his code to understand if there's some detail missing. Commented Feb 14, 2017 at 20:05
-
1yes, or else I'd not match llcoins(Luigi's tool) at step3. I managed to tie out eventually after a few obscure(not intuitive) hacks to b58, which I'll present in a separate question I think.– kumarzCommented Feb 14, 2017 at 21:45
-
-
How can someone send you anything if he doesn't know the address? :) However, with subaddresses, it will be possible to easily make a new address for each payment, but have them all in one wallet. Commented Dec 25, 2017 at 21:05
Integrated addresses are an amalgamation of a standard Monero address and a short payment id, bundled in one single string.
They are intended to be used when a recipient requires a payment id, and they have two main advantages over the historical practice of supplying a standard address and a payment id:
it is self contained, including a checksum, so it becomes a lot harder for the payer to forget the payment id, which is a common cause of trouble
integrated addresses use a short payment id (64 bits, as opposed to the original 256 bit standalone payment ids), which will always be encrypted on the blockchain, increasing privacy (and decreasing blockchain size usage slightly).
Note that it is trivial to go from an integrated address to the standard address plus payment id. Thus, an integrated address should NOT be viewed as a way to obscure one's address from the sender.
Not many exchanges and other merchants currently support integrated addresses, however, but their use is encouraged for the above reasons.
Payment ID allows the receiver to identify the sender (it does not identify the receiver)
Integrated addess is the receiver address + payment ID combined together for convenience and presented as one string.