#include "scalar.h"
#include "group.h"
#include "ecmult_const.h"
#include "ecmult_impl.h"
Go to the source code of this file.
◆ ECMULT_CONST_TABLE_GET_GE
| #define ECMULT_CONST_TABLE_GET_GE |
( |
|
r, |
|
|
|
pre, |
|
|
|
n, |
|
|
|
w |
|
) |
| |
Value: do { \
int m; \
int abs_n = (n) * (((n) > 0) * 2 - 1); \
int idx_n = abs_n / 2; \
secp256k1_fe neg_y; \
VERIFY_CHECK(((n) & 1) == 1); \
VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1)); \
VERIFY_CHECK((n) <= ((1 << ((w)-1)) - 1)); \
VERIFY_SETUP(secp256k1_fe_clear(&(
r)->x)); \
VERIFY_SETUP(secp256k1_fe_clear(&(
r)->y)); \
\
secp256k1_fe_cmov(&(
r)->x, &(pre)[m].x, m == idx_n); \
secp256k1_fe_cmov(&(
r)->y, &(pre)[m].y, m == idx_n); \
} \
secp256k1_fe_negate(&neg_y, &(
r)->y, 1); \
secp256k1_fe_cmov(&(
r)->y, &neg_y, (n) != abs_n); \
} while(0)
Definition at line 16 of file ecmult_const_impl.h.