Oddbean new post about | logout
 The Introduction of Keychat

Keychat is a chat app, built on Bitcoin ecash, Nostr protocol and Signal protocol.

Keychat is inspired by the postal system — stamps, post offices, letters.

Keychat uses Bitcoin ecash as stamps and Nostr relays as post offices. 

Senders send messages stamped with Bitcoin ecash to Nostr relays. The Nostr relays collect the Bitcoin ecash, then deliver messages to receivers. 

Unlike the centralized postal system, Keychat can use multiple Bitcoin ecash issuers and Nostr relays, each maintained by distinct operators.

Keychat uses Signal protocol to ensure message encryption security and meta-data privacy.

The content of the letter can be exposed easily by opening the envelope. Keychat messages are end-to-end encrypted via Signal protocol, with a unique encryption key generated for each message. Only the sender and receiver can decrypt the message.

The addresses of both parties on the envelope can be tracked. In theory, this problem is solved if they change addresses daily. So Keychat reuses Signal protocol to update sending and receiving addresses for nearly every message.

Like the postal system, Keychat requires no registration. Users just generate Nostr keys as ID.

https://www.keychat.io/ 
 This is interesting, but is it interoperable? Where is the code? 
 It is interoperable. Keychat relay only add collecting bitcoin ecash function. If the relay operator provides free service, current relays e.g., Damus relay can be used as Keychat relay. 

The android apk will be released first, then the code. 
 > The android apk will be released first, then the code.

This sounds suspicious tbh.  Why do this? 
 Agreed, there is no reason to do this. Not necessarily malicious, sometimes people just have bad ideas and/or justify them with bad reasoning.

OP, please release the source code as soon as possible; no one cares if it's ugly or half-broken or whatever.

When the app is released I might test it out briefly, but for something as important as encrypted comms I won't consider using it regularly until source is available (and ideally it has reproducible builds too). 
 We will release code and android apk at the same time. 
 Keychat message is also kind 4 event. So Keychat can use all relays which supports kind 4. 

The difference between Keychat messages and DM messages is encryption/decryption methods, which processed in client. Relays don’t care about encryption. 
 事件是由Sats能量驱动的,技术的创新破坏终于来了。 
 Runs on Cashu <3  
 Does the app allow signal users to interact with nostr and vice versa?

What's the role of these postage stamps? Are the stamps for paying the relays? What about the internet gateway etc..?  
 Yes, nostr relays get those ecash stamp. 

We think there is no long-lasting free lunch. So we learn from postal system. Ecash is best e-stamp. relay will be post office, which has income to cover cost. 
 Cool, perhaps you could consider layering the post stamps if you want to pay the ISP as well :) 
 Yes, it’s possible. Bitcoin ecash as estamp is general solution. 
 Very good thinking! I wonder, would it be possible to also onion-route the messages using multiple relays? 
 I think it is possible. Give all relays who routed the message bitcoin ecash. Just like using 10 letter envelops, every envelop has one stamp. 
 Yes, the protocol just needs to understand "forward to relay" instead of "forward to user". 
 Signal protocol =/= Signal app. WhatsApp also use signal protocol to achieve end to end encryption. 

So keychat users can’t interact with signal app users. 
 So what does the protocol do? Did you throw signal into the mix for the GUI?  
 The Signal protocol is only responsible for encrypting and decrypting messages.

Yeah, Keychat uses Signal protocol to encrypt / decrypt message. 
 Interesting, I just read about the double ratchet algorithm: https://signal.org/docs/specifications/doubleratchet/#double-ratchet

Does this mean that users could publish their nsec and their old DMs would not be accessible? 
 Can the devs stop now please. 😂

Can't keep up anymore.

nostr:nevent1qqsdyx8k5my7e9vxzwfr0mz4mutd6kzdg3jk0hmsufj6lg5luwjsqqgpvemhxue69uhkv6tvw3jhytnwdaehgu3wwa5kuef0dec82c33vdhrvdesvcmrvvmwxd4hxvpjdfhxumrnwejr27fc8pax5mn9veunsve5xdukkctcwvmhjvmw0faxket5wfehy6nhwsuxz0mzwfhkzerrv9ehg0t5wf6k2q3qh0uj825jgcr9lzxyp37ehasuenq070707pj63je07n8mkcsg3u0qxpqqqqqqzdwjg40 
 👀 
 what is "bitcoin ecash" tho? 

i'm guessing you're using double blinded signatures for what you call stamps here, but they are not tied to bitcoin? 
 The onlyProblemm is constantly having to install a new app/migrate friends and famely.... But one day we'll have a absolutely great solution
