You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
miniscript: fix ExtData to correctly account for uncompressed keys
In our existing code we assume that all "ECDSA keys" are compressed,
i.e. 34 bytes long. This is not a valid assumption. We originally did
this because under some circumstances we legitimately did not know the
key and didn't want to penalize users by assuming uncompressed keys when
this was unlikely the case.
However, now the only way to have a pk or pkh where we don't know the
key is if the user is using a raw pkh. And if they do this in Taproot
or Segwit we still know that there are no uncompressed keys (though
with the current Ctx trait we can't distinguish Segwit from pre-Segwit
so the new logic assumes uncompressed keys even for Segwit.)
This logic will be cleaned up and improved with ValidationParams; but
currently it is wrong, and it is causing me trouble with later commits.
So fix the situation here as best we can.
The next commit will make a similar change to the multi() combinator
(multi_a is fine because the keys and sigs are fixed size); the commit
after that will introduce a unit test to SortedMulti which exercises
this logic.
0 commit comments