Skip to content

Commit 6e3ed2d

Browse files
committed
doc: add module description for secp256k1-silentpayments
1 parent a9a5fe8 commit 6e3ed2d

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

include/secp256k1_silentpayments.h

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,26 @@
77
extern "C" {
88
#endif
99

10-
/* TODO: add module description */
10+
/* This module provides an implementation for the ECC related parts of
11+
* Silent Payments, as specified in BIP352. This particularly involves
12+
* the creation of input tweak data by summing up private or public keys
13+
* and the derivation of a shared secret using Elliptic Curve Diffie-Hellman.
14+
* Combined are either:
15+
* - spender's private keys and receiver's public key (a * B, sender side)
16+
* - spender's public keys and receiver's private key (A * b, receiver side)
17+
* With this result, the necessary key material for ultimately creating/scanning
18+
* or spending Silent Payment outputs can be determined.
19+
*
20+
* Note that this module is _not_ a full implementation of BIP352, as it
21+
* inherently doesn't deal with higher-level concepts like addresses, output
22+
* script types or transactions. The intent is to provide cryptographical
23+
* helpers for low-level calculations that are most error-prone to custom
24+
* implementations (e.g. enforcing the right y-parity for key material, ECDH
25+
* calculation etc.). For any wallet software already using libsecp256k1, this
26+
* API should provide all the functions needed for a Silent Payments
27+
* implementation without the need for any further manual elliptic-curve
28+
* operations.
29+
*/
1130

1231
/* TODO: add function API for sender side. */
1332

0 commit comments

Comments
 (0)