• 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

FBI Flags Criminal Network Exploiting Crypto ATMs With Fake Law Enforcement Threats

FBI Flags Criminal Network Exploiting Crypto ATMs With Fake Law Enforcement Threats

March 19, 2026
What is WKC Crypto? WIKICAT Price Correction on BSC After +40% Pump

What is WKC Crypto? WIKICAT Price Correction on BSC After +40% Pump

March 18, 2026
Share76Tweet47

Related Posts

FBI Flags Criminal Network Exploiting Crypto ATMs With Fake Law Enforcement Threats

FBI Flags Criminal Network Exploiting Crypto ATMs With Fake Law Enforcement Threats

by Moussa
March 19, 2026
0

The FBI warns of rising impersonation scams involving cryptocurrency payments, as fraudsters use urgency and evolving tactics to pressure victims...

What is WKC Crypto? WIKICAT Price Correction on BSC After +40% Pump

What is WKC Crypto? WIKICAT Price Correction on BSC After +40% Pump

by Moussa
March 18, 2026
0

Wiki Cat (WKC) has been purring loudly on the charts this week, leaving the broader market in the dust. The...

XRP $1.50 Breakout Was No Coincidence – Here’s What’s Happening Underneath The Move

XRP $1.50 Breakout Was No Coincidence – Here’s What’s Happening Underneath The Move

by Moussa
March 18, 2026
0

Trusted Editorial content, reviewed by leading industry experts and seasoned editors. Ad Disclosure After surging past key price levels, XRP,...

Bitwise Found What’s Really Driving Ethereum Price

Bitwise Found What’s Really Driving Ethereum Price

by Moussa
March 18, 2026
0

Ethereum’s price has spent much of the past cycle lagging its own institutional and on-chain progress, and Bitwise says the...

Wife Accused Of Spying And Stealing $172M In Bitcoin From Husband

Wife Accused Of Spying And Stealing $172M In Bitcoin From Husband

by Moussa
March 18, 2026
0

A dispute over more than $172 million in Bitcoin has moved forward in the UK’s High Court of Justice, where...

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

© 2024 APPROX FOUNDATION - The Crypto Currency News