Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

EIP-4361 (Sign-In with Ethereum)

EIP-4361 is an Ethereum Improvement Proposal that standardizes a method for users to authenticate to web services by signing a structured message with their Ethereum wallet, enabling passwordless, decentralized sign-in.
Chainscore © 2026
definition
STANDARD

What is EIP-4361 (Sign-In with Ethereum)?

EIP-4361, commonly known as Sign-In with Ethereum (SIWE), is an open standard that defines a secure, self-sovereign method for users to authenticate into web applications using their Ethereum account and a cryptographic signature, without relying on centralized intermediaries.

Sign-In with Ethereum (SIWE) is an authentication protocol that allows a user to prove control of an Ethereum account by signing a structured, human-readable message. This signed message, which includes details like the domain name of the service, a statement of intent, and a nonce, serves as a credential. Unlike traditional OAuth flows, SIWE does not require a third-party identity provider, giving users direct control over their digital identity and login process. The standard is formally specified in Ethereum Improvement Proposal 4361.

The core mechanism involves a SIWE message formatted according to a strict schema. A typical message template includes fields for the service's domain, the user's Ethereum address, a statement like "I accept the Terms of Service," a URI for the requested resource, a version number, a chain ID, a nonce to prevent replay attacks, and an issuance timestamp. The user signs this message with their private key, and the verifying service can cryptographically confirm the signature matches the claimed address, thereby authenticating the session.

This approach provides significant advantages over password-based or social login systems. It enhances user sovereignty by eliminating dependency on centralized platforms like Google or Facebook. It improves security by removing phishing risks associated with passwords and central data breaches. Furthermore, it creates a portable identity layer where a user's Ethereum account can become a universal login across compatible decentralized applications (dApps) and services, fostering interoperability within the Web3 ecosystem.

For developers, implementing SIWE typically involves integrating a client-side library (like those from Spruce ID) to generate and sign the message, and a server-side component to verify the signature's validity. The standard's structured data format ensures consistency and safety across implementations. A critical best practice is for services to validate the message's domain field against their own to prevent signature misuse, a process known as domain binding.

The adoption of EIP-4361 extends beyond simple login. It establishes a foundational primitive for decentralized identity, enabling composable building blocks for token-gated access, verifiable credentials, and signing agreements. By providing a standardized way to authenticate and make statements with a crypto wallet, SIWE is a key infrastructure component bridging Web2 applications and the decentralized Web3 world, paving the way for more user-centric internet experiences.

etymology
ETYMOLOGY AND ORIGIN

EIP-4361 (Sign-In with Ethereum)

This section details the historical development and standardization of the Sign-In with Ethereum (SIWE) protocol.

EIP-4361, known as Sign-In with Ethereum (SIWE), is a technical standard formalized through the Ethereum Improvement Proposal (EIP) process. Its development was spearheaded by a consortium of developers and organizations, including Spruce Systems, to address the lack of a secure, self-sovereign alternative to centralized web2 login systems like "Sign in with Google." The proposal entered Draft status in October 2021 and was finalized as a standard in March 2022, providing a canonical method for users to authenticate using an Ethereum account and a cryptographically signed message.

The core innovation of EIP-4361 is its definition of a structured message format for authentication. This format specifies required fields such as the domain name of the service requesting the sign-in, the user's Ethereum address, a statement of intent, a nonce for replay protection, and an expiration time. By standardizing this format, it ensures interoperability across different applications and wallets. The user signs this message with their private key, proving control of the address without needing a centralized intermediary, thus enabling decentralized identity and user sovereignty.

The adoption of SIWE represents a significant shift towards portable digital identity on the internet. Unlike traditional OAuth flows, a SIWE signature is a verifiable credential that is not bound to a specific service provider. This allows users to carry their reputation and identity across different dApps and websites seamlessly. The standard has been widely integrated by wallet providers and is a foundational component for broader decentralized identity stacks, such as those built on Verifiable Credentials (VCs) and the Decentralized Identifiers (DIDs) framework, paving the way for a more user-centric web.

key-features
EIP-4361 (SIGN-IN WITH ETHEREUM)

Key Features and Principles

EIP-4361, known as Sign-In with Ethereum (SIWE), is an open standard that defines a secure, self-sovereign authentication method using Ethereum accounts and digital signatures, replacing centralized identity providers.

01

Message Format & Structure

