1
0
mirror of https://github.com/bitcoin/bips.git synced 2025-01-18 21:35:13 +01:00
Commit Graph

9 Commits

Author SHA1 Message Date
Sebastian Falbesoner
fe0f83531e BIP-352: generate input_hash after summing up keys (simplification)
For both sender and receiver, generating the input hash is currently
listed as the first step. This already involves summing up the public
keys, even though summing up key material (private keys for sender,
public keys of inputs for receiver) is then again listed explicitly
in later steps.

It seems to be more obvious and less redundant (and also hopefully less
confusing for readers) to reorder the instructions to calculate the
input_hash _after_ the key aggregation is done to reuse the result. In
case of the sender, the private key sum has to be multiplicated with G
in order to the get to the corresponding input pubkey sum.

This also corresponds to the current BIP352 implementation in the
secp256k1 library (https://github.com/bitcoin-core/secp256k1/pull/1519).
The reference implementation in Python here is adapted for the sender
side, the receiver side has already generated the input_hash after
summing up the pubkeys.
2024-06-20 00:33:14 +02:00
cocoyeal
46a2440718 remove duplicated words 2024-05-29 16:18:11 +08:00
Jon Atack
f4693dc0fd bip352: fix link to coredev discussion 2024-05-12 11:22:56 -06:00
josibake
17e1d168e8
Minor fixups
- Fix link
- Add explanation for scalar multiplication
- Spelling error in test section
2024-05-08 18:34:39 +02:00
josibake
9929215dcf
Change status to Proposed 2024-05-08 18:34:34 +02:00
josibake
ef108e0e77
Add post-history 2024-05-08 18:14:56 +02:00
josie
0ccf42c869
Apply suggestions from code review
Punctuation and wording improvements.

Co-authored-by: Mark "Murch" Erhardt <murch@murch.one>
2024-05-08 18:14:56 +02:00
josibake
33a99a1a17
Add reference.py with test vectors
* reference.py contains the silent payment specific code
* secp256k1.py for doing the EC operations
* bech32m.py contains code for encoding/decoding bech32(m) addresses
* bitcoin_utils.py contains some helper code, not specific to silent
  payments
* send_and_receive_test_vectors.json contains the wallet unit test
  vectors

Co-Authored-By: S3RK <1466284+S3RK@users.noreply.github.com>
Co-Authored-By: Oghenovo Usiwoma <37949128+Eunovo@users.noreply.github.com>
Co-authored-by: S.Blagogee <34041358+setavenger@users.noreply.github.com>
2024-05-08 18:14:55 +02:00
josibake
96f4e5a4c4
Add BIP for Silent Payments
Co-Authored-By: Ruben Somsen <rsomsen@gmail.com>
2024-05-08 18:14:55 +02:00