Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/ecmult_gen_impl.h
Show First 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
/* Setup blinding values for secp256k1_ecmult_gen. */ | /* Setup blinding values for secp256k1_ecmult_gen. */ | ||||
static void secp256k1_ecmult_gen_blind(secp256k1_ecmult_gen_context *ctx, const unsigned char *seed32) { | static void secp256k1_ecmult_gen_blind(secp256k1_ecmult_gen_context *ctx, const unsigned char *seed32) { | ||||
secp256k1_scalar b; | secp256k1_scalar b; | ||||
secp256k1_gej gb; | secp256k1_gej gb; | ||||
secp256k1_fe s; | secp256k1_fe s; | ||||
unsigned char nonce32[32]; | unsigned char nonce32[32]; | ||||
secp256k1_rfc6979_hmac_sha256_t rng; | secp256k1_rfc6979_hmac_sha256 rng; | ||||
int retry; | int retry; | ||||
unsigned char keydata[64] = {0}; | unsigned char keydata[64] = {0}; | ||||
if (seed32 == NULL) { | if (seed32 == NULL) { | ||||
/* When seed is NULL, reset the initial point and blinding value. */ | /* When seed is NULL, reset the initial point and blinding value. */ | ||||
secp256k1_gej_set_ge(&ctx->initial, &secp256k1_ge_const_g); | secp256k1_gej_set_ge(&ctx->initial, &secp256k1_ge_const_g); | ||||
secp256k1_gej_neg(&ctx->initial, &ctx->initial); | secp256k1_gej_neg(&ctx->initial, &ctx->initial); | ||||
secp256k1_scalar_set_int(&ctx->blind, 1); | secp256k1_scalar_set_int(&ctx->blind, 1); | ||||
} | } | ||||
Show All 38 Lines |