It could be done but prob needs multi-hop aliases and centralization. Encryption methods are flexible. This would probably end up not having much to do with Bitcoin or Blockchains beyond touching them to check for alias routing data if exists.
I’ve been wanting to utilize CP Assets as IDs and have begun playing around a little. It’s a good use of Asset names and GUIs should consider this (as you have). So send me XCP at SULL.XCP
If you look at coinspark.org, you will see their approach to adding messages to transactions. It is not pure Bitcoin and there is a reason for that.
From what I understand from that article, Bitcoin’s cryptography will work well. However, to send an encrypted message to an address, you need its public key. Public keys are known only for addresses that have been sent from (?). This is a minor issues since whoever you’d like to contact normally will have sent outgoing transactions.
If someone has made a Bitcoin JS implementation for encrypting/decrypting messages, it should be trivial to implement a basic solution for CounterTools. After you’ve written a message it will be encrypted locally, then sent to xcp.pw’s server. When the recipient open his CounterTools wallet, he will receive the encrypted message which then is decrypted locally.
A more rubust solution would be great but for now I’ll try this, granted I find the necessary functions for the cryptology
Regarding alias - in CounterTools the user enters an asset name. Then, in the GUI, the user sees the asset owner’s address (so he can confirm himself that the address is correct). Everything under the hood works with the address, so coding-wise it’s easy to implement.