An encrypted email client built right into the PPCoin client

[ul]I love the idea behind Bitmessage, encrypted email sent using the Bitmesssage protocol. It would be great if we could build the same thing into the PPCoin client. Here is how it would work:
[list]
[li]To send any message would cost a very small PPCoin fee. This would reduce spam.[/li]
[li]Let’s say that I sell a physical item that needs to be shipped to the buyer. The item ended up being sold for 590 PPC.[/li]
[li]The PPCoin blockchain would allow me to add information to any transaction, so I send an invoice to the buyer’s PPCoin address. The invoice is embedded into the transaction. Cost to send: 0.01 PPC.
[/li][li]The buyer responds by sending me back an email with his or her mailing address. Cost: 0.01 PPC.
[/li][li]Since the message with the shipping address came from the buyer’s PPCoin address, I know that it is in fact the correct person that I am shipping the item to.
[/li][/list][li]The receipt, shipping address, invoice, and all other pertinent communications are stored in the blockchain forever in an encrypted format. Only the buyer and the seller have the necessary keys to decrypt the information, so they will always be able to retrieve a full record of the transaction for tax purposes, etc.
[/li][/ul]

I’m not a cryptographer, but I am pretty sure that what I am proposing here is possible. The PPCoin email client built into the PPCoin client would work on standard Public Key Encryption. The buyer would reveal his or her PPCoin address by sending the full 590 PPCoin payment to the PPCoin address posted on the seller’s website. This exposes the seller to the public key associated with the buyer’s PPCoin address. The seller can now use this public key to send encrypted messages to the buyer, which can be decrypted by ONLY the buyer using the buyer’s secret private key.

The seller gets the 590 PPC, and sends an invoice/receipt back to the buyer via the blockchain. The buyer now has the seller’s public key, and can send encrypted messages to the seller. Now, the two can communicate back and forth, as much as necessary.

I believe it would be perfectly possible to do what you are suggesting… however I believe the main downside to all of this is the fear / threat of blockchain bloating… the btc blockchain is over 9GB now… and rising fast… each message stored in the blockchain makes it larger… and for every transaction on the PPC this would escalate rather rapidly.

That’s a good point. I hadn’t thought about that. Would it be possible to create a separate database just for messages? The user would only have to download the message database if they want to use the encrypted email feature. Perhaps the transaction id of any message in the message database would exactly match the associated PPCoin transaction in the blockchain.

This program is here already! Go to: https://bitmessage.org/ for more information. Scan my avatar and send me a message :wink:

This program is here already! Go to: https://bitmessage.org/ for more information. Scan my avatar and send me a message ;)[/quote]
Yeah i was going to say there is bitmessage that does exactly what is being suggested… now building bitmessage into the PPC client and having it run as separate merged mined chain… now that would be awesome :stuck_out_tongue:

That’s a good point. I hadn’t thought about that. Would it be possible to create a separate database just for messages? The user would only have to download the message database if they want to use the encrypted email feature. Perhaps the transaction id of any message in the message database would exactly match the associated PPCoin transaction in the blockchain.[/quote]

Create a distributed hash table, and then just use scriptsigs to store the hashes of the actual objects maybe?

Anymore thought into this wonderful idea?

I think some sort of message layer built into the protocol would be great (though how exactly it should be implemented needs some consideration). With the ability to send messages between users, people could design their own custom protocol extensions and clients to handle them. Two examples:

  1. Multi-pass contracts
    Consider some sort of contract that requires a raw transaction to be passed around multiple users for signing before being broadcast. Traditionally this passing round would either have to be done manually, through a central service like Blockchain.info, or else through a client application that relies on a messaging protocol like e-mail/SMS/bitmessage or communicates with a central server or connects to a second P2P network (distinct from PPCoin) to transmit and receive the messages.

With messaging, users could send special messages to each other which certain clients could parse and respond by opening a dialogue asking the user to sign, delay signing or reject the transaction (or for instance in the case of a 2-of-3 signatures transaction if the user who is to receive the funds by the transaction receives a message their client could automatically sign it because there is no risk). This could automate complex contract operations.

Example message:

<message protocol="#PROTOCOL">
<to>#ADDRESS</to>
<request>#SIGN_&_TRANSMIT</request>
[#RAW_TRANSACTION]
</message>
  1. Trustless mixing

Rather than relying on a centralised server for mixer, or even a centralised server for collating outputs and signatures for trustless mixing, or having to connect to a second P2P network, a client (or a client add-on) could be designed that handles messages of a certain format/content.

A user would trasmit a message to the whole network of a certain form, containing only the output(s) of their intended mixed transaction, then other users wishing to participate in the mixing would add their outputs to the message and retransmit it, then when it had enough outputs (or a certain time limit had elapsed or whatever) it would (somehow) request all the participants to add their inputs, then would go round again asking for signatures. The exact mechanics of this are vague, I haven’t really thought about this one in detail, but this is not the idea I’m proposing, just an example.


The point is that rather than clients having to rely on external servers/p2p networks or else having to lobby the dev team for a major change to the protocol, a messaging layer would enable new functionalities to be developed independently. Rather than a centralised decision about what protocol extensions should go in, individual clients can offer different services (which obviously won’t be compatible with all users necessarily to begin with), and the popular ones will be implemented by all/most clients/wallets. The really popular ones can become “canon” and considered part of the core PPCoin protocol itself.

The use of PPCoin purely for decentralised messaging is pointless and would be underused, as there are plenty of dedicated services out there already providing this. But a messaging layer within the PPCoin protocol would be a major advancement.

I don’t think messaging should be implemented directly into the block-chain; not only would this bloat it, but it is pointless: there is no need to have a full public ledger of all (probably encrypted) messages that have ever been sent. Only the ones that haven’t been dealt with need to be available. There are of course other issues to consider with regards to messaging, such as how to prevent spam (tx fees seem like the most obvious answer, but will people be willing to pay even trivial fees just to sign a transaction?). Apologies I haven’t presented a full working concept, but I definitely think it’s something to be looked into.

[I appreciate the title of the thread is slightly different from what I have suggested.]

Just thought of another example.

  1. News and market data
    Exchangers could transmit signed and time-stamped market price information every so often, which clients could pick up and display to users. Nodes with two messages signed by the same exchanger with the same id but with different time-stamps would simply delete the older one in favour of the newer one, meaning such updates would not bloat the “message chain” or whatever.

Similarly, PPCoin/cryptocurrency news websites could broadcast news updates which expire after a certain time limit. Forums could even broadcast new posts which users could configure their client to look out for (e.g. threads started by certain users, new replies to certain threads). There are so many possibilities, this would be a really great feature.