From cfcc81d2941dbda1717519215716fa17781c3406 Mon Sep 17 00:00:00 2001 From: 64anushka <71181022+64anushka@users.noreply.github.com> Date: Tue, 2 Jul 2024 14:23:54 +0530 Subject: [PATCH 01/21] Create erc-64.md --- erc-64.md | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 erc-64.md diff --git a/erc-64.md b/erc-64.md new file mode 100644 index 0000000000..6f15c0a5f3 --- /dev/null +++ b/erc-64.md @@ -0,0 +1,153 @@ +--- +eip: xx +title: Decentralized Identity Verification (DID) Standard +description: A standard for decentralized identity verification on the Ethereum blockchain. +author: Anushka Yadav <64anushka@gmail.com> +discussions-to: https://ethereum-magicians.org/t/discussion-on-decentralized-identity-verification-did-standard/20392 +status: Draft +type: Standards Track +category: ERC +created: 2024-07-02 +--- + +## Abstract + +This proposal introduces a standard for decentralized identity verification (DID) on the Ethereum blockchain. The standard aims to provide a secure, privacy-preserving method for identity verification that can be used by decentralized applications (dApps). + +## Motivation + +Centralized identity verification methods are often cumbersome, prone to data breaches, and do not give users control over their identity data. A decentralized identity verification standard will allow users to maintain control over their identity information while ensuring security and privacy. + +## Specification + +The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174. + +### Interface + +```solidity +pragma solidity ^0.8.0; + +interface IDecentralizedIdentity { + // Struct to represent an identity + struct Identity { + address userAddress; // Ethereum address of the user + bytes32 identityHash; // Hash of the identity data + bytes32[2] verificationHashes; // Hashes used for verifying identity + bool isVerified; // Indicates if the identity is verified + uint256 timestamp; // Timestamp of identity creation + } + + // Event emitted when a new identity is created + event IdentityCreated(address indexed userAddress, bytes32 identityHash, uint256 timestamp); + + // Event emitted when an identity is verified + event IdentityVerified(address indexed userAddress, bytes32[2] verificationHashes, uint256 timestamp); + + // Event emitted when an identity is revoked + event IdentityRevoked(address indexed userAddress, uint256 timestamp); + + // Function to create a new decentralized identity for the caller. + // Parameters: + // - identityHash: Hash of the identity data. + function createIdentity(bytes32 identityHash) external; + + // Function to verify the decentralized identity for the caller. + // Parameters: + // - verificationHashes: Hashes used for verifying the identity. + function verifyIdentity(bytes32[2] calldata verificationHashes) external; + + // Function to revoke the decentralized identity for the caller. + function revokeIdentity() external; + + // Function to retrieve the decentralized identity for a given user address + // Parameters: + // - userAddress Ethereum address of the user. + // Returns: + // identity The decentralized identity struct. + function getIdentity(address userAddress) external view returns (Identity memory); +} + +``` + +## Rationale + +The design leverages cryptographic hashes to represent identity information, ensuring that sensitive data is not stored directly on the blockchain. The use of verification hashes allows for flexible identity verification mechanisms, and the inclusion of events ensures transparency and traceability. + +## Reference Implementation + +```solidity +pragma solidity ^0.8.0; + +import "./IDecentralizedIdentity.sol"; + +contract DecentralizedIdentity is IDecentralizedIdentity { + // Mapping to store identities by user address + mapping(address => Identity) private identities; + + // Function to create a new decentralized identity for the caller. + // Parameters: + // - identityHash Hash of the identity data. + function createIdentity(bytes32 identityHash) external override { + // Ensure identity does not already exist + require(identities[msg.sender].userAddress == address(0), "Identity already exists"); + + // Create the identity for the caller + identities[msg.sender] = Identity({ + userAddress: msg.sender, + identityHash: identityHash, + verificationHashes: [bytes32(0), bytes32(0)], // Initialize with empty hashes + isVerified: false, + timestamp: block.timestamp + }); + + // Emit event for the creation of a new identity + emit IdentityCreated(msg.sender, identityHash, block.timestamp); + } + + // Function to verify the decentralized identity for the caller. + // Parameters: + // - verificationHashes: Hashes used for verifying the identity. + function verifyIdentity(bytes32[2] calldata verificationHashes) external override { + // Ensure identity exists + require(identities[msg.sender].userAddress != address(0), "Identity does not exist"); + + // Update verification hashes and mark identity as verified + identities[msg.sender].verificationHashes = verificationHashes; + identities[msg.sender].isVerified = true; + + // Emit event for the verification of identity + emit IdentityVerified(msg.sender, verificationHashes, block.timestamp); + } + + // Function to revoke the decentralized identity for the caller. + function revokeIdentity() external override { + // Ensure identity exists + require(identities[msg.sender].userAddress != address(0), "Identity does not exist"); + + // Mark identity as not verified + identities[msg.sender].isVerified = false; + + // Emit event for the revocation of identity + emit IdentityRevoked(msg.sender, block.timestamp); + } + + // Function to retrieve the decentralized identity for a given user address + // Parameters: + // - userAddress Ethereum address of the user. + // Returns: + // identity The decentralized identity struct. + function getIdentity(address userAddress) external view override returns (Identity memory) { + return identities[userAddress]; + } +} +``` + +## Security Considerations + +**Secure Hashing**: Ensure that identity and verification hashes are generated using a secure hashing algorithm to prevent collisions and ensure the integrity of the identity data. + +**User Control**: Users have control over their identity data, which reduces the risk of unauthorized access and ensures privacy. + +## Copyright + +Copyright and related rights waived via [CC0](../LICENSE.md). From 46ec3f932b44fcf3de846c3212614a43c9276938 Mon Sep 17 00:00:00 2001 From: 64anushka <71181022+64anushka@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:22:10 +0530 Subject: [PATCH 02/21] Rename erc-64.md to erc-7734.md --- erc-64.md => erc-7734.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename erc-64.md => erc-7734.md (100%) diff --git a/erc-64.md b/erc-7734.md similarity index 100% rename from erc-64.md rename to erc-7734.md From 70e3a8718fb4a614d684e53d5f4314064efd3ed3 Mon Sep 17 00:00:00 2001 From: 64anushka <71181022+64anushka@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:26:58 +0530 Subject: [PATCH 03/21] Update erc-7734.md --- erc-7734.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erc-7734.md b/erc-7734.md index 6f15c0a5f3..d637553571 100644 --- a/erc-7734.md +++ b/erc-7734.md @@ -1,9 +1,9 @@ --- -eip: xx -title: Decentralized Identity Verification (DID) Standard +eip: 7734 +title: Decentralized Identity Verification (DID) description: A standard for decentralized identity verification on the Ethereum blockchain. author: Anushka Yadav <64anushka@gmail.com> -discussions-to: https://ethereum-magicians.org/t/discussion-on-decentralized-identity-verification-did-standard/20392 +discussions-to: https://ethereum-magicians.org/t/erc-7734-decentralized-identity-verification-did/20392 status: Draft type: Standards Track category: ERC From de9cceb5ed7f2b45e5f896233bf5a85d4c683af9 Mon Sep 17 00:00:00 2001 From: Sam Wilson <57262657+SamWilsn@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:47:16 -0400 Subject: [PATCH 04/21] Rename erc-7734.md to ERCS/erc-7734.md --- erc-7734.md => ERCS/erc-7734.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename erc-7734.md => ERCS/erc-7734.md (100%) diff --git a/erc-7734.md b/ERCS/erc-7734.md similarity index 100% rename from erc-7734.md rename to ERCS/erc-7734.md From 5999900fd4d3ed8c077ae5869a621b4091698e2c Mon Sep 17 00:00:00 2001 From: 64anushka <71181022+64anushka@users.noreply.github.com> Date: Tue, 23 Jul 2024 21:39:26 +0530 Subject: [PATCH 05/21] Update erc-7734.md --- ERCS/erc-7734.md | 49 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index d637553571..00f1789c99 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -1,13 +1,13 @@ --- -eip: 7734 -title: Decentralized Identity Verification (DID) -description: A standard for decentralized identity verification on the Ethereum blockchain. -author: Anushka Yadav <64anushka@gmail.com> -discussions-to: https://ethereum-magicians.org/t/erc-7734-decentralized-identity-verification-did/20392 +eip: xx +title: Decentralized Identity Verification (DID) Standard +description: A standard for decentralized identity verification on the blockchain. +author: Anushka Yadav <@64anushka> +discussions-to: https://ethereum-magicians.org/t/discussion-on-decentralized-identity-verification-did-standard/20392 status: Draft type: Standards Track category: ERC -created: 2024-07-02 +created: 2024-06-26 --- ## Abstract @@ -16,7 +16,7 @@ This proposal introduces a standard for decentralized identity verification (DID ## Motivation -Centralized identity verification methods are often cumbersome, prone to data breaches, and do not give users control over their identity data. A decentralized identity verification standard will allow users to maintain control over their identity information while ensuring security and privacy. +Centralized identity verification methods are often cumbersome, prone to data breaches, and do not give users control over their identity data. Current DID solutions, while innovative, often come with complexity and additional requirements that can be burdensome for dApp developers and users. Our proposal aims to address these issues by providing a straightforward, minimalistic approach to decentralized identity verification. This standard focuses on user control and privacy, ensuring that users can manage their identity information securely without unnecessary overhead. By leveraging cryptographic hashes and events, we provide a transparent, traceable, and efficient method for identity verification. This simplicity encourages wider adoption and integration into various dApps, fostering a more secure and user-centric ecosystem on the Ethereum blockchain. ## Specification @@ -69,6 +69,41 @@ interface IDecentralizedIdentity { ``` +### Usage +#### Who Would Want to Implement It +##### dApp Developers: +Developers creating decentralized applications that require identity verification can implement this standard to provide users with secure, decentralized identity management. + +##### Service Providers: +Platforms offering services such as decentralized finance (DeFi), gaming, or social networking can integrate this standard to verify user identities without relying on centralized authorities. + +###### Enterprises: +Companies looking to integrate blockchain-based identity solutions into their existing systems can use this standard to ensure secure and privacy-preserving identity verification. + +##### Developers of Interoperability Solutions: +Developers working on cross-platform and cross-blockchain interoperability can implement this standard to enable a unified identity verification mechanism across different systems. + +### How It's Supposed to Be Used +#### Creating an Identity + +To create a new decentralized identity, a user calls the createIdentity function with the hash of their identity data. The contract stores this hash and emits the IdentityCreated event. This step ensures that the user's identity is registered on the blockchain. + +#### Verifying an Identity + +To verify an identity, a user calls the verifyIdentity function with two verification hashes. These hashes could be derived from proofs or attestations. The contract updates the identity's verification status and emits the IdentityVerified event. This process ensures that the identity is verified using off-chain proofs, maintaining privacy and security. + +#### Revoking an Identity + +If a user wishes to revoke their identity, they can call the revokeIdentity function. The contract marks the identity as not verified and emits the IdentityRevoked event. This feature allows users to manage their identities actively and revoke them if necessary. + +#### Retrieving an Identity + +Anyone can retrieve the details of a user's identity by calling the getIdentity function with the user's Ethereum address. This function returns the identity details, including whether the identity is verified. This feature allows dApps and services to check the identity status of users securely. + +## Differentiation + +This proposal distinguishes itself from other DID standards by focusing on a minimalistic approach, emphasizing user control and privacy. Unlike other proposals that might include a broader scope of identity attributes and interactions, this standard keeps the identity structure simple and relies on off-chain mechanisms for detailed identity management and verification. This simplicity encourages wider adoption and integration into various dApps, fostering a more secure and user-centric ecosystem on the Ethereum blockchain. + ## Rationale The design leverages cryptographic hashes to represent identity information, ensuring that sensitive data is not stored directly on the blockchain. The use of verification hashes allows for flexible identity verification mechanisms, and the inclusion of events ensures transparency and traceability. From d513455ed1d4acac0470585f5a5754cff8d9c66a Mon Sep 17 00:00:00 2001 From: 64anushka <71181022+64anushka@users.noreply.github.com> Date: Tue, 23 Jul 2024 21:50:29 +0530 Subject: [PATCH 06/21] Update erc-7734.md --- ERCS/erc-7734.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index 00f1789c99..7de5a3dc53 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -1,8 +1,8 @@ --- -eip: xx +eip: 7734 title: Decentralized Identity Verification (DID) Standard -description: A standard for decentralized identity verification on the blockchain. -author: Anushka Yadav <@64anushka> +description: A decentralized identity verification on the blockchain. +author: Anushka Yadav (@64anushka) <64anushka@gmail.com> discussions-to: https://ethereum-magicians.org/t/discussion-on-decentralized-identity-verification-did-standard/20392 status: Draft type: Standards Track From 3cc7424448a504ba8ed96175e5806d183de84072 Mon Sep 17 00:00:00 2001 From: 64anushka <71181022+64anushka@users.noreply.github.com> Date: Tue, 23 Jul 2024 21:53:32 +0530 Subject: [PATCH 07/21] Update erc-7734.md --- ERCS/erc-7734.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index 7de5a3dc53..7d279e79ae 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -1,6 +1,6 @@ --- eip: 7734 -title: Decentralized Identity Verification (DID) Standard +title: Decentralized Identity Verification (DID) description: A decentralized identity verification on the blockchain. author: Anushka Yadav (@64anushka) <64anushka@gmail.com> discussions-to: https://ethereum-magicians.org/t/discussion-on-decentralized-identity-verification-did-standard/20392 From 16fccc0f4c0317c6b237bd46a0477fbc6d1eb87b Mon Sep 17 00:00:00 2001 From: 64anushka <71181022+64anushka@users.noreply.github.com> Date: Tue, 23 Jul 2024 21:57:04 +0530 Subject: [PATCH 08/21] Update erc-7734.md --- ERCS/erc-7734.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index 7d279e79ae..2c32791960 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -100,7 +100,7 @@ If a user wishes to revoke their identity, they can call the revokeIdentity func Anyone can retrieve the details of a user's identity by calling the getIdentity function with the user's Ethereum address. This function returns the identity details, including whether the identity is verified. This feature allows dApps and services to check the identity status of users securely. -## Differentiation +### Differentiation This proposal distinguishes itself from other DID standards by focusing on a minimalistic approach, emphasizing user control and privacy. Unlike other proposals that might include a broader scope of identity attributes and interactions, this standard keeps the identity structure simple and relies on off-chain mechanisms for detailed identity management and verification. This simplicity encourages wider adoption and integration into various dApps, fostering a more secure and user-centric ecosystem on the Ethereum blockchain. From 2fe82ef16edd08a9fd9e9b317870efeb045a2f9e Mon Sep 17 00:00:00 2001 From: 64anushka <71181022+64anushka@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:11:09 +0530 Subject: [PATCH 09/21] Update erc-7734.md --- ERCS/erc-7734.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index 2c32791960..291caa11d9 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -18,6 +18,21 @@ This proposal introduces a standard for decentralized identity verification (DID Centralized identity verification methods are often cumbersome, prone to data breaches, and do not give users control over their identity data. Current DID solutions, while innovative, often come with complexity and additional requirements that can be burdensome for dApp developers and users. Our proposal aims to address these issues by providing a straightforward, minimalistic approach to decentralized identity verification. This standard focuses on user control and privacy, ensuring that users can manage their identity information securely without unnecessary overhead. By leveraging cryptographic hashes and events, we provide a transparent, traceable, and efficient method for identity verification. This simplicity encourages wider adoption and integration into various dApps, fostering a more secure and user-centric ecosystem on the Ethereum blockchain. +This standard focuses on user control and privacy, ensuring that users can manage their identity information securely without unnecessary overhead. By leveraging cryptographic hashes and events, we provide a transparent, traceable, and efficient method for identity verification. This simplicity encourages wider adoption and integration into various dApps, fostering a more secure and user-centric ecosystem on the Ethereum blockchain. + +The following stakeholders will benefit from this proposal: +### dApp Developers: +Developers creating decentralized applications that require identity verification can implement this standard to provide users with secure, decentralized identity management. The minimalistic design makes it easier to integrate into existing workflows without adding unnecessary complexity. + +### Service Providers: +Platforms offering services such as decentralized finance (DeFi), gaming, or social networking can integrate this standard to verify user identities without relying on centralized authorities. This reduces the risk of fraud and enhances user trust. + +### Enterprises: +Companies looking to integrate blockchain-based identity solutions into their existing systems can use this standard to ensure secure and privacy-preserving identity verification. This allows for a seamless transition to decentralized technologies while maintaining user privacy and security. + +### Developers of Interoperability Solutions: +Those working on cross-platform and cross-blockchain interoperability can implement this standard to enable a unified identity verification mechanism across different systems, reducing complexity and increasing user control over their identities. + ## Specification The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174. @@ -68,21 +83,6 @@ interface IDecentralizedIdentity { } ``` - -### Usage -#### Who Would Want to Implement It -##### dApp Developers: -Developers creating decentralized applications that require identity verification can implement this standard to provide users with secure, decentralized identity management. - -##### Service Providers: -Platforms offering services such as decentralized finance (DeFi), gaming, or social networking can integrate this standard to verify user identities without relying on centralized authorities. - -###### Enterprises: -Companies looking to integrate blockchain-based identity solutions into their existing systems can use this standard to ensure secure and privacy-preserving identity verification. - -##### Developers of Interoperability Solutions: -Developers working on cross-platform and cross-blockchain interoperability can implement this standard to enable a unified identity verification mechanism across different systems. - ### How It's Supposed to Be Used #### Creating an Identity From cff8663adb11224d84aa8c71af4b753e4b1c692b Mon Sep 17 00:00:00 2001 From: 64anushka <71181022+64anushka@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:13:02 +0530 Subject: [PATCH 10/21] Update ERCS/erc-7734.md Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com> --- ERCS/erc-7734.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index 291caa11d9..75614ecdb3 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -86,7 +86,7 @@ interface IDecentralizedIdentity { ### How It's Supposed to Be Used #### Creating an Identity -To create a new decentralized identity, a user calls the createIdentity function with the hash of their identity data. The contract stores this hash and emits the IdentityCreated event. This step ensures that the user's identity is registered on the blockchain. +To create a new decentralized identity, a user calls the `createIdentity` function with the hash of their identity data. The contract stores this hash and emits the `IdentityCreated` event. This step ensures that the user's identity is registered on the blockchain. #### Verifying an Identity From 57d79b53c2a72181c5ba98a618918c13369dbdd5 Mon Sep 17 00:00:00 2001 From: 64anushka <71181022+64anushka@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:20:12 +0530 Subject: [PATCH 11/21] Update erc-7734.md --- ERCS/erc-7734.md | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index 75614ecdb3..46c5dad959 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -21,18 +21,35 @@ Centralized identity verification methods are often cumbersome, prone to data br This standard focuses on user control and privacy, ensuring that users can manage their identity information securely without unnecessary overhead. By leveraging cryptographic hashes and events, we provide a transparent, traceable, and efficient method for identity verification. This simplicity encourages wider adoption and integration into various dApps, fostering a more secure and user-centric ecosystem on the Ethereum blockchain. The following stakeholders will benefit from this proposal: -### dApp Developers: +##### dApp Developers: Developers creating decentralized applications that require identity verification can implement this standard to provide users with secure, decentralized identity management. The minimalistic design makes it easier to integrate into existing workflows without adding unnecessary complexity. -### Service Providers: +##### Service Providers: Platforms offering services such as decentralized finance (DeFi), gaming, or social networking can integrate this standard to verify user identities without relying on centralized authorities. This reduces the risk of fraud and enhances user trust. -### Enterprises: +##### Enterprises: Companies looking to integrate blockchain-based identity solutions into their existing systems can use this standard to ensure secure and privacy-preserving identity verification. This allows for a seamless transition to decentralized technologies while maintaining user privacy and security. -### Developers of Interoperability Solutions: +##### Developers of Interoperability Solutions: Those working on cross-platform and cross-blockchain interoperability can implement this standard to enable a unified identity verification mechanism across different systems, reducing complexity and increasing user control over their identities. +### How It's Supposed to Be Used +#### Creating an Identity + +To create a new decentralized identity, a user calls the createIdentity function with the hash of their identity data. The contract stores this hash and emits the IdentityCreated event. This step ensures that the user's identity is registered on the blockchain. + +#### Verifying an Identity + +To verify an identity, a user calls the verifyIdentity function with two verification hashes. These hashes could be derived from off-chain proofs, cryptographic challenges, attestations, or other methods that suit the implementer's requirements. The contract updates the identity's verification status and emits the IdentityVerified event. This process ensures that the identity is verified using a flexible mechanism that allows for privacy and security. + +#### Revoking an Identity + +If a user wishes to revoke their identity, they can call the revokeIdentity function. The contract marks the identity as not verified and emits the IdentityRevoked event. This feature allows users to actively manage and revoke their identities if necessary. + +#### Retrieving an Identity + +Anyone can retrieve the details of a user's identity by calling the getIdentity function with the user's Ethereum address. This function returns the identity details, including whether the identity is verified. This feature allows dApps and services to check the identity status of users securely. + ## Specification The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174. @@ -68,7 +85,10 @@ interface IDecentralizedIdentity { // Function to verify the decentralized identity for the caller. // Parameters: - // - verificationHashes: Hashes used for verifying the identity. + // - verificationHashes: Hashes used for verifying the identity. These can be + // derived from off-chain proofs, cryptographic challenges, or other methods + // specific to the implementer's requirements. The exact meaning and derivation + // of the verificationHashes are left to the contract's implementer. function verifyIdentity(bytes32[2] calldata verificationHashes) external; // Function to revoke the decentralized identity for the caller. @@ -83,22 +103,6 @@ interface IDecentralizedIdentity { } ``` -### How It's Supposed to Be Used -#### Creating an Identity - -To create a new decentralized identity, a user calls the `createIdentity` function with the hash of their identity data. The contract stores this hash and emits the `IdentityCreated` event. This step ensures that the user's identity is registered on the blockchain. - -#### Verifying an Identity - -To verify an identity, a user calls the verifyIdentity function with two verification hashes. These hashes could be derived from proofs or attestations. The contract updates the identity's verification status and emits the IdentityVerified event. This process ensures that the identity is verified using off-chain proofs, maintaining privacy and security. - -#### Revoking an Identity - -If a user wishes to revoke their identity, they can call the revokeIdentity function. The contract marks the identity as not verified and emits the IdentityRevoked event. This feature allows users to manage their identities actively and revoke them if necessary. - -#### Retrieving an Identity - -Anyone can retrieve the details of a user's identity by calling the getIdentity function with the user's Ethereum address. This function returns the identity details, including whether the identity is verified. This feature allows dApps and services to check the identity status of users securely. ### Differentiation @@ -106,7 +110,7 @@ This proposal distinguishes itself from other DID standards by focusing on a min ## Rationale -The design leverages cryptographic hashes to represent identity information, ensuring that sensitive data is not stored directly on the blockchain. The use of verification hashes allows for flexible identity verification mechanisms, and the inclusion of events ensures transparency and traceability. +The design leverages cryptographic hashes to represent identity information, ensuring that sensitive data is not stored directly on the blockchain. The use of verificationHashes allows for flexible identity verification mechanisms. These hashes could be derived from various off-chain proofs, such as cryptographic challenges or attestations, depending on the implementer's needs. By leaving the interpretation of the verification hashes open, the standard enables adaptability while maintaining privacy and security. Additionally, the inclusion of events ensures transparency and traceability. ## Reference Implementation From 5a20c3668e985c196a5eb973a4db83bd38eb5c9d Mon Sep 17 00:00:00 2001 From: 64anushka <71181022+64anushka@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:21:39 +0530 Subject: [PATCH 12/21] Update erc-7734.md --- ERCS/erc-7734.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index 46c5dad959..9e7142c072 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -33,6 +33,10 @@ Companies looking to integrate blockchain-based identity solutions into their ex ##### Developers of Interoperability Solutions: Those working on cross-platform and cross-blockchain interoperability can implement this standard to enable a unified identity verification mechanism across different systems, reducing complexity and increasing user control over their identities. +### Differentiation + +This proposal distinguishes itself from other DID standards by focusing on a minimalistic approach, emphasizing user control and privacy. Unlike other proposals that might include a broader scope of identity attributes and interactions, this standard keeps the identity structure simple and relies on off-chain mechanisms for detailed identity management and verification. This simplicity encourages wider adoption and integration into various dApps, fostering a more secure and user-centric ecosystem on the Ethereum blockchain. + ### How It's Supposed to Be Used #### Creating an Identity @@ -104,10 +108,6 @@ interface IDecentralizedIdentity { ``` -### Differentiation - -This proposal distinguishes itself from other DID standards by focusing on a minimalistic approach, emphasizing user control and privacy. Unlike other proposals that might include a broader scope of identity attributes and interactions, this standard keeps the identity structure simple and relies on off-chain mechanisms for detailed identity management and verification. This simplicity encourages wider adoption and integration into various dApps, fostering a more secure and user-centric ecosystem on the Ethereum blockchain. - ## Rationale The design leverages cryptographic hashes to represent identity information, ensuring that sensitive data is not stored directly on the blockchain. The use of verificationHashes allows for flexible identity verification mechanisms. These hashes could be derived from various off-chain proofs, such as cryptographic challenges or attestations, depending on the implementer's needs. By leaving the interpretation of the verification hashes open, the standard enables adaptability while maintaining privacy and security. Additionally, the inclusion of events ensures transparency and traceability. From d8a73cefe7217f0de71400794355f02915b2af1b Mon Sep 17 00:00:00 2001 From: Anushka Yadav <71181022+64anushka@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:35:03 +0530 Subject: [PATCH 13/21] Update erc-7734.md --- ERCS/erc-7734.md | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index 9e7142c072..2d598ebe10 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -1,7 +1,7 @@ --- eip: 7734 title: Decentralized Identity Verification (DID) -description: A decentralized identity verification on the blockchain. +description: A lightweight and privacy-preserving standard for decentralized identity verification, enabling secure and seamless integration of identity management in decentralized applications (dApps) on the blockchain. author: Anushka Yadav (@64anushka) <64anushka@gmail.com> discussions-to: https://ethereum-magicians.org/t/discussion-on-decentralized-identity-verification-did-standard/20392 status: Draft @@ -12,13 +12,15 @@ created: 2024-06-26 ## Abstract -This proposal introduces a standard for decentralized identity verification (DID) on the Ethereum blockchain. The standard aims to provide a secure, privacy-preserving method for identity verification that can be used by decentralized applications (dApps). +This proposal introduces a standard for decentralized identity verification (DID) on the blockchain. The standard leverages cryptographic hashes to represent identity proofs and events for transparency and traceability. By emphasizing simplicity, privacy, and user control, this proposal aims to reduce overhead for developers and users, ensuring seamless integration into decentralized applications (dApps). It offers a minimalistic solution that keeps identity structure simple and enables off-chain mechanisms for detailed identity management and verification. ## Motivation -Centralized identity verification methods are often cumbersome, prone to data breaches, and do not give users control over their identity data. Current DID solutions, while innovative, often come with complexity and additional requirements that can be burdensome for dApp developers and users. Our proposal aims to address these issues by providing a straightforward, minimalistic approach to decentralized identity verification. This standard focuses on user control and privacy, ensuring that users can manage their identity information securely without unnecessary overhead. By leveraging cryptographic hashes and events, we provide a transparent, traceable, and efficient method for identity verification. This simplicity encourages wider adoption and integration into various dApps, fostering a more secure and user-centric ecosystem on the Ethereum blockchain. +Centralized identity verification methods are cumbersome, prone to data breaches, and fail to provide users control over their identity data. Existing DID solutions often introduce complexity, making adoption challenging for developers and users. This proposal seeks to address these issues by: -This standard focuses on user control and privacy, ensuring that users can manage their identity information securely without unnecessary overhead. By leveraging cryptographic hashes and events, we provide a transparent, traceable, and efficient method for identity verification. This simplicity encourages wider adoption and integration into various dApps, fostering a more secure and user-centric ecosystem on the Ethereum blockchain. + -Offering a minimalistic, decentralized standard that simplifies identity verification. + -Providing privacy-preserving mechanisms that keep sensitive identity data off-chain. + -Encouraging wider adoption by enabling seamless integration into dApps across various industries. The following stakeholders will benefit from this proposal: ##### dApp Developers: @@ -35,28 +37,26 @@ Those working on cross-platform and cross-blockchain interoperability can implem ### Differentiation -This proposal distinguishes itself from other DID standards by focusing on a minimalistic approach, emphasizing user control and privacy. Unlike other proposals that might include a broader scope of identity attributes and interactions, this standard keeps the identity structure simple and relies on off-chain mechanisms for detailed identity management and verification. This simplicity encourages wider adoption and integration into various dApps, fostering a more secure and user-centric ecosystem on the Ethereum blockchain. +This proposal stands out from other DID standards by focusing on minimalism, user control, and privacy. Unlike other solutions that encompass a wide range of identity attributes and interactions, this standard keeps the structure simple and relies on off-chain mechanisms for detailed identity management. Its simplicity fosters easier adoption, making it ideal for dApps that prioritize user-centric, secure ecosystems. -### How It's Supposed to Be Used -#### Creating an Identity - -To create a new decentralized identity, a user calls the createIdentity function with the hash of their identity data. The contract stores this hash and emits the IdentityCreated event. This step ensures that the user's identity is registered on the blockchain. - -#### Verifying an Identity - -To verify an identity, a user calls the verifyIdentity function with two verification hashes. These hashes could be derived from off-chain proofs, cryptographic challenges, attestations, or other methods that suit the implementer's requirements. The contract updates the identity's verification status and emits the IdentityVerified event. This process ensures that the identity is verified using a flexible mechanism that allows for privacy and security. - -#### Revoking an Identity +## Specification +The Decentralized Identity Verification (DID) standard introduces a simple, secure, and privacy-preserving mechanism for verifying user identities on the blockchain. The key components of this standard are outlined below: -If a user wishes to revoke their identity, they can call the revokeIdentity function. The contract marks the identity as not verified and emits the IdentityRevoked event. This feature allows users to actively manage and revoke their identities if necessary. +#### Identity Contract +A smart contract that acts as the central authority for identity verification. The contract stores the status of identity verifications for users and ensures that verification events are triggered securely and transparently. -#### Retrieving an Identity +#### Verification Function +The verifyIdentity function allows a user to submit two verification hashes that represent off-chain proofs or attestations of identity. These hashes can be derived from external sources such as third-party verifiers, documents, or attestations.The function compares the provided hashes and updates the identity verification status accordingly. -Anyone can retrieve the details of a user's identity by calling the getIdentity function with the user's Ethereum address. This function returns the identity details, including whether the identity is verified. This feature allows dApps and services to check the identity status of users securely. +##### Input Parameters: +**identityHash:** A cryptographic hash representing the user's identity. +**verificationHash:** A cryptographic hash derived from the proof or attestation used to verify the identity. -## Specification +#### IdentityVerified Event +The IdentityVerified event is emitted when the user's identity verification is successfully updated. This event ensures traceability and transparency, allowing dApp developers and users to track verification statuses. -The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174. +#### Identity Structure +The identity is a simple structure represented by a unique address (public key). Additional identity attributes, such as name or age, are optional and left to off-chain management. This minimal approach keeps the implementation lean, avoiding unnecessary complexity and encouraging broader adoption. ### Interface @@ -184,8 +184,9 @@ contract DecentralizedIdentity is IDecentralizedIdentity { ## Security Considerations **Secure Hashing**: Ensure that identity and verification hashes are generated using a secure hashing algorithm to prevent collisions and ensure the integrity of the identity data. +**Replay Attacks**: Verification hashes should incorporate nonces or timestamps to prevent replay attacks. +**Implementation Flexibility**: Developers must ensure that hash generation and validation processes are robust and resistant to manipulation. -**User Control**: Users have control over their identity data, which reduces the risk of unauthorized access and ensures privacy. ## Copyright From a694d4f099cf17b3d6564cb824970122f3b4a7f8 Mon Sep 17 00:00:00 2001 From: Anushka Yadav <71181022+64anushka@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:38:52 +0530 Subject: [PATCH 14/21] Update erc-7734.md --- ERCS/erc-7734.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index 2d598ebe10..719bf65270 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -1,7 +1,7 @@ --- eip: 7734 title: Decentralized Identity Verification (DID) -description: A lightweight and privacy-preserving standard for decentralized identity verification, enabling secure and seamless integration of identity management in decentralized applications (dApps) on the blockchain. +description: A privacy-preserving method for decentralized identity verification, enabling secure integration of identity management in dApps. author: Anushka Yadav (@64anushka) <64anushka@gmail.com> discussions-to: https://ethereum-magicians.org/t/discussion-on-decentralized-identity-verification-did-standard/20392 status: Draft From 3fe38338177227f722ca926db2295bae29d7de9a Mon Sep 17 00:00:00 2001 From: Sam Wilson <57262657+SamWilsn@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:30:28 -0500 Subject: [PATCH 15/21] Update erc-7734.md --- ERCS/erc-7734.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index 719bf65270..b09bc71c69 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -18,9 +18,9 @@ This proposal introduces a standard for decentralized identity verification (DID Centralized identity verification methods are cumbersome, prone to data breaches, and fail to provide users control over their identity data. Existing DID solutions often introduce complexity, making adoption challenging for developers and users. This proposal seeks to address these issues by: - -Offering a minimalistic, decentralized standard that simplifies identity verification. - -Providing privacy-preserving mechanisms that keep sensitive identity data off-chain. - -Encouraging wider adoption by enabling seamless integration into dApps across various industries. +- Offering a minimalistic, decentralized standard that simplifies identity verification. +- Providing privacy-preserving mechanisms that keep sensitive identity data off-chain. +- Encouraging wider adoption by enabling seamless integration into dApps across various industries. The following stakeholders will benefit from this proposal: ##### dApp Developers: From 5fb5d294019dc06276f549e2017cbdfe048fc8ca Mon Sep 17 00:00:00 2001 From: Sam Wilson <57262657+SamWilsn@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:31:14 -0500 Subject: [PATCH 16/21] Update erc-7734.md --- ERCS/erc-7734.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index b09bc71c69..9f051f56bc 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -21,18 +21,21 @@ Centralized identity verification methods are cumbersome, prone to data breaches - Offering a minimalistic, decentralized standard that simplifies identity verification. - Providing privacy-preserving mechanisms that keep sensitive identity data off-chain. - Encouraging wider adoption by enabling seamless integration into dApps across various industries. +- +### Stakeholders The following stakeholders will benefit from this proposal: -##### dApp Developers: + +#### dApp Developers Developers creating decentralized applications that require identity verification can implement this standard to provide users with secure, decentralized identity management. The minimalistic design makes it easier to integrate into existing workflows without adding unnecessary complexity. -##### Service Providers: +#### Service Providers Platforms offering services such as decentralized finance (DeFi), gaming, or social networking can integrate this standard to verify user identities without relying on centralized authorities. This reduces the risk of fraud and enhances user trust. -##### Enterprises: +#### Enterprises Companies looking to integrate blockchain-based identity solutions into their existing systems can use this standard to ensure secure and privacy-preserving identity verification. This allows for a seamless transition to decentralized technologies while maintaining user privacy and security. -##### Developers of Interoperability Solutions: +#### Developers of Interoperability Solutions Those working on cross-platform and cross-blockchain interoperability can implement this standard to enable a unified identity verification mechanism across different systems, reducing complexity and increasing user control over their identities. ### Differentiation From 9478bf679cec804a38b82502013afe9abfc0bb51 Mon Sep 17 00:00:00 2001 From: Sam Wilson <57262657+SamWilsn@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:32:50 -0500 Subject: [PATCH 17/21] Update erc-7734.md --- ERCS/erc-7734.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index 9f051f56bc..4b06e62044 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -49,14 +49,14 @@ The Decentralized Identity Verification (DID) standard introduces a simple, secu A smart contract that acts as the central authority for identity verification. The contract stores the status of identity verifications for users and ensures that verification events are triggered securely and transparently. #### Verification Function -The verifyIdentity function allows a user to submit two verification hashes that represent off-chain proofs or attestations of identity. These hashes can be derived from external sources such as third-party verifiers, documents, or attestations.The function compares the provided hashes and updates the identity verification status accordingly. +The `verifyIdentity` function allows a user to submit two verification hashes that represent off-chain proofs or attestations of identity. These hashes can be derived from external sources such as third-party verifiers, documents, or attestations.The function compares the provided hashes and updates the identity verification status accordingly. ##### Input Parameters: **identityHash:** A cryptographic hash representing the user's identity. **verificationHash:** A cryptographic hash derived from the proof or attestation used to verify the identity. #### IdentityVerified Event -The IdentityVerified event is emitted when the user's identity verification is successfully updated. This event ensures traceability and transparency, allowing dApp developers and users to track verification statuses. +The `IdentityVerified` event is emitted when the user's identity verification is successfully updated. This event ensures traceability and transparency, allowing dApp developers and users to track verification statuses. #### Identity Structure The identity is a simple structure represented by a unique address (public key). Additional identity attributes, such as name or age, are optional and left to off-chain management. This minimal approach keeps the implementation lean, avoiding unnecessary complexity and encouraging broader adoption. @@ -108,12 +108,11 @@ interface IDecentralizedIdentity { // identity The decentralized identity struct. function getIdentity(address userAddress) external view returns (Identity memory); } - ``` ## Rationale -The design leverages cryptographic hashes to represent identity information, ensuring that sensitive data is not stored directly on the blockchain. The use of verificationHashes allows for flexible identity verification mechanisms. These hashes could be derived from various off-chain proofs, such as cryptographic challenges or attestations, depending on the implementer's needs. By leaving the interpretation of the verification hashes open, the standard enables adaptability while maintaining privacy and security. Additionally, the inclusion of events ensures transparency and traceability. +The design leverages cryptographic hashes to represent identity information, ensuring that sensitive data is not stored directly on the blockchain. The use of `verificationHashes` allows for flexible identity verification mechanisms. These hashes could be derived from various off-chain proofs, such as cryptographic challenges or attestations, depending on the implementer's needs. By leaving the interpretation of the verification hashes open, the standard enables adaptability while maintaining privacy and security. Additionally, the inclusion of events ensures transparency and traceability. ## Reference Implementation @@ -190,7 +189,6 @@ contract DecentralizedIdentity is IDecentralizedIdentity { **Replay Attacks**: Verification hashes should incorporate nonces or timestamps to prevent replay attacks. **Implementation Flexibility**: Developers must ensure that hash generation and validation processes are robust and resistant to manipulation. - ## Copyright Copyright and related rights waived via [CC0](../LICENSE.md). From ac1e8fb9f2a6700e3258a1ed69f0f431ed91a2fb Mon Sep 17 00:00:00 2001 From: Anushka Yadav <71181022+64anushka@users.noreply.github.com> Date: Tue, 10 Dec 2024 22:08:48 +0530 Subject: [PATCH 18/21] Update erc-7734.md --- ERCS/erc-7734.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index 4b06e62044..5e808913d2 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -4,7 +4,7 @@ title: Decentralized Identity Verification (DID) description: A privacy-preserving method for decentralized identity verification, enabling secure integration of identity management in dApps. author: Anushka Yadav (@64anushka) <64anushka@gmail.com> discussions-to: https://ethereum-magicians.org/t/discussion-on-decentralized-identity-verification-did-standard/20392 -status: Draft +status: Review type: Standards Track category: ERC created: 2024-06-26 From f1f40bb39829b9f994f017b7fafcf2f4234a46d2 Mon Sep 17 00:00:00 2001 From: Anushka Yadav <71181022+64anushka@users.noreply.github.com> Date: Tue, 10 Dec 2024 22:41:06 +0530 Subject: [PATCH 19/21] Update erc-7734.md --- ERCS/erc-7734.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index 5e808913d2..4b06e62044 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -4,7 +4,7 @@ title: Decentralized Identity Verification (DID) description: A privacy-preserving method for decentralized identity verification, enabling secure integration of identity management in dApps. author: Anushka Yadav (@64anushka) <64anushka@gmail.com> discussions-to: https://ethereum-magicians.org/t/discussion-on-decentralized-identity-verification-did-standard/20392 -status: Review +status: Draft type: Standards Track category: ERC created: 2024-06-26 From ccdffa5e8850efc74b219639800518010d1124c9 Mon Sep 17 00:00:00 2001 From: Anushka Yadav <71181022+64anushka@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:05:24 +0530 Subject: [PATCH 20/21] Update erc-7734.md --- ERCS/erc-7734.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index 4b06e62044..5e808913d2 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -4,7 +4,7 @@ title: Decentralized Identity Verification (DID) description: A privacy-preserving method for decentralized identity verification, enabling secure integration of identity management in dApps. author: Anushka Yadav (@64anushka) <64anushka@gmail.com> discussions-to: https://ethereum-magicians.org/t/discussion-on-decentralized-identity-verification-did-standard/20392 -status: Draft +status: Review type: Standards Track category: ERC created: 2024-06-26 From 1f8973ebb221f090b9e870f0531a0dec5af6d52e Mon Sep 17 00:00:00 2001 From: Sam Wilson <57262657+SamWilsn@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:57:34 -0500 Subject: [PATCH 21/21] Update erc-7734.md --- ERCS/erc-7734.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ERCS/erc-7734.md b/ERCS/erc-7734.md index 5e808913d2..4b06e62044 100644 --- a/ERCS/erc-7734.md +++ b/ERCS/erc-7734.md @@ -4,7 +4,7 @@ title: Decentralized Identity Verification (DID) description: A privacy-preserving method for decentralized identity verification, enabling secure integration of identity management in dApps. author: Anushka Yadav (@64anushka) <64anushka@gmail.com> discussions-to: https://ethereum-magicians.org/t/discussion-on-decentralized-identity-verification-did-standard/20392 -status: Review +status: Draft type: Standards Track category: ERC created: 2024-06-26