AntonKueltz / fastecdsa

Python library for fast elliptic curve crypto
https://pypi.python.org/pypi/fastecdsa
The Unlicense
264 stars 77 forks source link

Add support for prehashed messages #31

Closed justinba1010 closed 5 years ago

justinba1010 commented 5 years ago

I'm not too sure if this fits into this package, but thought maybe it would be a good idea if you guys leave an option for prehashed messages to be signed. I haven't looked at the verification step yet, so this is more of a suggestion atm.

AntonKueltz commented 5 years ago

I think having both a sign_hash and sign(... prehashed=<bool>) function is a bit redundant. I think the prehashed keyword arg is probably sufficient. Could you also make sure the indentation in the new code matches? The test suite runs pep8 before it runs the actual tests so if pep8 fails we won't know if the new code broke any tests.

Thanks, Anton

justinba1010 commented 5 years ago

Sorry about the delay, have been very busy with classes. Removed the redundancy and the indentation.

AntonKueltz commented 5 years ago

Sorry it's taken so long for me to get to this, been a tumultuous couple of weeks recently. Will review and merge this weekend.

Cheers, Anton

AntonKueltz commented 5 years ago

Took a while but it's now in v1.7.2!

Cheers, Anton