{"id":25417427,"url":"https://github.com/zcloak-network/zk-did-method-specs","last_synced_at":"2026-02-07T16:33:05.487Z","repository":{"id":104424178,"uuid":"551396986","full_name":"zCloak-Network/zk-did-method-specs","owner":"zCloak-Network","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-28T06:31:51.000Z","size":8,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-23T20:56:48.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zCloak-Network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-10-14T10:19:52.000Z","updated_at":"2024-11-11T17:26:04.000Z","dependencies_parsed_at":"2023-03-13T00:00:36.170Z","dependency_job_id":null,"html_url":"https://github.com/zCloak-Network/zk-did-method-specs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zCloak-Network/zk-did-method-specs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zCloak-Network%2Fzk-did-method-specs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zCloak-Network%2Fzk-did-method-specs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zCloak-Network%2Fzk-did-method-specs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zCloak-Network%2Fzk-did-method-specs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zCloak-Network","download_url":"https://codeload.github.com/zCloak-Network/zk-did-method-specs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zCloak-Network%2Fzk-did-method-specs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29199802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T16:28:23.579Z","status":"ssl_error","status_checked_at":"2026-02-07T16:28:22.566Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-16T17:58:48.623Z","updated_at":"2026-02-07T16:33:05.454Z","avatar_url":"https://github.com/zCloak-Network.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZK DID Method Specification\n\n## Summary\n\nDecentralized identifiers (DIDs) are a new type of identifiers that enables verifiable, self-sovereign digital identity. This ZK DID method specification describes a new DID method -- `ZK DID`, defines how the `ZK DIDs` are stored, presents more details information about the corresponding DID Documents and how to do CRUD operations on `ZK DID` Documents.\n\nThis specification conforms to the requirements specified in the [DID specification[1]](https://www.w3.org/TR/did-core/) currently published by the W3C Credentials Community Group.\n\nUnlike other DID Methods, `ZK DID` uses a brand new `verifiableDataRegistry` -- [Arweave[2]](https://www.arweave.org/), which is a global permanent hard drive built on a specially modified blockchain known as blockweave. \n\n\n## ZK DID Method Name\n\nThe namestring that shall identify this DID method is: `zk`\n\nA DID that uses this method **MUST** begin with the following prefix: `did:zk`. Per the DID specification, this string **MUST** be in lowercase. \n\nThe remainder of the DID, after the prefix, is specified below.\n\n\n### ZK DID Method Specific Identifier\n\nFor now, the ZK DID method specific identifiers are categorized as two DID types, `EVM-based DID` and `Non-EVM-based DID`.\n\n### EVM-based DIDs\n\nA ZK EVM-based DID has the following structure:\n\n```\nzk-did  = \"did:zk:\" + \u003cuser-ethereum-address\u003e \nuser-ethereum-address = \"0x\" 40*HEXDIG\n```\n\n\n### Non-EVM-based DIDs\n\nA ZK Non-EVM-based DID has the following structure:\n\n```\nzk-did  = \"did:zk:\" + \u003cnon-evm-chain-name\u003e  + [ \":\" + \u003cuser-address\u003e ]\nnon-evm-chain-name = \"sui\" | \"aptos\" | ...\nuser-address = [a-zA-Z0-9]{1,64}\n```\n\n### ZK DID examples\n\n| did                                                       | type        | description\n|:----------------------------------------------------------|-------------|-----------------------------------------------------------------------------\n| did:zk:0x51fA67337...82EB6a9B22A   | EVM-based DID  | a `did` which relates to a brand new `Ethereum` address -- '0x51fA67337...82EB6a9B22A'\n| did:zk:sui:0xd5059a902ad02b...7ceaf7d6     | Non-EVM-based DID  | a `did` which relates to a brand new `Non-EVM-based` address -- '0xd5059a902ad02b...7ceaf7d6'\n\n\n\n## DID Document\n\n\n### Elements of a DID Document\n\nA DID Document associated with a ZK DID is a set of data describing a DID subject. The representation of a DID Document when requested for production  MUST meet the DID Core specifications.\n\nThe following elements are needed for a W3C specification compliant DID Document representation:\n- `@context`: A list of strings with links or JSONs for describing specifications that this DID Document is following to.\n- `id`: Target DID with ZK DID Method prefix `did:zk:` or `did:zk:\u003cnon-evm-chain-name\u003e:` (according to the network) and a unique-id identifier.\n- `controller`: A list of fully qualified DID strings or one string. Contains one or more ZK DIDs who can control this DID Document.\n- `verificationMethod`: A list of Verification Methods.\n- `authentication` (optional): A list of strings with key aliases or IDs.\n- `assertionMethod` (optional): A list of strings with key aliases or IDs.\n- `keyAgreement` (optional): A list of strings with key aliases or IDs.\n- `capabilityInvocation` (optional): A list of strings with key aliases or IDs\n- `capabilityDelegation` (optional): A list of strings with key aliases or IDs.\n- `service` (optional): A set of Service Endpoint maps.\n\n\n### DID Document Example\n* `EVM-based` DID Document example\n\n```json\n{\n  \"@context\": [ \"https://www.w3.org/ns/did/v1\"],\n  \"id\": \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1\",\n  \"controller\": [ \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1\" ],\n  \"verificationMethod\": [\n    {\n      \"id\": \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1#key-0\",\n      \"controller\": \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1\",\n      \"type\": \"EcdsaSecp256k1VerificationKey2019\",\n      \"publicKeyMultibase\": \"zgz4zgTUcbvduVZ1Jf3MNMeVeRYP2eiKDJnY7A6PCq3ew\"\n    },\n    {\n      \"id\": \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1#key-1\",\n      \"controller\": \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1\",\n      \"type\": \"X25519KeyAgreementKey2019\",\n      \"publicKeyMultibase\": \"zEi6rdNHidYZdHyvKYX9sdKka32o6Xq5kP1umoL3Hv1mL\"\n    }\n  ],\n  \"authentication\": [ \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1#key-0\" ],\n  \"assertionMethod\": [ \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1#key-0\" ],\n  \"keyAgreement\": [ \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1#key-1\" ],\n  \"capabilityInvocation\": [ \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1#key-0\" ],\n  \"capabilityDelegation\": [ \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1#key-0\" ],\n  \"service\": []\n}\n```\n\n* `Non-EVM-based` DID Document example\n```json\n{\n  \"@context\": [ \"https://www.w3.org/ns/did/v1\"],\n  \"id\": \"did:zk:sui:0xe9f5c3e0a721335e08bcc1168d606257418fc847\",\n  \"controller\": [ \"did:zk:sui:0xe9f5c3e0a721335e08bcc1168d606257418fc847\" ],\n  \"verificationMethod\": [\n    {\n      \"id\": \"did:zk:sui:0xe9f5c3e0a721335e08bcc1168d606257418fc847#key-0\",\n      \"controller\": \"did:zk:sui:0xe9f5c3e0a721335e08bcc1168d606257418fc847\",\n      \"type\": \"Ed25519\",\n      \"publicKeyMultibase\": \"z28Ua2trQFi6EcXutLiHto6wx6AvJM28i4XLNHkQUVm8fJ\"\n    },\n    {\n      \"id\": \"did:zk:sui:0xe9f5c3e0a721335e08bcc1168d606257418fc847#key-1\",\n      \"controller\": \"did:zk:sui:0xe9f5c3e0a721335e08bcc1168d606257418fc847\",\n      \"type\": \"X25519KeyAgreementKey2019\",\n      \"publicKeyMultibase\": \"zGnC9ZV1EJoq2DHLBXNboBzhUysTvTYAhUCRspymTjXe\"\n    }\n  ],\n  \"authentication\": [ \"did:zk:sui:0xe9f5c3e0a721335e08bcc1168d606257418fc847#key-0\" ],\n  \"assertionMethod\": [ \"did:zk:sui:0xe9f5c3e0a721335e08bcc1168d606257418fc847#key-0\" ],\n  \"keyAgreement\": [ \"did:zk:sui:0xe9f5c3e0a721335e08bcc1168d606257418fc847#key-1\" ],\n  \"capabilityInvocation\": [ \"did:zk:sui:0xe9f5c3e0a721335e08bcc1168d606257418fc847#key-0\" ],\n  \"capabilityDelegation\": [ \"did:zk:sui:0xe9f5c3e0a721335e08bcc1168d606257418fc847#key-0\" ],\n  \"service\": []\n}\n```\n\n### Supported cryptography\n\nCurrently, two public key and signing algorithms are supported:\n\n- [`Ed25519`](https://en.wikipedia.org/wiki/EdDSA#Ed25519) -- the EdDSA signature scheme using [SHA-512](https://en.wikipedia.org/wiki/SHA-2) (SHA-2) and [Curve25519](https://en.wikipedia.org/wiki/Curve25519).\n- [`Secp256k1`](https://en.bitcoin.it/wiki/Secp256k1) with the ECDSA algorithm -- defined in [*Standards for Efficient Cryptography (SEC)* (Certicom Research)](http://www.secg.org/sec2-v2.pdf).\n- [`X25519`](https://en.wikipedia.org/wiki/Curve25519) --  is an elliptic curve[ Diffie-Hellman key exchange](https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange) using [Curve25519](https://en.wikipedia.org/wiki/Curve25519). It allows two parties to jointly agree on a shared secret using an insecure channel.\n\n\n### Verification method\n\nVerification methods are used to define how to authenticate / authorise interactions with a DID subject.\n\n- `id` (string): A string with prefix `did:zk:` or `did:zk:\u003cnon-evm-chain-name\u003e:`.\n- `type` (string): A string that references exactly one verification method type. For now, only `EcdsaSecp256k1VerificationKey2019`, `Ed25519` and `X25519KeyAgreementKey2019` are supported.\n- `controller`(string): A string with fully qualified ZK DID. The ZK DID must exist.\n- `publicKeyHex`(HexString): A Hex String representation of the `publickKey`.\n\nExample of Verification method in a DID Document:\n```json\n  \"verificationMethod\": [\n    {\n      \"id\": \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1#key-0\",\n      \"controller\": \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1\",\n      \"type\": \"EcdsaSecp256k1VerificationKey2019\",\n      \"publicKeyMultibase\": \"zgz4zgTUcbvduVZ1Jf3MNMeVeRYP2eiKDJnY7A6PCq3ew\"\n    },\n    {\n      \"id\": \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1#key-1\",\n      \"controller\": \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1\",\n      \"type\": \"X25519KeyAgreementKey2019\",\n      \"publicKeyMultibase\": \"zEi6rdNHidYZdHyvKYX9sdKka32o6Xq5kP1umoL3Hv1mL\"\n    }\n  ]\n```\n\n### Verifiable Data Registry using Arweave\n\nCurrently, we build the ZK DID Method with an unique VDR -- **Arweave**. [Arweave]((https://www.arweave.org/)) is a distributed, cryptographically verified permanent archive built on a cryptocurrency that aims to provide permanent data storage. It allows users to pay once and store their data permanently on the Arweave network.\n\nIn Arweave, *Tags* are important when a user tries to retrieve certain transactions. *Tags* are key-value pairs of data that will be processed by Arweave. Users can query Arweave Transactions via `Tags`, `Owners`, `Recipients` and many other elements. This property plays a significant role during the resolution phrase.\n\n##  CRUD Operations\n\nZK DID is registered and managed on a dedicated DID Registry on Arweave.\n\n- Anyone can create ZK DID by interacting with zCloak DID Registry Manager. We provide [`create`](https://github.com/zCloak-Network/zkid-sdk/blob/master/packages/did/src/did/helpers.ts#L148-L216) function in our SDK.\n- Anyone can read (resolve) the DID documents by accessing public Arweave network nodes. We also provide [`resolve`](https://github.com/zCloak-Network/zkid-sdk/blob/master/packages/did-resolver/src/DidResolver.ts#L23-L28) funtion in our SDK to help achieve that.\n\n### Create (Register)\n\nA ZK DID can be created via the [DID Create SDK[3]](https://github.com/zCloak-Network/zkid-sdk/blob/master/packages/did/src/did/helpers.ts#L148-L216) as explained below.\n\nA ZK DID supports the following keys: authentication key, key agreement key, assertion key, capabilityInvocation key and capabilityDelegation key.\n\nEach authentication key, assertion key, capabilityInvocation key and capabilityDelegation key are generated through `ecdsa-secp256k1` or `Ed25519`. For key agreement key, currently, only `x25519` is supported.\n\nTo generate and store the new ZK DID on the Arweave, the DID controller must sign the `DID Document`. The DID Document along with the signature are stored in Arweave as one document. \n\nThis operation creates a new DID using the `did:zk` method along with associated DID Document.\n\n- `mnemonic`: valid bip39 mnemonic phrase\n- `keyring`: an instance of 'KeyringInstance'\n\n\n#### Client request format for create DID \n\nCheck more coding details about the `Creating DID functionin` our [SDK](https://github.com/zCloak-Network/zkid-sdk/blob/master/packages/did/src/did/helpers.ts#L148-L216).\n\n```ts\nexport function createEcdsaFromMnemonic(\n  mnemonic: string,\n  keyring: KeyringInstance = new Keyring()\n): Did\n```\n\n#### Example of Creating DID request\n\n```ts\nimport { helpers, Did } from '@zcloak/did'\nimport { Keyring } from '@zcloak/keyring'\nimport type { IDidDetails } from '@zcloak/did/types';\n\nconst mnemonic = 'health correct setup usage father decorate curious copper sorry recycle skin equal';\nconst keyring: Keyring = new Keyring();\nconst did: Did = helpers.createEcdsaFromMnemonic(mnemonic, keyring);\n```\n\n### Read (Resolve)\n\nA DID with the type `did:zk` can be resolved using the resolve query to fetch a response from the Arweave. The response contains:\n\n- `did Document`: DID Document associated with the specified DID in a W3C specification compliant DID Doc structure.\n\n\n#### Client request format for read(resolve) DID\n\n[DID resolution requests[4]](https://github.com/zCloak-Network/zkid-sdk/blob/master/packages/did-resolver/src/DidResolver.ts#L23-L28) can be sent by passing the fully-qualified ZK DID String and retrieve the corresponding DID Document.\n\n```ts\npublic resolve(did: string): Promise\u003cDidDocument\u003e \n```\n\n#### Example of an get/resolve DID request\n\n```ts\nlet DidString = \"did:zk:0x11f8b77F34FCF14B7095BF5228Ac0606324E82D1\";\nlet DidDoc = resolve(DidString);\n```\n\n### Update (Replace)\n\nNot supported yet. Documents stored in Arweave are permanent and tamper-proof. Update of DID Document can be supported by appending a new version of the DID Document to the old one. This function will be supported in the future.\n\n### Delete (Revoke)\n\nNot supported yet. Documents stored in Arweave are permanent and tamper-proof. Revocation of a DID Document can be supported by appending a revoke document with a controller signature. This function will be supported in the future.\n\n## Security and Privacy Considerations\nThere are several security and privacy considerations that implementers would want to take into consideration when implementing this specification. \n\n1. Data Forgery Prevention\n\nZK DID Method prevents forgery and falsification through Arweave and Digital Signature. With Arweave, all DID Documents are stored permanently. With digital signature, only the controller of the DID Document is capable of managing the DID Document.\n\n2. Eavesdropping\n\nEavesdropping attacks are not applicable since all exchanged data is public and does not include any personal information about the user.\n\n3. Cryptographic Agility\n\nAs described in the Supported Cryptography section, currently `EcdsaSecp256k1VerificationKey2019`, `Ed25519` and `X25519KeyAgreementKey2019` are supported.  This can be easily extended by using other multicodec encoded keys.\n\n4. Keep DID Keys safe\n\nSince the key material is part of the identifier, and there is no support for key rotation at present, if the key is compromised then the identifier becomes unusable and unrecoverable.\n\n5. Keep personal data safe\n\nThe syntax and construction of a ZK DID and its associated DID Document helps to ensure that no Personally Identifiable Information (PII) or other personal data is exposed by these constructs.\n\nFurther, Implementers are strongly encouraged to review the [Security Considerations section](https://w3c.github.io/did-imp-guide/#security-considerations.) and the [Privacy Considerations section](https://w3c.github.io/did-imp-guide/#privacy-considerations) of the DID Implementation Guide.\n\nIn addition, consult the [Security Considerations section](https://www.w3.org/TR/did-core/#security-considerations) and the [Privacy Considerations section](https://www.w3.org/TR/did-core/#privacy-considerations) of the Decentralized Identifiers (DIDs) (DID-CORE) specification\n\n\n## Reference Implementations\n\n- [zk-did](https://github.com/zCloak-Network/zkid-sdk/tree/master/packages/did) -- the implementation of the ZK DID method.\n- [zk-did-resolver](https://github.com/zCloak-Network/zkid-sdk/tree/master/packages/did-resolver) -- ZK DID method resolver.\n\n## References\n\n[1] https://www.w3.org/TR/did-core/\n\n[2] https://www.arweave.org/\n\n[3] https://github.com/zCloak-Network/zkid-sdk/tree/master/packages/did\n\n[4] https://github.com/zCloak-Network/zkid-sdk/tree/master/packages/did-resolver","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcloak-network%2Fzk-did-method-specs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzcloak-network%2Fzk-did-method-specs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcloak-network%2Fzk-did-method-specs/lists"}