7 #ifndef SECP256K1_FIELD_IMPL_H 8 #define SECP256K1_FIELD_IMPL_H 10 #if defined HAVE_CONFIG_H 17 #if defined(USE_FIELD_10X26) 19 #elif defined(USE_FIELD_5X52) 22 #error "Please select field implementation" 49 secp256k1_fe x2, x3, x6, x9, x11, x22, x44, x88, x176, x220, x223, t1;
84 for (j=0; j<11; j++) {
90 for (j=0; j<22; j++) {
96 for (j=0; j<44; j++) {
102 for (j=0; j<88; j++) {
108 for (j=0; j<44; j++) {
114 for (j=0; j<3; j++) {
122 for (j=0; j<23; j++) {
126 for (j=0; j<6; j++) {
140 secp256k1_fe x2, x3, x6, x9, x11, x22, x44, x88, x176, x220, x223, t1;
155 for (j=0; j<3; j++) {
161 for (j=0; j<3; j++) {
167 for (j=0; j<2; j++) {
173 for (j=0; j<11; j++) {
179 for (j=0; j<22; j++) {
185 for (j=0; j<44; j++) {
191 for (j=0; j<88; j++) {
197 for (j=0; j<44; j++) {
203 for (j=0; j<3; j++) {
211 for (j=0; j<23; j++) {
215 for (j=0; j<5; j++) {
219 for (j=0; j<3; j++) {
223 for (j=0; j<2; j++) {
230 #if defined(USE_FIELD_INV_BUILTIN) 232 #elif defined(USE_FIELD_INV_NUM) 235 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFFUL,
236 0xFFFFFFFFUL, 0xFFFFFFFFUL, 0xFFFFFFFEUL, 0xFFFFFC2EUL
239 static const unsigned char prime[32] = {
240 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
241 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
242 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
243 0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F
262 #error "Please select field inverse implementation" 299 static const unsigned char prime[32] = {
300 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
301 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
302 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
303 0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F
#define VERIFY_CHECK(cond)
Definition: util.h:67
Definition: field_10x26.h:12
static void secp256k1_fe_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp256k1_fe *SECP256K1_RESTRICT b)
static void secp256k1_fe_normalize_var(secp256k1_fe *r)
static void secp256k1_num_set_bin(secp256k1_num *r, const unsigned char *a, unsigned int alen)
static void secp256k1_fe_negate(secp256k1_fe *r, const secp256k1_fe *a, int m)
static SECP256K1_INLINE int secp256k1_fe_equal(const secp256k1_fe *a, const secp256k1_fe *b)
Definition: field_impl.h:25
static SECP256K1_INLINE int secp256k1_fe_equal_var(const secp256k1_fe *a, const secp256k1_fe *b)
Definition: field_impl.h:32
static void secp256k1_num_mod_inverse(secp256k1_num *r, const secp256k1_num *a, const secp256k1_num *m)
#define SECP256K1_FE_CONST(d7, d6, d5, d4, d3, d2, d1, d0)
Definition: field_10x26.h:40
static void secp256k1_fe_add(secp256k1_fe *r, const secp256k1_fe *a)
m
Definition: linearize-data.py:266
#define SECP256K1_INLINE
Definition: secp256k1.h:123
static int secp256k1_fe_is_quad_var(const secp256k1_fe *a)
Definition: field_impl.h:293
static int secp256k1_num_jacobi(const secp256k1_num *a, const secp256k1_num *b)
static void secp256k1_fe_inv(secp256k1_fe *r, const secp256k1_fe *a)
Definition: field_impl.h:139
static void secp256k1_fe_inv_var(secp256k1_fe *r, const secp256k1_fe *a)
Definition: field_impl.h:229
static int secp256k1_fe_normalizes_to_zero(secp256k1_fe *r)
#define CHECK(cond)
Definition: util.h:52
static void secp256k1_fe_sqr(secp256k1_fe *r, const secp256k1_fe *a)
static int secp256k1_fe_set_b32(secp256k1_fe *r, const unsigned char *a)
static int secp256k1_fe_sqrt(secp256k1_fe *r, const secp256k1_fe *a)
Definition: field_impl.h:39
static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe *a)
static void secp256k1_fe_inv_all_var(secp256k1_fe *r, const secp256k1_fe *a, size_t len)
Definition: field_impl.h:266
static void secp256k1_num_get_bin(unsigned char *r, unsigned int rlen, const secp256k1_num *a)
static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe *r)