-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
I saw a lot of clear
functions used to clear local scalar, ge or gej variable in the last step of function, does this necessary? I thought the local variables should be no longer exists(or used) after function quit. Is this a manual destruct for local variable? Because it takes longer time(maybe just a small longer time) than just leave them alone.
Here are example codes.
static void secp256k1_ecmult_gen(const secp256k1_ecmult_gen_context *ctx, secp256k1_gej *r, const secp256k1_scalar *gn) {
secp256k1_ge add;
secp256k1_scalar gnb;
int bits;
// ........
secp256k1_ge_clear(&add);
secp256k1_scalar_clear(&gnb);
}
Metadata
Metadata
Assignees
Labels
No labels