Goal
Strengthen HWI parity tests for nondeterministic signatures without requiring byte-for-byte equality.
Current state
- BitBox02
signmessage checks the JSON shape and that the base64 payload is 65 bytes, then skips exact comparison with the reference signature.
signtx compares the signed flag and unsigned transaction and checks that an expected partial-signature key exists.
- Those checks can accept malformed signatures or meaningful PSBT differences.
Scope
- Cryptographically verify each
signmessage signature against the expected message and device public key.
- Verify every expected PSBT signature against the correct transaction sighash, input, and public key.
- Compare meaningful PSBT fields and metadata while excluding only genuinely nondeterministic signature encodings.
- Apply the stronger helpers across Ledger, Jade, Coldcard, and BitBox02 parity cases.
- Add negative unit tests proving malformed or wrong-key signatures are rejected.
Acceptance criteria
Goal
Strengthen HWI parity tests for nondeterministic signatures without requiring byte-for-byte equality.
Current state
signmessagechecks the JSON shape and that the base64 payload is 65 bytes, then skips exact comparison with the reference signature.signtxcompares thesignedflag and unsigned transaction and checks that an expected partial-signature key exists.Scope
signmessagesignature against the expected message and device public key.Acceptance criteria
signmessageparity validates the signature instead of checking only length.signtxparity case validates the device signature cryptographically.