Investigation: Possibility of generating non-normalized signatures in sign
function.
#815
Labels
good first issue
Good for newcomers
sign
function.
#815
Context
Currently we have an assertion in the
encode_signature
function infuel-crypto/src/secp256/signature_format.rs
. However, this assertion is frequently failing during fuzz tests, as observed in #733.The assertion fails when the
encode_signature
function receives a non-normalized signature. The signature is produces in thesign
function infuel-crypto/src/secp256/backend/k1/secp256k1.rs
.It is not obvious that we guarantee that the signature creation here always return normalized signatures. We should further investigate if this is a guaranteed invariant from the rest of the code, and take appropriate action based on the findings.
Definition of done
We have clarity on whether we can expect the
sign
function to always return normalized signatures in production, and based on the findings we have either a follow-up task defined to fix this, or the code clearly maintains this invariant so that it is not encountered in fuzz tests.The text was updated successfully, but these errors were encountered: