tlsfuzzer / python-ecdsa

pure-python ECDSA signature/verification and ECDH key agreement
Other
906 stars 311 forks source link

unused parameter 'order' in sigdecode_der(sig_der, order) #318

Closed opacey closed 1 year ago

opacey commented 1 year ago

The 'order' parameter is not used in this function: def sigdecode_der(sig_der, order): ...within ecdsa/util.py

I believe curve group order is not relevant to this function so could be removed for clarity.

tomato42 commented 1 year ago

it's part of the API that the function must follow to be usable for signature verification, it needs to stay

opacey commented 1 year ago

Oh I see, fair enough, though it did cause me (a newcomer) some confusion in figuring out other issues I was having. Perhaps its status could be noted in the documentation to help those like me. Thanks.

tomato42 commented 1 year ago

PR with doc updates welcome, but I think the module description for util.py makes it rather clear: https://github.com/tlsfuzzer/python-ecdsa/blob/2457dc7c9b7337edcb868a323c5b648a32da2b8c/src/ecdsa/util.py#L2-L11