Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article examines ERC-5437, which proposes a mechanism for defining security contacts and supporting encrypted security notifications for smart contracts.
This article translates, summarizes, and supplements the material linked below.
I have also covered other EIPs.
Overview
ERC-5437 proposes a security notification interface based on asymmetric cryptography.
A smart contract exposes a public encryption key and a destination for security notifications, such as an email address or a web form URL, through its interface.
Security researchers can use the public key to encrypt sensitive information and report vulnerability details confidentially.
The recipient, typically the contract administrator or development team, receives and decrypts the information and responds to the report.
Motivation
There is no standardized official contact mechanism for reporting security issues to smart contract administrators.
Researchers who discover vulnerabilities may therefore be unsure where or how to report them, increasing the risk of delayed responses or information disclosure.
By implementing the interface proposed in ERC-5437, developers can provide a dedicated channel for confidential security reports, and researchers can use it to submit encrypted information.
The goal is to establish a more secure and reliable vulnerability reporting process for Ethereum and other EVM-based smart contract environments.
Specification
IEIP5437
interface IEIP5437 {
/// REQUIRED
function getSecurityContact(uint8 type, bytes memory data) public view
returns (
uint8 type,
bytes memory publicKey,
bytes memory extraData
);
/// OPTIONAL
// TODO consider remove if not needed before finalized
function setSecurityContact(
uint8 type,
bytes memory publicKey,
bytes memory extraData) public;
event SecurityContactChanged(uint8 type, bytes memory publicKeyForEncryption, bytes memory extraData);
/// OPTIONAL
function securityNotify(uint8 type, bytes memory data) public payable;
/// OPTIONAL
event OnSecurityNotification(uint8 type, bytes memory sourceData, uint256 value);
/// OPTIONAL
// TODO consider to make it a separate EIP
function bountyPolicy(uint256 id) public view returns(string, bytes memory extraData);
}Events
SecurityContactChanged- Emitted when
setSecurityContactsucceeds.
- Emitted when
OnSecurityNotification- Emitted when
securityNotifysucceeds.
- Emitted when
Functions
getSecurityContact
Retrieves security contact information.
function getSecurityContact(uint8 type, bytes memory data)
public view
returns (
uint8 type,
bytes memory publicKey,
bytes memory extraData
);type- Specifies the contact information format. Values in the range
[0x10, 0x7f]are valid.
- Specifies the contact information format. Values in the range
publicKey- The public key for the specified encryption scheme.
extraData- Additional information, such as an email address.
For example, type = 0x10 denotes a GnuPG RSA/3072 key together with an RFC2822-formatted email address.
setSecurityContact
function setSecurityContact(
uint8 type,
bytes memory publicKey,
bytes memory extraData
) public;Sets or updates the security contact information. A successful update emits the SecurityContactChanged event.
securityNotify
function securityNotify(uint8 type, bytes memory data) public payable;Submits an on-chain security notification to the contract. A successful call emits the OnSecurityNotification event.
bountyPolicy
function bountyPolicy(uint256 id) public view returns (string, bytes memory extraData);Retrieves information about the bounty policy for security vulnerability reports.
id = 0- An overview of the overall bounty program.
- Other numerical IDs
- Individual policies, such as reporting scope and conditions.
The return value is a URI string pointing to bounty information in a format chosen by the implementer.
Requirements
getSecurityContactmust be implemented.- ERC-165, the interface detection standard, must be supported.
- Values of
typemust be in the range[0x10, 0x7f]; other values are reserved for future extensions. - The
publicKeyformat must comply with the specified encryption scheme. - Implementations of
setSecurityContactorsecurityNotifymust emit their corresponding events.
Public Key Example
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBGLzM2YBDADnCxAW/A0idvKNeQ6s/iYUeIIE+2mWmHcBGqLi0zrfz7pKWI+D
m6Hek51sg2c7ZlswPEp8KqANrj/CV1stXHF+KAZtYeFiAqpIZl1wtB6QgKYWGsJf
sXjBU3duLzLut2yvTfbEZsWAvrEaDjlXywdpboorHvfTE2vOvI6iGcjdh7PW7W7g
IGzlL6ukLGG7y9FUO2dSMjCR/tWMLCupnDDLN2cUHnfEnHZ34FMd61NxcHLC7cIk
P8xkFt8GCxURniTjqI5HAB8bGfR34kflVpr2+iKD5e+vQxcWK7vB443nruVf8osn
udDF8Z6mgl7bKBbGyYH58QsVlmZ8g3E4YaMKjpwOzEK3V2R8Yh4ETdr670ZCRrIz
QWVkibGgmQ3J/9RYps5Hfqpj4wV60Bsh1xUIJEIAs3ubMt7Z5JYFeze7VlXGlwot
P+SnAfKzlZT4CDEl2LEEDrbpnpOEdp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/F
HB6J4JNOTzBZ0/1FVvUOcMkjuZ2dX81qoCZ8NP6eafzKvNYZrGa5NJnjWO1ag5jQ
D8qHuOwxs8Fy9evmkwAVl51evLFNT532I4LK0zHSbF8MccZjpEFMSKwalKJn02Ml
yTd+ljYLf8SKMOLVps8kc4VyMR1lz0PwSpKDFOmkC1LRURpM7UTtCK+/RFg1OLyQ
SKBmdI37KQARAQABiQG8BBgBCAAmFiEEw5P/Y80WfpVNnGPK0lSTW7ndZa0FAmLz
M2YCGwwFCRLMAwAACgkQ0lSTW7ndZa2oFgv8DAxHtRZchTvjxtdLhQEUSHt80JCQ
zgHd7OUI9EU3K+oDj9AKtKZF1fqMlQoOskgBsLy/xpWwyhatv2ONLtHSjYDkZ7qs
jsXshqpuvJ3X00Yn9PXG1Z1jKl7rzy2/0DnQ8aFP+gktfu2Oat4uIu4YSqRsVW/Z
sbdTsW3T4E6Uf0qUKDf49mK3Y2nhTwY0YZqJnuQkSuUvpuM5a/4zSoaIRz+vSNjX
MoXUIK/f8UnWABPm90OCptTMTzXCC1UXEHTNm6iBJThFiq3GeLZH+GnIola5KLO1
+YbsFEchLfLZ27pWGfIbyppvsuQmrHef+J3g6sXybOWDHVYr3Za1fzxQVIbwoIEe
ndKG0bu7ZAi2b/c8uH/wHT5IvtfzHLeSTjDqG8UyLTnaDxHQZIE9JIzWSQ1DSoNC
YrU7CQtL+/HRpiGFHfClaXln8VWkjnUvp+Fg1ZPtE1t/SKddZ7m29Hd9nzUc0OQW
MOA+HDqgA3a9kWbQKSloORq4unft1eu/FCra
=O6Bf
-----END PGP PUBLIC KEY BLOCK-----The example illustrates a 3072-bit RSA public key in PGP ASCII Armor format, generated using GnuPG for use with email notifications.
The Japanese source associates this format with RFC 20. That reference should be reviewed separately: RFC 20 describes ASCII rather than the OpenPGP ASCII Armor specification.
This interface allows a smart contract to advertise an official, cryptographically protected channel for receiving security reports.
Additional Notes
ERC-5437 adopts a straightforward GPG (GNU Privacy Guard) based encryption scheme and an email address for security contact information. The objective is to keep implementation and operation simple.
Future EIPs may introduce new encryption schemes or notification mechanisms, so the design allows for extensions.
Several auxiliary features are included for the following reasons.
setSecurityContactenables updates to security contact information when encryption keys expire or operational requirements change.- Making
securityNotifypayableallows implementations to support staking or deposits in connection with vulnerability reports.- For example, a deposit could be used to demonstrate the seriousness of a report.
bountyPolicyandextraDataallow flexible extensions to reward policies and notification mechanisms.
Compatibility
Existing approaches, including those used by OpenZeppelin, specify security contact information in plaintext in source code, as shown below.
/// @custom:security-contact some-user@some-domain.comERC-5437 proposes an encrypted security reporting channel in addition to existing plaintext contact mechanisms.
The proposal recommends using the new interface alongside existing approaches.
Security
Implementations of ERC-5437 should follow cryptographic communication best practices.
- Keep security contact information up to date.
- Rotate encryption keys regularly within recommended lifetimes.
- Monitor reporting channels, such as email inboxes, to receive and respond to notifications promptly.
Without appropriate operational practices, the security reporting mechanism may become ineffective, delaying the discovery and remediation of vulnerabilities.
Security therefore depends not only on the implementation but also on its ongoing operation and maintenance.
Citation
Zainan Zhou (@xinbenlv), "ERC-5437: Security Contact Interface [DRAFT]," Ethereum Improvement Proposals, no. 5437, August 2022. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-5437.
Conclusion
ERC-5437 proposes a standard interface for publishing security contact information and supporting encrypted vulnerability reports.
If you have questions, feel free to contact me on Twitter.
I also publish articles on the following platforms.



