Suppose Alice runs a confidential restaurant. Alice doesn鈥檛 want there to be any record of who visited her restaurant but does want to get paid for her food. She accepts Monero, and instead of a cash register there are two QR codes on display, one corresponding to her public view key A and the other corresponding to her public spend key S. How Bob buys his burger A customer Bob walks into the restaurant and orders a burger and fries. When Bob pays Alice, here鈥檚 what鈥檚 going on under the hood. Bob is using software that generates a random integer r and multiplies it by a point G on an elliptic curve, specifically ed25519, obtaining the point R = rG on the curve. The software also multiplies Alice鈥檚 view key A, a point on the same elliptic curve, by r, then runs a hash function H on the produce rA that returns an integer k. k = H(rA). Finally, Bob鈥檚 software computes the point P = kG + S and sends Alice鈥檚 cash register, i.e. her crypto wallet, the pair of points (P, R). The point P is a stealth address, an address that will only be used this one time and cannot be linked to Alice or Bob [1]. The point R is additional information that helps Alice receive her money. How Alice gets paid Alice and Bob share a secret: both know k. How鈥檚 that? Alice鈥檚 public view key A is the product of her private view key a and the group generator G [2]. So when Bob computes rA, he鈥檚 computing r(aG). Alice鈥檚 software can multiply the point R by a to obtain a(rG). rA = r(aG) = a(rG) = aR. Both Alice and Bob can hash this point鈥攚hich Alice thinks of as aR and Bob thinks of as rA鈥攖o obtain k. This is ECDH: elliptic curve Diffie-Hellman key exchange. Next, Alice鈥檚 software scans the blockchain for payments to P = kG + S. Note that P is on the blockchain, but only Alice and Bob know how to factor P into kG + S because only Alice and Bob know k. And only Alice can spend the money because only she knows the private key s corresponding to the public spend key S where S = sG. She knows P = kG + sG...
First seen: 2025-11-29 10:43
Last seen: 2025-11-29 15:44