EIP-7749 Adding an intended-validator signing method (Add wallet_signIntendedValidatorData method)
No call decision · Security & privacy · EIP status Draft · created 2024-06-21
Adds a new JSON-RPC method, wallet_signIntendedValidatorData, to wallets. It lets wallets natively support the ERC-191 0x00 version, which signs a message that includes the address of the contract or account that will verify the signature.
Why it is needed
Dapps today mainly use two methods to sign messages. One is ERC-191 version 0x45 (eth_sign), which is widely used but carries a high phishing risk because the wallet signs the data as is without interpreting it. The other is EIP-712 (eth_signTypedData), which displays structured data but is considered complex to implement. ERC-191 has three versions (0x45, 0x01, 0x00); of these, the 0x00 version, which includes the address that will verify the signature in the message, has no dedicated call method, so it had to rely on raw signing, which is risky and restricted by some wallets. As smart contract accounts and signature-based UX have grown more common, signing with a designated validator contract such as an entry point or key manager has become more frequent, and this proposal fills that gap with a dedicated RPC method.
What changes
Today
- Message signing mainly relies on ERC-191 version 0x45 (eth_sign) and EIP-712.
- Version 0x45 carries a high phishing risk because the wallet does not interpret the data.
- Using version 0x00 requires a raw signing method that is risky and restricted by some wallets.
After EIP-7749
- Wallets natively support ERC-191 0x00 signatures through the wallet_signIntendedValidatorData method.
- The address that will verify the signature is included in the message and shown to the user, reducing phishing risk.
- This creates a middle-ground option that is simpler than EIP-712 and safer than 0x45.
- Smart contract accounts can sign by designating a specific validator address.
Who is affected
- Users: The signing request screen can show the address that will verify this signature, reducing the risk of phishing through signature reuse in an unintended context.
- Wallet developers: Wallets must implement the new RPC method and add the ERC-191 0x00 flow and display screen that hashes the prefixed message before signing.
- Dapp developers: Since version 0x00 signatures can be requested without raw signing, signing flows that use validator contracts can be made safer.
- Smart contract account ecosystem: A standard path is created for specifying validator contracts, such as entry points or key managers, in signatures.
In depth
ERC-191 0x00 format and signature computation
This method MUST construct the message in the format 0x19 <0x00> <intended validator address> <data to sign> and compute the Ethereum signature as sign(keccak256("\x19\x00<intended validator address><data to sign>")). The 0x19 prefix is the common ERC-191 device that prevents signed data from being interpreted as a valid transaction; the following 0x00 is the version byte, and the next 20 bytes are the validator address. The source text explains that this prefix structure is meant to prevent a malicious dapp from getting arbitrary data (such as a transaction) signed and then using that signature to impersonate the victim.
Parameters and return value
There are three parameters. signerAddress is the 20-byte account address signing the message, validatorAddress is the 20-byte address of the intended validator included in the message to be signed, and dataToSign is the data string to be signed. The return value is a single generated Ethereum signature (Signature). The request follows the standard JSON-RPC format, with the three values placed in order in the params array.
A middle ground between 0x45 and EIP-712
The source Rationale states that this method is meant to bridge the gap between the simplicity of ERC-191 version 0x45 and the structured approach of EIP-712. Specifying the validator address reduces the phishing risk of signature reuse for other purposes and provides a safer signing method for use cases such as smart contract accounts that require a specific validator address. The Motivation section explains that as more smart contract accounts rely on signatures to improve UX and validator contracts such as entry points and key managers become common, the need to support the 0x00 version has grown.
Example test case
In the source example, the signer address is 0x6aFbBC5e6AFcB251371711a6551E60ead2779Dc0, the validator address is 0x345B918b9E06fAa7B0e56bd71Ba418F31F47FED4, and the data to sign is 0x59616d656e. The data is the hex encoding of the ASCII string "Yamen". The validator address can be either an EOA or a smart contract, and including this address in the signed data prevents a malicious actor from reusing the signature for an unintended purpose. The result field of the response contains the signature generated according to ERC-191 version 0.
Security considerations: preventing reuse attacks
Users should double-check the validator address before signing and verify that they trust the dapp requesting the signature. The source also notes that this format itself provides no chain separation or one-time guarantee, so it recommends including a chainId and a nonce in the validator data to be signed in order to prevent replay attacks and cross-chain replay attacks. No backward compatibility issues have been identified.
Current status: Draft
This EIP is in the Interface category of the Standards Track and its status is Draft. Since it is still at the draft stage, details such as the method name and parameter structure may change. No decision related to this proposal has been recorded at core developer calls.