Skip to content

Commit 93b4218

Browse files
theStackjosibake
authored andcommitted
doc: add module description for silentpayments
1 parent d37ce1b commit 93b4218

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

include/secp256k1_silentpayments.h

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,22 @@
77
extern "C" {
88
#endif
99

10-
/* TODO: add module description */
11-
12-
/* TODO: add function API for sender side. */
13-
14-
/* TODO: add function API for receiver side. */
10+
/* This module provides an implementation for Silent Payments, as specified in BIP352.
11+
* This particularly involves the creation of input tweak data by summing up private
12+
* or public keys and the derivation of a shared secret using Elliptic Curve Diffie-Hellman.
13+
* Combined are either:
14+
* - spender's private keys and recipient's public key (a * B, sender side)
15+
* - spender's public keys and recipient's private key (A * b, recipient side)
16+
* With this result, the necessary key material for ultimately creating/scanning
17+
* or spending Silent Payment outputs can be determined.
18+
*
19+
* Note that this module is _not_ a full implementation of BIP352, as it
20+
* inherently doesn't deal with higher-level concepts like addresses, output
21+
* script types or transactions. The intent is to provide a module for abstracting away
22+
* the elliptic-curve operations required for the protocol. For any wallet software already
23+
* using libsecp256k1, this API should provide all the functions needed for a Silent Payments
24+
* implementation without requiring any further elliptic-curve operations from the wallet.
25+
*/
1526

1627
#ifdef __cplusplus
1728
}

0 commit comments

Comments
 (0)