-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Copy pathsecp256k1_silentpayments.h
32 lines (27 loc) · 1.3 KB
/
secp256k1_silentpayments.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef SECP256K1_SILENTPAYMENTS_H
#define SECP256K1_SILENTPAYMENTS_H
#include "secp256k1.h"
#ifdef __cplusplus
extern "C" {
#endif
/** This module provides an implementation for Silent Payments, as specified in
* BIP352. This particularly involves the creation of input tweak data by
* summing up secret or public keys and the derivation of a shared secret using
* Elliptic Curve Diffie-Hellman. Combined are either:
* - spender's secret keys and recipient's public key (a * B, sender side)
* - spender's public keys and recipient's secret key (A * b, recipient side)
* With this result, the necessary key material for ultimately creating/scanning
* or spending Silent Payment outputs can be determined.
*
* Note that this module is _not_ a full implementation of BIP352, as it
* inherently doesn't deal with higher-level concepts like addresses, output
* script types or transactions. The intent is to provide a module for
* abstracting away the elliptic-curve operations required for the protocol. For
* any wallet software already using libsecp256k1, this API should provide all
* the functions needed for a Silent Payments implementation without requiring
* any further elliptic-curve operations from the wallet.
*/
#ifdef __cplusplus
}
#endif
#endif /* SECP256K1_SILENTPAYMENTS_H */