Sign-In with Ethereum Wallet Research - EIP-191 vs EIP-712

As part of our research for Sign-In with Ethereum, we needed to compare signing methods to decide which would be best to leverage for the specification.

Sign-In with Ethereum Wallet Research - EIP-191 vs EIP-712

As part of our research for Sign-In with Ethereum, we needed to compare signing methods to decide which would be best to leverage for the specification. This included considering factors such as ease of integration with large applications (and studying existing trends), how it's presented to end-users, and if the signing method has existing wallet support. The two major methods for signing data in use in the Ethereum ecosystem for users are EIP-191, and EIP-712.

EIP-191 is a specification about how to handle signed data in Ethereum contract, and it produces human-readable messages. It is simple to implement by prefixing a custom message with an invariable prefix prior to presenting it to wallet users for interactive signing.

EIP-712 is a standard for the hashing and signing of typed structured data as opposed to just bytestrings. EIP-712's reason d'etre is the need to sign more complex messages in order to have safer and deeper interactions with decentralized applications.

For a deeper exploration of both EIPs, check out our post reviewing all of the EIPs that helped shape Sign-In with Ethereum.

For the first version of Sign-In with Ethereum we decided to move forward with EIP-191 due to its user-friendliness, wide support in large applications, and existing support in wallets. The following is a breakdown of wallet tests, screenshots, and current capabilities between the two signing methods:

MetaMask

  • Supports both the signing and display of EIP-191 Personal Sign messages.

Example:

  • Supports both the signing and display of EIP-712 signatures, up to signTypedData_v4.

Example:

Trust Wallet

  • Supports both the signing and display of EIP-191 Personal Sign messages.

Example:

  • Supports both the signing and display of EIP-712 signatures, at least up to signTypedData_v3.

Example:

Argent

  • Supports the signing of EIP-191 Personal Sign messages.

Example:

  • Supports both the signing and display of EIP-712 signatures.

Example:

Coinbase Wallet

  • Supports both the signing and display of EIP-191 Personal Sign messages.

Example:

  • Supports both the signing and display of EIP-712 signatures.

Example:

Rainbow Wallet

  • Supports both the signing and display of EIP-191 Personal Sign messages.

Example:

  • Supports both the signing and display of EIP-712 signatures.

Example:

Fortmatic

  • Supports the signing of EIP-191 Personal Sign messages.

Example:

  • Supports both the signing and light display of EIP-712, up to signTypedData_v4.

Example:

Portis

  • Supports both the signing and display of EIP-191 Personal Sign messages.

Example:

  • Supports both the signing and display of EIP-712 signatures.

Example:

Torus

  • Supports both the signing and display of EIP-191 Personal Sign messages.

Example:

  • Supports both the signing and display of EIP-712 signatures.

Example:

Ledger Live

  • Supports both the signing and display of EIP-191 Personal Sign messages.

Example:

  • Supports both the signing and display of EIP-712 signatures.

Starting With EIP-191 Over EIP-712 for SIWE

A number of factors affected our decision in using EIP-191 over EIP-712 in the first version of Sign-In with Ethereum. We would like to also give special thanks to Oliver Terbu and Rouven Heck who led the discussion on EIP-712 and EIP-191 signing schemes during our community calls, including the benefits of structured data types and potential for extensions when using EIP-712.

Some of the reasons for the choice include the following:

  • EIP-191 is already broadly supported across wallet UX, while EIP-712 support for friendly user display is pending and on a per-wallet basis to create a better signing interface. EIP-712 creates signing outputs for machine consumption, with most wallets not displaying the payload to be signed in a manner friendly to humans.
  • EIP-191 is simple to implement using a pre-set prefix prior to signing, while EIP-712 is more complex to implement requiring the further implementations of a bespoke Solidity-inspired type system, RLP-based encoding format, and custom keccak-based hashing scheme.
  • EIP-712 has the advantage of on-chain representation and on-chain verifiability, such as for their use in metatransactions, but this feature is not relevant for the Sign-In with Ethereum's scope.

Additionally, we would also like to thank Hadrien Croubois who suggested adding the version indicator to allow forwards-compatibility, so a future version of Sign-In with Ethereum can be built around EIP-712-based signing.


Are we missing information on a wallet or capabilities with signing? Let us know and we'll update the list!

As we continue our work on Sign-in with Ethereum, we especially welcome implementers who already have users relying on similar workflows, authors of related EIPs, and wallet vendors who would like to do more to support user-owned identities to join the discussion. If you are interested in being involved, please join our Discord server: