-
Notifications
You must be signed in to change notification settings - Fork 96
/
index.html
5729 lines (5291 loc) · 226 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<title>Decentralized Identifiers (DIDs) v1.1</title>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<!--
=== NOTA BENE ===
For the three scripts below, if your spec resides on dev.w3 you can check
them out in the same tree and use relative links so that they'll work
offline.
-->
<script class="remove"
src="https://unpkg.com/browse/jquery/dist/jquery.min.js"></script>
<script class="remove"
src="https://www.w3.org/Tools/respec/respec-w3c"></script>
<script class="removeOnSave"
src="https://unpkg.com/reqlist/lib/reqlist.js"></script>
<link class="removeOnSave" rel="stylesheet" type="text/css"
href="https://unpkg.com/reqlist/lib/reqlist.css" />
<script class='remove' src="./common.js"></script>
<script class="remove" type="text/javascript">
var respecConfig = {
// the W3C WG and public mailing list
group: "did",
wgPublicList: "public-did-wg",
// the specification's short name, as in http://www.w3.org/TR/short-name/
shortName: "did-core-1.1",
// specification status (e.g., WD, LCWD, NOTE, etc.). If in doubt use ED.
specStatus: "ED",
// W3C Proposed Recommendation information
//prEnd: "2021-08-31",
// W3C Candidate Recommendation information
//crEnd: "2021-07-13",
//implementationReportURI: "https://w3c.github.io/did-test-suite/",
// Editor's Draft URL
edDraftURI: "https://w3c.github.io/did-core/",
// subtitle for the spec
subtitle: "Core architecture, data model, and representations",
// if you wish the publication date to be other than today, set this
//publishDate: "2022-07-19",
// previously published draft, uncomment this and set its
// YYYY-MM-DD date and its maturity status
previousPublishDate: "2022-07-19",
previousMaturity: "REC",
// automatically allow term pluralization
pluralize: true,
// extend the bibliography entries
localBiblio: ccg.localBiblio,
xref: "web-platform",
github: {
repoURL: "https://github.com/w3c/did-core/",
branch: "main"
},
includePermalinks: false,
// Uncomment these to use the respec extension that generates a list of
// normative statements:
preProcess: [/*prepare_reqlist*/],
postProcess: [/*add_reqlist_button*/, restrictRefs],
// list of specification editors
editors: [{
name: "Manu Sporny", url: "http://manu.sporny.org/",
company: "Digital Bazaar", companyURL: "https://digitalbazaar.com/",
w3cid: 41758, note: "v1.0, v1.1"
}, {
name: "Dmitri Zagidulin", url: "https://digitalcredentials.mit.edu/",
company: "Invited Expert", w3cid: 86708,
note: "v1.0"
}, {
name: "Steve McCown",
note: "v1.0"
}],
formerEditors: [{
name: "Amy Guy",
url: "https://rhiaro.co.uk/",
company: "Digital Bazaar",
companyURL: "https://digitalbazaar.com/",
w3cid: 69000,
note: "v1.0"
}, {
name: "Markus Sabadello",
url: "https://www.linkedin.com/in/markus-sabadello-353a0821",
company: "Danube Tech",
companyURL: "https://danubetech.com/",
w3cid: 46729,
note: "v1.0"
}, {
name: "Drummond Reed",
url: "https://www.linkedin.com/in/drummondreed/",
company: "Evernym/Avast",
companyURL: "https://www.evernym.com/",
w3cid: 3096,
note: "v1.0"
}],
// list of specification authors
authors: [{
name: "Manu Sporny",
url: "http://manu.sporny.org/",
company: "Digital Bazaar",
companyURL: "https://digitalbazaar.com/",
w3cid: 41758
}, {
name: "Dave Longley",
url: "https://github.com/dlongley",
company: "Digital Bazaar",
companyURL: "https://digitalbazaar.com/",
w3cid: 48025
}, {
name: "Markus Sabadello",
url: "https://www.linkedin.com/in/markus-sabadello-353a0821",
company: "Danube Tech",
companyURL: "https://danubetech.com/",
w3cid: 46729
}, {
name: "Drummond Reed",
url: "https://www.linkedin.com/in/drummondreed/",
company: "Evernym/Avast",
companyURL: "https://www.evernym.com/",
w3cid: 3096
}, {
name: "Orie Steele",
url: "https://www.linkedin.com/in/or13b/",
company: "Transmute",
companyURL: "https://transmute.industries/"
}, {
name: "Christopher Allen",
url: "https://www.linkedin.com/in/christophera",
company: "Blockchain Commons",
companyURL: "https://www.BlockchainCommons.com",
w3cid: 85560
}],
otherLinks: [{
key: "Related Documents",
data: [{
value: "DID Use Cases and Requirements",
href: "https://www.w3.org/TR/did-use-cases/"
}, {
value: "DID Specification Registries",
href: "https://www.w3.org/TR/did-spec-registries/"
}, {
value: "DID Core Implementation Report",
href: "https://w3c.github.io/did-test-suite/"
}]
}],
//errata: "https://w3c.github.io/did-core/errata.html"
};
</script>
<style>
pre .highlight {
font-weight: bold;
color: green;
}
pre .comment {
color: SteelBlue;
user-select: none;
}
code a[href] {
color: inherit;
border-bottom: none;
}
code a[href]:hover {
border-bottom: 1px solid #c63501;
}
table.column-width-50 td {
width: 50%;
}
.longdesc {
display: none;
}
.longdesc:target {
display: block;
background-color: #ff9;
}
</style>
</head>
<body data-cite="infra rfc3986">
<section id='abstract'>
<p>
<a>Decentralized identifiers</a> (DIDs) are a new type of identifier that
enables verifiable, decentralized digital identity. A <a>DID</a> refers to any
subject (e.g., a person, organization, thing, data model, abstract entity, etc.)
as determined by the controller of the <a>DID</a>. In contrast to
typical, federated identifiers, <a>DIDs</a> have been designed so that they may
be decoupled from centralized registries, identity providers, and certificate
authorities. Specifically, while other parties might be used to help enable the
discovery of information related to a <a>DID</a>, the design enables the
controller of a <a>DID</a> to prove control over it without requiring permission
from any other party. <a>DIDs</a> are <a>URIs</a> that associate a <a>DID
subject</a> with a <a>DID document</a> allowing trustable interactions
associated with that subject.
</p>
<p>
Each <a>DID document</a> can express cryptographic material, <a>verification
methods</a>, or <a>services</a>, which provide a set of mechanisms enabling a
<a>DID controller</a> to prove control of the <a>DID</a>. <a>Services</a> enable
trusted interactions associated with the <a>DID subject</a>. A <a>DID</a> might
provide the means to return the <a>DID subject</a> itself, if the <a>DID
subject</a> is an information resource such as a data model.
</p>
<p>
This document specifies the DID syntax, a common data model, core properties,
serialized representations, DID operations, and an explanation of the process
of resolving DIDs to the resources that they represent.
</p>
</section>
<section id='sotd'>
<p>
This version of the DID Core specification, version 1.1, is experimental.
DO NOT implement it. If you want to implement DIDs, use the current version 1.0
specification: [[[DID-CORE]]].
</p>
</section>
<section class="informative">
<h1>Introduction</h1>
<p>
As individuals and organizations, many of us use globally unique identifiers in
a wide variety of contexts. They serve as communications addresses (telephone
numbers, email addresses, usernames on social media), ID numbers (for passports,
drivers licenses, tax IDs, health insurance), and product identifiers (serial
numbers, barcodes, RFIDs). URIs (Uniform Resource Identifiers) are used for
resources on the Web and each web page you view in a browser has a globally
unique URL (Uniform Resource Locator).
</p>
<p>
The vast majority of these globally unique identifiers are not under our
control. They are issued by external authorities that decide who or what they
refer to and when they can be revoked. They are useful only in certain contexts
and recognized only by certain bodies not of our choosing. They might
disappear or cease to be valid with the failure of an organization. They might
unnecessarily reveal personal information. In many cases, they can be
fraudulently replicated and asserted by a malicious third-party, which is
more commonly known as "identity theft".
</p>
<p>
The Decentralized Identifiers (DIDs) defined in this specification are a new
type of globally unique identifier. They are designed to enable individuals and
organizations to generate their own identifiers using systems they trust. These
new identifiers enable entities to prove control over them by authenticating
using cryptographic proofs such as digital signatures.
</p>
<p>
Since the generation and assertion of Decentralized Identifiers is
entity-controlled, each entity can have as many DIDs as necessary to maintain
their desired separation of identities, personas, and interactions. The use of
these identifiers can be scoped appropriately to different contexts. They
support interactions with other people, institutions, or systems that require
entities to identify themselves, or things they control, while providing control
over how much personal or private data should be revealed, all without depending
on a central authority to guarantee the continued existence of the identifier.
These ideas are explored in the DID Use Cases document [[DID-USE-CASES]].
</p>
<p>
This specification does not presuppose any particular technology or cryptography
to underpin the generation, persistence, resolution, or interpretation of DIDs.
For example, implementers can create Decentralized Identifiers based on
identifiers registered in federated or centralized identity management systems.
Indeed, almost all types of identifier systems can add support for DIDs. This
creates an interoperability bridge between the worlds of centralized, federated,
and decentralized identifiers. This also enables implementers to design specific
types of DIDs to work with the computing infrastructure they trust, such as
distributed ledgers, decentralized file systems, distributed databases, and
peer-to-peer networks.
</p>
<p>
This specification is for:
</p>
<ul>
<li>
Anyone that wants to understand the core architectural principles that
are the foundation for Decentralized Identifiers;
</li>
<li>
Software developers that want to produce and consume Decentralized Identifiers
and their associated data formats;
</li>
<li>
Systems integrators that want to understand how to use Decentralized
Identifiers in their software and hardware systems;
</li>
<li>
Specification authors that want to create new DID infrastructures, known as DID
methods, that conform to the ecosystem described by this document.
</li>
</ul>
<p>
In addition to this specification, readers might find the
Use Cases and Requirements for Decentralized Identifiers [[DID-USE-CASES]]
document useful.
</p>
<section class="informative">
<h2>A Simple Example</h2>
<p>
A <a>DID</a> is a simple text string consisting of three parts: 1) the
<code>did</code> URI scheme identifier, 2) the identifier for the <a>DID
method</a>, and 3) the DID method-specific identifier.
</p>
<figure id="parts-of-a-did">
<img style="margin: auto; display: block; width: 75%;"
src="diagrams/parts-of-a-did.svg" alt="
A diagram showing the parts of a DID. The left-most letters spell 'did' in blue,
are enclosed in a horizontal bracket from above and a label that reads 'scheme'
above the bracket. A gray colon follows the 'did' letters. The middle letters
spell 'example' in magenta, are enclosed in a horizontal bracket from below and
a label that reads 'DID Method' below the bracket. A gray colon follows the
DID Method. Finally, the letters at the end read '123456789abcdefghi' in
green, are enclosed in a horizontal bracket from below and a label that
reads 'DID Method Specific String' below the bracket.
" >
<figcaption>
A simple example of a decentralized identifier (DID)
</figcaption>
</figure>
<p>
The example <a>DID</a> above resolves to a <a>DID document</a>. A <a>DID
document</a> contains information associated with the <a>DID</a>, such as ways
to cryptographically <a>authenticate</a> a <a>DID controller</a>.
</p>
<pre class="example nohighlight" title="A simple DID document">
{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"id": "did:example:123456789abcdefghi",
"authentication": [{
<span class="comment">// used to authenticate as did:...fghi</span>
"id": "did:example:123456789abcdefghi#keys-1",
"type": "Ed25519VerificationKey2020",
"controller": "did:example:123456789abcdefghi",
"publicKeyMultibase": "z6MkmM42vxfqZQsv4ehtTjFFxQ4sQKS2w6WR7emozFAn5cxu"
}]
}
</pre>
</section>
<section class="informative">
<h2>Design Goals</h2>
<p>
<a>Decentralized Identifiers</a> are a component of larger systems, such as the
Verifiable Credentials ecosystem [[VC-DATA-MODEL]], which influenced the design
goals for this specification. The design goals for Decentralized Identifiers
are summarized here.
</p>
<table class="simple">
<thead>
<tr>
<th>
Goal
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Decentralization
</td>
<td>
Eliminate the requirement for centralized authorities or single points of
failure in identifier management, including the registration of globally unique
identifiers, public verification keys, <a>services</a>, and other information.
</td>
</tr>
<tr>
<td>
Control
</td>
<td>
Give entities, both human and non-human, the power to directly control their
digital identifiers without the need to rely on external authorities.
</td>
</tr>
<tr>
<td>
Privacy
</td>
<td>
Enable entities to control the privacy of their information, including minimal,
selective, and progressive disclosure of attributes or other data.
</td>
</tr>
<tr>
<td>
Security
</td>
<td>
Enable sufficient security for requesting parties to depend on <a>DID
documents</a> for their required level of assurance.
</td>
</tr>
<tr>
<td>
Proof-based
</td>
<td>
Enable <a>DID controllers</a> to provide cryptographic proof when interacting
with other entities.
</td>
</tr>
<tr>
<td>
Discoverability
</td>
<td>
Make it possible for entities to discover <a>DIDs</a> for other entities, to
learn more about or interact with those entities.
</td>
</tr>
<tr>
<td>
Interoperability
</td>
<td>
Use interoperable standards so <a>DID</a> infrastructure can make use of
existing tools and software libraries designed for interoperability.
</td>
</tr>
<tr>
<td>
Portability
</td>
<td>
Be system- and network-independent and enable entities to use their digital
identifiers with any system that supports <a>DIDs</a> and <a>DID methods</a>.
</td>
</tr>
<tr>
<td>
Simplicity
</td>
<td>
Favor a reduced set of simple features to make the technology easier to
understand, implement, and deploy.
</td>
</tr>
<tr>
<td>
Extensibility
</td>
<td>
Where possible, enable extensibility provided it does not greatly hinder
interoperability, portability, or simplicity.
</td>
</tr>
</tbody>
</table>
</section>
<section class="informative">
<h2>
Architecture Overview
</h2>
<p>
This section provides a basic overview of the major components of
Decentralized Identifier architecture.
</p>
<figure id="brief-architecture-overview">
<img style="margin: auto; display: block; width: 75%;"
src="diagrams/did_brief_architecture_overview.svg" alt="
DIDs and DID documents are recorded on a Verifiable Data Registry; DIDs resolve
to DID documents; DIDs refer to DID subjects; a DID controller controls a DID
document; DID URLs contains a DID; DID URLs dereferenced to DID document
fragments or external resources.
" >
<figcaption>
Overview of DID architecture and the relationship of the basic components.
See also: <a class="longdesc-link"
href="#brief-architecture-overview-longdesc">narrative description</a>.
</figcaption>
</figure>
<div class="longdesc" id="brief-architecture-overview-longdesc">
<p>
Six internally-labeled shapes appear in the diagram, with labeled arrows
between them, as follows. In the center of the diagram is a rectangle labeled
DID URL, containing small typewritten text "did:example:123/path/to/rsrc". At
the center top of the diagram is a rectangle labeled, "DID", containing small
typewritten text "did:example:123". At the top left of the diagram is an oval,
labeled "DID Subject". At the bottom center of the diagram is a rectangle
labeled, "DID document". At the bottom left is an oval, labeled, "DID
Controller". On the center right of the diagram is a two-dimensional rendering
of a cylinder, labeled, "Verifiable Data Registry".
</p>
<p>
From the top of the "DID URL" rectangle, an arrow, labeled "contains", extends
upwards, pointing to the "DID" rectangle. From the bottom of the "DID URL"
rectangle, an arrow, labeled "refers, and
<strong><em>dereferences</em></strong>, to", extends downward, pointing to the
"DID document" rectangle. An arrow from the "DID" rectangle, labeled
"<strong><em>resolves</em></strong> to", points down to the "DID document"
rectangle. An arrow from the "DID" rectangle, labeled "refers to", points left
to the "DID subject" oval. An arrow from the "DID controller" oval, labeled
"controls", points right to the "DID document" rectangle. An arrow from the
"DID" rectangle, labeled "recorded on", points downards to the right, to the
"Verifiable Data Registry" cylinder. An arrow from the "DID document" rectangle,
labeled "recorded on", points upwards to the right to the "Verifiable Data
Registry" cylinder.
</p>
</div>
<dl>
<dt>
DIDs and DID URLs
</dt>
<dd>
A Decentralized Identifier, or <a>DID</a>, is a <a>URI</a> composed of three
parts: the scheme <code>did:</code>, a method identifier, and a unique,
method-specific identifier specified by the <a>DID method</a>. <a>DIDs</a> are
resolvable to <a>DID documents</a>. A <a>DID URL</a> extends the syntax of a
basic <a>DID</a> to incorporate other standard <a>URI</a> components such as
path, query, and fragment in order to locate a particular
<a>resource</a>—for example, a cryptographic public key inside a <a>DID
document</a>, or a <a>resource</a> external to the <a>DID document</a>.
These concepts are elaborated upon in <a href="#did-syntax"></a> and <a
href="#did-url-syntax"></a>.
</dd>
<dt>
DID subjects
</dt>
<dd>
The subject of a <a>DID</a> is, by definition, the entity identified by the
<a>DID</a>. The <a>DID subject</a> might also be the <a>DID controller</a>.
Anything can be the subject of a <a>DID</a>: person, group, organization,
thing, or concept. This is further defined in <a href="#did-subject"></a>.
</dd>
<dt>
DID controllers
</dt>
<dd>
The <a>controller</a> of a <a>DID</a> is the entity (person, organization, or
autonomous software) that has the capability—as defined by a <a>DID
method</a>—to make changes to a <a>DID document</a>. This capability is
typically asserted by the control of a set of cryptographic keys used by
software acting on behalf of the controller, though it might also be asserted
via other mechanisms. Note that a <a>DID</a> might have more than one
controller, and the <a>DID subject</a> can be the <a>DID controller</a>, or one
of them. This concept is documented in <a href="#did-controller"></a>.
</dd>
<dt>
Verifiable data registries
</dt>
<dd>
In order to be resolvable to <a>DID documents</a>, <a>DIDs</a> are typically
recorded on an underlying system or network of some kind. Regardless of the
specific technology used, any such system that supports recording <a>DIDs</a>
and returning data necessary to produce <a>DID documents</a> is called a
<a>verifiable data registry</a>. Examples include <a>distributed ledgers</a>,
decentralized file systems, databases of any kind, peer-to-peer networks, and
other forms of trusted data storage. This concept is further elaborated upon in
<a href="#methods"></a>.
</dd>
<dt>
DID documents
</dt>
<dd>
<a>DID documents</a> contain information associated with a <a>DID</a>. They
typically express <a>verification methods</a>, such as cryptographic public
keys, and <a>services</a> relevant to interactions with the <a>DID subject</a>.
The generic properties supported in a <a>DID document</a> are specified in <a
href="#core-properties"></a>. A <a>DID document</a> can be serialized to a byte
stream (see <a href="#representations"></a>). The properties present in
a <a>DID document</a> can be updated according to the applicable operations
outlined in <a href="#methods"></a>.
</dd>
<dt>
DID methods
</dt>
<dd>
<a>DID methods</a> are the mechanism by which a particular type of <a>DID</a>
and its associated <a>DID document</a> are created, resolved, updated, and
deactivated. <a>DID methods</a> are defined using separate DID method
specifications as defined in <a href="#methods"></a>.
</dd>
<dt>
DID resolvers and DID resolution
</dt>
<dd>
A <a>DID resolver</a> is a system component that takes a <a>DID</a> as input and
produces a conforming <a>DID document</a> as output. This process is called
<a>DID resolution</a>. The steps for resolving a specific type of <a>DID</a> are
defined by the relevant <a>DID method</a> specification. The process of <a>DID
resolution</a> is elaborated upon in [[?DID-RESOLUTION]].
</dd>
<dt>
DID URL dereferencers and DID URL dereferencing
</dt>
<dd>
A <a>DID URL dereferencer</a> is a system component that takes a <a>DID URL</a>
as input and produces a <a>resource</a> as output. This process is
called <a>DID URL dereferencing</a>. The process of <a>DID URL dereferencing</a>
is elaborated upon in [[?DID-RESOLUTION]].
</dd>
</dl>
</section>
<section id="conformance">
<p>
This document contains examples that contain JSON and JSON-LD content.
Some of these examples contain characters that are invalid, such as inline
comments (<code>//</code>) and the use of ellipsis (<code>...</code>) to denote
information that adds little value to the example. Implementers are cautioned to
remove this content if they desire to use the information as valid JSON
or JSON-LD.
</p>
<p>
Some examples contain terms, both property names and values, that are not
defined in this specification. These are indicated with a comment (<code>//
external (property name|value)</code>). Such terms, when used in a <a>DID
document</a>, are expected to be registered in the DID Specification Registries
[[?DID-SPEC-REGISTRIES]] with links to both a formal definition and a JSON-LD
context.
</p>
<p>
Interoperability of implementations for <a>DIDs</a> and <a>DID documents</a> is
tested by evaluating an implementation's ability to create and parse <a>DIDs</a>
and <a>DID documents</a> that conform to this specification. Interoperability
for producers and consumers of <a>DIDs</a> and <a>DID documents</a> is provided
by ensuring the <a>DIDs</a> and <a>DID documents</a> conform. Interoperability
for <a>DID method</a> specifications is provided by the details in each <a>DID
method</a> specification. It is understood that, in the same way that a web
browser is not required to implement all known <a>URI</a> schemes, conformant
software that works with <a>DIDs</a> is not required to implement all known
<a>DID methods</a>. However, all implementations of a given <a>DID method</a>
are expected to be interoperable for that method.
</p>
<p>
A <dfn>conforming DID</dfn> is any concrete expression of the rules specified in
<a href="#identifier"></a> which complies with relevant normative statements in
that section.
</p>
<p>
A <dfn>conforming DID document</dfn> is any concrete expression of the data
model described in this specification which complies with the relevant normative
statements in <a href="#data-model"></a> and <a href="#core-properties"></a>. A
serialization format for the conforming document is deterministic,
bi-directional, and lossless, as described in <a href="#representations"></a>.
</p>
<p>
A <dfn>conforming producer</dfn> is any algorithm realized as software and/or
hardware that generates <a>conforming DIDs</a> or <a>conforming DID
Documents</a> and complies with the relevant normative statements in <a
href="#representations"></a>.
</p>
<p>
A <dfn>conforming consumer</dfn> is any algorithm realized as software and/or
hardware that consumes <a>conforming DIDs</a> or <a>conforming DID documents</a>
and complies with the relevant normative statements in <a
href="#representations"></a>.
</p>
<p>
A <dfn class="lint-ignore">conforming DID method</dfn> is any specification that
complies with the relevant normative statements in <a href="#methods"></a>.
</p>
</section>
</section>
<section class="informative">
<h2>Terminology</h2>
<div data-include="terms.html">
</div>
<p>
In addition to the terminology above, this specification also uses terminology
from the [[INFRA]] specification to formally define the <a
href="#data-model">data model</a>. When [[INFRA]] terminology is used, such as
<a data-cite="INFRA#strings">string</a>, <a
data-cite="INFRA#ordered-set">set</a>, and <a
data-cite="INFRA#maps">map</a>, it is linked directly to that specification.
</p>
</section>
<section>
<h2>Identifier</h2>
<p>
This section describes the formal syntax for <a>DIDs</a> and <a>DID URLs</a>.
The term "generic" is used to differentiate the syntax defined here from syntax
defined by <em>specific</em> <a>DID methods</a> in their respective
specifications. The creation processes, and their timing, for <a>DIDs</a> and
<a>DID URLs</a> are described in <a href="#method-operations"></a> and
<a href="#creation-of-a-did"></a>.
</p>
<section class="normative">
<h3>DID Syntax</h3>
<p>
The generic <a>DID scheme</a> is a <a>URI</a> scheme conformant with
[[!RFC3986]]. The ABNF definition can be found below, which uses the syntax in
[[!RFC5234]] and the corresponding definitions for <code>ALPHA</code> and
<code>DIGIT</code>. All other rule names not defined in the ABNF below are
defined in [[RFC3986]]. All <a>DIDs</a> MUST conform to the
DID Syntax ABNF Rules.
</p>
<table class="simple">
<thead>
<tr>
<th>
The DID Syntax ABNF Rules
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<pre class="nohighlight">
did = "did:" method-name ":" method-specific-id
method-name = 1*method-char
method-char = %x61-7A / DIGIT
method-specific-id = *( *idchar ":" ) 1*idchar
idchar = ALPHA / DIGIT / "." / "-" / "_" / pct-encoded
pct-encoded = "%" HEXDIG HEXDIG
</pre>
</td>
</tr>
</tbody>
</table>
<p>
For requirements on <a>DID methods</a> relating to the <a>DID</a> syntax, see
Section <a href="#method-syntax"></a>.
</p>
</section>
<section class="normative">
<h3>DID URL Syntax</h3>
<p>
A <a>DID URL</a> is a network location identifier for a specific
<a>resource</a>. It can be used to retrieve things like representations
of <a>DID subjects</a>, <a>verification methods</a>, <a>services</a>,
specific parts of a <a>DID document</a>, or other resources.
</p>
<p>
The following is the ABNF definition using the syntax in [[!RFC5234]]. It builds
on the <code>did</code> scheme defined in <a href="#did-syntax"></a>. The <a
data-cite="!rfc3986#section-3.3"><code>path-abempty</code></a>, <a
data-cite="!rfc3986#section-3.4"><code>query</code></a>, and <a
data-cite="!rfc3986#section-3.5"><code>fragment</code></a> components are
defined in [[!RFC3986]]. All <a>DID URLs</a> MUST conform to the
DID URL Syntax ABNF Rules. <a>DID methods</a> can further restrict these
rules, as described in <a href="#method-syntax"></a>.
</p>
<table class="simple">
<thead>
<tr>
<th>
The DID URL Syntax ABNF Rules
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<pre class="nohighlight">
did-url = did path-abempty [ "?" query ] [ "#" fragment ]
</pre>
</td>
</tr>
</tbody>
</table>
<p class="note" title="Semicolon character is reserved for future use">
Although the semicolon (<code>;</code>) character can be used according to the
rules of the <a>DID URL</a> syntax, future versions of this specification may
use it as a sub-delimiter for parameters as described in [[?MATRIX-URIS]]. To
avoid future conflicts, developers ought to refrain from using it.
</p>
<section class="notoc">
<h2>Path</h2>
<p>
A <a>DID path</a> is identical to a generic <a>URI</a> path and conforms to the
<code>path-abempty</code> ABNF rule in <a
data-cite="RFC3986#section-3.3">RFC 3986, section 3.3</a>. As with
<a>URIs</a>, path semantics can be specified by <a>DID Methods</a>, which in
turn might enable <a>DID controllers</a> to further specialize those semantics.
</p>
<pre class="example nohighlight">
did:example:123456/path
</pre>
</section>
<section class="notoc">
<h2>Query</h2>
<p>
A <a>DID query</a> is identical to a generic <a>URI</a> query and conforms to
the <code>query</code> ABNF rule in <a
data-cite="RFC3986#section-3.4">RFC 3986, section 3.4</a>. This syntax
feature is elaborated upon in <a href="#did-parameters"></a>.
</p>
<pre class="example nohighlight">
did:example:123456?versionId=1
</pre>
</section>
<section class="notoc">
<h2>Fragment</h2>
<p>
<a>DID fragment</a> syntax and semantics are identical to a generic <a>URI</a>
fragment and conforms to the <code>fragment</code> ABNF rule in <a
data-cite="RFC3986#section-3.5">RFC 3986, section 3.5</a>.
</p>
<p>
A <a>DID fragment</a> is used as a method-independent reference into a <a>DID
document</a> or external <a>resource</a>. Some examples of DID fragment
identifiers are shown below.
</p>
<pre class="example nohighlight"
title="A unique verification method in a DID Document">
did:example:123#public-key-0
</pre>
<pre class="example nohighlight"
title="A unique service in a DID Document">
did:example:123#agent
</pre>
<pre class="example nohighlight"
title="A resource external to a DID Document">
did:example:123?service=agent&relativeRef=/credentials%23degree
</pre>
<p class="note"
title="Fragment semantics across representations">
In order to maximize interoperability, implementers are urged to ensure that
<a>DID fragments</a> are interpreted in the same way across
<a>representations</a> (see <a href="#representations"></a>). For example, while
JSON Pointer [[?RFC6901]] can be used in a <a>DID fragment</a>, it will not be
interpreted in the same way across non-JSON <a>representations</a>.
</p>
<p>
Additional semantics for fragment identifiers, which are compatible with and
layered upon the semantics in this section, are described for JSON-LD
representations in <a href="#application-did-ld-json"></a>. For information
about how to dereference a <a>DID fragment</a>, see [[?DID-RESOLUTION]].
</p>
</section>
<section>
<h2>DID Parameters</h2>
<p>
The <a>DID URL</a> syntax supports a simple format for parameters based on the
<code>query</code> component described in <a href="#query"></a>. Adding a DID
parameter to a <a>DID URL</a> means that the parameter becomes part of the
identifier for a <a>resource</a>.
</p>
<pre class="example nohighlight"
title="A DID URL with a 'versionTime' DID parameter">
did:example:123?versionTime=2021-05-10T17:00:00Z
</pre>
<pre class="example nohighlight"
title="A DID URL with a 'service' and a 'relativeRef' DID parameter">
did:example:123?service=files&relativeRef=/resume.pdf
</pre>
<p>
Some DID parameters are completely independent of of any specific <a>DID
method</a> and function the same way for all <a>DIDs</a>. Other DID parameters
are not supported by all <a>DID methods</a>. Where optional parameters are
supported, they are expected to operate uniformly across the <a>DID methods</a>
that do support them. The following table provides common DID parameters that
function the same way across all <a>DID methods</a>. Support for all
<a href="#did-parameters">DID Parameters</a> is OPTIONAL.
</p>
<p class="note">
It is generally expected that DID URL dereferencer implementations will
reference [[?DID-RESOLUTION]] for additional implementation details. The scope
of this specification only defines the contract of the most common
query parameters.
</p>
<table class="simple">
<thead>
<tr>
<th>
Parameter Name
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code><a>service</a></code>
</td>
<td>
Identifies a service from the <a>DID document</a> by service ID.
If present, the associated value MUST be an <a
data-lt="ascii string">ASCII string</a>.
</td>
</tr>
<tr>
<td>
<code>relativeRef</code>
</td>
<td>
A relative <a>URI</a> reference according to <a
data-cite="RFC3986#section-4.2">RFC3986 Section 4.2</a> that identifies a
<a>resource</a> at a <a>service endpoint</a>, which is selected from a <a>DID
document</a> by using the <code>service</code> parameter.
If present, the associated value MUST be an <a
data-lt="ascii string">ASCII string</a> and MUST use percent-encoding for
certain characters as specified in <a data-cite="RFC3986#section-2.1">RFC3986
Section 2.1</a>.
</td>
</tr>
<tr>
<td>
<code>versionId</code>
</td>
<td>
Identifies a specific version of a <a>DID document</a> to be resolved (the
version ID could be sequential, or a <a>UUID</a>, or method-specific).
If present, the associated value MUST be an <a
data-lt="ascii string">ASCII string</a>.
</td>
</tr>