1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-05-18 16:59:30 +00:00

BIP-352: scanning: add step to skip tx if input pubkeys sum A is point at infinity

The input data for the test vector is taken from the signet transaction
fe788cf6578d547819def43d79e6c8f0153d4885f5a343d12bd03f34507aabd6
which spends two P2WPKH inputs with negated pubkeys (x, y) and (x, -y)
from the funding transaction 3a286147b25e16ae80aff406f2673c6e565418c40f45c071245cdebc8a94174e
(see also https://github.com/bitcoin-core/secp256k1/pull/1519#issuecomment-2143167510
and the output from the script in the previous commit message).

Co-authored-by: josibake <josibake@protonmail.com>
This commit is contained in:
Sebastian Falbesoner
2024-06-14 14:33:40 +02:00
parent 47033c62dc
commit 59cc43d727
3 changed files with 47 additions and 0 deletions

View File

@@ -335,6 +335,7 @@ A scan and spend key pair using BIP32 derivation are defined (taking inspiration
If each of the checks in ''[[#scanning-silent-payment-eligible-transactions|Scanning silent payment eligible transactions]]'' passes, the receiving wallet must:
* Let ''A = A<sub>1</sub> + A<sub>2</sub> + ... + A<sub>n</sub>'', where each ''A<sub>i</sub>'' is the public key of an input from the ''[[#inputs-for-shared-secret-derivation|Inputs For Shared Secret Derivation]]'' list
** If ''A'' is the point at infinity, skip the transaction
* Generate the ''input_hash'' with the smallest outpoint lexicographically and ''A'', using the method described above
* Let ''ecdh_shared_secret = input_hash·b<sub>scan</sub>·A''
* Check for outputs: