• Welcome to forex.pm forex forum binary options trade. Please login or sign up.
 

C secp256k1 : what is the purpose of secp256k1_context_randomize?

Started by Bitcoin, Feb 04, 2022, 01:31 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bitcoin

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?