{"eip":7734,"title":"Decentralized Identity Verification (DID)","description":"A privacy-preserving method for decentralized identity verification, enabling secure integration of identity management in dApps.","authors":["Anushka Yadav (@64anushka) \u003c64anushka@gmail.com\u003e"],"status":"Final","type":"Standards Track","category":"ERC","created":"2024-06-26","discussionsTo":"https://ethereum-magicians.org/t/discussion-on-decentralized-identity-verification-did-standard/20392","repo":"ERCs","label":"ERC-7734","officialUrl":"https://eips.ethereum.org/EIPS/eip-7734","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7734.md","url":"https://eips.huatuo.xyz/eip-7734/","tldr":{"en":"A minimal on-chain identity registry where each address stores only hashes of its identity data and verification proofs, with events for creation, verification and revocation.","ja":"各アドレスが自分の身元データと検証証明のハッシュだけを保存する最小限のオンチェーン ID レジストリ。作成・検証・失効のイベントを備える。","ko":"각 주소가 자신의 신원 데이터와 검증 증명의 해시만 저장하는 최소한의 온체인 신원 레지스트리. 생성, 검증, 폐기에 대한 이벤트를 제공한다.","zh":"一个极简的链上身份注册表：每个地址只存储其身份数据和验证证明的哈希，并通过事件记录创建、验证和撤销。"},"tags":["identity","did","privacy","registry"],"explainers":{"en":{"lang":"en","tldr":"A minimal on-chain identity registry where each address stores only hashes of its identity data and verification proofs, with events for creation, verification and revocation.","tags":["identity","did","privacy","registry"],"related":[1056,7866],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7734/","markdown":"## What problem does it solve?\n\nMany dApps need to know that a user has passed some identity check: KYC for a DeFi pool, age verification for a game, a \"real human\" check for an airdrop. Centralised identity providers hold raw personal data, are frequent breach targets, and leave users with little control. Existing decentralised identity standards can be heavy to integrate.\n\nERC-7734 proposes a deliberately small interface: keep personal data off-chain, store only cryptographic hashes on-chain, and emit events so anyone can trace when an identity was created, verified or revoked.\n\n## How it works\n\nEach address can hold one `Identity` record:\n\n| Field | Meaning |\n| --- | --- |\n| `userAddress` | The owner's address (the identity itself) |\n| `identityHash` | Hash of off-chain identity data |\n| `verificationHashes` | Two hashes derived from off-chain proofs or attestations |\n| `isVerified` | Current status |\n| `timestamp` | When the identity was created |\n\nThe caller manages only their own record:\n\n- `createIdentity(identityHash)` registers it (once per address) and emits `IdentityCreated`.\n- `verifyIdentity(bytes32[2])` stores the two verification hashes, marks the record verified and emits `IdentityVerified`.\n- `revokeIdentity()` sets `isVerified` back to false and emits `IdentityRevoked`.\n- `getIdentity(user)` returns the record for anyone to read.\n\nWhat the verification hashes mean, and how they are produced (third-party attestation, signed document, cryptographic challenge), is left to the implementer. Names, ages and other attributes stay off-chain.\n\n## Sample code\n\nThe interface from the standard:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.0;\n\ninterface IDecentralizedIdentity {\n    struct Identity {\n        address userAddress;\n        bytes32 identityHash;\n        bytes32[2] verificationHashes;\n        bool isVerified;\n        uint256 timestamp;\n    }\n\n    event IdentityCreated(address indexed userAddress, bytes32 identityHash, uint256 timestamp);\n    event IdentityVerified(address indexed userAddress, bytes32[2] verificationHashes, uint256 timestamp);\n    event IdentityRevoked(address indexed userAddress, uint256 timestamp);\n\n    function createIdentity(bytes32 identityHash) external;\n    function verifyIdentity(bytes32[2] calldata verificationHashes) external;\n    function revokeIdentity() external;\n    function getIdentity(address userAddress) external view returns (Identity memory);\n}\n```\n\nChecking a user's status from a dApp (ethers v6):\n\n```ts\nimport { Contract, JsonRpcProvider } from \"ethers\";\n\nconst abi = [\n  \"function getIdentity(address) view returns (tuple(address userAddress, bytes32 identityHash, bytes32[2] verificationHashes, bool isVerified, uint256 timestamp))\",\n];\nconst registry = new Contract(REGISTRY_ADDRESS, abi, new JsonRpcProvider(RPC_URL));\nconst id = await registry.getIdentity(user);\nconsole.log(id.isVerified ? \"verified\" : \"not verified\");\n```\n\n## Things to know\n\n- Status is **Final**.\n- In the reference implementation, `verifyIdentity` is called by the user on their own record and is not checked against any external verifier. On its own, `isVerified` therefore means \"the owner submitted proofs\", not \"a trusted party approved them\". Real deployments need to restrict who can verify, or have dApps check the hashes against a trusted attester.\n- The spec recommends that verification hashes include nonces or timestamps to prevent replay, and that strong hash functions are used.\n- Hashes of low-entropy personal data (a birth date, a passport number) can be brute-forced; salt them before hashing.\n- For a different, older approach to on-chain identity, see [ERC-1056](/eip-1056/); for user profiles, see [ERC-7866](/eip-7866/).\n"},"ja":{"lang":"ja","tldr":"各アドレスが自分の身元データと検証証明のハッシュだけを保存する最小限のオンチェーン ID レジストリ。作成・検証・失効のイベントを備える。","tags":["identity","did","privacy","registry"],"related":[1056,7866],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7734/","markdown":"## 何を解決するのか\n\n多くの dApp は、ユーザーが何らかの本人確認を通過したことを知る必要があります。DeFi プールのための KYC、ゲームのための年齢確認、エアドロップのための「実在の人間」チェックなどです。中央集権的な ID プロバイダーは生の個人データを保持し、しばしば情報漏えいの標的になり、ユーザーにほとんど制御権を残しません。既存の分散型 ID の標準は、導入が重いことがあります。\n\nERC-7734 は、意図的に小さなインターフェースを提案します。個人データはオフチェーンに置き、暗号学的なハッシュだけをオンチェーンに保存し、イベントを発行することで、ID がいつ作成・検証・失効されたかを誰でも追跡できるようにするものです。\n\n## 仕組み\n\n各アドレスは 1 つの `Identity` レコードを持てます。\n\n| フィールド | 意味 |\n| --- | --- |\n| `userAddress` | 所有者のアドレス（ID そのもの） |\n| `identityHash` | オフチェーンの ID データのハッシュ |\n| `verificationHashes` | オフチェーンの証明やアテステーションから導かれる 2 つのハッシュ |\n| `isVerified` | 現在のステータス |\n| `timestamp` | ID が作成された時刻 |\n\n呼び出し元が管理できるのは自分のレコードだけです。\n\n- `createIdentity(identityHash)` はレコードを登録し（アドレスごとに 1 回）、`IdentityCreated` を発行します。\n- `verifyIdentity(bytes32[2])` は 2 つの検証ハッシュを保存し、レコードを検証済みにして、`IdentityVerified` を発行します。\n- `revokeIdentity()` は `isVerified` を false に戻し、`IdentityRevoked` を発行します。\n- `getIdentity(user)` は、誰でも読めるようにレコードを返します。\n\n検証ハッシュが何を意味し、どう生成されるか（第三者によるアテステーション、署名付き文書、暗号学的チャレンジなど）は、実装者に委ねられています。氏名、年齢、その他の属性はオフチェーンに残ります。\n\n## サンプルコード\n\n標準のインターフェース:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.0;\n\ninterface IDecentralizedIdentity {\n    struct Identity {\n        address userAddress;\n        bytes32 identityHash;\n        bytes32[2] verificationHashes;\n        bool isVerified;\n        uint256 timestamp;\n    }\n\n    event IdentityCreated(address indexed userAddress, bytes32 identityHash, uint256 timestamp);\n    event IdentityVerified(address indexed userAddress, bytes32[2] verificationHashes, uint256 timestamp);\n    event IdentityRevoked(address indexed userAddress, uint256 timestamp);\n\n    function createIdentity(bytes32 identityHash) external;\n    function verifyIdentity(bytes32[2] calldata verificationHashes) external;\n    function revokeIdentity() external;\n    function getIdentity(address userAddress) external view returns (Identity memory);\n}\n```\n\ndApp からユーザーのステータスを確認する例（ethers v6）:\n\n```ts\nimport { Contract, JsonRpcProvider } from \"ethers\";\n\nconst abi = [\n  \"function getIdentity(address) view returns (tuple(address userAddress, bytes32 identityHash, bytes32[2] verificationHashes, bool isVerified, uint256 timestamp))\",\n];\nconst registry = new Contract(REGISTRY_ADDRESS, abi, new JsonRpcProvider(RPC_URL));\nconst id = await registry.getIdentity(user);\nconsole.log(id.isVerified ? \"verified\" : \"not verified\");\n```\n\n## 知っておくべきこと\n\n- ステータスは **Final** です。\n- リファレンス実装では、`verifyIdentity` はユーザーが自分のレコードに対して呼び出し、外部の検証者に対するチェックは行われません。そのため `isVerified` だけでは、「所有者が証明を提出した」ことを意味するだけで、「信頼できる第三者が承認した」ことを意味しません。実際の運用では、誰が検証できるかを制限するか、dApp 側でハッシュを信頼できるアテスターと照合する必要があります。\n- 仕様は、リプレイを防ぐために検証ハッシュに nonce やタイムスタンプを含めること、そして強力なハッシュ関数を使うことを推奨しています。\n- エントロピーの低い個人データ（生年月日、パスポート番号）のハッシュは総当たりで破られる可能性があります。ハッシュ化する前に salt を付けてください。\n- 別の、より古いオンチェーン ID のアプローチについては [ERC-1056](/eip-1056/) を、ユーザープロフィールについては [ERC-7866](/eip-7866/) を参照してください。\n"},"ko":{"lang":"ko","tldr":"각 주소가 자신의 신원 데이터와 검증 증명의 해시만 저장하는 최소한의 온체인 신원 레지스트리. 생성, 검증, 폐기에 대한 이벤트를 제공한다.","tags":["identity","did","privacy","registry"],"related":[1056,7866],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7734/","markdown":"## 어떤 문제를 해결하나요?\n\n많은 dApp은 사용자가 어떤 신원 확인을 통과했다는 사실을 알아야 합니다. DeFi 풀을 위한 KYC, 게임을 위한 연령 확인, 에어드롭을 위한 \"실제 사람\" 확인 같은 것들입니다. 중앙화된 신원 제공자는 원본 개인 데이터를 보관하고, 자주 유출의 표적이 되며, 사용자에게 통제권을 거의 주지 않습니다. 기존의 분산 신원 표준은 연동하기에 무거울 수 있습니다.\n\nERC-7734는 의도적으로 작은 인터페이스를 제안합니다. 개인 데이터는 오프체인에 두고, 암호학적 해시만 온체인에 저장하며, 이벤트를 발생시켜 신원이 언제 생성, 검증, 폐기되었는지 누구나 추적할 수 있게 하는 것입니다.\n\n## 어떻게 동작하나요?\n\n각 주소는 `Identity` 레코드 하나를 가질 수 있습니다.\n\n| 필드 | 의미 |\n| --- | --- |\n| `userAddress` | 소유자의 주소(신원 자체) |\n| `identityHash` | 오프체인 신원 데이터의 해시 |\n| `verificationHashes` | 오프체인 증명이나 증명서(attestation)에서 도출한 해시 두 개 |\n| `isVerified` | 현재 상태 |\n| `timestamp` | 신원이 생성된 시각 |\n\n호출자는 자기 레코드만 관리합니다.\n\n- `createIdentity(identityHash)`는 레코드를 등록하고(주소당 한 번) `IdentityCreated`를 발생시킵니다.\n- `verifyIdentity(bytes32[2])`는 검증 해시 두 개를 저장하고, 레코드를 검증됨으로 표시하며, `IdentityVerified`를 발생시킵니다.\n- `revokeIdentity()`는 `isVerified`를 다시 false로 되돌리고 `IdentityRevoked`를 발생시킵니다.\n- `getIdentity(user)`는 누구나 읽을 수 있도록 레코드를 반환합니다.\n\n검증 해시가 무엇을 의미하고 어떻게 만들어지는지(제3자 증명, 서명된 문서, 암호학적 챌린지)는 구현자에게 맡깁니다. 이름, 나이, 그 밖의 속성은 오프체인에 남습니다.\n\n## 샘플 코드\n\n표준의 인터페이스:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.0;\n\ninterface IDecentralizedIdentity {\n    struct Identity {\n        address userAddress;\n        bytes32 identityHash;\n        bytes32[2] verificationHashes;\n        bool isVerified;\n        uint256 timestamp;\n    }\n\n    event IdentityCreated(address indexed userAddress, bytes32 identityHash, uint256 timestamp);\n    event IdentityVerified(address indexed userAddress, bytes32[2] verificationHashes, uint256 timestamp);\n    event IdentityRevoked(address indexed userAddress, uint256 timestamp);\n\n    function createIdentity(bytes32 identityHash) external;\n    function verifyIdentity(bytes32[2] calldata verificationHashes) external;\n    function revokeIdentity() external;\n    function getIdentity(address userAddress) external view returns (Identity memory);\n}\n```\n\ndApp에서 사용자의 상태를 확인하는 예(ethers v6):\n\n```ts\nimport { Contract, JsonRpcProvider } from \"ethers\";\n\nconst abi = [\n  \"function getIdentity(address) view returns (tuple(address userAddress, bytes32 identityHash, bytes32[2] verificationHashes, bool isVerified, uint256 timestamp))\",\n];\nconst registry = new Contract(REGISTRY_ADDRESS, abi, new JsonRpcProvider(RPC_URL));\nconst id = await registry.getIdentity(user);\nconsole.log(id.isVerified ? \"verified\" : \"not verified\");\n```\n\n## 알아둘 점\n\n- 상태는 **Final**입니다.\n- 레퍼런스 구현에서 `verifyIdentity`는 사용자가 자기 레코드에 대해 호출하며, 어떤 외부 검증자와도 대조하지 않습니다. 따라서 `isVerified`만으로는 \"소유자가 증명을 제출했다\"는 뜻일 뿐, \"신뢰할 수 있는 주체가 승인했다\"는 뜻이 아닙니다. 실제 배포에서는 누가 검증할 수 있는지 제한하거나, dApp이 해시를 신뢰할 수 있는 증명자와 대조해야 합니다.\n- 스펙은 재생 공격을 막기 위해 검증 해시에 nonce나 타임스탬프를 포함하고 강력한 해시 함수를 쓸 것을 권장합니다.\n- 엔트로피가 낮은 개인 데이터(생년월일, 여권 번호)의 해시는 무차별 대입으로 깨질 수 있으니, 해시하기 전에 salt를 적용하세요.\n- 더 오래된 다른 온체인 신원 접근 방식은 [ERC-1056](/eip-1056/)을, 사용자 프로필은 [ERC-7866](/eip-7866/)을 참고하세요.\n"},"zh":{"lang":"zh","tldr":"一个极简的链上身份注册表：每个地址只存储其身份数据和验证证明的哈希，并通过事件记录创建、验证和撤销。","tags":["identity","did","privacy","registry"],"related":[1056,7866],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7734/","markdown":"## 它解决什么问题？\n\n许多 dApp 需要知道用户已通过某种身份检查：DeFi 池的 KYC、游戏的年龄验证、空投的\"真人\"检查。中心化身份提供方持有原始个人数据，经常成为数据泄露的目标，用户几乎没有控制权。现有的去中心化身份标准集成起来可能比较沉重。\n\nERC-7734 提议一个刻意保持小巧的接口：个人数据留在链下，只在链上存储密码学哈希，并发出事件，让任何人都能追踪身份是何时创建、验证或撤销的。\n\n## 它如何运作\n\n每个地址可以持有一条 `Identity` 记录：\n\n| 字段 | 含义 |\n| --- | --- |\n| `userAddress` | 所有者的地址（即身份本身） |\n| `identityHash` | 链下身份数据的哈希 |\n| `verificationHashes` | 由链下证明或证明材料（attestation）派生的两个哈希 |\n| `isVerified` | 当前状态 |\n| `timestamp` | 身份创建的时间 |\n\n调用者只能管理自己的记录：\n\n- `createIdentity(identityHash)` 注册记录（每个地址一次），并触发 `IdentityCreated`。\n- `verifyIdentity(bytes32[2])` 存储两个验证哈希，把记录标记为已验证，并触发 `IdentityVerified`。\n- `revokeIdentity()` 把 `isVerified` 重新设为 false，并触发 `IdentityRevoked`。\n- `getIdentity(user)` 返回该记录，任何人都可读取。\n\n验证哈希的含义以及如何生成（第三方证明、签名文件、密码学挑战），由实现者自行决定。姓名、年龄和其他属性都保留在链下。\n\n## 示例代码\n\n标准中的接口：\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.0;\n\ninterface IDecentralizedIdentity {\n    struct Identity {\n        address userAddress;\n        bytes32 identityHash;\n        bytes32[2] verificationHashes;\n        bool isVerified;\n        uint256 timestamp;\n    }\n\n    event IdentityCreated(address indexed userAddress, bytes32 identityHash, uint256 timestamp);\n    event IdentityVerified(address indexed userAddress, bytes32[2] verificationHashes, uint256 timestamp);\n    event IdentityRevoked(address indexed userAddress, uint256 timestamp);\n\n    function createIdentity(bytes32 identityHash) external;\n    function verifyIdentity(bytes32[2] calldata verificationHashes) external;\n    function revokeIdentity() external;\n    function getIdentity(address userAddress) external view returns (Identity memory);\n}\n```\n\n从 dApp 检查用户状态（ethers v6）：\n\n```ts\nimport { Contract, JsonRpcProvider } from \"ethers\";\n\nconst abi = [\n  \"function getIdentity(address) view returns (tuple(address userAddress, bytes32 identityHash, bytes32[2] verificationHashes, bool isVerified, uint256 timestamp))\",\n];\nconst registry = new Contract(REGISTRY_ADDRESS, abi, new JsonRpcProvider(RPC_URL));\nconst id = await registry.getIdentity(user);\nconsole.log(id.isVerified ? \"verified\" : \"not verified\");\n```\n\n## 需要注意\n\n- 状态为 **Final**。\n- 在参考实现中，`verifyIdentity` 由用户对自己的记录调用，并不会与任何外部验证者核对。因此单看 `isVerified`，它只表示\"所有者提交了证明\"，而不是\"受信任的一方批准了这些证明\"。实际部署需要限制谁可以进行验证，或让 dApp 把哈希与受信任的证明方核对。\n- 规范建议验证哈希中包含 nonce 或时间戳以防重放，并使用强哈希函数。\n- 低熵个人数据（出生日期、护照号）的哈希可以被暴力破解；哈希之前请先加盐。\n- 想了解另一种更早的链上身份方案，请见 [ERC-1056](/eip-1056/)；关于用户档案，请见 [ERC-7866](/eip-7866/)。\n"}}}
