monero-docs/docs/public-address/integrated-address.md

39 lines
2.9 KiB
Markdown
Raw Normal View History

2017-12-23 01:35:50 +00:00
# Integrated address
Monero integrated address embeds a compact payment ID.
2017-12-25 23:20:09 +00:00
Use integrated address to learn for what you are being paid. It is ideal for accepting Monero in an automated fashion,
like online stores and exchanges.
You should allow Monero software to generate integrated addresses for you (instead of forcing your own payment IDs).
Please note these are Monero technical payment IDs and must not be confused with business identifiers like order number or invoice number.
The transaction to integrated address will not reveal the payment ID publicly.
Payment ID in a transaction will be encrypted with a shared secret (one-time random key known only to sender and recipient).
Only the recipient will be able to match the transaction against payment ID.
TODO: explain how exactly payment IDs are encoded in transactions.
2017-12-23 01:35:50 +00:00
Monero integrated address obsoletes the former practice of using full 32-bytes payment ID in a transaction extra field (where it was not encrypted).
Data structure ([src](https://github.com/monero-project/monero/blob/f7b9f44c1b0d53170fd7f53d37fc67648f3247a2/src/cryptonote_basic/cryptonote_basic_impl.cpp#L172)):
Index | Size in bytes | Description
------------|------------------|-------------------------------------------------------------
0 | 1 | identifies the network and address type; [19](https://github.com/monero-project/monero/blob/793bc973746a10883adb2f89827e223f562b9651/src/cryptonote_config.h#L150) - main chain; [54](https://github.com/monero-project/monero/blob/793bc973746a10883adb2f89827e223f562b9651/src/cryptonote_config.h#L162) - test chain
1 | 32 | public spend key
33 | 32 | public view key
65 | 8 | compact payment ID - 8 bytes randomly generated by the recipient; note that it does not need encryption in the address itself but it is hidden in a transaction paying to integrated address to prevent linking payment with the address by external observers
73 | 4 | checksum ([Keccak-f[1600] hash](https://github.com/monero-project/monero/blob/8f1f43163a221153403a46902d026e3b72f1b3e3/src/common/base58.cpp#L261) of the previous 73 bytes, trimmed to first [4](https://github.com/monero-project/monero/blob/8f1f43163a221153403a46902d026e3b72f1b3e3/src/common/base58.cpp#L53) bytes)
2018-01-05 16:36:27 +00:00
It totals to 78 bytes. The bytes are then encoded ([src](https://github.com/monero-project/monero/blob/8f1f43163a221153403a46902d026e3b72f1b3e3/src/common/base58.cpp#L240)) in [Monero specific Base58](/cryptography/base58) format, resulting in a 106 chars long string. Example integrated address:
2017-12-23 01:35:50 +00:00
`4LL9oSLmtpccfufTMvppY6JwXNouMBzSkbLYfpAV5Usx3skxNgYeYTRj5UzqtReoS44qo9mtmXCqY45DJ852K5Jv2bYXZKKQePHES9khPK`
2017-12-26 00:51:22 +00:00
## Caveats
Single transaction cannot pay to multiple integrated addresses.
2017-12-25 23:20:09 +00:00
## Reference
2017-12-23 01:35:50 +00:00
* question on [StackExchenge](https://monero.stackexchange.com/questions/3179/what-is-an-integrated-address)