Skip to content

Commit

Permalink
Merge pull request AntonKueltz#67 from botovq/nonce-leak
Browse files Browse the repository at this point in the history
Avoid leaking nonce in _ecdsa_sign()
  • Loading branch information
AntonKueltz authored Apr 14, 2021
2 parents e657c59 + 2420058 commit 7315fa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/_ecdsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static PyObject * _ecdsa_sign(PyObject *self, PyObject *args) {

char * resultR = mpz_get_str(NULL, 10, sig.r);
char * resultS = mpz_get_str(NULL, 10, sig.s);
mpz_clears(sig.r, sig.s, privKey, NULL);
mpz_clears(sig.r, sig.s, privKey, nonce, NULL);

PyObject * ret = Py_BuildValue("ss", resultR, resultS);
free(resultR);
Expand Down

0 comments on commit 7315fa3

Please sign in to comment.