Many early DID methods were based on distributed ledgers or other decentralized infrastructure. The DID method presented here is did:git.
The primary intention of the did:git method is to support permissive commons by embedding licensing, rights, and financial obligations directly into the version control workflow, anchored via gitmark to the Bitcoin blockchain. This strips "digital slavery" out of the commons informatics supply chain.
The did:git method specification conforms to the requirements specified in the
Decentralized Identifiers v1.1 Specification [[DID-CORE]]. For more
information about DIDs and DID method specifications, please also see the
[[?DID-PRIMER]].
did:git:git@github.com:WebCivics/did-method-git.git
{
"@context": "https://www.w3.org/ns/did/v1",
"id": "did:git:github:WebCivics/did-method-git.git",
"publicKey": [
{
"id": "#keys-1",
"type": "RsaVerificationKey2018",
"owner": "did:git:github:WebCivics/did-method-git.git",
"publicKeyPem": ""
}
]
}
{
"@context": "https://www.w3.org/ns/did/v1",
"id": "did:git:github:WebCivics/did-method-git/",
'commit':"e59a1820d9f79c54655c16777949b1b09e378671",
"publicKey": [
{
"id": "#keys-1",
"type": "RsaVerificationKey2018",
"owner": "did:git:github:WebCivics",
"publicKeyPem": ""
}
]
}
The target system of the did:git method is the GIT distributed version control system, originally
authored by Linus Torvalds in 2005 for development of the Linux kernel. The source code for Git refers to the program as,
"the information manager from hell." source: WikiPedia
The method name that shall identify this DID method is: git.
A DID that uses this method MUST begin with the following prefix:
did:git. Per the DID specification, this string MUST be in
lowercase.
the method-specific identifier for a DID is a unique Git repository URL or Git commit hash. The repository URL identifies a specific Git repository that can be cloned and manipulated using the Git protocol, while the commit hash represents a specific commit in the Git repository. Both the repository URL and the commit hash can be used to verify the authenticity and integrity of the associated data, which is a key feature of the DID specification. The links to the formal rules describing valid GIT syntax will be added to the specification.
git-did = "did:git:" git-repo [ ":" commit-hash ]
The git-repo component can be a standard git URL, and the optional commit-hash anchors the resolution to a specific moment in the repository's history.
Creating a DID is done by:
The following steps MUST be executed to resolve a DID to a DID document using the
did:git method.
To read the DID document, the git repository must be accessible to the user. see the Read section.
To Fork a GIT Repo linked to a DID document, the git repository must be accessible to the user. see the Read section.
To create a pull request for a GIT Repo linked to a DID document, the git repository must be accessible to the user. see the Read section.
To create a pull request for a GIT Repo linked to a DID document, the git repository must be accessible to the user. see the Read section.
It's important to note that deactivating a DID using the DID:GIT method does not necessarily remove the associated data from the Git repository. Instead, it simply indicates that the DID is no longer active and should not be used for authentication or other purposes (see the Deactivate section).
Discuss if there should be a way to explicitly mark a git resource as "deactivated" or "deprecated".
To create a pull request for a GIT Repo linked to a DID document, the git repository must be accessible to the user. see the Read section.
It's important to note that deactivating a DID using the DID:GIT method does not necessarily remove the associated data from the Git repository. Instead, it simply indicates that the DID is no longer active and should not be used for authentication or other purposes (see the Deactivate section).
Discuss if there should be a way to explicitly mark a git resource as "deactivated" or "deprecated".
To create a pull request for a GIT Repo linked to a DID document, the git repository must be accessible to the user. see the Read section.
It's important to note that deactivating a DID using the DID:GIT method does not necessarily remove the associated data from the Git repository. Instead, it simply indicates that the DID is no longer active and should not be used for authentication or other purposes (see the Deactivate section).
Discuss if there should be a way to explicitly mark a git resource as "deactivated" or "deprecated".
Similar to this specification, [[?DID-WEB]] also defines a new DID method based on domain names. The syntax
of the identifiers is equivalent with the exceptions that 1. the method name in this specification is
git instead of
web, and 2. the did:web method also allows an optional colon-separated path
component as part of its method-specific identifier, which is not supported by this specification. In terms
of functionality, the main difference between the two methods is that while the did:web
method requires both git and web infrastructure for its operation, the did:git method requires
only git infrastructure.
The [[?DID-IN-git]] specification also provides a way to connect existing git infrastructure with DIDs. It uses similar Resource Records (RRs). It however does not define a new DID method specification; rather, it defines a way of discovering a DID (using any DID method) from a domain name, using the git infrastructure and protocol. This is intended for use cases where a domain name is used for bootstrapping initial relationships or interactions, but the domain name is not intended to be used beyond such an initial step.
Similar to [[?DID-IN-git]], the [[?WELL-KNOWN-DID]] specification also does not define a new DID method and is rather used for discovery of a DID (using any DID method) via an existing domain name.
As the discovery
mechanism, it uses a /.well-known/ path (see [[DID-WEB]]) on a web server in addition to git.
In addition to public permissive commons, did:git natively supports Private Shared Resources (e.g., private relationship logs or sensitive shared data) by leveraging the cryptographic keys embedded in the W3C DID Documents.
Network Access Control: The SSH keys defined in the verificationMethod of authorized did:git identified entities can be mapped to Git transport hooks (e.g., Gitolite or native SSH constraints), thereby cryptographically restricting which users can fetch or push to the repository.
Payload Encryption: To guarantee data privacy even on untrusted hosts, did:git supports transparent file encryption (conceptually identical to git-crypt). The PGP public keys associated with authorized did:git identified users are used to encrypt the repository's files. Thus, the files remain encrypted at rest and in transit, and can only be decrypted locally by the authorized participants holding the corresponding private keys.
A separate specification will further define the native DID to SSH bindings (DID:SSH) for transport layer security.
To prevent metadata leakage (such as IP addresses and connection timing) that occurs even when payloads are encrypted, did:git natively supports the Nym Mixnet.
A Decentralized Identifier Document can express a Nym network address as a ServiceEndpoint. Git clients SHOULD route fetch and push operations through a Nym SOCKS5 proxy (e.g., nym-socks5-client) when resolving repositories hosted via Nym Network Requesters. This ensures true anonymity for both the repository host and the identified users communicating with it.
Git natively supports several signature standards. The did:git method parses these raw commit signatures and maps them to standard W3C verificationMethod cryptographic suites.
The required mappings are as follows:
-----BEGIN SSH SIGNATURE----- with ssh-ed25519 payload): Maps to Ed25519VerificationKey2020.-----BEGIN SSH SIGNATURE----- with ecdsa-sha2-nistp256 payload): Maps to EcdsaSecp256k1VerificationKey2019.-----BEGIN SSH SIGNATURE----- with ssh-rsa payload): Maps to RsaVerificationKey2018.-----BEGIN PGP SIGNATURE-----): Maps to PgpVerificationKey2021.-----BEGIN SIGNED MESSAGE-----): Maps to JsonWebKey2020 (or equivalent X.509 standards).
The base did:git method provides identity and verifiable history purely through the Git protocol. However, to support the Permissive Commons Profile, the use of gitmark is REQUIRED.
Gitmark anchors git commits to the Bitcoin blockchain using blocktrails key chaining. This enables the evaluation of permissive commons obligations and the tracking of financial contributions in a tamper-proof manner without requiring a centralized registry. For basic did:git resolution where obligation tracking is not needed, gitmark is optional.
A WebID is a URI that points to a profile document identifying a person, agent, or group, often utilized in decentralized web ecosystems like the Solid Project.
The did:git method is designed to natively operate as a valid WebID, seamlessly bridging W3C Decentralized Identifiers with WebID authentication paradigms (WebID-TLS and WebID-OIDC).
When a relying party (e.g., a Solid Pod) attempts to dereference a WebID, it performs HTTP Content Negotiation. While modern applications should request JSON-LD, many legacy Semantic Web agents strictly expect WebID profiles to be served in Turtle (.ttl) format.
To ensure maximum backward compatibility across the WebID and Solid ecosystems, did:git resolvers SHOULD support dynamic Content Negotiation for text/turtle. When an agent requests Accept: text/turtle, the resolver must dynamically synthesize and return a valid RDF Turtle string from the underlying JSON-LD DID Document, explicitly mapping the cryptographic verificationMethod arrays to standard cert:key and foaf:Agent triples.
WebID-TLS authentication requires the client to present an X.509 client certificate, which the server validates against the public key found in the WebID profile.
Because the did:git parser natively extracts X.509 S/MIME signatures from Git commits and maps them to JsonWebKey2020 (or equivalent) in the verificationMethod array, a did:git DID Document inherently exposes the exact cryptographic assertions required for WebID-TLS authentication. A user simply signs their repository commits with their client certificate to establish their WebID identity root.
The DID operations defined in this specification do not provide an immutable history of changes that is typical for other forms of blockchain/DLT based DID methods, and which can be used for auditing purposes. This can lead to certain attacks where the DID document is manipulated temporarily, or different DID documents are presented to different resolvers, without an easy way to detect this behavior.
Add further discussion and possible mitigations.
It has been made known that the DID Working Group has extensively discussed the meaning of "decentralized" identifiers, and various aspects of this terms. GIT is considered to be a decentralized system, in a traditional sense. Further considerations will be made to updated versions of the document.
TBA/TBD.
The author would like to acknowledge the people who work tirelessly often without recgonition, compensation or reembursement of costs associated to their work. The hope is that the consequence of works, that includes this specification and if / as needed, the one for DNS:SSH, are parts of work that will lead to better approaches being available to address the widespread problems associated with web slavery, as to better support human rights as they relate to the works done by people, seeking to make a better world for all.