-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6162d57
commit 048f9f8
Showing
11 changed files
with
128 additions
and
1 deletion.
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
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,18 @@ | ||
#ifndef _SECP256K1_BULLETPROOFS_ | ||
# define _SECP256K1_BULLETPROOFS_ | ||
|
||
# include "secp256k1.h" | ||
|
||
# ifdef __cplusplus | ||
extern "C" { | ||
# endif | ||
|
||
#include <stdint.h> | ||
|
||
/* TODO */ | ||
|
||
# ifdef __cplusplus | ||
} | ||
# endif | ||
|
||
#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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/********************************************************************** | ||
* Copyright (c) 2020 Andrew Poelstra * | ||
* Distributed under the MIT software license, see the accompanying * | ||
* file COPYING or http://www.opensource.org/licenses/mit-license.php.* | ||
**********************************************************************/ | ||
|
||
#include <stdint.h> | ||
|
||
#include "include/secp256k1_bulletproofs.h" | ||
#include "util.h" | ||
#include "bench.h" | ||
|
||
typedef struct { | ||
secp256k1_context* ctx; | ||
} bench_bulletproofs_data; | ||
|
||
static void bench_bulletproofs_setup(void* arg) { | ||
(void) arg; | ||
} | ||
|
||
static void bench_bulletproofs(void* arg, int iters) { | ||
bench_bulletproofs_data *data = (bench_bulletproofs_data*)arg; | ||
|
||
(void) data; | ||
(void) iters; | ||
} | ||
|
||
int main(void) { | ||
bench_bulletproofs_data data; | ||
int iters = get_iters(32); | ||
|
||
data.ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY); | ||
|
||
run_benchmark("bulletproofs_verify_bit", bench_bulletproofs, bench_bulletproofs_setup, NULL, &data, 10, iters); | ||
|
||
secp256k1_context_destroy(data.ctx); | ||
return 0; | ||
} |
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,10 @@ | ||
include_HEADERS += include/secp256k1_bulletproofs.h | ||
noinst_HEADERS += src/modules/bulletproofs/tests_impl.h | ||
noinst_HEADERS += src/modules/bulletproofs/main_impl.h | ||
|
||
if USE_BENCHMARK | ||
noinst_PROGRAMS += bench_bulletproofs | ||
bench_bulletproofs_SOURCES = src/bench_bulletproofs.c | ||
bench_bulletproofs_LDADD = libsecp256k1.la $(SECP_LIBS) | ||
bench_bulletproofs_LDFLAGS = -static | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/********************************************************************** | ||
* Copyright (c) 2020 Andrew Poelstra * | ||
* Distributed under the MIT software license, see the accompanying * | ||
* file COPYING or http://www.opensource.org/licenses/mit-license.php.* | ||
**********************************************************************/ | ||
|
||
#ifndef _SECP256K1_MODULE_BULLETPROOFS_MAIN_ | ||
#define _SECP256K1_MODULE_BULLETPROOFS_MAIN_ | ||
|
||
/* TODO */ | ||
|
||
#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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/********************************************************************** | ||
* Copyright (c) 2020 Andrew Poelstra * | ||
* Distributed under the MIT software license, see the accompanying * | ||
* file COPYING or http://www.opensource.org/licenses/mit-license.php.* | ||
**********************************************************************/ | ||
|
||
#ifndef _SECP256K1_MODULE_BULLETPROOFS_TEST_ | ||
#define _SECP256K1_MODULE_BULLETPROOFS_TEST_ | ||
|
||
void run_bulletproofs_tests(void) { | ||
/* TODO */ | ||
} | ||
|
||
#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
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