The zkBob account doesn't contain any fixed address. Instead if you want to receive funds you should generate and provide private addresses. In general a new private address can be generated for every incoming transaction. It is not possible to link different private addresses derived from the single account to one another or to the primary account. Only the account owner can confirm a private address belongs to the account.
A new private payment address is generated by:
Generate a random 80-bit diversifier d
Calculate diversifier subgroup generator point: Gdā=ToSubGroupHashE(Frā)ā(d)
Derive diversifier public part: Pdā=Ī·Gdāā
Prepare address data buffer (buf, 42 bytes): join 10 byte of the diversifier with 32 bytes of the Pdā.x
Get address checksum: checksum=keccak256(buf)
Attach checksum first 4 bytes to the buf
Encode buf with Base58 to the string
Thus the address string contains the diversifier public key (d,Pdā) protected with checksum to avoid typos. Checking any private addresses for ownership is very straightforward. You decode the address string and extract d and Pdā values. Next you derive Pdā²āā with the your Ī· key. The private address belongs to your account only if Pdā²ā=Pdā.
Address derivation example
Let's imagine you have an account with the intermediate key:
Ī·=0x2dedcb9b32000d350bf1055d764302b9d4f4a3820015ea49aaf02438aaa72a85ā
To derive a private address we should generate a random diversifier d and calculate the hash for it:
d=0xc2767ac851b6b1e19eda
Hash(d)=0x998ed1a2c59ea1ac23ea4519bd11e88cefe5c888d22bf245b8c22923b4b5488ā
Convert scalar Hash(d) to the subgroup generator point:
Gdā={x=0x2f6f6ef223959602c05afd2b73ea8952fe0a10ad19ed665b3ee5a0b0b9e4e3ef,y=0x2e23e2751abbb64461e9a852b7b20c8337fc279ed748c77dfa23cf6158f6a6c3}ā
Put d and Gdā.x into the buffer as little-endian numbers (start with the last significant byte):
daĀ 9eĀ e1Ā b1Ā b6Ā 51Ā c8Ā 7aĀ 76Ā c2Ā efĀ e3Ā e4Ā b9Ā b0Ā a0Ā e5Ā 3eĀ 5bĀ 66Ā edĀ 19Ā adĀ 10Ā 0aĀ feĀ 52Ā 89Ā eaĀ 73Ā 2bĀ fdĀ 5aĀ c0Ā 02Ā 96Ā 95Ā 23Ā f2Ā 6eĀ 6fĀ 2f Add a checksum. To do it we must compute keccak256 hash from the buffer above:
f4Ā e1Ā d3Ā a9Ā 45Ā a0Ā c6Ā 4aĀ 2cĀ 8cĀ 60Ā a6Ā 4bĀ adĀ 38Ā 04Ā 0fĀ 3fĀ 75Ā 24Ā 30Ā 79Ā 7cĀ 30Ā d1Ā 41Ā 91Ā a8Ā 0aĀ b5Ā 4aĀ beĀ ā
Get the first 4 bytes from the hash above and append them to the end of buffer:
daĀ 9eĀ e1Ā b1Ā b6Ā 51Ā c8Ā 7aĀ 76Ā c2Ā efĀ e3Ā e4Ā b9Ā b0Ā a0Ā e5Ā 3eĀ 5bĀ 66Ā edĀ 19Ā adĀ 10Ā 0aĀ feĀ 52Ā 89Ā eaĀ 73Ā 2bĀ fdĀ 5aĀ c0Ā 02Ā 96Ā 95Ā 23Ā f2Ā 6eĀ 6fĀ 2fĀ f4Ā e1Ā d3Ā a9 Finally encode this buffer with Base58 to get private address:
QsnTijXekjRm9hKcq5kLNPsa6P4HtMRrc3RxVx3jsLHeo2AiysYxVJP86mriHfN