• About
  • FAQ
  • Earn Bitcoin while Surfing the net
  • Buy & Sell Crypto on Paxful
Newsletter
Approx Foundation
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
Approx Foundation
No Result
View All Result
Home Bitcoin

privacy – How to aggregate Schnorr PrivateKeys and PublicKeys from untrusted sources to create stealth addresses?

Moussa by Moussa
March 19, 2026
in Bitcoin
0
How do Bitcoin mining pools typically handle payout frequency versus thresholds?
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


Alice wishes to donate to Bob anonymously.
Alice wants to create a bitcoin “stealth” address for Bob (which cannot be associated to Bob on the blockchain explorer) using shnorr signatures.

Alice has Bob’s Schnorr PublicKey1 from his donation website.
Alice produces on her laptop a new (privateKey2, publicKey2) pair.
Alice creates aggregated PubKey1 + PubKey2 using Schnorr’s aggregated public keys feature.
Alice sends bitcoins to the aggregated address(PubKey1 + PubKey2).
Alice shares the privKey2 with Bob via a secure end-to-end channel.

Later, Bob logs in and retrieves the PrivKey2 that Alice shared.
Bob then calculates aggregated PrivKey1 + PrivKey2 and spends the unspent transaction.

I was able to achieve PubKey1 + PubKey2 with the Musig2 aggregation function that uses tags.

import * as musig2 from '@scure/btc-signer/musig2.js'
import {randomBytes} from "@noble/ciphers/utils.js"
import {schnorr} from "@noble/curves/secp256k1.js"

//alice pair
privateKey2 = randomBytes(32)
publicKey2 = musig2.IndividualPubkey(privateKey1)

const individualsPublicKeys = [publicKey1, publicKey2]; // Collect all individual public keys
const sortedPublicKeys = musig2.sortKeys(individualsPublicKeys); // Sort public keys lexicographically (as required by MuSig2)
const aggregatePublicKey = musig2.keyAggregate(sortedPublicKeys).aggPublicKey.toBytes(true) // Extract aggregate public key (33 bytes)

console.log(aggregatePublicKey)//PublicKey1 + PublicKey2

//...
//Alice send coins to address(aggregatePublicKey)
//...

how to compute aggregate privateKey1 + privateKey2 to spend the coins ?

signature = schnorr.sign(msg, aggregatePrivateKey)
schnorr.verify(signature, msg, aggregatePublicKey);

But how does Bob compute the aggregated private key in JavaScript using the @scure/btc-signer @noble/curves/secp256k1 libraries? Is there a vulnerability while computing the aggregated private key? Bob distrusts Alice because she could be an awful adversary who could try to steal Bob’s private key.

I know Bob can implement musig2 partial signature, but my whole code already uses musig2 partial signature, thus this would result in a two-step recursion. In this scenario, I am unsure how to use musig2 partial signature.

LE:

I believe I’ve worked it out. To aggregate private keys, I believe Bob has to just add them using the Point class.

var priv1 = Point.fromBytes(priv1)
var priv2 = Point.fromBytes(priv1)

privSum = Point.ZERO
privSum = privSum.add(priv1)
privSum = privSum.add(priv2)

var pub1 = Point.fromBytes(pub1)
var pub2 = Point.fromBytes(pub2)

var pubSum = Point.ZERO
pubSum = pubSum.add(pub1)
pubSum = pubSum.add(pub2)

console.log(GetPublicKey(privSum))
console.log(pubSum)

both matches in console. Bob now can use privSum to spends the coins he received from Alice.

Is the aggregation of Schnorr private keys secure? Do I have to perform any more verifications?



Source link

Related articles

21Shares Builds XRP Case Around Utility, ETFs, and Fixed Supply

21Shares Builds XRP Case Around Utility, ETFs, and Fixed Supply

September 15, 2026
Swiss Bitcoin Pay Shuts Down Servers After Data Breach

Swiss Bitcoin Pay Shuts Down Servers After Data Breach

September 14, 2026
Share76Tweet47

Related Posts

21Shares Builds XRP Case Around Utility, ETFs, and Fixed Supply

