-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BIP352 silentpayments
module
#1519
Open
josibake
wants to merge
10
commits into
bitcoin-core:master
Choose a base branch
from
josibake:bip352-silentpayments-module
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6c8eafb
build: add skeleton for new silentpayments (BIP352) module
theStack e35d188
silentpayments: sending
josibake 7cde4ac
silentpayments: recipient label support
theStack ae316e2
silentpayments: receiving
josibake 58294b2
silentpayments: add examples/silentpayments.c
josibake 01e605d
silentpayments: add benchmarks for scanning
josibake 15ff6f6
tests: add BIP-352 test vectors
josibake 09a6aa6
tests: add constant time tests
josibake 7af65a8
ci: enable silentpayments module
theStack 71df073
docs: update README
josibake File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include_HEADERS += include/secp256k1_silentpayments.h | ||
noinst_HEADERS += src/modules/silentpayments/main_impl.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/*********************************************************************** | ||
* Distributed under the MIT software license, see the accompanying * | ||
* file COPYING or https://www.opensource.org/licenses/mit-license.php.* | ||
***********************************************************************/ | ||
|
||
#ifndef SECP256K1_MODULE_SILENTPAYMENTS_MAIN_H | ||
#define SECP256K1_MODULE_SILENTPAYMENTS_MAIN_H | ||
|
||
#include "../../../include/secp256k1.h" | ||
#include "../../../include/secp256k1_silentpayments.h" | ||
|
||
/* TODO: implement functions for sender side. */ | ||
|
||
/* TODO: implement functions for receiver side. */ | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, we also want to enable the schorrsig module here
(that also matches the autotools-equivalent part)