Skip to content

Commit edd8f9e

Browse files
committed
Rename buletproof_pp* to bppp*
1 parent 773076e commit edd8f9e

18 files changed

+177
-177
lines changed

.cirrus.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ env:
2323
WHITELIST: no
2424
MUSIG: no
2525
ECDSAADAPTOR: no
26-
BULLETPROOFS: no
26+
BPPP: no
2727
### test options
2828
SECP256K1_TEST_ITERS:
2929
BENCH: yes
@@ -73,12 +73,12 @@ task:
7373
<< : *LINUX_CONTAINER
7474
matrix: &ENV_MATRIX
7575
- env: {WIDEMUL: int64, RECOVERY: yes}
76-
- env: {WIDEMUL: int64, ECDH: yes, SCHNORRSIG: yes, EXPERIMENTAL: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes, BULLETPROOFS: yes}
76+
- env: {WIDEMUL: int64, ECDH: yes, SCHNORRSIG: yes, EXPERIMENTAL: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes, BPPP: yes}
7777
- env: {WIDEMUL: int128}
7878
- env: {WIDEMUL: int128, RECOVERY: yes, SCHNORRSIG: yes}
79-
- env: {WIDEMUL: int128, ECDH: yes, SCHNORRSIG: yes, EXPERIMENTAL: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes, BULLETPROOFS: yes}
79+
- env: {WIDEMUL: int128, ECDH: yes, SCHNORRSIG: yes, EXPERIMENTAL: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes, BPPP: yes}
8080
- env: {WIDEMUL: int128, ASM: x86_64}
81-
- env: { RECOVERY: yes, SCHNORRSIG: yes, EXPERIMENTAL: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes, BULLETPROOFS: yes}
81+
- env: { RECOVERY: yes, SCHNORRSIG: yes, EXPERIMENTAL: yes, ECDSA_S2C: yes, RANGEPROOF: yes, WHITELIST: yes, GENERATOR: yes, MUSIG: yes, ECDSAADAPTOR: yes, BPPP: yes}
8282
- env: {BUILD: distcheck, WITH_VALGRIND: no, CTIMETEST: no, BENCH: no}
8383
- env: {CPPFLAGS: -DDETERMINISTIC}
8484
- env: {CFLAGS: -O0, CTIMETEST: no}
@@ -109,7 +109,7 @@ task:
109109
GENERATOR: yes
110110
MUSIG: yes
111111
ECDSAADAPTOR: yes
112-
BULLETPROOFS: yes
112+
BPPP: yes
113113
matrix:
114114
- env:
115115
CC: i686-linux-gnu-gcc
@@ -167,7 +167,7 @@ task:
167167
GENERATOR: yes
168168
MUSIG: yes
169169
ECDSAADAPTOR: yes
170-
BULLETPROOFS: yes
170+
BPPP: yes
171171
CTIMETEST: no
172172
<< : *MERGE_BASE
173173
test_script:
@@ -262,7 +262,7 @@ task:
262262
GENERATOR: yes
263263
MUSIG: yes
264264
ECDSAADAPTOR: yes
265-
BULLETPROOFS: yes
265+
BPPP: yes
266266
CTIMETEST: no
267267
matrix:
268268
- name: "Valgrind (memcheck)"

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
bench
2-
bench_bulletproofs
2+
bench_bppp
33
bench_ecmult
44
bench_generator
55
bench_rangeproof

Makefile.am

+2-2
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ clean-precomp:
226226

227227
EXTRA_DIST = autogen.sh SECURITY.md
228228

229-
if ENABLE_MODULE_BULLETPROOFS
230-
include src/modules/bulletproofs/Makefile.am.include
229+
if ENABLE_MODULE_BPPP
230+
include src/modules/bppp/Makefile.am.include
231231
endif
232232

233233
if ENABLE_MODULE_ECDH

ci/cirrus.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ valgrind --version || true
1919
--with-ecmult-gen-precision="$ECMULTGENPRECISION" \
2020
--enable-module-ecdh="$ECDH" --enable-module-recovery="$RECOVERY" \
2121
--enable-module-ecdsa-s2c="$ECDSA_S2C" \
22-
--enable-module-bulletproofs="$BULLETPROOFS" \
22+
--enable-module-bppp="$BPPP" \
2323
--enable-module-rangeproof="$RANGEPROOF" --enable-module-whitelist="$WHITELIST" --enable-module-generator="$GENERATOR" \
2424
--enable-module-schnorrsig="$SCHNORRSIG" --enable-module-musig="$MUSIG" --enable-module-ecdsa-adaptor="$ECDSAADAPTOR" \
2525
--enable-module-schnorrsig="$SCHNORRSIG" \
@@ -52,9 +52,9 @@ then
5252
$EXEC ./bench_ecmult
5353
$EXEC ./bench_internal
5454
$EXEC ./bench
55-
if [ "$BULLETPROOFS" = "yes" ]
55+
if [ "$BPPP" = "yes" ]
5656
then
57-
$EXEC ./bench_bulletproofs
57+
$EXEC ./bench_bppp
5858
fi
5959
} >> bench.log 2>&1
6060
fi

configure.ac

+9-9
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ AC_ARG_ENABLE(examples,
140140
AS_HELP_STRING([--enable-examples],[compile the examples [default=no]]), [],
141141
[SECP_SET_DEFAULT([enable_examples], [no], [yes])])
142142

143-
AC_ARG_ENABLE(module_bulletproofs,
144-
AS_HELP_STRING([--enable-module-bulletproofs],[enable Bulletproofs module (experimental)]),
143+
AC_ARG_ENABLE(module_bppp,
144+
AS_HELP_STRING([--enable-module-bppp],[enable Bulletproofs++ module (experimental)]),
145145
[],
146-
[SECP_SET_DEFAULT([enable_module_bulletproofs], [no], [yes])])
146+
[SECP_SET_DEFAULT([enable_module_bppp], [no], [yes])])
147147

148148
AC_ARG_ENABLE(module_ecdh,
149149
AS_HELP_STRING([--enable-module-ecdh],[enable ECDH module [default=no]]), [],
@@ -422,9 +422,9 @@ if test x"$enable_module_rangeproof" = x"yes"; then
422422
AC_DEFINE(ENABLE_MODULE_RANGEPROOF, 1, [Define this symbol to enable the Pedersen / zero knowledge range proof module])
423423
fi
424424

425-
if test x"$enable_module_bulletproofs" = x"yes"; then
425+
if test x"$enable_module_bppp" = x"yes"; then
426426
enable_module_generator=yes
427-
AC_DEFINE(ENABLE_MODULE_BULLETPROOFS, 1, [Define this symbol to enable the Bulletproofs module])
427+
AC_DEFINE(ENABLE_MODULE_BPPP, 1, [Define this symbol to enable the Bulletproofs++ module])
428428
fi
429429

430430
if test x"$enable_module_generator" = x"yes"; then
@@ -470,8 +470,8 @@ else
470470
# module (which automatically enables the module dependencies) we want to
471471
# print an error for the dependent module, not the module dependency. Hence,
472472
# we first test dependent modules.
473-
if test x"$enable_module_bulletproofs" = x"yes"; then
474-
AC_MSG_ERROR([Bulletproofs module is experimental. Use --enable-experimental to allow.])
473+
if test x"$enable_module_bppp" = x"yes"; then
474+
AC_MSG_ERROR([Bulletproofs++ module is experimental. Use --enable-experimental to allow.])
475475
fi
476476
if test x"$enable_module_whitelist" = x"yes"; then
477477
AC_MSG_ERROR([Key whitelisting module is experimental. Use --enable-experimental to allow.])
@@ -515,7 +515,7 @@ AM_CONDITIONAL([USE_TESTS], [test x"$enable_tests" != x"no"])
515515
AM_CONDITIONAL([USE_EXHAUSTIVE_TESTS], [test x"$enable_exhaustive_tests" != x"no"])
516516
AM_CONDITIONAL([USE_EXAMPLES], [test x"$enable_examples" != x"no"])
517517
AM_CONDITIONAL([USE_BENCHMARK], [test x"$enable_benchmark" = x"yes"])
518-
AM_CONDITIONAL([ENABLE_MODULE_BULLETPROOFS], [test x"$enable_module_bulletproofs" = x"yes"])
518+
AM_CONDITIONAL([ENABLE_MODULE_BPPP], [test x"$enable_module_bppp" = x"yes"])
519519
AM_CONDITIONAL([ENABLE_MODULE_ECDH], [test x"$enable_module_ecdh" = x"yes"])
520520
AM_CONDITIONAL([ENABLE_MODULE_MUSIG], [test x"$enable_module_musig" = x"yes"])
521521
AM_CONDITIONAL([ENABLE_MODULE_RECOVERY], [test x"$enable_module_recovery" = x"yes"])
@@ -555,7 +555,7 @@ echo " module whitelist = $enable_module_whitelist"
555555
echo " module musig = $enable_module_musig"
556556
echo " module ecdsa-s2c = $enable_module_ecdsa_s2c"
557557
echo " module ecdsa-adaptor = $enable_module_ecdsa_adaptor"
558-
echo " module bulletproofs = $enable_module_bulletproofs"
558+
echo " module bppp = $enable_module_bppp"
559559
echo
560560
echo " asm = $set_asm"
561561
echo " ecmult window size = $set_ecmult_window"

include/secp256k1_bulletproofs.h include/secp256k1_bppp.h

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef _SECP256K1_BULLETPROOFS_
2-
# define _SECP256K1_BULLETPROOFS_
1+
#ifndef _SECP256K1_BPPP_
2+
# define _SECP256K1_BPPP_
33

44
# include "secp256k1.h"
55

@@ -10,7 +10,7 @@ extern "C" {
1010
#include <stdint.h>
1111

1212
/** Opaque structure representing a large number of NUMS generators */
13-
typedef struct secp256k1_bulletproofs_generators secp256k1_bulletproofs_generators;
13+
typedef struct secp256k1_bppp_generators secp256k1_bppp_generators;
1414

1515
/** Allocates and initializes a list of NUMS generators.
1616
* Returns a list of generators, or calls the error callback if the allocation fails.
@@ -21,18 +21,18 @@ typedef struct secp256k1_bulletproofs_generators secp256k1_bulletproofs_generato
2121
* points. We will later use G = H0(required for compatibility with pedersen_commitment DS)
2222
* in a separate commit to make review easier.
2323
*/
24-
SECP256K1_API secp256k1_bulletproofs_generators *secp256k1_bulletproofs_generators_create(
24+
SECP256K1_API secp256k1_bppp_generators *secp256k1_bppp_generators_create(
2525
const secp256k1_context* ctx,
2626
size_t n
2727
) SECP256K1_ARG_NONNULL(1);
2828

2929
/** Allocates a list of generators from a static array
3030
* Returns a list of generators or NULL in case of failure.
3131
* Args: ctx: pointer to a context object
32-
* In: data: data that came from `secp256k1_bulletproofs_generators_serialize`
32+
* In: data: data that came from `secp256k1_bppp_generators_serialize`
3333
* data_len: the length of the `data` buffer
3434
*/
35-
SECP256K1_API secp256k1_bulletproofs_generators* secp256k1_bulletproofs_generators_parse(
35+
SECP256K1_API secp256k1_bppp_generators* secp256k1_bppp_generators_parse(
3636
const secp256k1_context* ctx,
3737
const unsigned char* data,
3838
size_t data_len
@@ -49,9 +49,9 @@ SECP256K1_API secp256k1_bulletproofs_generators* secp256k1_bulletproofs_generato
4949
* TODO: For ease of review, this setting G = H0 is not included in this commit. We will
5050
* add it in the follow-up rangeproof PR.
5151
*/
52-
SECP256K1_API int secp256k1_bulletproofs_generators_serialize(
52+
SECP256K1_API int secp256k1_bppp_generators_serialize(
5353
const secp256k1_context* ctx,
54-
const secp256k1_bulletproofs_generators* gen,
54+
const secp256k1_bppp_generators* gen,
5555
unsigned char* data,
5656
size_t *data_len
5757
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4);
@@ -61,9 +61,9 @@ SECP256K1_API int secp256k1_bulletproofs_generators_serialize(
6161
* gen: pointer to the generator set to be destroyed
6262
* (can be NULL, in which case this function is a no-op)
6363
*/
64-
SECP256K1_API void secp256k1_bulletproofs_generators_destroy(
64+
SECP256K1_API void secp256k1_bppp_generators_destroy(
6565
const secp256k1_context* ctx,
66-
secp256k1_bulletproofs_generators* gen
66+
secp256k1_bppp_generators* gen
6767
) SECP256K1_ARG_NONNULL(1);
6868

6969
# ifdef __cplusplus

src/bench_bulletproofs.c src/bench_bppp.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,32 @@
66

77
#include <stdint.h>
88

9-
#include "include/secp256k1_bulletproofs.h"
9+
#include "include/secp256k1_bppp.h"
1010
#include "util.h"
1111
#include "bench.h"
1212

1313
typedef struct {
1414
secp256k1_context* ctx;
15-
} bench_bulletproofs_data;
15+
} bench_bppp_data;
1616

17-
static void bench_bulletproofs_setup(void* arg) {
17+
static void bench_bppp_setup(void* arg) {
1818
(void) arg;
1919
}
2020

21-
static void bench_bulletproofs(void* arg, int iters) {
22-
bench_bulletproofs_data *data = (bench_bulletproofs_data*)arg;
21+
static void bench_bppp(void* arg, int iters) {
22+
bench_bppp_data *data = (bench_bppp_data*)arg;
2323

2424
(void) data;
2525
(void) iters;
2626
}
2727

2828
int main(void) {
29-
bench_bulletproofs_data data;
29+
bench_bppp_data data;
3030
int iters = get_iters(32);
3131

3232
data.ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY);
3333

34-
run_benchmark("bulletproofs_verify_bit", bench_bulletproofs, bench_bulletproofs_setup, NULL, &data, 10, iters);
34+
run_benchmark("bppp_verify_bit", bench_bppp, bench_bppp_setup, NULL, &data, 10, iters);
3535

3636
secp256k1_context_destroy(data.ctx);
3737
return 0;

src/modules/bppp/Makefile.am.include

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
include_HEADERS += include/secp256k1_bppp.h
2+
noinst_HEADERS += src/modules/bppp/bppp_util.h
3+
noinst_HEADERS += src/modules/bppp/main_impl.h
4+
noinst_HEADERS += src/modules/bppp/bppp_transcript_impl.h
5+
noinst_HEADERS += src/modules/bppp/bppp_norm_product_impl.h
6+
noinst_HEADERS += src/modules/bppp/tests_impl.h
7+
8+
if USE_BENCHMARK
9+
noinst_PROGRAMS += bench_bppp
10+
bench_bppp_SOURCES = src/bench_bppp.c
11+
bench_bppp_LDADD = libsecp256k1.la $(SECP_LIBS)
12+
bench_bppp_LDFLAGS = -static
13+
endif

0 commit comments

Comments
 (0)