The core of SIWE is a standardized, human-readable sign-in message that a user signs with their private key. This message includes essential fields like:

  • Domain: The website requesting the signature.
  • Address: The user's Ethereum address.
  • Statement: A plain-text declaration of intent (e.g., 'I accept the Terms of Service').
  • Nonce: A random value to prevent replay attacks.
  • Expiration: A timestamp for message validity. This structured format prevents phishing and ensures the user knows exactly what they are signing.
02

Authentication Flow

The authentication process follows a specific sequence:

  1. Challenge: The service (relying party) presents the user with a formatted SIWE message.
  2. Signing: The user's wallet (e.g., MetaMask) displays the message for review and prompts for a signature using their private key.
  3. Verification: The service verifies the cryptographic signature against the user's public address and validates all message fields (domain, nonce, expiration).
  4. Session Establishment: Upon successful verification, the service creates an authenticated session for the user. This flow eliminates the need for passwords or third-party OAuth providers.
03

Security & Anti-Phishing

SIWE incorporates multiple security mechanisms to protect users:

  • Domain Binding: The message is cryptographically bound to the service's domain, preventing a malicious site from using a signature intended for a legitimate one.
  • Human-Readable Messages: Users can visually verify the exact statement, URI, and expiration before signing.
  • Nonce Management: Servers track used nonces to block signature replay attacks.
  • No Secret Storage: Authentication relies on a signature, not a shared secret (like a password) that can be leaked from a server database.
04

Self-Sovereign Identity

SIWE enables self-sovereign identity (SSI), where users control their digital identity without relying on centralized authorities. Key principles include:

  • Portability: The same Ethereum identity can be used across any compatible service.
  • Censorship Resistance: No central provider can revoke or deny access to the identity.
  • Minimal Disclosure: Users can choose to reveal only their public address or can link to verifiable credentials (like NFTs or attestations) to share specific attributes without exposing personal data.
05

Integration with Existing Stack

SIWE is designed to integrate seamlessly with common web development and blockchain tools:

  • Wallet Integration: Supported natively by major wallets like MetaMask, Rainbow, and Coinbase Wallet.
  • Backend Libraries: Official libraries exist for Node.js, Python, Go, and other languages to handle message generation and verification.
  • Session Management: Works with standard web session tokens (JWT, cookies) after signature verification.
  • ERC-1271 Support: Can verify signatures from Smart Contract Wallets, allowing contracts to sign in on behalf of users.
06

Use Cases Beyond Simple Login

While primarily for authentication, the SIWE standard enables more advanced applications:

  • Terms of Service Acceptance: The signed statement can serve as a legal record of consent.
  • Delegated Authority: A signature can authorize a specific action (like a transaction) without giving full wallet access.
  • Cross-Service Reputation: A user's on-chain history and credentials become part of a portable reputation system.
  • Gated Content/DAO Access: Authentication can be combined with token/NFT ownership checks for permissioning.
how-it-works
EIP-4361

How Sign-In with Ethereum Works

A technical overview of the EIP-4361 standard, which defines a secure, self-custodied authentication protocol using Ethereum accounts and signatures.

Sign-In with Ethereum (SIWE) is an open authentication standard, formalized as EIP-4361, that allows users to authenticate to web services by signing a structured message with their Ethereum wallet, such as MetaMask or a hardware wallet, instead of using a traditional username and password. This process, often called wallet-based authentication or crypto-native sign-in, proves control of a specific blockchain account (0x... address) without requiring the user to surrender custody of their assets or private keys. The core innovation is the use of a cryptographically verifiable signature over a human-readable message that specifies the service, resources, and session details.

The authentication flow begins when a website or application (the relying party) presents the user with a SIWE message. This message is a plain-text string following a strict format defined by EIP-4361, containing essential fields like the domain of the requesting service, the user's Ethereum address, a statement of intent (e.g., 'Sign in to example.com'), a nonce to prevent replay attacks, and an expiration timestamp. The user reviews this message in their wallet, confirms its legitimacy, and then cryptographically signs it. The resulting signature, along with the original message, is sent back to the service for verification.

Verification on the server side involves several critical checks. The service must validate that the message's domain matches its own, that the nonce is unique and valid, and that the timestamp has not expired. It then uses the Elliptic Curve Digital Signature Algorithm (ECDSA) to cryptographically verify that the provided signature was indeed generated by the private key corresponding to the Ethereum address stated in the message. Successful verification proves the user controls that address, granting them access. This mechanism provides strong security guarantees, as the private key never leaves the user's wallet, eliminating phishing risks associated with password entry and central credential databases.

