CuEVM
|
The secp256k1 field prime number (P) and order. More...
Functions | |
__host__ __device__ void | cgbn_mul_mod (env_t env, bn_t &res, bn_t &a, bn_t &b, bn_t &mod) |
__host__ __device__ void | cgbn_add_mod (env_t env, bn_t &res, bn_t &a, bn_t &b, bn_t &mod) |
__host__ __device__ void | cgbn_sub_mod (env_t env, bn_t &res, bn_t &a, bn_t &b, bn_t &mod) |
__host__ __device__ void | cgbn_div_mod (env_t env, bn_t &res, bn_t &a, bn_t &b, bn_t &mod) |
helper div_mod for bn_t More... | |
__host__ __device__ bool | is_on_cuve_simple (env_t env, bn_t &Px, bn_t &Py, bn_t &mod, uint32_t B) |
Check if a basic point P(x, y) is on the curve y^2 = x^3 + B. More... | |
__host__ __device__ int | ec_add (ArithEnv &arith, Curve curve, bn_t &ResX, bn_t &ResY, bn_t &Px, bn_t &Py, bn_t &Qx, bn_t &Qy) |
__host__ __device__ int | ec_mul (ArithEnv &arith, Curve curve, bn_t &ResX, bn_t &ResY, bn_t &Gx, bn_t &Gy, bn_t &n) |
__host__ __device__ void | convert_point_to_address (ArithEnv &arith, bn_t &address, bn_t &X, bn_t &Y) |
__host__ __device__ int | ec_recover (ArithEnv &arith, CuEVM::EccConstants *ecc_constants_ptr, signature_t &sig, bn_t &signer) |
__host__ __device__ int | pairing_multiple (ArithEnv &arith, EccConstants *ecc_constants_ptr, uint8_t *points_data, size_t data_len) |
The secp256k1 field prime number (P) and order.
__host__ __device__ void ecc::cgbn_add_mod | ( | env_t | env, |
bn_t & | res, | ||
bn_t & | a, | ||
bn_t & | b, | ||
bn_t & | mod | ||
) |
__host__ __device__ void ecc::cgbn_div_mod | ( | env_t | env, |
bn_t & | res, | ||
bn_t & | a, | ||
bn_t & | b, | ||
bn_t & | mod | ||
) |
helper div_mod for bn_t
env | |
res | |
a | |
b | |
mod |
__host__ __device__ void ecc::cgbn_mul_mod | ( | env_t | env, |
bn_t & | res, | ||
bn_t & | a, | ||
bn_t & | b, | ||
bn_t & | mod | ||
) |
__host__ __device__ void ecc::cgbn_sub_mod | ( | env_t | env, |
bn_t & | res, | ||
bn_t & | a, | ||
bn_t & | b, | ||
bn_t & | mod | ||
) |
__host__ __device__ void ecc::convert_point_to_address | ( | ArithEnv & | arith, |
bn_t & | address, | ||
bn_t & | X, | ||
bn_t & | Y | ||
) |
__host__ __device__ int ecc::ec_add | ( | ArithEnv & | arith, |
Curve | curve, | ||
bn_t & | ResX, | ||
bn_t & | ResY, | ||
bn_t & | Px, | ||
bn_t & | Py, | ||
bn_t & | Qx, | ||
bn_t & | Qy | ||
) |
__host__ __device__ int ecc::ec_mul | ( | ArithEnv & | arith, |
Curve | curve, | ||
bn_t & | ResX, | ||
bn_t & | ResY, | ||
bn_t & | Gx, | ||
bn_t & | Gy, | ||
bn_t & | n | ||
) |
__host__ __device__ int ecc::ec_recover | ( | ArithEnv & | arith, |
CuEVM::EccConstants * | ecc_constants_ptr, | ||
signature_t & | sig, | ||
bn_t & | signer | ||
) |
Recover signer from the signature with the above structure. return the signer address in cgbn type
arith | |
sig | |
signer |
__host__ __device__ bool ecc::is_on_cuve_simple | ( | env_t | env, |
bn_t & | Px, | ||
bn_t & | Py, | ||
bn_t & | mod, | ||
uint32_t | B | ||
) |
Check if a basic point P(x, y) is on the curve y^2 = x^3 + B.
env | |
Px | |
Py | |
mod | |
B |
__host__ __device__ int ecc::pairing_multiple | ( | ArithEnv & | arith, |
EccConstants * | ecc_constants_ptr, | ||
uint8_t * | points_data, | ||
size_t | data_len | ||
) |