7 #ifndef SECP256K1_SCALAR_REPR_IMPL_H 8 #define SECP256K1_SCALAR_REPR_IMPL_H 23 return ((*a >> offset) & ((((uint32_t)1) << count) - 1));
29 return secp256k1_scalar_get_bits(a, offset, count);
39 static void secp256k1_scalar_cadd_bit(
secp256k1_scalar *r,
unsigned int bit,
int flag) {
47 static void secp256k1_scalar_set_b32(
secp256k1_scalar *r,
const unsigned char *b32,
int *overflow) {
51 for (i = 0; i < 32; i++) {
55 if (overflow) *overflow = 0;
58 static void secp256k1_scalar_get_b32(
unsigned char *bin,
const secp256k1_scalar* a) {
60 bin[28] = *a >> 24; bin[29] = *a >> 16; bin[30] = *a >> 8; bin[31] = *
a;
84 if (flag) secp256k1_scalar_negate(r, r);
96 ret = *r & ((1 << n) - 1);
#define VERIFY_CHECK(cond)
A scalar modulo the group order of the secp256k1 curve.
#define EXHAUSTIVE_TEST_ORDER