Wallet ownership verification is often described as “sign in with a wallet.” That shorthand hides an important boundary: a valid signature can demonstrate control of a private key for a specific message at a particular verification time. It does not prove a person's legal identity, control of an exchange account, authority to spend funds, a transaction outcome, or the safety of the site that requested it.
This article explains a safer pattern for using EIP-191-style message signatures in an application login or ownership-verification flow.
What EIP-191 is for
ERC-191 defines a family of signed-data formats beginning with 0x19, followed by a version byte and version-specific data. The prefix is designed so the signed data is not a valid RLP-encoded Ethereum transaction. That distinction helps keep a message-verification flow separate from a transaction-signing flow.
The commonly used personal_sign form corresponds to version 0x45 (E) and signs a message with the familiar Ethereum signed-message prefix. Libraries such as ethers expose message signing and address recovery helpers, but the application still has to define a safe message and a safe verification policy.
A signature is evidence of key control, not identity
After a verifier reconstructs the exact message, hashes it with the expected EIP-191 format, and recovers the expected address, the narrow conclusion is:
At the time of signing, the signer controlled the private key corresponding to the recovered address and approved this exact message.
That is useful for binding a session to a wallet address. It does not establish who controls the address in the real world. It also does not prove that an address has a particular balance, that a transaction was broadcast, or that a user should be authorised for every action in an application.
Design the message so the user can inspect it
Use clear text that names the relying application and the narrow purpose. Include at least:
- domain or application origin;
- statement of purpose, such as “Sign in” or “Verify wallet ownership”;
- generated nonce;
- issuance time and expiry;
- chain identifier where the application needs one;
- a human-readable warning that this is not a transaction or payment approval.
Example message:
Example App requests proof of wallet control.
Purpose: sign in
Address: 0xabc...def
Nonce: 9d883e7c-...
Issued at: 2026-11-26T12:00:00Z
Expires at: 2026-11-26T12:05:00Z
Chain ID: 1
This is not a transaction or permission to move funds.
Avoid opaque hashes and unexplained blobs when a readable message will work. A person cannot meaningfully inspect a claim they cannot read.
A minimal server-side verification sequence
- Generate a cryptographically random nonce on the server and store it with the intended address, purpose, origin, expiry and a
used=falsestate. - Build the canonical message on the server. Do not trust a message string supplied by a browser as the source of truth.
- Ask the wallet to sign that exact message.
- On the server, recover the signer using the expected EIP-191 variant and compare addresses after normalisation.
- Reject expired, unknown, already-used, wrong-origin, wrong-purpose or wrong-chain challenges.
- Mark the nonce used atomically before creating the authenticated session.
- Record a privacy-minimised security audit event; do not log private keys, recovery phrases or raw sensitive session material.
The critical property is one-time use. Without it, a captured signature may be replayed for the same purpose. The server must decide when a challenge was issued, what it means and whether it has already been consumed.
Common mistakes
Treating a signature as a transaction approval
A signed message and a blockchain transaction use different formats and consequences. A product should label the requested action accurately and never tell users that a message signature will “confirm” a transfer, token approval or recovery action.
Reusing generic messages
“I own this wallet” has no domain, purpose or expiry. It can be difficult to audit and easy to reuse. Bind the message to one application action and make it short-lived.
Accepting client-built challenges
If a client chooses the nonce, time or purpose, it can weaken replay protection and make audit trails unreliable. The server should generate and persist the challenge before a signature is requested.
Ignoring phishing and origin checks
Signature verification does not make a website trustworthy. Users should check the domain, wallet prompt and requested purpose. Applications should use HTTPS, clear branding and a narrow, readable message. Never ask for a recovery phrase or private key.
Confusing ownership proof with authorisation
Wallet control can be one authentication factor. Sensitive actions may need additional policy checks, confirmation steps, rate limits and context-specific authorisation. Key control is not a universal permission slip.
When EIP-712 may be a better fit
EIP-191 includes a version for structured data, while EIP-712 standardises typed, domain-separated messages. For complex structured claims, typed data can make the intended fields more explicit. The same fundamentals still apply: domain separation, nonce, expiry, replay prevention, exact server-side reconstruction and a careful distinction between proof and permission.
Closing checklist
- Is the requested message human-readable and correctly labelled?
- Does it name the relying app, purpose, nonce and expiry?
- Does the server own challenge creation and one-time consumption?
- Does the verifier recover the expected address using the expected format?
- Does the product avoid treating a signature as identity proof, payment approval or a transaction?
- Are recovery phrases and private keys never requested?
Good ownership verification is intentionally modest. It gives an application limited evidence of key control for one well-defined action. Keeping that boundary visible is part of the security design.