Skip to content

Commit 4fd7e1e

Browse files
Merge #197: fix include paths in all the -zkp modules
347f96d fix include paths in all the -zkp modules (Andrew Poelstra) Pull request description: This is causing out-of-tree build failures in Elements. ACKs for top commit: real-or-random: utACK 347f96d Tree-SHA512: 7d6211f3b8d5612f95bcb3085c22458e7ceaa79f1ee74e37404cc6d1fdf0fbc02b4443b02623b9b6c1225437c1a1954b6d36a953d52b020ac7913326404894e0
2 parents d1d6e47 + 347f96d commit 4fd7e1e

20 files changed

+77
-78
lines changed

src/modules/ecdsa_adaptor/main_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#ifndef SECP256K1_MODULE_ECDSA_ADAPTOR_MAIN_H
88
#define SECP256K1_MODULE_ECDSA_ADAPTOR_MAIN_H
99

10-
#include "include/secp256k1_ecdsa_adaptor.h"
11-
#include "modules/ecdsa_adaptor/dleq_impl.h"
10+
#include "../../../include/secp256k1_ecdsa_adaptor.h"
11+
#include "dleq_impl.h"
1212

1313
/* (R, R', s', dleq_proof) */
1414
static int secp256k1_ecdsa_adaptor_sig_serialize(unsigned char *adaptor_sig162, secp256k1_ge *r, secp256k1_ge *rp, const secp256k1_scalar *sp, const secp256k1_scalar *dleq_proof_e, const secp256k1_scalar *dleq_proof_s) {

src/modules/ecdsa_adaptor/tests_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef SECP256K1_MODULE_ECDSA_ADAPTOR_TESTS_H
22
#define SECP256K1_MODULE_ECDSA_ADAPTOR_TESTS_H
33

4-
#include "include/secp256k1_ecdsa_adaptor.h"
4+
#include "../../../include/secp256k1_ecdsa_adaptor.h"
55

66
void rand_scalar(secp256k1_scalar *scalar) {
77
unsigned char buf32[32];

src/modules/ecdsa_s2c/main_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#ifndef SECP256K1_MODULE_ECDSA_S2C_MAIN_H
88
#define SECP256K1_MODULE_ECDSA_S2C_MAIN_H
99

10-
#include "include/secp256k1.h"
11-
#include "include/secp256k1_ecdsa_s2c.h"
10+
#include "../../../include/secp256k1.h"
11+
#include "../../../include/secp256k1_ecdsa_s2c.h"
1212

1313
static void secp256k1_ecdsa_s2c_opening_save(secp256k1_ecdsa_s2c_opening* opening, secp256k1_ge* ge) {
1414
secp256k1_pubkey_save((secp256k1_pubkey*) opening, ge);

src/modules/ecdsa_s2c/tests_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#ifndef SECP256K1_MODULE_ECDSA_S2C_TESTS_H
88
#define SECP256K1_MODULE_ECDSA_S2C_TESTS_H
99

10-
#include "include/secp256k1_ecdsa_s2c.h"
10+
#include "../../../include/secp256k1_ecdsa_s2c.h"
1111

1212
static void test_ecdsa_s2c_tagged_hash(void) {
1313
unsigned char tag_data[14] = "s2c/ecdsa/data";

src/modules/generator/main_impl.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
#include <stdio.h>
1111

12-
#include "field.h"
13-
#include "group.h"
14-
#include "hash.h"
15-
#include "scalar.h"
12+
#include "../../field.h"
13+
#include "../../group.h"
14+
#include "../../hash.h"
15+
#include "../../scalar.h"
1616

1717
static void secp256k1_generator_load(secp256k1_ge* ge, const secp256k1_generator* gen) {
1818
int succeed;

src/modules/generator/tests_impl.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
#include <string.h>
1111
#include <stdio.h>
1212

13-
#include "group.h"
14-
#include "scalar.h"
15-
#include "testrand.h"
16-
#include "util.h"
13+
#include "../../group.h"
14+
#include "../../scalar.h"
15+
#include "../../testrand.h"
16+
#include "../../util.h"
1717

18-
#include "include/secp256k1_generator.h"
18+
#include "../../../include/secp256k1_generator.h"
1919

2020
void test_generator_api(void) {
2121
unsigned char key[32];

src/modules/rangeproof/borromean.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
#ifndef _SECP256K1_BORROMEAN_H_
99
#define _SECP256K1_BORROMEAN_H_
1010

11-
#include "scalar.h"
12-
#include "field.h"
13-
#include "group.h"
14-
#include "ecmult.h"
15-
#include "ecmult_gen.h"
11+
#include "../../scalar.h"
12+
#include "../../field.h"
13+
#include "../../group.h"
14+
#include "../../ecmult.h"
15+
#include "../../ecmult_gen.h"
1616

1717
int secp256k1_borromean_verify(secp256k1_scalar *evalues, const unsigned char *e0, const secp256k1_scalar *s,
1818
const secp256k1_gej *pubs, const size_t *rsizes, size_t nrings, const unsigned char *m, size_t mlen);

src/modules/rangeproof/borromean_impl.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
#ifndef _SECP256K1_BORROMEAN_IMPL_H_
99
#define _SECP256K1_BORROMEAN_IMPL_H_
1010

11-
#include "scalar.h"
12-
#include "field.h"
13-
#include "group.h"
14-
#include "hash.h"
15-
#include "eckey.h"
16-
#include "ecmult.h"
17-
#include "ecmult_gen.h"
11+
#include "../../scalar.h"
12+
#include "../../field.h"
13+
#include "../../group.h"
14+
#include "../../hash.h"
15+
#include "../../eckey.h"
16+
#include "../../ecmult.h"
17+
#include "../../ecmult_gen.h"
1818
#include "borromean.h"
1919

2020
#include <limits.h>

src/modules/rangeproof/main_impl.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
#ifndef SECP256K1_MODULE_RANGEPROOF_MAIN
88
#define SECP256K1_MODULE_RANGEPROOF_MAIN
99

10-
#include "group.h"
10+
#include "../../group.h"
1111

12-
#include "modules/rangeproof/pedersen_impl.h"
13-
#include "modules/rangeproof/borromean_impl.h"
14-
#include "modules/rangeproof/rangeproof_impl.h"
12+
#include "pedersen_impl.h"
13+
#include "borromean_impl.h"
14+
#include "rangeproof_impl.h"
1515

1616
/** Alternative generator for secp256k1.
1717
* This is the sha256 of 'g' after standard encoding (without compression),

src/modules/rangeproof/pedersen.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
#ifndef _SECP256K1_PEDERSEN_H_
88
#define _SECP256K1_PEDERSEN_H_
99

10-
#include "ecmult_gen.h"
11-
#include "group.h"
12-
#include "scalar.h"
10+
#include "../../ecmult_gen.h"
11+
#include "../../group.h"
12+
#include "../../scalar.h"
1313

1414
#include <stdint.h>
1515

src/modules/rangeproof/pedersen_impl.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99

1010
#include <string.h>
1111

12-
#include "eckey.h"
13-
#include "ecmult_const.h"
14-
#include "ecmult_gen.h"
15-
#include "group.h"
16-
#include "field.h"
17-
#include "scalar.h"
18-
#include "util.h"
12+
#include "../../eckey.h"
13+
#include "../../ecmult_const.h"
14+
#include "../../ecmult_gen.h"
15+
#include "../../group.h"
16+
#include "../../field.h"
17+
#include "../../scalar.h"
18+
#include "../../util.h"
1919

2020
static void secp256k1_pedersen_scalar_set_u64(secp256k1_scalar *sec, uint64_t value) {
2121
unsigned char data[32];

src/modules/rangeproof/rangeproof.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
#ifndef _SECP256K1_RANGEPROOF_H_
88
#define _SECP256K1_RANGEPROOF_H_
99

10-
#include "scalar.h"
11-
#include "group.h"
12-
#include "ecmult.h"
13-
#include "ecmult_gen.h"
10+
#include "../../scalar.h"
11+
#include "../../group.h"
12+
#include "../../ecmult.h"
13+
#include "../../ecmult_gen.h"
1414

1515
static int secp256k1_rangeproof_verify_impl(const secp256k1_ecmult_gen_context* ecmult_gen_ctx,
1616
unsigned char *blindout, uint64_t *value_out, unsigned char *message_out, size_t *outlen, const unsigned char *nonce,

src/modules/rangeproof/rangeproof_impl.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@
77
#ifndef _SECP256K1_RANGEPROOF_IMPL_H_
88
#define _SECP256K1_RANGEPROOF_IMPL_H_
99

10-
#include "eckey.h"
11-
#include "scalar.h"
12-
#include "group.h"
13-
#include "rangeproof.h"
14-
#include "hash_impl.h"
15-
#include "pedersen_impl.h"
16-
#include "util.h"
10+
#include "../../eckey.h"
11+
#include "../../scalar.h"
12+
#include "../../group.h"
13+
#include "../../hash_impl.h"
14+
#include "../../util.h"
1715

18-
#include "modules/rangeproof/pedersen.h"
19-
#include "modules/rangeproof/borromean.h"
16+
#include "pedersen.h"
17+
#include "rangeproof.h"
18+
#include "borromean.h"
2019

2120
SECP256K1_INLINE static void secp256k1_rangeproof_pub_expand(secp256k1_gej *pubs,
2221
int exp, size_t *rsizes, size_t rings, const secp256k1_ge* genp) {

src/modules/rangeproof/tests_impl.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
#include <string.h>
1111

12-
#include "group.h"
13-
#include "scalar.h"
14-
#include "testrand.h"
15-
#include "util.h"
12+
#include "../../group.h"
13+
#include "../../scalar.h"
14+
#include "../../testrand.h"
15+
#include "../../util.h"
1616

17-
#include "include/secp256k1_rangeproof.h"
17+
#include "../../../include/secp256k1_rangeproof.h"
1818

1919
static void test_pedersen_api(const secp256k1_context *none, const secp256k1_context *sign, const secp256k1_context *vrfy, const secp256k1_context *sttc, const int32_t *ecount) {
2020
secp256k1_pedersen_commitment commit;

src/modules/surjection/main_impl.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
#include "libsecp256k1-config.h"
1414
#endif
1515

16-
#include "include/secp256k1_rangeproof.h"
17-
#include "include/secp256k1_surjectionproof.h"
18-
#include "modules/rangeproof/borromean.h"
19-
#include "modules/surjection/surjection_impl.h"
20-
#include "hash.h"
16+
#include "../../../include/secp256k1_rangeproof.h"
17+
#include "../../../include/secp256k1_surjectionproof.h"
18+
#include "../rangeproof/borromean.h"
19+
#include "surjection_impl.h"
20+
#include "../../hash.h"
2121

2222
#ifdef USE_REDUCED_SURJECTION_PROOF_SIZE
2323
#undef SECP256K1_SURJECTIONPROOF_MAX_USED_INPUTS

src/modules/surjection/surjection.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#ifndef _SECP256K1_SURJECTION_H_
88
#define _SECP256K1_SURJECTION_H_
99

10-
#include "group.h"
11-
#include "scalar.h"
10+
#include "../../group.h"
11+
#include "../../scalar.h"
1212

1313
SECP256K1_INLINE static int secp256k1_surjection_genmessage(unsigned char *msg32, secp256k1_ge *ephemeral_input_tags, size_t n_input_tags, secp256k1_ge *ephemeral_output_tag);
1414

src/modules/surjection/surjection_impl.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
#include <assert.h>
1111
#include <string.h>
1212

13-
#include "eckey.h"
14-
#include "group.h"
15-
#include "scalar.h"
16-
#include "hash.h"
13+
#include "../../eckey.h"
14+
#include "../../group.h"
15+
#include "../../scalar.h"
16+
#include "../../hash.h"
1717

1818
SECP256K1_INLINE static void secp256k1_surjection_genmessage(unsigned char *msg32, const secp256k1_generator *ephemeral_input_tags, size_t n_input_tags, const secp256k1_generator *ephemeral_output_tag) {
1919
/* compute message */

src/modules/surjection/tests_impl.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
#ifndef SECP256K1_MODULE_SURJECTIONPROOF_TESTS
88
#define SECP256K1_MODULE_SURJECTIONPROOF_TESTS
99

10-
#include "testrand.h"
11-
#include "group.h"
12-
#include "include/secp256k1_generator.h"
13-
#include "include/secp256k1_rangeproof.h"
14-
#include "include/secp256k1_surjectionproof.h"
10+
#include "../../testrand.h"
11+
#include "../../group.h"
12+
#include "../../../include/secp256k1_generator.h"
13+
#include "../../../include/secp256k1_rangeproof.h"
14+
#include "../../../include/secp256k1_surjectionproof.h"
1515

1616
static void test_surjectionproof_api(void) {
1717
unsigned char seed[32];

src/modules/whitelist/main_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#ifndef SECP256K1_MODULE_WHITELIST_MAIN
88
#define SECP256K1_MODULE_WHITELIST_MAIN
99

10-
#include "include/secp256k1_whitelist.h"
11-
#include "modules/whitelist/whitelist_impl.h"
10+
#include "../../../include/secp256k1_whitelist.h"
11+
#include "whitelist_impl.h"
1212

1313
#define MAX_KEYS SECP256K1_WHITELIST_MAX_N_KEYS /* shorter alias */
1414

src/modules/whitelist/tests_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#ifndef SECP256K1_MODULE_WHITELIST_TESTS
88
#define SECP256K1_MODULE_WHITELIST_TESTS
99

10-
#include "include/secp256k1_whitelist.h"
10+
#include "../../../include/secp256k1_whitelist.h"
1111

1212
void test_whitelist_end_to_end_internal(const unsigned char *summed_seckey, const unsigned char *online_seckey, const secp256k1_pubkey *online_pubkeys, const secp256k1_pubkey *offline_pubkeys, const secp256k1_pubkey *sub_pubkey, const size_t signer_i, const size_t n_keys) {
1313
unsigned char serialized[32 + 4 + 32 * SECP256K1_WHITELIST_MAX_N_KEYS] = {0};

0 commit comments

Comments
 (0)