MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / ECC_Start

Function ECC_Start

src/key.cpp:304–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304void ECC_Start() {
305 assert(secp256k1_context_sign == NULL);
306
307 secp256k1_context *ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN);
308 assert(ctx != NULL);
309
310 {
311 // Pass in a random blinding seed to the secp256k1 context.
312 unsigned char seed[32];
313 LockObject(seed);
314 GetRandBytes(seed, 32);
315 bool ret = secp256k1_context_randomize(ctx, seed);
316 assert(ret);
317 UnlockObject(seed);
318 }
319
320 secp256k1_context_sign = ctx;
321}
322
323void ECC_Stop() {
324 secp256k1_context *ctx = secp256k1_context_sign;

Callers 3

Secp256k1InitMethod · 0.85
AppInit2Function · 0.85
BasicTestingSetupMethod · 0.85

Calls 5

secp256k1_context_createFunction · 0.85
LockObjectFunction · 0.85
GetRandBytesFunction · 0.85
UnlockObjectFunction · 0.85

Tested by 1

BasicTestingSetupMethod · 0.68