Skip to content

Commit 99fbc2a

Browse files
depend tree patches
1 parent c98f8fb commit 99fbc2a

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

depend/secp256k1/src/ecmult.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ typedef struct {
1717
secp256k1_ge_storage (*pre_g_128)[]; /* odd multiples of 2^128*generator */
1818
} secp256k1_ecmult_context;
1919

20-
static const size_t SECP256K1_ECMULT_CONTEXT_PREALLOCATED_SIZE;
20+
//static const size_t SECP256K1_ECMULT_CONTEXT_PREALLOCATED_SIZE;
2121
static void secp256k1_ecmult_context_init(secp256k1_ecmult_context *ctx);
2222
static void secp256k1_ecmult_context_build(secp256k1_ecmult_context *ctx, void **prealloc);
2323
static void secp256k1_ecmult_context_finalize_memcpy(secp256k1_ecmult_context *dst, const secp256k1_ecmult_context *src);

depend/secp256k1/src/ecmult_gen.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ typedef struct {
3535
secp256k1_gej initial;
3636
} secp256k1_ecmult_gen_context;
3737

38-
static const size_t SECP256K1_ECMULT_GEN_CONTEXT_PREALLOCATED_SIZE;
38+
//static const size_t SECP256K1_ECMULT_GEN_CONTEXT_PREALLOCATED_SIZE;
3939
static void secp256k1_ecmult_gen_context_init(secp256k1_ecmult_gen_context* ctx);
4040
static void secp256k1_ecmult_gen_context_build(secp256k1_ecmult_gen_context* ctx, void **prealloc);
4141
static void secp256k1_ecmult_gen_context_finalize_memcpy(secp256k1_ecmult_gen_context *dst, const secp256k1_ecmult_gen_context* src);

depend/secp256k1/src/modules/schnorrsig/main_impl.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static void secp256k1_nonce_function_bip340_sha256_tagged_aux(secp256k1_sha256 *
4545

4646
/* algo16 argument for nonce_function_bip340 to derive the nonce exactly as stated in BIP-340
4747
* by using the correct tagged hash function. */
48-
static const unsigned char bip340_algo16[16] = "BIP0340/nonce\0\0\0";
48+
static const unsigned char bip340_algo16[17] = "BIP0340/nonce\0\0\0";
4949

5050
static int nonce_function_bip340(unsigned char *nonce32, const unsigned char *msg32, const unsigned char *key32, const unsigned char *xonly_pk32, const unsigned char *algo16, void *data) {
5151
secp256k1_sha256 sha;
@@ -58,7 +58,7 @@ static int nonce_function_bip340(unsigned char *nonce32, const unsigned char *ms
5858

5959
if (data != NULL) {
6060
secp256k1_nonce_function_bip340_sha256_tagged_aux(&sha);
61-
secp256k1_sha256_write(&sha, data, 32);
61+
secp256k1_sha256_write(&sha, (const unsigned char *)data, 32);
6262
secp256k1_sha256_finalize(&sha, masked_key);
6363
for (i = 0; i < 32; i++) {
6464
masked_key[i] ^= key32[i];

depend/secp256k1/src/secp256k1.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "selftest.h"
2525

2626
#ifdef SECP256K1_NO_BUILD
27-
# error "secp256k1.h processed without SECP256K1_BUILD defined while building secp256k1.c"
27+
//# error "secp256k1.h processed without SECP256K1_BUILD defined while building secp256k1.c"
2828
#endif
2929

3030
#if defined(VALGRIND)

depend/secp256k1/src/util.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ static SECP256K1_INLINE void secp256k1_memczero(void *s, size_t len, int flag) {
222222
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189
223223
*/
224224
static SECP256K1_INLINE int secp256k1_memcmp_var(const void *s1, const void *s2, size_t n) {
225-
const unsigned char *p1 = s1, *p2 = s2;
225+
/*
226+
const void *p1 = s1, *p2 = s2;
226227
size_t i;
227228
228229
for (i = 0; i < n; i++) {
@@ -232,6 +233,8 @@ static SECP256K1_INLINE int secp256k1_memcmp_var(const void *s1, const void *s2,
232233
}
233234
}
234235
return 0;
236+
*/
237+
return memcmp(s1, s2, n);
235238
}
236239

237240
/** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. Both *r and *a must be initialized and non-negative.*/

0 commit comments

Comments
 (0)