• 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

How do Bitcoin mining pools typically handle payout frequency versus thresholds?

bitcoin core – estimatesmartfee differs a lot on testnet4

April 22, 2026
XRP Falls 4% as Network Records Largest Realized Loss Spike Since 2022

Bitcoin Theft: A Fake Policeman’s Guide to Stealing $1M BTC

April 21, 2026
Share76Tweet47

Related Posts

How do Bitcoin mining pools typically handle payout frequency versus thresholds?

bitcoin core – estimatesmartfee differs a lot on testnet4

by Moussa
April 22, 2026
0

I have two testnet4 nodes, both running Bitcoin Core v30.2 and I use estimatesmartfee API calls to guess fees on...

XRP Falls 4% as Network Records Largest Realized Loss Spike Since 2022

Bitcoin Theft: A Fake Policeman’s Guide to Stealing $1M BTC

by Moussa
April 21, 2026
0

Men in uniform knocked on the door. They had badges, authority, and a script tight enough to convince the victim...

Why You Should Be Paying Attention To The Bitcoin Monthly MACD

Why You Should Be Paying Attention To The Bitcoin Monthly MACD

by Moussa
April 21, 2026
0

Trusted Editorial content, reviewed by leading industry experts and seasoned editors. Ad Disclosure Crypto analyst Merlijn The Trader has published...

Bipartisan PACE Act Introduced To Expand Crypto Firms’ Access To Fed Payment Services

Bipartisan PACE Act Introduced To Expand Crypto Firms’ Access To Fed Payment Services

by Moussa
April 21, 2026
0

Ronaldo is an experienced crypto enthusiast dedicated to the nascent and ever-evolving industry. With over five years of extensive research...

New York Sues Coinbase And Gemini Over Alleged Illegal Prediction Market Gambling Operations

New York Sues Coinbase And Gemini Over Alleged Illegal Prediction Market Gambling Operations

by Moussa
April 21, 2026
0

New York Attorney General Letitia James has filed lawsuits against Coinbase Financial Markets and Gemini Titan, alleging that both companies...

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

© 2024 APPROX FOUNDATION - The Crypto Currency News