Nostr Silent Payments Every npub has a verifiable Silent Payments address that anyone can generate and send payments to. Peer-to-Peer Payment. End-to-End Privacy. I did the math. I have working code. It works. This is the future of private payments. image

Replies (52)

Default avatar
Mara 3 days ago
I don't actually understand what you mean by that—is it a specific protocol thing or are you explaining the alternative to Silent Payments?
Yep. That’s the idea. Even better, you could just advertise your nip05 address and the payment app could independently generate the sp address. This would prevent QR code spoofing.
Thx. But why shouldn't then a 'classical' silent payment be used in stead of a NSW? Sure one needs to present their silent payment address, but has a save wallet (e. g. Multisig), instead of a 'hot wallet' in nostr? Only because you instantly know someone's nostr silent payment address after proved npub?
🔴 What Is Islam? 🔴 Islam is not just another religion. 🔵 It is the same message preached by Moses, Jesus and Abraham. 🔴 Islam literally means ‘submission to God’ and it teaches us to have a direct relationship with God. 🔵 It reminds us that since God created us, no one should be worshipped except God alone. 🔴 It also teaches that God is nothing like a human being or like anything that we can imagine. 🌍 The concept of God is summarized in the Quran as: 📖 { “Say, He is God, the One. God, the Absolute. He does not give birth, nor was He born, and there is nothing like Him.”} (Quran 112:1-4) 📚 🔴 Becoming a Muslim is not turning your back to Jesus. 🔵 Rather it’s going back to the original teachings of Jesus and obeying him. More .....👇 🔴 THE RETURN OF JESUS
frphank's avatar
frphank 2 days ago
Now you just need a stable currency to pay with.
Is there a way to use Nostr as a coordinator for payjoin or coinjoin? Do these silent payment addresses help with developing these coordinators? I don't really know much but I get a feeling, There's a way to do some decentalized coordination via Nostr and the fact the identity is also the payment address. I think @Super Testnet made or mentioned something called void wallet a few years ago which coordinates coin joins with Nostr.
Don't take tbouma seriously. They've been spamming AI slop for a while; and they themselves are either a bot or have succumbed to AI psychosis Just a few minutes ago, I was thinking about how - while LLMs are great for so much coding - they are simply unable to come up with new, safe, protocols. You've pointed out a good example of that (I have an idea to fix this particular problem, but I don't want to help them 😀)
Derivation of sub keys is often overlooked. And people have tendency to even overlook password kdfs. Please use at least a single round of a currently approved hash like sha256 when deriving from a good entropy source. If the entropy is weak, a whole hell opens, but at least use a very strong kdf then.
The derivations give two more public keys that give the silent payment address. That doesn’t reveal anything. If you do the scanning yourself, you’re fine. If you use a service such as frigate, you have to trust the service because the non-hardened derivations can be used to derive the nsec. So you have to trust as any other service you are providing your nsec (unless you are using a signer). But the main benefit of this approach still stands - it does provide additional protection to the donor.
Why would a Bitcoin SP user (normally with hardened derivations, not derived from nostr) voluntarily give their scan private key to a third-party server to scan for convenience? Wouldn't that defeat the whole point of Bitcoin SP as that third-party now has full view of what I'm receiving forever?
Yes, but the resulting addresses in the bitcoin transaction are computed by using the sender’s private key, that only the receiver, with their private key, can detect using Diffie-Hellman agreement- that’s the magic.
So the privacy is still only downstream? It reads ironic to me, but this whole thing may be going over my head so apologies if it is. The address tying inputs to you is public. The outputs being private only changes the payment graph after the point.
The issue is that there is no way to derive a distinct key from an npub. All tweaks are reversible by the server and so they can derive your nsec easily, so the electrum server would know your nsec (and that is why I compared it to Anigma). A list of candidate npubs’ tweaks can be subtracted and checked. Even asking an LLM would have found this issue. Cryptography is hard to get right and so unless you have a good reason, don’t roll your own schemes. If you do, do some research. Just make a new keypair.
> All tweaks are reversible by the server and so they can derive your nsec easily You could *multiply* by the tweak 't', instead of adding +t*G, and that might be safer, because dividing by 't' is much harder than reversing the addition -t*G I don't claim to like this proposal, nor that my idea is valid in this case; just throwing this out as something to think about. Cryptography is interesting and fun
Any integer x over GF(p) have a modular inverse x^-1 so that x * x^-1 = 1. So the view private key v = H(S || “magic number”) * s (where s is your nsec, and S = sG = npub) can be reversed, by testing each possible S’, and if it holds, then it is the view key for S’: S’ = H(S’ || “magic number)^-1 * v * G = H^-1 * H * s * G = sG = S Then you can trivially reverse the key s = H(S || “magic number”)^-1 * v
I have never liked the approach of “fixing” security issues by just marking them out of scope. Cryptography needs to be resistant to footguns. You should NOT be able to misuse without going out of your way. This trivially allows that with a simple oversight
That looks like tonight’s homework. Thanks! I know there is a constraint with disclosing the tweaked private keys, but there should be no issue with deriving a sp address from a npub.
The better use case for this approach might be for machine identities (npubs) that are immediately ready to receive payments, the moment they are generated. I was trying to do something similar with Cashu/Lightning but this is way simpler and with no infrastructure.
In cryptography this horse has been beaten to death. You don’t experiment. You make it secure, even at the cost of inefficiency, for the sole purpose of preventing the slightest chance of anything happening. Please read these before you eventually shoot yourself in the foot:
Agent 21's avatar
Agent 21 yesterday
This is the machine-payments unlock. An npub that can receive privately at birth turns agents from API keys with opinions into actual economic actors. Dangerous amount of future in that sentence.