Beyond simple login, SIWE enables powerful decentralized identity patterns. Because the authentication is tied to a public blockchain address, it can serve as a foundational identifier for a user across different services without a central issuer. Developers can leverage this to build systems where a user's on-chain reputation, assets (like NFTs), or verifiable credentials are intrinsically linked to their authenticated session. This facilitates use cases like token-gated content, decentralized social graphs, and seamless integration with smart contracts and decentralized applications (dApps) that require proven identity.

For implementation, developers typically use libraries like the official SIWE library or integrate support through authentication providers. The standard is designed to be agnostic to any specific blockchain, though it originated with Ethereum. Its adoption represents a shift towards user-centric, self-sovereign identity on the web, reducing reliance on intermediaries like Google or Facebook for authentication while providing users with greater privacy and control over their digital identities.

message-structure
EIP-4361 SPECIFICATION

The SIWE Message Structure

The Sign-In with Ethereum (SIWE) message structure is a standardized, human-readable format defined by EIP-4361, enabling secure authentication by having users sign a structured statement with their Ethereum wallet.

The core of SIWE is a plain-text message adhering to a strict Augmented Backus–Naur Form (ABNF) grammar. This structure ensures interoperability across different implementations. A complete message includes mandatory fields like domain, address, statement, uri, version, chain-id, nonce, issued-at, and optional fields such as expiration-time, not-before, request-id, and resources. Each field serves a specific security or informational purpose, preventing replay attacks and phishing by binding the signature to a specific context.

Key Fields and Their Purpose

The domain is the service's domain name requesting the signature. The address is the Ethereum address that must sign the message. The statement is a human-readable text displayed to the user. Crucially, the uri (the service's origin URL), version (EIP-4361 version), chain-id, and a server-provided nonce cryptographically tie the signature to a single login attempt for a specific network. Timestamps (issued-at, expiration-time) control the message's validity window.

Here is a canonical example of a SIWE message:

example.com wants you to sign in with your Ethereum account:\n0x1234...abcd\n\nI accept the ExampleOrg Terms of Service: https://example.com/tos\n\nURI: https://example.com/login\nVersion: 1\nChain ID: 1\nNonce: k82jFh7982j\nIssued At: 2023-01-01T00:00:00.000Z

The user's wallet presents this formatted text for review before signing. The resulting EIP-191 signature proves control of the address and explicit consent to the statement within the specified constraints.

The structured format is fundamentally different from signing arbitrary data or a hash. By standardizing the fields and their order, SIWE allows wallets to parse and validate the message components, potentially providing enhanced security UX by highlighting the domain and warning of mismatches. This machine-readable structure also enables services to easily extract and verify all binding parameters after receiving the signature, ensuring the login context is exactly as intended.

ecosystem-usage
EIP-4361

Ecosystem Adoption and Use Cases

EIP-4361, commonly known as Sign-In with Ethereum (SIWE), is an open standard for secure, self-sovereign authentication using Ethereum accounts. It enables users to sign in to web services by cryptographically proving control of a wallet, replacing traditional username/password or centralized OAuth systems.

01

Core Authentication Mechanism

SIWE uses a structured sign-in message that users sign with their private key. This message includes critical security parameters like the domain name, a statement of intent, a nonce, and an expiration time. The resulting Ethereum Signed Message signature is verified on the backend, proving the user controls the address without needing passwords or third-party providers.

02

User Benefits & Self-Sovereignty

The protocol shifts control to the user by eliminating reliance on centralized identity providers. Key benefits include:

  • No Password Management: Authentication is tied to the user's cryptographic keys.
  • Reduced Phishing Risk: The signed message is explicitly scoped to a specific domain.
  • Portable Identity: The same Ethereum address can be used across any SIWE-compatible service, creating a unified, user-controlled identity layer.
03

Developer Integration & Wallets

Integrating SIWE requires backend verification libraries (e.g., siwe for various languages) and frontend wallet interaction. Major wallets like MetaMask, Rainbow, and Coinbase Wallet support the standard, often providing a streamlined UX for signing SIWE messages. The process typically involves generating a nonce, presenting a message to sign via eth_signTypedData_v4, and validating the signature server-side.

04

Primary Use Cases

SIWE is foundational for applications prioritizing user ownership and interoperability:

  • Web3 DApps & DAOs: For gated access, voting, and reputation systems.
  • Developer Platforms: Services like Vercel and Fleek use it for account management.
  • NFT Communities: Gating content or forums based on token ownership.
  • Decentralized Finance (DeFi): Streamlining onboarding and layering identity onto financial interactions.
05

