证明转账行为
这笔交易是我转账出去的。
并不是“挖矿证明”,而是证明我知道此笔交易中“具体某个输出”所对应的“真实的交易金额”。
P = Hs(rA)G + B
因为我知道“交易私钥 r”,进而知道加密金额时的“共享私钥”。之后,即可进行解密。
EncryptDecryptPaymentID
// this function is used to encrypt/decrypt payment id
// as the operation is symmetric XOR, is the same in both direction
Prove
核心思路是证明“这笔交易里的每个输出,我都知道其交易金额”。
// this function will prove detect and decode output amount for the tx
返回输出里具体哪个地址是真正的收款地址,交易金额,PaymentID(有的话)