Bug: Change type of pbst partial sig from secp key to bitcoin key#836
Conversation
This changes the type of secp signature from secp256k1::Signature to bitcoin::PublicKey. Psbt allows storing signatures for both compressed as well as uncompressed keys. This bug was introduced in rust-bitcoin#591 while trying to change the type of BIP32 keys from bitcoin::PublicKey to secp256k1::PublicKey.
|
FWIW looks good to me. |
|
Perhaps add a test? |
|
Added a breaking test. Cross-tested with bitcoin core. Commits can be re-ordered to see that the test fails during decoding the psbt. |
This commit can be re-ordered before the fix to see that the test fail during psbt decoding
026b1fe to
4e19973
Compare
|
Post-merge nACK: the issue is not solved. Please refer to bitcoin/bips#1100 In practice, non-compressed keys in PSBTs are not used, non-BIP32 compliant and should be prohibited at the spec level. |
|
In the linked issue the PSBT maintainer disagrees with your stance. I also disagree. The point of PSBT is to enable wallet interoperability. I don't understand the benefit of banning legal key formats, when the cost is entirely localized to one field, whose type just needs to be changed from one keytype to another. |
|
@dr. Maxim Orlovsky ***@***.***> , this is not about bip32
keys. This is about partial sigs type that are allowed to be 65 bytes.
Note that bip32 keys are still secp256k1::PublicKey
…On Thu, Feb 17, 2022, 09:11 Andrew Poelstra ***@***.***> wrote:
In the linked issue the PSBT maintainer disagrees with your stance. I also
disagree. The point of PSBT is to enable wallet interoperability. I don't
understand the benefit of banning legal key formats, when the cost is
entirely localized to one field, whose type just needs to be changed from
one keytype to another.
—
Reply to this email directly, view it on GitHub
<#836 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABUQEOMSYHAJBIIE26PVRS3U3UT33ANCNFSM5OT3YNJA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
@dr-orlovsky: Let me elaborate a bit: Pbsts have two fields that deal wth key.
|
|
Oh, I see now, sorry. Still slowed down after last weeks cold. |
This changes the type of secp signature from secp256k1::PublicKey to
bitcoin::PublicKey. Psbt allows storing signatures for both compressed
as well as uncompressed keys. This bug was introduced in #591 while
trying to change the type of BIP32 keys from bitcoin::PublicKey to
secp256k1::PublicKey.