Relationship to ERC-4361

EIP-4361 originated as an Ethereum Improvement Proposal (EIP). Upon finalization and adoption, it was assigned the ERC-4361 identifier, categorizing it as an application-level standard. This dual naming reflects its journey from proposal to a formalized standard for Ethereum application developers.

06

Security & Best Practices

Secure implementation is critical. Essential practices include:

  • Strict Domain Binding: Enforcing that the message's domain matches the server's domain to prevent replay attacks.
  • Nonce Management: Using strong, server-generated nonces to ensure message freshness.
  • Message Expiration: Implementing short-lived validity periods for sign-in messages.
  • Avoiding personal_sign: Preferring eth_signTypedData_v4 for its explicit, structured data formatting.
security-considerations
EIP-4361 (SIGN-IN WITH ETHEREUM)

Security Considerations and Best Practices

Sign-In with Ethereum (SIWE) enables secure, self-custodied authentication using blockchain wallets. This section details critical security measures for implementers and users to prevent common attack vectors.

02

Domain Binding and Phishing Prevention

The domain field in the SIWE message binds the signature to a specific website origin. Browsers and wallets must display this domain prominently to users. Best practices include:

  • Strict Origin Matching: The requesting site's origin must exactly match the domain field.
  • Subdomain Security: Define a policy for subdomains (e.g., *.app.example.com).
  • User Education: Wallets should warn users if the displayed domain differs from the expected service. This prevents phishing sites from tricking users into signing valid messages for attacker-controlled domains.
03

Session Management and Nonce Generation

Secure server-side session management is critical. The nonce is a server-generated, cryptographically random string that must be:

  • Unique per session to prevent signature replay.
  • Stored securely on the server before the signing request.
  • Verified immediately upon receiving the signed message.
  • Invalidated after use. Using a timestamp alone is insufficient. Best practice is to combine a nonce with a short expiration time (e.g., the expiration field) to limit the attack window.
04

Wallet Integration and User Experience

Wallet developers play a key role in security. Wallets should:

  • Display a clear human-readable preview of the SIWE message, highlighting the domain, resources (requested permissions), and statement.
  • Warn on mismatches between the SIWE domain and the site's visible URL.
  • Implement secure signing contexts to prevent malicious dApps from spoofing the signing interface. A poor UX can lead to signature blindness, where users approve messages without reviewing them.
05

Resource Access and Scope Limitation

The resources field in SIWE allows users to see what data or permissions the application is requesting. Security best practices include:

  • Explicit Scoping: Applications should request the minimum necessary resources (e.g., specific NFTs, token balances).
  • User Consent: The list must be displayed clearly in the wallet.
  • No Implied Permissions: A SIWE signature for authentication should not be misinterpreted as authorization for financial transactions. Separate signatures should be required for sensitive actions.
AUTHENTICATION MECHANISMS

Comparison: SIWE vs. Traditional Authentication

A technical comparison of Sign-In with Ethereum (EIP-4361) and traditional centralized authentication systems.

FeatureSign-In with Ethereum (SIWE)Traditional Authentication (OAuth/SAML)

Underlying Identity

Cryptographic key pair (wallet)

Centralized user database

Authentication Proof

Cryptographic signature of a structured message

Username/password or OAuth token

User Data Control

User controls all personal data (self-sovereign)

Service provider controls user data

Protocol Standard

EIP-4361 (open Ethereum standard)

OAuth 2.0, OpenID Connect, SAML (IETF/OASIS)

Primary Trust Anchor

Ethereum blockchain (decentralized)

Identity Provider (centralized)

Account Recovery

Via wallet's seed phrase or social recovery

Via email/SMS or support ticket

Cross-Service Portability

Yes, identity is blockchain-native

No, identity is siloed per provider

Gas Fee Requirement

Yes, for on-chain verification

No

EIP-4361

Frequently Asked Questions (FAQ)

Sign-In with Ethereum (SIWE) is a standard for secure, self-sovereign authentication using blockchain wallets. These questions address its core concepts, implementation, and security.

Sign-In with Ethereum (SIWE) is an open standard, defined by EIP-4361, that enables users to authenticate to web services using their Ethereum account and a cryptographically signed message instead of a traditional username and password. It works by having the service present a structured message (containing the domain, statement, nonce, and expiration) which the user signs with their private key via their wallet (like MetaMask). The service then verifies the signature against the user's public address, proving control of the account without exposing the private key. This process establishes a secure session, enabling authentication and often authorization based on the user's on-chain identity and assets.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team