• 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

BitMEX Sets Close-Only Risk Limits Ahead Of September Wind-Down

BitMEX Sets Close-Only Risk Limits Ahead Of September Wind-Down

August 25, 2026
Strive (ASST) Holds 19,864 BTC With No New Purchases Last Week, Balance Sheet Hits $141.7M Cash

Strive Stock Soars After 1,110 Bitcoin Buy

August 25, 2026
Share76Tweet47

Related Posts

BitMEX Sets Close-Only Risk Limits Ahead Of September Wind-Down

BitMEX Sets Close-Only Risk Limits Ahead Of September Wind-Down

by Moussa
August 25, 2026
0

BitMEX will move into strict risk-limit mode on August 26 as part of its planned exchange wind-down. Starting at 04:00...

Strive (ASST) Holds 19,864 BTC With No New Purchases Last Week, Balance Sheet Hits $141.7M Cash

Strive Stock Soars After 1,110 Bitcoin Buy

by Moussa
August 25, 2026
0

Strive, Inc. bought 1,110 bitcoin last week, the Dallas-based company’s largest single-week purchase in months, lifting its treasury to 21,356...

Anthropic Co-Founder Ben Mann Says Elite Schools Matter Less in the AI Era

Anthropic Co-Founder Ben Mann Says Elite Schools Matter Less in the AI Era

by Moussa
August 25, 2026
0

Key TakeawaysAnthropic’s Benjamin Mann says AI weakens elite-school advantages built 10-20 years ago.OpenAI’s Sam Altman signals curiosity and judgment may...

How to make your own crypto coin or token? [closed]

by Moussa
August 25, 2026
0

I'm absolute new to this. Can someone help, how I can make my own coin or token and sell it...

Coinbase Investor Class Action Can Move Forward, Federal Judge Rules

Coinbase Investor Class Action Can Move Forward, Federal Judge Rules

by Moussa
August 25, 2026
0

A federal judge has allowed parts of an investor class-action lawsuit against Coinbase and certain executives to proceed, keeping allegations...

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

© 2024 APPROX FOUNDATION - The Crypto Currency News