0

Tweaking an "internal" public_key into a "tweaked" public key, using bip341 for key spend with taproot, seems to make it impossible to extract the internal key, even when knowing the tweak.

Application is trying to identify a Nostr id from a taproot address. Even when the taproot is spent, this is still not possible, as the tweaked pubkey can't be mapped to an untweaked (nostr) pubkey.

This can only be done by getting a list of NostrIds and generating the TapTweak bip341 addresses and doing a lookup.

Am I missing something?

1 Answer 1

2

If you know the tweak, you can compute its additive inverse (the negation) and add the resulting point to the tweaked pubkey. The result should be the untweaked key.

The additive inverse is just n - tweak.

3
  • what is n? 0? also are there any helper functions for this in Secp256k1? ty
    – jaybny
    Commented Aug 28 at 4:58
  • nevermind - i don't know the tweak - the tweak contains a hash of the pubkey - I know the TagHash - tweak is sha256(sha256("TapTweak") | sha256("TapTweak") | P) so, i guess i don't know the tweak
    – jaybny
    Commented Aug 28 at 5:07
  • 3
    n is the order of the secp256k1 curve. If you don't know the tweak, you cannot retrieve the internal pubkey.
    – Ava Chow
    Commented Aug 28 at 21:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.