21Shares Builds XRP Case Around Utility, ETFs, and Fixed Supply

by Moussa
September 15, 2026
0

Key Takeaways21Shares says XRP’s prospects rest on four market pillars.U.S. spot XRP ETFs have drawn more than $1.70 billion in...

Swiss Bitcoin Pay Shuts Down Servers After Data Breach

Swiss Bitcoin Pay Shuts Down Servers After Data Breach

by Moussa
September 14, 2026
0

Another day, another data breach.  Swiss Bitcoin Pay, a non-custodial bitcoin payment processor, said that it had to temporarily shut...

UAE Taps Avalanche to Secure Digital Identity for 12.5M People

UAE Taps Avalanche to Secure Digital Identity for 12.5M People

by Moussa
September 14, 2026
0

Key TakeawaysUAE migrated its UAEPASS digital vault to Avalanche’s L1, ensuring reliable performance for 12.5M users.The dedicated L1 handles only...

August CPI Puts Fed Policy in Focus as Hike Odds Reach 90%

August CPI Puts Fed Policy in Focus as Hike Odds Reach 90%

by Moussa
September 14, 2026
0

Markets were betting on a 90% chance of a Federal Reserve rate hike at Wednesday’s policy meeting, according to CME...

KuCoin Spotlight Returns With a Gno.land (GNOT) Pre-Listing Subscription, Featuring Pro-Rata Allocation, KCS Holder Benefits and Conditional Buyback Mechanism

KuCoin Spotlight Returns With a Gno.land (GNOT) Pre-Listing Subscription, Featuring Pro-Rata Allocation, KCS Holder Benefits and Conditional Buyback Mechanism

by Moussa
September 14, 2026
0

KuCoin Spotlight returns with a pre-listing subscription for 7,751,938 GNOT at a subscription price of $0.0645 per token. The oversubscription...

Load More

youssufi.com

sephina.com

[vc_row full_width="stretch_row" parallax="content-moving" vc_row_background="" background_repeat="no-repeat" background_position="center center" footer_scheme="dark" css=".vc_custom_1517813231908{padding-top: 60px !important;padding-bottom: 30px !important;background-color: #191818 !important;background-position: center;background-repeat: no-repeat !important;background-size: cover !important;}" footer_widget_title_color="#fcbf46" footer_button_bg="#fcb11e"][vc_column width="1/4"]

We bring you the latest in Crypto News

[/vc_column][vc_column width="1/4"][vc_wp_categories]
[/vc_column][vc_column width="1/4"][vc_wp_tagcloud taxonomy="post_tag"][/vc_column][vc_column width="1/4"]

Newsletter

[vc_raw_html]JTNDcCUzRSUzQ2RpdiUyMGNsYXNzJTNEJTIydG5wJTIwdG5wLXN1YnNjcmlwdGlvbiUyMiUzRSUwQSUzQ2Zvcm0lMjBtZXRob2QlM0QlMjJwb3N0JTIyJTIwYWN0aW9uJTNEJTIyaHR0cHMlM0ElMkYlMkZhcHByb3gub3JnJTJGJTNGbmElM0RzJTIyJTNFJTBBJTBBJTNDaW5wdX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N5JTNDJTJGbGFiZWwlM0UlM0MlMkZkaXYlM0UlM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1idXR0b24lMjIlM0UlM0NpbnB1dCUyMGNsYXNzJTNEJTIydG5wLXN1Ym1pdCUyMiUyMHR5cGUlM0QlMjJzdWJtaXQlMjIlMjB2YWx1ZSUzRCUyMlN1YnNjcmliZSUyMiUyMCUzRSUwQSUzQyUyRmRpdiUzRSUwQSUzQyUyRmZvcm0lM0UlMEElM0MlMkZkaXYlM0UlM0NiciUyRiUzRSUzQyUyRnAlM0U=[/vc_raw_html][/vc_column][/vc_row]
No Result
View All Result
  • Contact Us
  • Homepages
  • Business
  • Guide

© 2024 APPROX FOUNDATION - The Crypto Currency News