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?