An interface for security notice using asymmetric encryption. The interface exposes a asymmetric encryption key and a destination of delivery.
Currently there is no consistent way to specify an official channel for security researchers to report security issues to smart contract maintainers.
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.
getSecurityContact method.type is a one byte data with valid range of [0x10, 0x7f]. The ranges of [0x00, 0x0f] and [0x80, 0xff] are reserved for future extension.
The type indicates the format of the publicKey and extraData in the following way
| Type | Encryption scheme | extraData |
|---|---|---|
| 0x10 | GnuPG - RSA/3072 | Email address(es) encoded in format of RFC 2822 |
A new version of this table can be proposed by future EIPs by specifying a new type number.
publicKey returned from getSecurityContact MUST follow the encryption scheme specified
in the table above.The following is an example of a publicKey using RSA/3072 generated via GnuPG in an RFC 20 ASCII-encoding of the public key string:
IF setSecurityContact is implemented and a call to it has succeeded in setting a new security contact, an event SecurityContactChanged MUST be emitted with the identical passed-in-parameters of setSecurityContact
It's also RECOMMENDED that an on-chain security notify method securityNotify
to implemented to receive security notice onchain. If it's implemented and a call
has succeeded, it MUST emit an OnSecurityNotification with identical pass-in-parameter data.
Compliant interfaces MUST implement EIP-165.
bountyPolicy method. The id = 0 is preserved for a full overview, while other digits are used for different individual bounty policies. The returned
string will be URI to content of bounty policies.
No particular format of bounty policy is specified.setSecurityContact, to set the security contact, because it might change due to circumstances such as the expiration of the cryptographic keys.securityNotify as payable, in order to allow implementers to set a staking amount to report a security vulnerability.bountyPolicy the extraData fields. Additional values of these fields may be added in future EIPs.Currently, existing solutions such as OpenZeppelin use plaintext in source code
It's recommend that new versions of smart contracts adopt this EIP in addition to the legacy @custom:security-contact approach.
Implementors should properly follow security practices required by the encryption scheme to ensure the security of the chosen communication channel. Some best practices are as follows:
Copyright and related rights waived via CC0.