{"eip":1078,"title":"Universal login / signup using ENS subdomains","description":"This presents a method to replace the usual signup/login design pattern with a minimal ethereum native scheme, that doesn’t require passwords, backing up private keys nor typing seed phrases.","authors":["Alex Van de Sande \u003cavsa@ethereum.org\u003e"],"status":"Stagnant","type":"Standards Track","category":"ERC","created":"2018-05-04","requires":[191,681,725,1077],"discussionsTo":"https://ethereum-magicians.org/t/erc1077-and-1078-the-magic-of-executable-signed-messages-to-login-and-do-actions/351","repo":"ERCs","label":"ERC-1078","officialUrl":"https://eips.ethereum.org/EIPS/eip-1078","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-1078.md","url":"https://eips.huatuo.xyz/eip-1078/","tldr":{"en":"A passwordless login and signup flow where your identity is a smart-contract account behind an ENS name, and each app or device gets its own revocable signing key.","ja":"パスワード不要のログイン・サインアップの流れ。アイデンティティは ENS 名の背後にあるスマートコントラクトアカウントで、アプリやデバイスごとに失効可能な専用の署名鍵が与えられる。","ko":"비밀번호 없는 로그인·가입 흐름. 아이덴티티는 ENS 이름 뒤에 있는 스마트 컨트랙트 계정이고, 앱이나 기기마다 폐기할 수 있는 고유 서명 키를 갖는다.","zh":"无密码的登录与注册流程：你的身份是 ENS 名称背后的智能合约账户，每个应用或设备各自持有可撤销的签名密钥。"},"tags":["identity","login","ens","ux","smart-accounts"],"explainers":{"en":{"lang":"en","tldr":"A passwordless login and signup flow where your identity is a smart-contract account behind an ENS name, and each app or device gets its own revocable signing key.","tags":["identity","login","ens","ux","smart-accounts"],"related":[1077,725,681,191,137],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-1078/","markdown":"## What problem does it solve?\n\nEarly dapps asked every user to install a wallet, back up a seed phrase and fund an account with ether before they could do anything. Logging in to a new app on a new device meant moving that private key around, which is both scary and unsafe.\n\nERC-1078 sketches a different model. The user's long-lived identity is a **contract** (an [ERC-725](/eip-725/) identity that also accepts [ERC-1077](/eip-1077/) executable signed messages), and people refer to it by an **ENS name** such as `alice.app.eth`. Devices and apps never hold the user's funds; they hold small, disposable keys that the identity contract has authorised. Losing a phone means revoking one key, not losing the account.\n\n## How it works\n\n1. **Ask for a name.** The app asks for the user's ENS name. Because checking whether a name exists is trivial, the app should treat signup and login as one smooth flow instead of separate forms.\n2. **Sign up (new identity).** The app generates a private key locally, deploys or sets up an identity contract, registers that key as the only admin key, registers the requested subdomain and transfers it to the identity contract, and optionally adds a recovery method. The spec suggests bundling this into one transaction and not making the user wait for confirmation.\n3. **Log in (existing identity).** The app generates a local key, resolves the ENS name to the identity address, and requests that the key be added with `addKey(key, level)`. The request is delivered via a peer messaging network, `web3` if available, an [ERC-681](/eip-681/) URI, or as a last resort a QR code the user scans with a device that already controls the identity.\n4. **Act.** Many actions stay off-chain: the app signs messages with its key, and others check the identity contract to confirm that key belongs to the user. When an on-chain action is needed, the app builds an ERC-1077 signed message and a relayer submits it via `executeSigned`.\n\nThe spec describes three privilege levels for keys:\n\n| Level | Can do |\n| --- | --- |\n| Manager | Change the identity itself (add or remove keys) |\n| Action | Send transactions to other addresses (move funds, assets) |\n| Encryption | No transactions; sign off-chain messages (chat, game moves) |\n\nApps should request the lowest level they need.\n\n## Sample code\n\nThe spec's example of an ERC-681 request asking an identity to add a locally generated key:\n\n```text\nethereum:bob.example.eth?function=addKey(address='0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',uint=1)\n```\n\nGenerating the device key and resolving the identity in an app (ethers v6, illustrative):\n\n```ts\nimport { Wallet, JsonRpcProvider } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\n\n// 1. A fresh key that lives only on this device and never holds funds\nconst deviceKey = Wallet.createRandom();\n\n// 2. Resolve the user's ENS name to their identity contract\nconst identity = await provider.resolveName(\"bob.example.eth\");\n\n// 3. Build a request URI for a device that already controls the identity\nconst uri =\n  `ethereum:bob.example.eth?function=addKey(` +\n  `address='${deviceKey.address}',uint=1)`;\nconsole.log(identity, uri); // show as a link or QR code\n```\n\n## Things to know\n\n- **Status: Stagnant.** The spec itself says no working implementation existed when it was written, and it was never finalised.\n- It depends on [ERC-1077](/eip-1077/) and [ERC-725](/eip-725/), which are also not final, and leaves the messaging layer for broadcasting requests as an open question.\n- The ideas (contract accounts, per-device session keys, relayers paying gas) live on in later smart-account work such as [ERC-4337](/eip-4337/); use those standards for new builds.\n- Apps that create identities may charge or apply anti-sybil checks, since deploying a contract and registering a name costs gas.\n"},"ja":{"lang":"ja","tldr":"パスワード不要のログイン・サインアップの流れ。アイデンティティは ENS 名の背後にあるスマートコントラクトアカウントで、アプリやデバイスごとに失効可能な専用の署名鍵が与えられる。","tags":["identity","login","ens","ux","smart-accounts"],"related":[1077,725,681,191,137],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-1078/","markdown":"## 何を解決するのか\n\n初期の dapp は、何かを始める前に、ユーザーにウォレットのインストール、シードフレーズのバックアップ、アカウントへの ether の入金を求めていました。新しいデバイスで新しいアプリにログインするには、その秘密鍵を持ち運ぶ必要があり、これは不安でもあり危険でもありました。\n\nERC-1078 は別のモデルを描きます。ユーザーの長期的なアイデンティティは**コントラクト**（[ERC-1077](/eip-1077/) の実行可能な署名付きメッセージも受け付ける [ERC-725](/eip-725/) アイデンティティ）であり、人々は `alice.app.eth` のような **ENS 名**でそれを参照します。デバイスやアプリはユーザーの資金を保持せず、アイデンティティコントラクトが承認した、使い捨ての小さな鍵だけを持ちます。携帯電話を失くしても、失効させるのは鍵 1 つで、アカウントを失うことにはなりません。\n\n## 仕組み\n\n1. **名前を尋ねる。** アプリはユーザーの ENS 名を尋ねます。名前が存在するかの確認は簡単なので、アプリはサインアップとログインを別々のフォームにせず、1 つの滑らかな流れとして扱うべきです。\n2. **サインアップ（新しいアイデンティティ）。** アプリはローカルで秘密鍵を生成し、アイデンティティコントラクトをデプロイまたはセットアップし、その鍵を唯一の管理鍵として登録し、要求されたサブドメインを登録してアイデンティティコントラクトに移転し、必要に応じて復旧手段を追加します。仕様は、これを 1 つのトランザクションにまとめ、ユーザーに確認を待たせないことを提案しています。\n3. **ログイン（既存のアイデンティティ）。** アプリはローカルの鍵を生成し、ENS 名をアイデンティティのアドレスに解決し、`addKey(key, level)` でその鍵を追加するよう要求します。要求は、ピアメッセージングネットワーク、利用可能なら `web3`、[ERC-681](/eip-681/) URI、または最後の手段として、すでにアイデンティティを制御しているデバイスでユーザーがスキャンする QR コードで届けられます。\n4. **操作する。** 多くの操作はオフチェーンのままです。アプリが鍵でメッセージに署名し、他者はアイデンティティコントラクトを調べてその鍵がユーザーのものであることを確認します。オンチェーンの操作が必要なときは、アプリが ERC-1077 の署名付きメッセージを作り、リレイヤーが `executeSigned` で送信します。\n\n仕様は、鍵に 3 つの権限レベルを定めています。\n\n| レベル | できること |\n| --- | --- |\n| Manager | アイデンティティ自体の変更（鍵の追加・削除） |\n| Action | 他のアドレスへのトランザクション送信（資金・資産の移動） |\n| Encryption | トランザクションは不可。オフチェーンメッセージへの署名（チャット、ゲームの手） |\n\nアプリは、必要な最低限のレベルを要求すべきです。\n\n## サンプルコード\n\nアイデンティティに、ローカルで生成した鍵を追加するよう求める ERC-681 リクエストの仕様上の例です。\n\n```text\nethereum:bob.example.eth?function=addKey(address='0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',uint=1)\n```\n\nアプリでデバイス鍵を生成し、アイデンティティを解決する例です（ethers v6、説明用）。\n\n```ts\nimport { Wallet, JsonRpcProvider } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\n\n// 1. A fresh key that lives only on this device and never holds funds\nconst deviceKey = Wallet.createRandom();\n\n// 2. Resolve the user's ENS name to their identity contract\nconst identity = await provider.resolveName(\"bob.example.eth\");\n\n// 3. Build a request URI for a device that already controls the identity\nconst uri =\n  `ethereum:bob.example.eth?function=addKey(` +\n  `address='${deviceKey.address}',uint=1)`;\nconsole.log(identity, uri); // show as a link or QR code\n```\n\n## 知っておくべきこと\n\n- **ステータス: Stagnant。** 仕様自身が、執筆時点で動作する実装は存在しなかったと述べており、最終化されることはありませんでした。\n- [ERC-1077](/eip-1077/) と [ERC-725](/eip-725/) に依存していますが、これらも最終化されておらず、リクエストをブロードキャストするメッセージング層は未解決の課題として残されています。\n- コントラクトアカウント、デバイスごとのセッション鍵、リレイヤーによる gas 支払いといったアイデアは、[ERC-4337](/eip-4337/) などその後のスマートアカウントの取り組みに受け継がれています。新規開発ではそれらの標準を使ってください。\n- アイデンティティを作成するアプリは、コントラクトのデプロイと名前の登録に gas がかかるため、課金したり、シビル対策のチェックを行ったりすることがあります。\n"},"ko":{"lang":"ko","tldr":"비밀번호 없는 로그인·가입 흐름. 아이덴티티는 ENS 이름 뒤에 있는 스마트 컨트랙트 계정이고, 앱이나 기기마다 폐기할 수 있는 고유 서명 키를 갖는다.","tags":["identity","login","ens","ux","smart-accounts"],"related":[1077,725,681,191,137],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-1078/","markdown":"## 어떤 문제를 해결하나요?\n\n초기 dapp은 무엇이든 하기 전에 모든 사용자에게 지갑 설치, 시드 구문 백업, 계정에 이더 입금을 요구했습니다. 새 기기에서 새 앱에 로그인하려면 그 개인키를 옮겨야 했는데, 이는 불안하고 안전하지도 않았습니다.\n\nERC-1078은 다른 모델을 제시합니다. 사용자의 장기적인 아이덴티티는 **컨트랙트**([ERC-1077](/eip-1077/)의 실행 가능한 서명 메시지도 받는 [ERC-725](/eip-725/) 아이덴티티)이며, 사람들은 `alice.app.eth` 같은 **ENS 이름**으로 이를 가리킵니다. 기기와 앱은 사용자의 자금을 갖지 않고, 아이덴티티 컨트랙트가 승인한 작고 일회용인 키만 갖습니다. 휴대폰을 잃어버려도 폐기하는 것은 키 하나일 뿐, 계정을 잃지 않습니다.\n\n## 어떻게 동작하나요?\n\n1. **이름 묻기.** 앱이 사용자의 ENS 이름을 묻습니다. 이름이 존재하는지 확인하는 것은 간단하므로, 앱은 가입과 로그인을 별도 양식이 아니라 하나의 매끄러운 흐름으로 다뤄야 합니다.\n2. **가입(새 아이덴티티).** 앱이 로컬에서 개인키를 생성하고, 아이덴티티 컨트랙트를 배포하거나 설정하고, 그 키를 유일한 관리자 키로 등록하고, 요청된 서브도메인을 등록해 아이덴티티 컨트랙트로 이전하며, 선택적으로 복구 수단을 추가합니다. 명세는 이를 하나의 트랜잭션으로 묶고 사용자가 확인을 기다리게 하지 말 것을 제안합니다.\n3. **로그인(기존 아이덴티티).** 앱이 로컬 키를 생성하고, ENS 이름을 아이덴티티 주소로 해석하고, `addKey(key, level)`로 그 키를 추가해 달라고 요청합니다. 요청은 피어 메시징 네트워크, 가능하면 `web3`, [ERC-681](/eip-681/) URI, 또는 최후의 수단으로 이미 아이덴티티를 제어하는 기기로 사용자가 스캔하는 QR 코드를 통해 전달됩니다.\n4. **동작.** 많은 동작은 오프체인에 머뭅니다. 앱이 키로 메시지에 서명하고, 다른 쪽은 아이덴티티 컨트랙트를 조회해 그 키가 사용자의 것임을 확인합니다. 온체인 동작이 필요하면 앱이 ERC-1077 서명 메시지를 만들고 릴레이어가 `executeSigned`로 제출합니다.\n\n명세는 키에 세 가지 권한 수준을 설명합니다.\n\n| 수준 | 할 수 있는 일 |\n| --- | --- |\n| Manager | 아이덴티티 자체 변경(키 추가·제거) |\n| Action | 다른 주소로 트랜잭션 전송(자금, 자산 이동) |\n| Encryption | 트랜잭션 불가. 오프체인 메시지 서명(채팅, 게임 수) |\n\n앱은 필요한 가장 낮은 수준을 요청해야 합니다.\n\n## 샘플 코드\n\n아이덴티티에 로컬에서 생성한 키를 추가해 달라고 요청하는 ERC-681 요청의 명세 예시입니다.\n\n```text\nethereum:bob.example.eth?function=addKey(address='0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',uint=1)\n```\n\n앱에서 기기 키를 생성하고 아이덴티티를 해석하는 예입니다(ethers v6, 설명용).\n\n```ts\nimport { Wallet, JsonRpcProvider } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\n\n// 1. A fresh key that lives only on this device and never holds funds\nconst deviceKey = Wallet.createRandom();\n\n// 2. Resolve the user's ENS name to their identity contract\nconst identity = await provider.resolveName(\"bob.example.eth\");\n\n// 3. Build a request URI for a device that already controls the identity\nconst uri =\n  `ethereum:bob.example.eth?function=addKey(` +\n  `address='${deviceKey.address}',uint=1)`;\nconsole.log(identity, uri); // show as a link or QR code\n```\n\n## 알아둘 점\n\n- **상태: Stagnant.** 명세 스스로 작성 당시 동작하는 구현이 없었다고 밝히며, 최종 확정된 적이 없습니다.\n- 마찬가지로 최종 확정되지 않은 [ERC-1077](/eip-1077/)과 [ERC-725](/eip-725/)에 의존하며, 요청을 브로드캐스트하는 메시징 계층은 열린 문제로 남겨 둡니다.\n- 컨트랙트 계정, 기기별 세션 키, 릴레이어가 gas를 내는 방식 같은 아이디어는 [ERC-4337](/eip-4337/) 같은 이후 스마트 계정 작업에 이어집니다. 새로 만든다면 그 표준을 사용하세요.\n- 아이덴티티를 만들어 주는 앱은 컨트랙트 배포와 이름 등록에 gas가 들기 때문에 요금을 부과하거나 시빌 방지 검사를 적용할 수 있습니다.\n"},"zh":{"lang":"zh","tldr":"无密码的登录与注册流程：你的身份是 ENS 名称背后的智能合约账户，每个应用或设备各自持有可撤销的签名密钥。","tags":["identity","login","ens","ux","smart-accounts"],"related":[1077,725,681,191,137],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-1078/","markdown":"## 它解决什么问题？\n\n早期的 dapp 要求每个用户先安装钱包、备份助记词，并给账户充入以太币，才能做任何事。在新设备上登录新应用，意味着要搬运那把私钥，既让人害怕，也不安全。\n\nERC-1078 勾勒了另一种模型。用户长期的身份是一个**合约**（一个 [ERC-725](/eip-725/) 身份，同时接受 [ERC-1077](/eip-1077/) 可执行的签名消息），人们用 **ENS 名称**（如 `alice.app.eth`）来指代它。设备和应用从不持有用户的资金，只持有身份合约授权的、用完即弃的小密钥。丢了手机，只需撤销一把密钥，而不会丢掉账户。\n\n## 它如何运作\n\n1. **询问名称。** 应用询问用户的 ENS 名称。由于检查名称是否存在非常简单，应用应把注册和登录视为一个流畅的流程，而不是两个独立的表单。\n2. **注册（新身份）。** 应用在本地生成私钥，部署或设置身份合约，把这把密钥注册为唯一的管理密钥，注册所请求的子域名并将其转给身份合约，还可以选择添加恢复方式。规范建议把这些打包成一笔交易，而且不要让用户等待确认。\n3. **登录（已有身份）。** 应用生成本地密钥，把 ENS 名称解析为身份地址，并请求用 `addKey(key, level)` 添加该密钥。请求通过点对点消息网络、可用时的 `web3`、[ERC-681](/eip-681/) URI 发送，最后的办法是用户用已控制该身份的设备扫描二维码。\n4. **操作。** 许多操作保持在链下：应用用其密钥签署消息，其他人查询身份合约以确认该密钥属于该用户。需要链上操作时，应用构造一条 ERC-1077 签名消息，由中继者通过 `executeSigned` 提交。\n\n规范为密钥描述了三个权限级别：\n\n| 级别 | 可以做什么 |\n| --- | --- |\n| Manager | 修改身份本身（添加或移除密钥） |\n| Action | 向其他地址发送交易（转移资金、资产） |\n| Encryption | 不能发交易；签署链下消息（聊天、游戏操作） |\n\n应用应只请求其所需的最低级别。\n\n## 示例代码\n\n规范中的 ERC-681 请求示例，请求身份添加一把本地生成的密钥：\n\n```text\nethereum:bob.example.eth?function=addKey(address='0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',uint=1)\n```\n\n在应用中生成设备密钥并解析身份（ethers v6，仅作示意）：\n\n```ts\nimport { Wallet, JsonRpcProvider } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\n\n// 1. A fresh key that lives only on this device and never holds funds\nconst deviceKey = Wallet.createRandom();\n\n// 2. Resolve the user's ENS name to their identity contract\nconst identity = await provider.resolveName(\"bob.example.eth\");\n\n// 3. Build a request URI for a device that already controls the identity\nconst uri =\n  `ethereum:bob.example.eth?function=addKey(` +\n  `address='${deviceKey.address}',uint=1)`;\nconsole.log(identity, uri); // show as a link or QR code\n```\n\n## 需要注意\n\n- **状态：Stagnant。** 规范自己说明，撰写时还没有可用的实现，也从未最终确定。\n- 它依赖同样没有最终确定的 [ERC-1077](/eip-1077/) 和 [ERC-725](/eip-725/)，并把广播请求的消息层留作开放问题。\n- 这些想法（合约账户、每设备会话密钥、由中继者支付 gas）在之后的智能账户工作（如 [ERC-4337](/eip-4337/)）中延续；新项目请使用那些标准。\n- 创建身份的应用可能会收费或进行反女巫检查，因为部署合约和注册名称都要消耗 gas。\n"}}}
