4

After the receiver scan the blockchain and identifies his own transaction, how does he know the amount that he received in that Tx? (Without off-chain communication)

I appreciate a Technical explanation according to the Monero terminology (RingCT etc..).

Thanks.

2

The amount is encrypted by the sender and then communicated as part of the transaction (it's a field called amount in the ecdhInfos part of the transaction).

To decrypt the encrypted amount, you need to know your private view key a. The transaction already includes the transaction public key R.

Decrypted amount = encrypted amount - Hs(Hs(8aR || i)) where i is the index of the output whose amount you want to decrypt, || means byte concatenation, and Hs() is a hashing function that returns a kind of number called a scalar.

  • 1
    1- How does it make sense to subtract hash values from encrypted data? 2- How does the receiver know 'i' value? 3-Why is there 8 inside the hash function? – user1387682 Mar 8 '18 at 9:32
  • 1. It's a nice way of encrypting the value, since the hash will be randomly distributed, meaning the encrypted amount will be randomly distributed. You're seeing the reverse operation to decrypt it. 2. i is just the index of the output, and is simply the array index of the output as listed in the transaction 3. The cryptonote white paper says the transaction shared secret is aR, but in reality it's 8aR in the implementation in order to ensure that the resulting EC point is in the subgroup of G and not in a small subgroup (which would cause a vulnerability). – knaccc Mar 12 '18 at 20:24

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.