crypto/secp256k1: fix build

This commit is contained in:
Marius van der Wijden 2025-02-24 14:43:26 +01:00
parent c3fd7e6ee0
commit bc4948d0b4
2 changed files with 7 additions and 15 deletions

View File

@ -109,8 +109,8 @@ int secp256k1_ext_scalar_mul(const secp256k1_context* ctx, unsigned char *point,
ARG_CHECK(scalar != NULL);
(void)ctx;
secp256k1_fe_set_b32(&feX, point);
secp256k1_fe_set_b32(&feY, point+32);
secp256k1_fe_set_b32_limit(&feX, point);
secp256k1_fe_set_b32_limit(&feY, point+32);
secp256k1_ge_set_xy(&ge, &feX, &feY);
secp256k1_scalar_set_b32(&s, scalar, &overflow);
if (overflow || secp256k1_scalar_is_zero(&s)) {

View File

@ -12,25 +12,17 @@ package secp256k1
#cgo CFLAGS: -I./libsecp256k1
#cgo CFLAGS: -I./libsecp256k1/src/
#ifdef __SIZEOF_INT128__
# define HAVE___INT128
# define USE_FIELD_5X52
# define USE_SCALAR_4X64
#else
# define USE_FIELD_10X26
# define USE_SCALAR_8X32
#endif
#ifndef NDEBUG
# define NDEBUG
#endif
#define USE_ENDOMORPHISM
#define USE_NUM_NONE
#define USE_FIELD_INV_BUILTIN
#define USE_SCALAR_INV_BUILTIN
#define ECMULTWINDOW 15
#define ECMULTGENKB 22
#define WIDEMUL auto
#include "./libsecp256k1/src/secp256k1.c"
#include "./libsecp256k1/src/modules/recovery/main_impl.h"
#include "./libsecp256k1/src/precomputed_ecmult.c"
#include "./libsecp256k1/src/precomputed_ecmult_gen.c"
#include "ext.h"
typedef void (*callbackFunc) (const char* msg, void* data);