Skip to content

Conversation

@theStack
Copy link

@theStack theStack commented Dec 4, 2025

Calculating $P_k = B_{spend} + t_k * G$ (being called "base output key" in this code base) can be done in one shot using the function for additive pubkey tweaking (-> tweak B_spend with t_k), which is simpler and should also be slightly faster than multiplying and adding up successively.

I came across this code in the course of investigating existing BIP-352 implementations w.r.t. scanning, trying to find a proper approach for a new secp256k1 "silentpayments" module (bitcoin-core/secp256k1#1765).

Calculating
    P_k = B_spend + t_k * G
can be done in one shot using the function for additive pubkey tweaking
(-> tweak B_spend with t_k), which is simpler and should also be
slightly faster than multiplying and adding up successively.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant