I’m proposing a minimal, non-financial standard for encrypted peer-to-peer communication using smart contracts on EVM chains.
The draft ERC defines a stateless protocol that transmits encrypted messages via a single emitted event. It specifies structured message types to support ECDH key exchange and AES-GCM encryption, but does not enforce these cryptographic operations in the contract itself. Instead, all key derivation, encryption, decryption, and semantic enforcement occur off-chain in compliant clients. The contract emits one event with four parameters: from
, to
, messageType
, and data
.
The goal is to define a foundational primitive, not a full messaging protocol. This allows applications to build on top with their own onboarding, spam controls, identity layers, or encryption preferences, while maintaining interoperability through the shared event format.
You can find the draft here:
A working prototype of a decentralized messaging application has informed the development of this standard. The app uses a similar model, with encrypted messaging over EVM blockchains transmitted through emitted events. It currently separates the user-connection process and encrypted messaging into different contracts, but a major refactor is underway to incorporate the proposed standard as the unified messaging layer. This real-world usage has helped identify the core requirements for the standard. The app is functional on macOS but not yet production-ready.
The contracts currently used for connection setup and encrypted messaging in the prototype are available here:
More about the prototype:
Related EIPs
This proposal is intentionally minimal and stateless, in the spirit of ERC-3722: Poster, which emits plaintext posts for decentralized social media. While Poster focuses on public broadcast-style messaging, this proposed standard defines a private, encrypted peer-to-peer communication model.
The two differ not just in use case but in security assumptions: posting plaintext messages to an immutable, public blockchain poses long-term risks, especially if illegal or harmful content becomes permanently associated with a project or platform. This standard is specifically intended for encrypted communication between two addresses - not plaintext public posts.
This proposal also contrasts with ERC-7627: Secure Messaging Protocol, which defines a comprehensive messaging interface, including on-chain key management, encryption algorithm enumeration, and session identifiers.
By contrast, this standard is intended to facilitate basic encrypted communication between two addresses within a wide range of app environments, while offering the flexibility to incorporate other features through app-specific use of the messageType parameter. It also aims to minimize gas costs.
Feedback Welcome
I’d appreciate any comments, especially around:
- Event design
- MessageType conventions
- Edge cases around off-chain enforcement or misuse
- Security concerns
This ERC is intended as a foundation for further work. I’m currently preparing a follow-up ERC that defines a Non-Economic Token standard for per-connection blockchain channel blocking (replacing the prototype’s current ERC-20 token approach).
Thanks in advance for your input.
Scott