7 #ifndef SECP256K1_ECMULT_GEN_H 8 #define SECP256K1_ECMULT_GEN_H 36 #if defined(EXHAUSTIVE_TEST_ORDER) 42 # if EXHAUSTIVE_TEST_ORDER == 7 44 # define COMB_BLOCKS 1 46 # elif EXHAUSTIVE_TEST_ORDER == 13 48 # define COMB_BLOCKS 1 50 # elif EXHAUSTIVE_TEST_ORDER == 199 52 # define COMB_BLOCKS 2 55 # error "Unknown exhaustive test order" 57 # if (COMB_RANGE >= 32) || ((EXHAUSTIVE_TEST_ORDER >> (COMB_RANGE - 1)) != 1) 58 # error "COMB_RANGE != ceil(log2(EXHAUSTIVE_TEST_ORDER+1))" 61 # define COMB_RANGE 256 66 # define COMB_BLOCKS 11 68 # pragma message DEBUG_CONFIG_MSG("COMB_BLOCKS undefined, assuming default value") 74 # pragma message DEBUG_CONFIG_MSG("COMB_TEETH undefined, assuming default value") 78 #define COMB_SPACING CEIL_DIV(COMB_RANGE, COMB_BLOCKS * COMB_TEETH) 84 #define COMB_BITS (COMB_BLOCKS * COMB_TEETH * COMB_SPACING) 86 #define COMB_POINTS (1 << (COMB_TEETH - 1)) 89 #if !(1 <= COMB_BLOCKS && COMB_BLOCKS <= 256) 90 # error "COMB_BLOCKS must be in the range [1, 256]" 92 #if !(1 <= COMB_TEETH && COMB_TEETH <= 8) 93 # error "COMB_TEETH must be in the range [1, 8]" 95 #if COMB_BITS < COMB_RANGE 96 # error "COMB_BLOCKS * COMB_TEETH * COMB_SPACING is too low" 103 #if (COMB_BLOCKS - 1) * COMB_TEETH * COMB_SPACING >= 256 104 # error "COMB_BLOCKS can be reduced" 106 #if COMB_BLOCKS * (COMB_TEETH - 1) * COMB_SPACING >= 256 107 # error "COMB_TEETH can be reduced" 111 # pragma message DEBUG_CONFIG_DEF(COMB_RANGE) 112 # pragma message DEBUG_CONFIG_DEF(COMB_BLOCKS) 113 # pragma message DEBUG_CONFIG_DEF(COMB_TEETH) 114 # pragma message DEBUG_CONFIG_DEF(COMB_SPACING) This field implementation represents the value as 10 uint32_t limbs in base 2^26. ...
static void secp256k1_ecmult_gen(const secp256k1_ecmult_gen_context *ctx, secp256k1_gej *r, const secp256k1_scalar *a)
Multiply with the generator: R = a*G.
static void secp256k1_ecmult_gen_blind(secp256k1_ecmult_gen_context *ctx, const unsigned char *seed32)
A group element of the secp256k1 curve, in jacobian coordinates.
static void secp256k1_ecmult_gen_context_clear(secp256k1_ecmult_gen_context *ctx)
A group element in affine coordinates on the secp256k1 curve, or occasionally on an isomorphic curve ...
A scalar modulo the group order of the secp256k1 curve.
static void secp256k1_ecmult_gen_context_build(secp256k1_ecmult_gen_context *ctx)
secp256k1_scalar scalar_offset