tlsfuzzer/python-ecdsa

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

opacey opened this issue · 3 comments

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.

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

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.

PR with doc updates welcome, but I think the module description for util.py makes it rather clear:

This module includes some utility functions.
The methods most typically used are the sigencode and sigdecode functions
to be used with :func:`~ecdsa.keys.SigningKey.sign` and
:func:`~ecdsa.keys.VerifyingKey.verify`
respectively. See the :func:`sigencode_strings`, :func:`sigdecode_string`,
:func:`sigencode_der`, :func:`sigencode_strings_canonize`,
:func:`sigencode_string_canonize`, :func:`sigencode_der_canonize`,
:func:`sigdecode_strings`, :func:`sigdecode_string`, and
:func:`sigdecode_der` functions.