Skip to content
This repository was archived by the owner on Feb 16, 2025. It is now read-only.
This repository was archived by the owner on Feb 16, 2025. It is now read-only.

Signature verify failed because wrong signatures order #27

@soralit

Description

@soralit

Hi, we met an issue about signatures order when testing.
Currently the function parseSignaturesFromPSBT will make signatures grouped by public keys, which will make signatures' order mismatched with PSBT's inputs.

e.g:

If we have 7 public keys [A,B,C,D,E,F,G] and 10 UTXOs [0,1,2,3,4,5,6,7,8,9] while 4 UTXOs [0,2,4,8] belong to the same public key E.
After parsing signatures from signed PSBT, the signatures will be grouped by public keys and when call validateAndSetSignature in caravan, we will flat the signatureSet and get a signature list with wrong inputs order like [0',2',4',8',1',3',5',6',7',9'] (x' means it is inputs[x]'s signature) which will cause error when verify inputs[2]'s signature with inputs[1]'s hash and public key.

What do you think?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions