Please forgive me if this is not the right place, however, I encountered This mbed TLS cryptographic function that generates an ECDH keypair on an elliptic curve: https://tls.mbed.org/api/ecdh_8h.html#a403a5d7363b6219a2017b837b665c354 And in addition to the private key and a point on the curve, the function needs also random inputs. Why and what for are the random variables required? Why Isn't it just Q=d*G?