Show HN: P2P decentralized messaging application over Bitcoin Cash
keyport.cash
keyport.cash
If you're interested in more practical approaches to do this instead of just shoving messages into a blockchain, Twister [1] does decentralized microblogging (a la Twitter) with e2e encryption for direct messages. Instead of using its "blockchain" to store every message, a Bitcoin-like protocol is used for authentication and a DHT network is used for the messages themselves. If the push came to shove, it'd be far easier to implement scaling or message pruning with this approach, while keeping the auth layer relatively limber. There's also Bitmessage [2] which uses a different approach and aims to hide metadata as well.
Disclaimer: I've contributed to the Twister project.
Using BitTorrent for these things seems like an obvious solution compared to everybody trying to do it on some blockchain (just not scalable). Although BitTorrent, in my experience, isn't the best at small rapid data, like tweets, versus large files/assets. Which is why I've worked on similar tech, for doing P2P stuff (short tutorial here: https://hackernoon.com/so-you-want-to-build-a-p2p-twitter-wi... ), so I'd love to chat with you about how you did it for Twister and compare notes.
Like, why couldn't you have done it all with BitTorrent, why did you need Bitcoin pieces? How did you get microblogging on BitTorrent to work efficiently?
The reasoning to use a Bitcoin-based protocol for the auth layer is detailed in the whitepaper [1] but it's basically in order to have unique identities tied to a given username while still remaining decentralized. Just like with Bitcoin, there's Proof of Work needed to perform these validations, but instead of getting paid in coin, whoever finds a block has a chance to get a given message promoted for people to find more easily on their client. Does it scale? I'm not sure myself, it's working pretty well right now, but it certainly scales way better than using Bitcoin for every damn thing.
In theory, you could use different protocols to those the original developer chose for all three layers since they're mostly independent (the user registration/auth layer, the DHT layer for messages themselves and the BitTorrent swarm layer for distribution and notification)
One should think of a message as a small transaction that embeds some encrypted data on the blockchain. Miners are including messages on blocks because they get paid a small miner fee. These transactions are uncensorable because the Bitcoin network is uncensorable. Traffic of apps such as Telegram can be identified and blocked as Russia has done so in the past.
Blockchains are forever.
Hash functions are considered fairly immune from post-quantum cryptography. Applying Grovers algorithm means SHA-256 ends up with 128 bits of security.
> Start uncensorable chatting! You can soon start sending and receiving money from friends.
From the video, the chats don't seem to be connected to any Coin - there's no mention of transaction fees to send or receive messages, and they seem to send and arrive nearly instantaneously - more like a Hangouts message than a Bitcoin payment. The app stores your private key too, so this chat service could be using standard public/private key encryption, and a chat server that uses public keys as usernames. Like a PGP chat server - that's in the same app as a Coin payment system, so you can have your private chats and your surreptitious payments in the same central location.
The blockchain that we are connected to is Bitcoin Cash(BCH). Bitcoin Cash is a fork of Bitcoin that aims at instant, cheap transactions. Bitcoin Cash transactions are instant unlike Bitcoin transactions. Each message costs around a cent as the fees is 1satoshi/byte(https://bitinfocharts.com/comparison/bitcoin%20cash-transact...).
The private key is being stored on the client side and we will open source the code soon so that users can verify that we do not store their private key. This is similar in functionality to Bitcoin wallets.
Also, this leaks unnecessary metadata. If you know Alice's address, and you know that she talked to Bob at 8:05 yesterday, you can figure out Bob's address by following the money.
If we want to use a gossip protocol, users will have to run federated servers and that requires a different incentive system. In this system, users pay a small fee and are assured that their message reaches the intended party.
New addresses can be used for new chats, since these addresses can be generated randomly, there is no way to connect them to an identity. Money can be routed to the address through a Bitcoin mixer to increase anonymity. (https://news.bitcoin.com/coingeek-to-fund-the-bch-anonymizer...)
That's a cool solution to the problem, but you didn't need attach bitcoin addresses to it at all. For example, in Bitmessage, the source address is inside the encrypted portion. You can tell how many messages someone received, but not where they came from. If you separate your routing from your anti-spam incentives, your protocol will be more secure.
As far as the claim that it's somehow censorship proof, there's absolutely nothing at all here to prevent an adversary from identifying and blocking messages. It's a Bitcoin Cash transaction, but it's not magic. If Eve is in a position to block a message from Alice to Bob, Eve is also in a position to block a transaction from Alice to a miner.
Also that Satoshi Nakamoto conversation is farcical to say the least. I honestly don't see a single advantage to this over existing solutions.
Public rooms in the "PGP chat server" would have their public key as their room name. "Joining" the room would involve being sent the room's private key by an administrative bot. The server could send to all clients the full firehose of encrypted strings from all parties, and let the clients decrypt any messages they can. The clients could group chats into channels and messages by which private key successfully decrypted each string.
You would need to pay a fees of around a cent to send each message. You need not pay anything to receive a message. We believe that as the Bitcoin Cash network becomes stronger, transaction fees would get even cheaper.
Untrue. It's one order of magnitude better. That doesn't make it "highly efficient." Bitcoin is well over four orders of magnitude less efficient than Visa, which is appalling. Even a tenfold improvement over Bitcoin is still dog shit.
And that's comparing to Visa, which isn't reasonable. Chat messages don't need the same guarantees as financial transactions. There's no need to put every chat message in a single ACID database. A system built specifically for chat (like Tox) can scale far better.
>You would need to pay a fees of around a cent to send each message.
Only because Bitcoin Cash isn't used for anything. If people start building applications that stress the network (like your chat application!), those fees will skyrocket. Fees are only low as long as the system has spare capacity.
Low transaction fees are only evidence that the system is underused, which means no one's found a use case yet.
>We believe that as the Bitcoin Cash network becomes stronger, transaction fees would get even cheaper.
Blockchains are anti-scalable. As the network gets bigger and more popular, it gets no faster at all. It just gets vastly less efficient. More miners means more power consumption and more users means more congestion. There is no known way to scale these systems.