Closed bboilot-ledger closed 3 months ago
Hi!
Thanks for the PR :) I think my intention was to add a prehashed
option to _sign
like for _verify
but forgot to do so, and there isn't a test for signing with pre-hashing. :P
The fix looks good to me, I'd just prefer to keep the hashed-or-not message
instead of raw_message
in SigData
if you can. That way the user gets the actual input given to their function in the debug information of the report.
And I'll add a unit test for this case after merging.
It makes sense! I've made the modifications according to your feedback :smiley:
Thanks!
Hi :wave:
When using the
pre_hashed
option onECDSA.test_sign
, the message replaced by its hash. But following the call to the sign harness, the results are then given to crypto-condor_verify
function. However, the message now contains the hash of the message which will make the call to_verify
to return that the signature is invalid in every case. This PR fixes this issue by keeping the complete message even when thepre_hashed
option is enabled.I've also added the missing return value in the documentation for the ECDSA sign protocol.
Let me know if you want me to fix it differently or add anything to this.