nostr:nevent1qqsdyx8k5my7e9vxzwfr0mz4mutd6kzdg3jk0hmsufj6lg5luwjsqqgpz3mhxue69uhhyetvv9ujumn0wd68ytnzvupzpwleyw4fy3sxt7yvgrran0mpenxqlululur94r9jlax0hd3q3rc7qvzqqqqqqyq5al6v 
 will the cashu be encrypted for the relay or public? 
 Public. The relay is the first to receive the ecash stamp, so it can collect it. It's like the stamp is affixed on the envelope, not inside it. 
 hmm, definitely interesting  
 Code first  
 So one needs ecash to send message? Is it fixed rate? How does it work exactly? 
 Users choose which relay to use. Relays set their own prices, although some may offer services for free. 
 Bitcoin ecash is a horrible name and it took me a while to distinguish it from bcash 
 Almost no one cares about Bcash anymore. 

We think bitcoin ecash will be popular. 
 Does it make sense to have a setting for receivers to require stamps too? 

Use case: if someone outside of my contacts sends me a note then they have to pay me to read it. 
 It’s possible. You just need to ask him to transfer ecash.

In Keychat, transferring ecash is just a message.Very easy. 
 Next is freight postage using ecash 
 Interesting. 
 Nostr and open source cannot be separated... we hope the code is released, it sounds good 
 Agree. 
 Sorry!
I can't understand why I should pay for messages when I can send messages for free, for example through SimpleX or Briar?
Perhaps you meant that when sending messages with stamps, the relay will have an incentive to work and not interfere with sending encrypted messages? And there might even be special relays? 
 Because relay operators need to pay for server-related expenses. SimpleX relay operators also need to pay server-related expenses. 
 You didn’t write about this on your website, you didn’t say why I should send paid messages.
I'm not outraged, I just want people to understand what incentive they might have to use your program.
 
 Not have free meals. The ecash stamp will help maintain the whole system 
 Why not just use a bitcoin lightning stamp? 
 Because in the Lightning Network, payments require multiple interactions to succeed. Additionally, the transaction fees for self-hosted Lightning Network transactions are very expensive. 
 I don't understand.

What do you mean by 'multiple interactions to succeed'?

Transaction fees on Lightning are in the order of one hundredth of one cent. 
 Take Phoenix LN wallet for example. Fees of Sending via Lightning	0.4 % + 4 sat

https://phoenix.acinq.co/faq#what-are-the-fees

The fee-free mode of custodial Lightning Network wallets has misled many people into thinking that the Lightning Network is very cheap. 
 Don't use Phoenix then.

If I have $50 of Bitcoin on the Lightning network. I don't care about custody.

If I put $1000 of Bitcoin on the Lightning network, I'll make sure I have my own keys.

"Bitcoin e-cash" is a misnomer. It's not Bitcoin. It's some shitcoin that may or may not be backed by Bitcoin. 
 “If I have $50 of Bitcoin on the Lightning network. I don't care about custody.” 

yes,custody Lightning network is shitcoin. 
 I disagree. Happily used it every day in El Salvador. And it works. And it's bitcoin. 

The only use case I can think of for e-cash is CBDC and dog meme coins. 
 custody Lightning network is much worse than bitcoin ecash. 
 1. At least it's Bitcoin.
2. Bolt 12 
 I would imagine the relay operates the mint and since lightning is used to get in/out your client could just use lightning to buy the exact amount of ecash needed for a stamp and then use that? Probably still prohibitively expensive with lightning fees for one stamp but maybe you could just round up to whatever makes sense whenever your balance is too low. 
 Sure, but the mint can still issue more tokens than it has in reserve. 
 Yeah I don't see it as functionally different than you loading an account somewhere with credits, or a custodial wallet. I think it might be useful as a formalized way for people to spin up an account system within their app/service with lightning in/out and some privacy internally, but still just as risky as holding funds on anywhere else custodially. 
 There are no lightning stamps. Ecash is bearer asset, lightning does not have anything like that, but it's convertible, it is actually created by paying a lightning invoice. Doing several roundtrips to pay 1 sat (which would be requirement for lightning) is not feasible. 
 Github link for .apk? 
 Not released now. Plz wait. 
 Moar messaging options... 
nostr:nevent1qqsdyx8k5my7e9vxzwfr0mz4mutd6kzdg3jk0hmsufj6lg5luwjsqqgpzamhxue69uhhyetvv9ujumn0wd68ytnzv9hxgtczyzaljga2jfrqvhugcsx8mxlkrnxvplelelcxt2xt9l6vlwmzpz83uqcyqqqqqqg0zl3hf 
 You want me to pay to send a message? 
#NGMI 
😂 
 To avoid tracking, do you need to change addresses manually every day or is this done automatically when you send a message? 
 Do I need to change addresses manually? 
 It is done automatically. Just like encryption key updating automatically. 
 SHOW
THE
CODE. 
 Please wait, we need some more time.

You can first see if you like the design of Keychat through the notes we have posted. 
 Don’t care about the design.
Don’t care about the notes.
Open code audited for security claims before a single use, and this will be the nostr wide recommendation. 
 Sounds good. Cant wait to get started.