jonasnick / bips

Bitcoin Improvement Proposals
4 stars 5 forks source link

When should xonly tweaks be used vs "ordinary" #13

Closed LLFourn closed 2 years ago

LLFourn commented 2 years ago

Here's something I wasn't able to understand from the text. If I want use BIP86 key derivation on my MuSig key (with some chaincode I chose) How do I first derive /0/7 (for example) as a non-hardened path and then turn that into an external key.

Do I:

I have a feeling we need to somehow simplify things in this spec to have less xonly negating algebra but before suggesting anything I wanted to udnerstand the current API properly. Thanks!

jonasnick commented 2 years ago

You need to "Apply both the /0 tweak and /7 tweak as ordinary and then apply TR tweak as xonly". Ordinary tweaking is for BIP32 key derivation and Taproot requires x-only tweaking.

real-or-random commented 2 years ago

I have a feeling we need to somehow simplify things in this spec to have less xonly negating algebra but before suggesting anything

Do you have a specific change in mind?

LLFourn commented 2 years ago

Not

I have a feeling we need to somehow simplify things in this spec to have less xonly negating algebra but before suggesting anything

Do you have a specific change in mind?

No not yet.

LLFourn commented 2 years ago

I'll close this in favor of other issues I'm about to open.

nickfarrow commented 2 years ago

Semi unrelated but not worthy of new issue: Does anyone know the origin of ordinary being used to describe these tweaks?

As someone who is newer to all this, I have found ordinary to be slightly misleading. When I hear ordinary I think of "the usual" as being the x-only taproot tweak because that is the tweak I am used to. As opposed to ordinary meaning "plain"

LLFourn commented 2 years ago

The tweak everyone else is used to is bip32 though :)

real-or-random commented 2 years ago

Similar to this discussion: https://github.com/jonasnick/bips/pull/15#discussion_r887233075

@nickfarrow Do you have a better term in mind?

nickfarrow commented 2 years ago

Hmm I was thinking plain but perhaps Legacy is better? maybe pedantic..

jonasnick commented 2 years ago

plain sounds pretty good imo, but not sure if it's worth changing at this point.

real-or-random commented 2 years ago

I also like "plain", it's similar to "ordinary" but a little better. "Ordinary" sounds like the other thing is weird.

Plain is also a term that would be a good fit for keys itself, so we could 33 byte keys "plain pubkeys".

jonasnick commented 2 years ago

Did the rename (for tweaks only) in #29