门罗币隐身地址的工作原理
How stealth addresses work in Monero

原始链接: https://www.johndcook.com/blog/2025/11/24/monero-stealth-addresses/

爱丽丝的私密餐厅使用门罗币接受付款,同时保护顾客隐私。她不用传统的收银机,而是展示两个二维码,分别链接到她的公钥(A)和花费密钥(S)。 当顾客鲍勃付款时,他的软件会生成一个随机数‘r’,并将其与爱丽丝的公钥(A)和一个加密函数结合,创建出一个一次性“隐身地址”(P)和附加数据(R)。鲍勃将(P, R)发送到爱丽丝的钱包。 关键在于,鲍勃和爱丽丝都独立地使用他们的密钥和‘r’计算出相同的秘密数字‘k’——这个过程称为椭圆曲线迪菲-赫尔曼(ECDH)。然后,爱丽丝扫描区块链,查找发送到地址P的交易。 只有爱丽丝和鲍勃知道如何将P与资金关联起来,因为他们共享‘k’。爱丽丝可以使用她的私钥(s)来花费这笔钱,从而为交易创建一个新的私钥(k+s)。 门罗币的环签名进一步增强了隐私,将鲍勃伪装成众多发送者之一,使得仅凭区块链无法确定地将他与付款联系起来。

这次黑客新闻的讨论集中在门罗币隐私功能的实用性上,特别是隐身地址。虽然门罗币旨在模糊交易细节,但一个关键问题出现了:如何将加密货币转换回传统法定货币(如美元),而不暴露来源? 用户指出内在的挑战——转换回法定货币不可避免地会引入潜在可追溯性。一位评论员建议建立一个“圈子”的企业来洗钱,提到了使用看似合法但实际上空壳的机构。另一位则强调了获取、存储和转换门罗币的复杂性和成本,认为对用户来说存在重大障碍。 本质上,这次对话强调了,虽然门罗币增强了隐私性,但“退出到法定货币”仍然是一个薄弱环节,并且通常需要应对复杂且可能存在风险的方法。
相关文章

原文

Suppose Alice runs a confidential restaurant. Alice doesn’t 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’s what’s 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’s 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.

kH(rA).

Finally, Bob’s software computes the point

PkGS

and sends Alice’s cash register, i.e. her crypto wallet, the pair of points (PR). 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’s that?

Alice’s 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’s computing r(aG). Alice’s software can multiply the point R by a to obtain a(rG).

rAr(aG) = a(rG) = aR.

Both Alice and Bob can hash this point—which Alice thinks of as aR and Bob thinks of as rA—to obtain k. This is ECDH: elliptic curve Diffie-Hellman key exchange.

Next, Alice’s software scans the blockchain for payments to

PkGS.

Note that P is on the blockchain, but only Alice and Bob know how to factor P into kGS 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

SsG.

She knows

PkGsG = (ks)G

and so she has the private key (ks) corresponding to P.

Related posts

[1] Bob sends money to the address P, so there could be some connection between Bob and P on the Monero blockchain. However, due to another feature of Monero, namely ring signatures, someone analyzing the blockchain could only determine that Bob is one of 16 people who may have sent money to the address P, and there’s no way to know who received the money. That is, there is no way, using only information on the blockchain, who received the money. A private investigator who saw Bob walk into Alice’s restaurant would have additional information outside the blockchain.

[2] The key assumption of elliptic curve cryptography is that it’s computationally infeasible to “divide” on an elliptic curve, i.e. to recover a from knowledge of G and aG. You could recover a by brute force if the group were small, but the elliptic curve ed25519 has on the order of 2255 points, and a is some integer chosen randomly between 1 and the size of the curve.

联系我们 contact @ memedata.com