This is an interesting idea and it’s great to see creative thinking around on-chain communication. That said, there are a few important technical and practical challenges that might make this approach less ideal in practice:
1. Asymmetry in Encryption/Decryption
Using a public key for encryption works well when sending private messages to someone, but not for mutual two-way communication. Each participant would need to share and use each other’s public keys, and manage encryption/decryption accordingly. This introduces complexity that’s not immediately obvious from the original concept.
2. On-Chain Data Visibility
Even though encrypted messages would be unreadable to third parties, the fact that they’re stored on-chain means the data (e.g. metadata, sender/receiver addresses, timestamps) is still publicly accessible. This could lead to unintended privacy leaks, even without decrypting the messages.
3. Cost and Efficiency
Storing any data on-chain, especially encrypted messages, comes with gas costs and can quickly become expensive. Over time, this could lead to significant inefficiencies and make the solution difficult to scale.
4. Security Considerations
Without additional layers like forward secrecy or ephemeral key exchange, messages encrypted with static public keys could be vulnerable if a private key is ever compromised. This is especially concerning for long-term or sensitive communications.
5. Existing Alternatives
There are off-chain protocols (such as Waku or Libp2p) designed specifically for secure, encrypted P2P messaging that can integrate with on-chain identity systems. These can offer a better balance of scalability, privacy, and user experience.
In summary, while the vision of on-chain encrypted communication is compelling, there are some architectural and cryptographic concerns that might limit its effectiveness. Exploring hybrid solutions—where identities and permissions live on-chain, but messaging happens off-chain—might strike a better balance between decentralization and practicality.