forex.pm forex forum binary options trade

 Сryptocurrency exchanges => Binance - Сryptocurrency exchanges => Topic started by: Bitcoin on Feb 04, 2022, 01:31 pm

Title: C secp256k1 : what is the purpose of secp256k1_context_randomize?
Post by: Bitcoin on Feb 04, 2022, 01:31 pm
C secp256k1 : what is the purpose of secp256k1_context_randomize?

In the course of studying the secp256k1 library API, I came acrosssecp256k1_context_randomize which seems similar to providing a seed to a pseudo-random generator. At the same time, the file secp256k1.h seemingly does not offer any functionality for generating random private keys, and the function secp256k1_ecdsa_sign relies on a deterministic secret (rfc 6979) rather than anything randomly generated. Now I can see the API being extended in file secp256k1_ecdh.h with the function secp256k1_ecdh which returns an EC Diffie-Hellman secret. But this doesn't seem to rely on random generation either since the scalar is provided as argument. So I am wondering, why would a user care to randomize a context, or in other words, where is randomization used with the library?   


Source: C secp256k1 : what is the purpose of secp256k1_context_randomize? (https://bitcoin.stackexchange.com/questions/52254/c-secp256k1-what-is-the-purpose-of-secp256k1-context-randomize)