Skip to content

zkMeLabs/zkme-did-method-spec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

zkMe DID Method Specification

Preface

The zkme-did method specification is in compliance with the DID requirements specified by the W3C Credentials Community Group. For a more detailed understanding of DID and other DID method specifications, please refer to this resource.

Abstract

The zkMe DID method allows any Ethereum key pair account to become a valid identity. For registration of the DID Document, a smart contract has been deployed on Zetachain testnet address specified at registry-contract

Target System

The zkme-did-registry contract is deployed on

  1. Zetachain Testnet

DID Method Name

The DID uri for zkMe specific DID method is: 'zkme' . A DID uri on Zetachain testnet will entail a prefix of order "did:zkme:testnet".

DID Method Specific Identifier

For the zkMe DID representation, the MSI (Method Specific Identifier) is an ethereum address, which can also be called as a Hex encoded secp256k1 compressed public key.

For Zetachain testnet

did:zkme:testnet:0x2acE1D0d919293D10Ef7611bC768F5386d908fc2

CRUD

Register

To create a zkMe DID, the user is required to either hold a public key, of a Ethereum wallet.

Next the user will initiate a call to the registerDID function with the generated DID uri and other parameters as contract address and RPC url(for chain identification). The function will create a corresponding DID Document of format given below and it will be logged on chain.

{
	"@context": "https://w3id.org/did/v1",
	"id": "did:zkme:testnet:0x2acE1D0d919293D10Ef7611bC768F5386d908fc2",
	"verificationMethod": [{
		"id": "did:zkme:testnet:0x2acE1D0d919293D10Ef7611bC768F5386d908fc2",
		"type": "EcdsaSecp256k1VerificationKey2019",
		"controller": "did:zkme:testnet:0x2acE1D0d919293D10Ef7611bC768F5386d908fc2",
		"publicKeyBase58": "7Lnm1frErwLwwZB1x2XbweLauYJpAZBjGxAXk55u248DEGGKF62apu9QuekaE3d7jMUUeHjk2F4sSYqKF3oeQ6b3ZLuMb"
	}]
}

Transaction Fee

To register a DID on the Zetachain platform, a small fee in the form of gas will be required. This gas fee is paid in Zetachain's native token, the AZETA token. Transactions involving Create, Update, and Delete operations will require a transaction fee.

Resolve

To resolve a DID, you need to fetch the DID document registered on the chain. When you query the resolver with a DID, it returns the associated DID document. The resolver sends out a query to fetch the registered DID document from the chain. This document can then be used for signing or verification purposes.

Update

There is a standard set of rules defining how a DID document should be created, but sometimes there may be a need to update the DID document. To assist users with this process, the zkMe DID method has been improved to include the ability to update a DID. This functionality is only available to the controller or owner of the DID.

Delete

The owner of a DID document has the authority to control their instance of the document on the chain. To maintain true ownership, the network allows the user to delete their instance of the DID document from the blockchain at any time. It's important to note that only the owner or controller of the DID document will have permission to delete the instance.

Security Considerations

To improve security, all transactions to register, update, or delete a DID on Zetachain are signed using key pairs generated by the secp256k1 algorithm. If there are any vulnerabilities in this algorithm, they could also be reflected in the zkMe DID method protocol. Additionally, to further enhance security, the zkMe DID method implementation only stores the DID document on the blockchain with valid timestamps.

Privacy

In terms of privacy, a DID is pseudonymous. However, it's important for the user to note that since the DID zkMe is registered on a decentralized chain, it cannot be fully revoked. Additionally, once a DID document is registered, only the owner of the DID can update or revoke it as a privacy measure.

Reference Implementation

The users who wish to have a DID on Zetachain, are expected to use the refrence implementation of 'zkme-did-registrar' and 'zkme-did-resolver' to register and resolve zkMe based DID's on chain.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published