[Cryptography-dev] Generating deterministic ECDSA signatures

Eran Messeri eranm at google.com
Mon Dec 12 06:43:05 EST 2016


Hi,

Is there a way to generate deterministic ECDSA signatures?
With the following code I get a different signature each time:
eckey = default_backend().load_pem_private_key(pkey_pem, password=None)
eckey.sign('test', ec.ECDSA(hashes.SHA256()))

But to implement signing code compliant with RFC6962-bis (section 12.4,
draft 21:
https://tools.ietf.org/html/draft-ietf-trans-rfc6962-bis-21#section-12.4)
the signature produced has to be the same every time.

Thanks,
Eran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cryptography-dev/attachments/20161212/e4bcdfa5/attachment.html>


More information about the Cryptography-dev mailing list