darosior / python-bip380

Bitcoin Output Script Descriptors with Miniscript extension
MIT License
20 stars 5 forks source link

Disallow key duplicates #12

Open darosior opened 2 years ago

stickies-v commented 2 years ago

Which key duplicates are we talking about? Node properties, cryptographic keys, or something else?

darosior commented 2 years ago

I meant the secp256k1 public keys. The problem is that if a signature is given for a key, but that is repeated through the Miniscript it becomes really hard to reason about malleability. See the linked issue for more details.

-------- Original Message -------- On May 1, 2022, 8:17 PM, stickies-v wrote:

Which key duplicates are we talking about? Node properties, cryptographic keys, or something else?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

darosior commented 2 years ago

It should be trivial to check for now that we have the keys property of descriptors: https://github.com/darosior/python-bip380/blob/8aa1e2ff1f2092e249c16a559b1cb4a2b6835f6c/bip380/descriptors/__init__.py#L38-L42

SomberNight commented 1 year ago

See the linked issue for more details

Where is the link?

darosior commented 1 year ago

:facepalm: thanks for pointing that out @SomberNight. There was no link, and i don't remember what i was referring to now.

We introduced this change in the C++ implementation in https://github.com/sipa/miniscript/pull/116.