7 #ifndef SECP256K1_SCALAR_H
8 #define SECP256K1_SCALAR_H
12 #if defined HAVE_CONFIG_H
13 #include "libsecp256k1-config.h"
16 #if defined(EXHAUSTIVE_TEST_ORDER)
18 #elif defined(USE_SCALAR_4X64)
19 #include "scalar_4x64.h"
20 #elif defined(USE_SCALAR_8X32)
21 #include "scalar_8x32.h"
23 #error "Please select scalar implementation"
30 static unsigned int secp256k1_scalar_get_bits(
const secp256k1_scalar *a,
unsigned int offset,
unsigned int count);
33 static unsigned int secp256k1_scalar_get_bits_var(
const secp256k1_scalar *a,
unsigned int offset,
unsigned int count);
36 static void secp256k1_scalar_set_b32(
secp256k1_scalar *
r,
const unsigned char *bin,
int *overflow);
45 static void secp256k1_scalar_get_b32(
unsigned char *bin,
const secp256k1_scalar* a);
51 static void secp256k1_scalar_cadd_bit(
secp256k1_scalar *
r,
unsigned int bit,
int flag);
99 #ifdef USE_ENDOMORPHISM