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

Function ECC_Start

src/key.cpp:343–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341}
342
343void ECC_Start() {
344 assert(secp256k1_context_sign == nullptr);
345
346 secp256k1_context *ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN);
347 assert(ctx != nullptr);
348
349 {
350 // Pass in a random blinding seed to the secp256k1 context.
351 std::vector<unsigned char, secure_allocator<unsigned char>> vseed(32);
352 GetRandBytes(vseed.data(), 32);
353 bool ret = secp256k1_context_randomize(ctx, vseed.data());
354 assert(ret);
355 }
356
357 secp256k1_context_sign = ctx;
358}
359
360void ECC_Stop() {
361 secp256k1_context *ctx = secp256k1_context_sign;

Callers 4

Secp256k1InitMethod · 0.85
AppInitSanityChecksFunction · 0.85
BasicTestingSetupMethod · 0.85
mainFunction · 0.85

Calls 4

secp256k1_context_createFunction · 0.85
GetRandBytesFunction · 0.85
dataMethod · 0.45

Tested by 1

BasicTestingSetupMethod · 0.68