forked from w3c/vc-data-model
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
5363 lines (4815 loc) · 213 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>Verifiable Credentials Data Model v2.0</title>
<meta http-equiv='Content-Type' content='text/html;charset=utf-8'/>
<!--
=== 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 src='https://www.w3.org/Tools/respec/respec-w3c' class='remove'></script>
<script src="./common.js" class="remove"></script>
<script class="remove"
src="https://cdn.jsdelivr.net/gh/digitalbazaar/[email protected]/dist/main.js"></script>
<script type="text/javascript" class="remove">
var respecConfig = {
group: "vc",
// specification status (e.g., WD, LCWD, NOTE, etc.). If in doubt use ED.
specStatus: "ED",
// the specification's short name, as in http://www.w3.org/TR/short-name/
shortName: "vc-data-model-2.0",
// subtitle for the spec
//subtitle: "Expressing information with verifiable provenance",
// if you wish the publication date to be other than today, set this
publishDate: "2022-08-11",
//crEnd: "2019-08-21",
//prEnd: "2019-10-01",
//implementationReportURI: "https://w3c.github.io/vc-test-suite/implementations/",
//errata: "https://w3c.github.io/vc-data-model/errata.html",
previousMaturity: "REC",
previousPublishDate: "2022-03-03",
// if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
// and its maturity status
// previousPublishDate: "1977-03-15",
// previousMaturity: "WD",
// extend the bibliography entries
localBiblio: vcwg.localBiblio,
doJsonLd: true,
// Uncomment these to use the respec extension that generates a list of
// normative statements:
preProcess: [/*prepare_reqlist*/],
postProcess: [
restrictRefs,
window.respecVc.createVcExamples
/*add_reqlist_button*/
],
github: "https://github.com/w3c/vc-data-model/",
includePermalinks: false,
// if there a publicly available Editor's Draft, this is the link
edDraftURI: "https://w3c.github.io/vc-data-model/",
// if this is a LCWD, uncomment and set the end of its review period
// lcEnd: "2009-08-05",
// editors, add as many as you like
// only "name" is required
editors: [
{ name: "Manu Sporny", url: "https://www.linkedin.com/in/manusporny/",
company: "Digital Bazaar", companyURL: "https://digitalbazaar.com/",
note: "v1.0, v1.1, v2.0", w3cid: 41758},
{ name: "Orie Steele", url: "https://github.com/OR13",
company: "Transmute",
companyURL: "https://www.transmute.industries/",
note: "v2.0", w3cid: 109171},
{ name: "Michael B. Jones", url: "https://self-issued.info/",
company: "Microsoft", companyURL: "https://www.microsoft.com",
note: "v2.0", w3cid: 38745},
{ name: "Gabe Cohen", url: "https://github.com/decentralgabe",
company: "Block", companyURL: "https://block.xyz/",
note: "v2.0", w3cid: 116851},
{ name: "Oliver Terbu", url: "https://github.com/awoie",
company: "Spruce Systems, Inc.", companyURL: "https://spruceid.com/",
note: "v2.0", w3cid: 110059}
],
formerEditors: [
{ name: "Grant Noble", url: "https://www.linkedin.com/in/grant-noble-8253994a/",
company: "ConsenSys", companyURL: "https://consensys.net/",
note: "v1.0", w3cid: 110600},
{ name: "Dave Longley", url: "https://github.com/dlongley",
company: "Digital Bazaar", companyURL: "https://digitalbazaar.com/",
note: "v1.0", w3cid: 48025},
{ name: "Daniel C. Burnett", url: "https://www.linkedin.com/in/daburnett/",
company: "ConsenSys", companyURL: "https://consensys.net/",
note: "v1.0", w3cid: 37473},
{ name: "Brent Zundel", url: "https://www.linkedin.com/in/bzundel/",
company: "Evernym", companyURL: "https://www.evernym.com/",
note: "v1.0", w3cid: 102128},
{ name: "Kyle Den Hartog", url: "https://www.linkedin.com/in/kyledenhartog/",
company: "MATTR", companyURL: "https://mattr.global/",
note: "v1.1", w3cid: 103517}
],
// authors, add as many as you like.
// This is optional, uncomment if you have authors as well as editors.
// only "name" is required. Same format as editors.
authors:
[
{ name: "Manu Sporny", url: "https://digitalbazaar.com/",
company: "Digital Bazaar", companyURL: "https://digitalbazaar.com/",
w3cid: 41758
},
{ name: "Dave Longley", url: "https://digitalbazaar.com/",
company: "Digital Bazaar", companyURL: "https://digitalbazaar.com/",
w3cid: 48025
},
{ name: "David Chadwick",
url: "https://www.linkedin.com/in/david-chadwick-36816395/",
company: "University of Kent",
companyURL: "https://www.kent.ac.uk/",
w3cid: 46156
}
],
maxTocLevel: 2,
inlineCSS: true
};
</script>
<style>
pre .highlight {
font-weight: bold;
color: Green;
}
pre .subject {
font-weight: bold;
color: RoyalBlue;
}
pre .property {
font-weight: bold;
color: DarkGoldenrod;
}
pre .comment {
font-weight: bold;
color: SteelBlue;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
</style>
</head>
<body>
<section id='abstract'>
<p>
<a>Credentials</a> are a part of our daily lives; driver's licenses are used to
assert that we are capable of operating a motor vehicle, university degrees
can be used to assert our level of education, and government-issued passports
enable us to travel between countries. This specification provides a mechanism
to express these sorts of <a>credentials</a> on the Web in a way that is
cryptographically secure, privacy respecting, and machine-verifiable.
</p>
</section>
<section id='sotd'>
<p>
Comments regarding this specification are welcome at any time.
Please file issues directly on
<a href="https://github.com/w3c/vc-data-model/issues/">GitHub</a>,
or send them to
<a href="mailto:[email protected]">[email protected]</a>
(<a href="mailto:[email protected]?subject=subscribe">subscribe</a>,
<a href="https://lists.w3.org/Archives/Public/public-vc-comments/">archives</a>).
</p>
</section>
<section class="informative">
<h2>Introduction</h2>
<p>
<a>Credentials</a> are a part of our daily lives; driver's licenses are used to
assert that we are capable of operating a motor vehicle, university degrees
can be used to assert our level of education, and government-issued passports
enable us to travel between countries. These <a>credentials</a> provide
benefits to us when used in the physical world, but their use on the Web
continues to be elusive.
</p>
<p>
Currently it is difficult to express education qualifications, healthcare
data, financial account details, and other sorts of third-party <a>verified</a>
machine-readable personal information on the Web. The difficulty of expressing
digital <a>credentials</a> on the Web makes it challenging to receive the same
benefits through the Web that physical <a>credentials</a> provide us in the
physical world.
</p>
<p>
This specification provides a standard way to express <a>credentials</a> on the
Web in a way that is cryptographically secure, privacy respecting, and
machine-verifiable.
</p>
<p>
For those unfamiliar with the concepts related to
<a>verifiable credentials</a>, the following sections provide an overview of:
</p>
<ul>
<li>
The components that constitute a <a>verifiable credential</a>
</li>
<li>
The components that constitute a <a>verifiable presentation</a>
</li>
<li>
An ecosystem where <a>verifiable credentials</a> and
<a>verifiable presentations</a> are expected to be useful
</li>
<li>
The use cases and requirements that informed this specification.
</li>
</ul>
<section class="informative">
<h3>What is a Verifiable Credential?</h3>
<p>
In the physical world, a <a>credential</a> might consist of:
</p>
<ul>
<li>
Information related to identifying the <a>subject</a> of the <a>credential</a>
(for example, a photo, name, or identification number)
</li>
<li>
Information related to the issuing authority (for example, a city government,
national agency, or certification body)
</li>
<li>
Information related to the type of <a>credential</a> this is (for example, a
Dutch passport, an American driving license, or a health insurance card)
</li>
<li>
Information related to specific attributes or properties being asserted by
the issuing authority about the <a>subject</a> (for example, nationality,
the classes of vehicle entitled to drive, or date of birth)
</li>
<li>
Evidence related to how the <a>credential</a> was derived
</li>
<li>
Information related to constraints on the credential (for example, expiration
date, or terms of use).
</li>
</ul>
<p>
A <a>verifiable credential</a> can represent all of the same information that a
physical <a>credential</a> represents. The addition of technologies, such as
digital signatures, makes <a>verifiable credentials</a> more tamper-evident and
more trustworthy than their physical counterparts.
</p>
<p>
<a>Holders</a> of <a>verifiable credentials</a> can generate
<a>verifiable presentations</a> and then share these
<a>verifiable presentations</a> with <a>verifiers</a> to prove they possess
<a>verifiable credentials</a> with certain characteristics.
</p>
<p>
Both <a>verifiable credentials</a> and <a>verifiable presentations</a> can be
transmitted rapidly, making them more convenient than their physical
counterparts when trying to establish trust at a distance.
</p>
<p>
While this specification attempts to improve the ease of expressing digital
<a>credentials</a>, it also attempts to balance this goal with a number of
privacy-preserving goals. The persistence of digital information, and the ease
with which disparate sources of digital data can be collected and correlated,
comprise a privacy concern that the use of <a>verifiable</a> and easily
machine-readable <a>credentials</a> threatens to make worse. This document
outlines and attempts to address a number of these issues in Section
<a href="#privacy-considerations"></a>. Examples of how to use this data model
using privacy-enhancing technologies, such as zero-knowledge proofs, are also
provided throughout this document.
</p>
<p>
The word "verifiable" in the terms
<a>verifiable credential</a> and <a>verifiable presentation</a>
refers to the characteristic of a <a>credential</a> or <a>presentation</a>
as being able to be <a>verified</a> by a <a>verifier</a>,
as defined in this document. Verifiability of a credential does not imply
that the truth of <a>claims</a> encoded therein can be evaluated; however,
the issuer can include values in the <a>evidence</a> property to help the verifier
apply their business logic to determine whether the claims have sufficient
veracity for their needs.
</p>
</section>
<section class="informative">
<h3>Ecosystem Overview</h3>
<p>
This section describes the roles of the core actors and the relationships
between them in an ecosystem where <a>verifiable credentials</a> are expected
to be useful. A role is an abstraction that might be implemented in many
different ways. The separation of roles suggests likely interfaces and
protocols for standardization. The following roles are introduced in this
specification:
</p>
<dl>
<dt><a>holder</a></dt>
<dd>
A role an <a>entity</a> might perform by possessing one or more
<a>verifiable credentials</a> and generating <a>verifiable presentations</a>
from them. Example holders include students, employees, and customers.
</dd>
<dt><a>issuer</a></dt>
<dd>
A role an <a>entity</a> performs by asserting <a>claims</a> about one or
more <a>subjects</a>, creating a <a>verifiable credential</a> from these
<a>claims</a>, and transmitting the <a>verifiable credential</a> to a
<a>holder</a>. Example issuers include corporations, non-profit organizations,
trade associations, governments, and individuals.
</dd>
<dt><a>subject</a></dt>
<dd>
An <a>entity</a> about which <a>claims</a> are made. Example subjects include
human beings, animals, and things. In many cases the <a>holder</a> of a
<a>verifiable credential</a> is the subject, but in certain cases it is not. For
example, a parent (the <a>holder</a>) might hold the
<a>verifiable credentials</a> of a child (the <a>subject</a>), or a pet owner
(the <a>holder</a>) might hold the <a>verifiable credentials</a> of their pet
(the <a>subject</a>). For more information about these special cases, see the
<a href="https://www.w3.org/TR/vc-imp-guide/#subject-holder-relationships">
Subject-Holder Relationships</a> section in the Verifiable Credentials
Implementation Guide [[VC-IMP-GUIDE]].
</dd>
<dt><a>verifier</a></dt>
<dd>
A role an <a>entity</a> performs by receiving one or more
<a>verifiable credentials</a>, optionally inside a
<a>verifiable presentation</a>, for processing. Example verifiers include
employers, security personnel, and websites.
</dd>
<dt><a>verifiable data registry</a></dt>
<dd>
A role a system might perform by mediating the creation and <a>verification</a>
of identifiers, keys, and other relevant data, such as
<a>verifiable credential</a> schemas, revocation registries, issuer public keys,
and so on, which might be required to use <a>verifiable credentials</a>. Some
configurations might require correlatable identifiers for <a>subjects</a>.
Example verifiable data registries include trusted databases, decentralized
databases, government ID databases, and distributed ledgers. Often
there is more than one type of verifiable data registry utilized in an
ecosystem.
</dd>
</dl>
<figure id="roles">
<img style="margin: auto; display: block; width: 75%;"
src="diagrams/ecosystem.svg" alt="diagram showing how
credentials flow from issuer to holder and
presentations flow from holder to verifier where all
three parties can use information from a logical
verifiable data registry">
<figcaption style="text-align: center;">
The roles and information flows forming the basis for this specification.
</figcaption>
</figure>
<p class="note">
<a href="#roles"></a> above provides an example ecosystem in which to ground the
rest of the concepts in this specification. Other ecosystems exist, such as
protected environments or proprietary systems, where
<a>verifiable credentials</a> also provide benefit.
</p>
</section>
<section class="informative">
<h3>Use Cases and Requirements</h3>
<p>
The Verifiable Credentials Use Cases document [[VC-USE-CASES]] outlines a number
of key topics that readers might find useful, including:
</p>
<ul>
<li>
A more thorough explanation of the
<a href="https://www.w3.org/TR/vc-use-cases/#user-roles">roles</a>
introduced above
</li>
<li>
The
<a href="https://www.w3.org/TR/vc-use-cases/#user-needs">needs</a>
identified in market verticals, such as education, finance, healthcare, retail,
professional licensing, and government
</li>
<li>
Common
<a href="https://www.w3.org/TR/vc-use-cases/#user-tasks">tasks</a>
performed by the roles in the ecosystem, as well as their associated
requirements
</li>
<li>
Common
<a href="https://www.w3.org/TR/vc-use-cases/#user-sequences">sequences
and flows</a> identified by the Working Group.
</li>
</ul>
<p>
As a result of documenting and analyzing the use cases document, the following
desirable ecosystem characteristics were identified for this specification:
</p>
<!-- requirement list start -->
<ul>
<li>
<a>Credentials</a> represent statements made by an <a>issuer</a>.
</li>
<li>
<a>Verifiable credentials</a> represent statements made by an <a>issuer</a> in
a tamper-evident and privacy-respecting manner.
</li>
<li>
<a>Holders</a> assemble collections of <a>credentials</a> and/or
<a>verifiable credentials</a> from different <a>issuers</a> into a single
artifact, a <a>presentation</a>.
</li>
<li>
Holders transform <a>presentations</a> into <a>verifiable presentations</a>
to render them tamper-evident.
</li>
<li>
<a>Issuers</a> can issue <a>verifiable credentials</a> about any <a>subject</a>.
</li>
<li>
Acting as <a>issuer</a>, <a>holder</a>, or <a>verifier</a> requires neither
registration nor approval by any authority, as the trust involved is bilateral
between parties.
</li>
<li>
<a>Verifiable presentations</a> allow any <a>verifier</a> to <a>verify</a> the
authenticity of <a>verifiable credentials</a> from any <a>issuer</a>.
</li>
<li>
<a>Holders</a> can receive <a>verifiable credentials</a> from anyone.
</li>
<li>
<a>Holders</a> can interact with any <a>issuer</a> and any <a>verifier</a>
through any user agent.
</li>
<li>
<a>Holders</a> can share <a>verifiable presentations</a>, which can then be
<a>verified</a> without revealing the identity of the <a>verifier</a> to the
<a>issuer</a>.
</li>
<li>
<a>Holders</a> can store <a>verifiable credentials</a> in any location, without
affecting their <a>verifiability</a> and without the <a>issuer</a> knowing
anything about where they are stored or when they are accessed.
</li>
<li>
<a>Holders</a> can present <a>verifiable presentations</a> to any
<a>verifier</a> without affecting authenticity of the claims and without
revealing that action to the <a>issuer</a>.
</li>
<li>
A <a>verifier</a> can <a>verify</a> <a>verifiable presentations</a> from any
<a>holder</a>, containing proofs of <a>claims</a> from any <a>issuer</a>.
</li>
<li>
<a>Verification</a> should not depend on direct interactions between
<a>issuers</a> and <a>verifiers</a>.
</li>
<li>
<a>Verification</a> should not reveal the identity of the <a>verifier</a> to
any <a>issuer</a>.
</li>
<li>
The specification must provide a means for <a>issuers</a> to issue
<a>verifiable credentials</a> that support selective disclosure, without
requiring all conformant software to support that feature.
</li>
<li>
<a>Issuers</a> can issue <a>verifiable credentials</a> that support
selective disclosure.
</li>
<li>
If a single <a>verifiable credential</a> supports selective disclosure, then
<a>holders</a> can present proofs of <a>claims</a> without revealing the entire
<a>verifiable credential</a>.
</li>
<li>
<a>Verifiable presentations</a> can either disclose the attributes of a
<a>verifiable credential</a>, or satisfy <a>derived predicates</a> requested by
the <a>verifier</a>. <a>Derived predicates</a> are Boolean conditions, such as
greater than, less than, equal to, is in set, and so on.
</li>
<li>
<a>Issuers</a> can issue revocable <a>verifiable credentials</a>.
</li>
<li>
The processes of cryptographically protecting <a>credentials</a> and
<a>presentations</a>, and verifying <a>verifiable credentials</a> and
<a>verifiable presentations</a>, have to be deterministic, bi-directional, and
lossless. Any verification of a <a>verifiable credential</a> or
<a>verifiable presentation</a> has to be transformable to the generic data model
defined in this document in a deterministic process, such that the resulting
<a>credential</a> or <a>presentation</a> is semantically and syntactically
equivalent to the original construct, so that it can be processed in an
interoperable fashion.
</li>
<li>
<a>Verifiable credentials</a> and <a>verifiable presentations</a> have to be
serializable in one or more machine-readable data formats. The process of
serialization and/or de-serialization has to be deterministic, bi-directional,
and lossless. Any serialization of a <a>verifiable credential</a> or
<a>verifiable presentation</a> needs to be transformable to the generic data
model defined in this document in a deterministic process such that the
resulting <a>verifiable credential</a> can be processed in an interoperable
fashion. The serialized form also needs to be able to be generated from the data
model without loss of data or content.
</li>
<li>
The data model and serialization must be extendable with minimal coordination.
</li>
<li>
Revocation by the <a>issuer</a> should not reveal any identifying information
about the <a>subject</a>, the <a>holder</a>, the specific
<a>verifiable credential</a>, or the <a>verifier</a>.
</li>
<li>
<a>Issuers</a> can disclose the revocation reason.
</li>
<li>
<a>Issuers</a> revoking <a>verifiable credentials</a> should distinguish between
revocation for cryptographic integrity (for example, the signing key is
compromised) versus revocation for a status change (for example, the driver’s
license is suspended).
</li>
<li>
<a>Issuers</a> can provide a service for refreshing a
<a>verifiable credential</a>.
</li>
</ul>
</section>
<section id="conformance" class="normative">
<p>
A <dfn>conforming document</dfn> is any concrete expression of the data model
that complies with the normative statements in this specification.
Specifically, all relevant normative statements in Sections
<a href="#basic-concepts"></a>, <a href="#advanced-concepts"></a>, and
<a href="#syntaxes"></a> of this document MUST be enforced. A serialization
format for the conforming document MUST be deterministic, bi-directional,
and lossless as described in Section <a href="#syntaxes"></a>.
The <a>conforming document</a> MAY be transmitted or stored in any such
serialization format.
</p>
<p>
A <dfn class="lint-ignore">conforming processor</dfn> is any algorithm realized
as software and/or hardware that generates or consumes a <a>conforming
document</a>. Conforming processors MUST produce errors when non-conforming
documents are consumed.
</p>
<p>
This specification makes no normative statements with regard to the
conformance of roles in the ecosystem, such as <a>issuers</a>, <a>holders</a>,
or <a>verifiers</a>, because the conformance of ecosystem roles are highly
application, use case, and market vertical specific.
</p>
<p>
Digital proof mechanisms, a subset of which are digital signatures, are required
to ensure the protection of a <a>verifiable credential</a>. Having and
validating proofs, which may be dependent on the syntax of the proof
(for example, using the JSON Web Signature of a JSON Web Token for proofing a
key holder), are an essential part of processing a <a>verifiable credential</a>.
At the time of publication, Working Group members had implemented
<a>verifiable credentials</a> using at least three proof mechanisms:
</p>
<ul>
<li>
JSON Web Tokens [[RFC7519]] secured using JSON Web Signatures [[RFC7515]]
</li>
<li>
Data Integrity Proofs [[?VC-DATA-INTEGRITY]]
</li>
<li>
Camenisch-Lysyanskaya Zero-Knowledge Proofs [[?CL-SIGNATURES]].
</li>
</ul>
<p>
Implementers are advised to note that not all proof mechanisms are standardized
as of the publication date of this specification. The group expects some of
these mechanisms, as well as new ones, to mature independently and become
standardized in time. Given there are multiple valid proof mechanisms, this
specification does not standardize on any single digital signature mechanism.
One of the goals of this specification is to provide a data model that can be
protected by a variety of current and future digital proof mechanisms.
Conformance to this specification does not depend on the details of a particular
proof mechanism; it requires clearly identifying the mechanism a
<a>verifiable credential</a> uses.
</p>
<p>
This document also contains examples that contain JSON and JSON-LD content.
Some of these examples contain characters that are invalid JSON, 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>
</section>
</section>
<section class="informative">
<h2>Terminology</h2>
<div data-include="./terms.html"></div>
</section>
<section class="informative">
<h2>Core Data Model</h2>
<p>
The following sections outline core data model concepts, such as <a>claims</a>,
<a>credentials</a>, and <a>presentations</a>, which form the foundation of this
specification.
</p>
<section class="informative">
<h3>Claims</h3>
<p>
A <a>claim</a> is a statement about a <a>subject</a>. A <a>subject</a> is a
thing about which <a>claims</a> can be made. <a>Claims</a> are expressed using
<strong><em>subject</em></strong>-<dfn data-lt="property|properties">
property</dfn>-<dfn class="lint-ignore">value</dfn> relationships.
</p>
<figure id="basic-structure">
<img style="margin: auto; display: block; width: 50%;"
src="diagrams/claim.svg" alt="subject has a property which
has a value">
<figcaption style="text-align: center;">
The basic structure of a claim.
</figcaption>
</figure>
<p>
The data model for <a>claims</a>, illustrated in <a href="#basic-structure"></a>
above, is powerful and can be used to express a large variety of statements. For
example, whether someone graduated from a particular university can be expressed
as shown in <a href="#basic-example"></a> below.
</p>
<figure id="basic-example">
<img style="margin: auto; display: block; width: 60%;"
src="diagrams/claim-example.svg" alt="Pat has an alumniOf
property whose value is Example University">
<figcaption style="text-align: center;">
A basic claim expressing that Pat is an alumni of "Example University".
</figcaption>
</figure>
<p>
Individual <a>claims</a> can be merged together to express a <a>graph</a> of
information about a <a>subject</a>. The example shown in
<a href="#multiple-claims"></a> below extends the previous <a>claim</a> by
adding the <a>claims</a> that Pat knows Sam and that Sam is employed as a
professor.
</p>
<figure id="multiple-claims">
<img style="margin: auto; display: block; width: 75%;"
src="diagrams/claim-extended.svg" alt="extends previous
diagram with another property called knows whose value is
Sam, and Sam has a property jobTitle whose value is Professor">
<figcaption style="text-align: center;">
Multiple claims can be combined to express a graph of information.
</figcaption>
</figure>
<p>
To this point, the concepts of a <a>claim</a> and a <a>graph</a> of information
are introduced. To be able to trust <a>claims</a>, more information is
expected to be added to the graph.
</p>
</section>
<section class="informative">
<h3>Credentials</h3>
<p>
A <a>credential</a> is a set of one or more <a>claims</a> made by the same
<a>entity</a>. <a>Credentials</a> might also include an identifier and
metadata to describe properties of the <a>credential</a>, such as the
<a>issuer</a>, the expiry date and time, a representative image, a public key
to use for <a>verification</a> purposes, the revocation mechanism, and so on.
The metadata might be signed by the <a>issuer</a>. A
<a>verifiable credential</a> is a set of tamper-evident <a>claims</a> and
metadata that cryptographically prove who issued it.
</p>
<figure id="basic-vc">
<img style="margin: auto; display: block; width: 50%;"
src="diagrams/credential.svg" alt="a Verifible
Credential contains Credential Metadata, Claim(s), and
Proof(s)">
<figcaption style="text-align: center;">
Basic components of a verifiable credential.
</figcaption>
</figure>
<p>
Examples of <a>verifiable credentials</a> include digital employee
identification cards, digital birth certificates, and digital educational
certificates.
</p>
<p class="note">
<a>Credential</a> identifiers are often used to identify specific instances
of a <a>credential</a>. These identifiers can also be used for correlation. A
<a>holder</a> wanting to minimize correlation is advised to use a selective
disclosure scheme that does not reveal the <a>credential</a> identifier.
</p>
<p>
<a href="#basic-vc"></a> above shows the basic components of a
<a>verifiable credential</a>, but abstracts the details about how <a>claims</a>
are organized into information <a>graphs</a>, which are then organized into
<a>verifiable credentials</a>. <a href="#info-graph-vc"></a> below shows a
more complete depiction of a <a>verifiable credential</a>, which is normally
composed of at least two information <a>graphs</a>. The first <a>graph</a>
expresses the <a>verifiable credential</a> itself, which contains credential
metadata and <a>claims</a>. The second <a>graph</a> expresses the digital proof,
which is usually a digital signature.
</p>
<figure id="info-graph-vc">
<img style="margin: auto; display: block; width: 100%;"
src="diagrams/credential-graph.svg" alt="diagram with a
Credential Graph on top connected via a proof to a
Proof Graph on the bottom. The Credental Graph has
Credential 123 with 4 properties: 'type' of value
AlumniCredential, 'issuer' of Example University,
'issuanceDate' of 2010-01-01T19:23:24Z, and
credentialSubject of Pat, who has an alumniOf property
with value of Example University. The Proof Graph has
Signature 456 with 5 properties: 'type' of
RsaSignature2018, 'verificationMethod' of Example University
Public Key 7, 'created' of 2017-06-18T21:19:10Z, and 'jws'
of 'BavEll0...3JT24='">
<figcaption style="text-align: center;">
Information graphs associated with a basic verifiable credential.
</figcaption>
</figure>
<p class="note">
It is possible to have a <a>credential</a>, such as a marriage certificate,
containing multiple <a>claims</a> about different <a>subjects</a> that are not
required to be related.
</p>
<p class="note">
It is possible to have a <a>credential</a> that does not contain any
<a>claims</a> about the <a>entity</a> to which the <a>credential</a> was issued.
For example, a <a>credential</a> that only contains <a>claims</a> about a
specific dog, but is issued to its owner.
</p>
</section>
<section class="informative">
<h3>Presentations</h3>
<p>
Enhancing privacy is a key design feature of this specification. Therefore, it
is important for <a>entities</a> using this technology to be able to express
only the portions of their persona that are appropriate for a given situation.
The expression of a subset of one's persona is called a
<a>verifiable presentation</a>. Examples of different personas include a
person's professional persona, their online gaming persona, their
family persona, or an incognito persona.
</p>
<p>
A <a>verifiable presentation</a> expresses data from one or more
<a>verifiable credentials</a>, and is packaged in such a way that the
authorship of the data is <a>verifiable</a>. If <a>verifiable credentials</a>
are presented directly, they become <a>verifiable presentations</a>. Data
formats derived from <a>verifiable credentials</a> that are cryptographically
<a>verifiable</a>, but do not of themselves contain
<a>verifiable credentials</a>, might also be <a>verifiable presentations</a>.
</p>
<p>
The data in a <a>presentation</a> is often about the same <a>subject</a>, but
might have been issued by multiple <a>issuers</a>. The aggregation of this
information typically expresses an aspect of a person, organization, or
<a>entity</a>.
</p>
<figure id="basic-vp">
<img style="margin: auto; display: block; width: 50%;"
src="diagrams/presentation.svg" alt="A Verifiable
Presentation contains Presentation Metadata, Verifiable
Credential(s), and Proof(s)">
<figcaption style="text-align: center;">
Basic components of a verifiable presentation.
</figcaption>
</figure>
<p>
<a href="#basic-vp"></a> above shows the components of a
<a>verifiable presentation</a>, but abstracts the details about how
<a>verifiable credentials</a> are organized into information <a>graphs</a>,
which are then organized into <a>verifiable presentations</a>.
</p>
<p>
<a href="#info-graph-vp"></a> below shows a more complete depiction of a
<a>verifiable presentation</a>, which is normally composed of at least four
information <a>graphs</a>. The first of these information <a>graphs</a>, the
Presentation <a>Graph</a>, expresses the <a>verifiable presentation</a>
itself, which contains presentation metadata. The
<code>verifiableCredential</code> property in the Presentation <a>Graph</a>
refers to one or more <a>verifiable credentials</a>, each being one of the
second information <a>graphs</a>, i.e., a self-contained Credential
<a>Graph</a>, which in turn contains credential metadata and claims. The
third information <a>graph</a>, the Credential Proof <a>Graph</a>, expresses
the credential graph proof, which is usually a digital signature. The fourth
information <a>graph</a>, the Presentation Proof <a>Graph</a>, expresses the
presentation graph proof, which is usually a digital signature.
</p>
<figure id="info-graph-vp">
<img style="margin: auto; display: block; width: 75%;"
src="diagrams/presentation-graph.svg" alt="diagram with
a Presentation Graph on top connected via a proof to a
Presentation Proof Graph on the bottom. The
Presentation Graph has Presentation ABC with 3
properties: 'type' of value VerifiablePresentation,
'termsOfUse' of value Do Not Archive, and
'verifiableCredential' whose value is Figure 6. The
Presentation Proof Graph has Signature 8910 with 5
properties: 'type' of RsaSignature2018, 'verificationMethod'
of Example Presenter Public Key 11, 'created' of
2018-01-15T12:43:56Z, 'challenge' of d28348djsj3239, and
'jws' of 'p2KaZ...8Fj3K='">
<figcaption style="text-align: center;">
Information graphs associated with a basic verifiable presentation.
</figcaption>
</figure>
<p class="note">
It is possible to have a <a>presentation</a>, such as a business persona, which
draws on multiple <a>credentials</a> about different <a>subjects</a> that are
often, but not required to be, related.
</p>
</section>
<section class="informative">
<h3>Concrete Lifecycle Example</h3>
<p>
The previous sections introduced the concepts of <a>claims</a>,
<a>verifiable credentials</a>, and <a>verifiable presentations</a> using
graphical depictions. This section provides a concrete set of simple but
complete lifecycle examples of the data model expressed in one of the concrete
syntaxes supported by this specification. The lifecycle of <a>credentials</a>
and <a>presentations</a> in the
<a href="#ecosystem-overview">Verifiable Credentials Ecosystem</a> often
take a common path:
</p>
<ol>
<li>
Issuance of one or more <a>verifiable credentials</a>.
</li>
<li>
Storage of <a>verifiable credentials</a> in a <a>credential repository</a>
(such as a digital wallet).
</li>
<li>
Composition of <a>verifiable credentials</a> into a
<a>verifiable presentation</a> for <a>verifiers</a>.
</li>
<li>
<a>Verification</a> of the <a>verifiable presentation</a> by the
<a>verifier</a>.
</li>
</ol>
<p>
To illustrate this lifecycle, we will use the example of redeeming an alumni
discount from a university. In the example below, Pat receives an alumni
<a>verifiable credential</a> from a university, and Pat stores the
<a>verifiable credential</a> in a digital wallet.
</p>
<pre class="example nohighlight" title="A simple example of a verifiable credential">
{
<span class='comment'>// set the context, which establishes the special terms we will be using
// such as 'issuer' and 'alumniOf'.</span>
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
<span class='comment'>// specify the identifier for the credential</span>
"id": "http://example.edu/credentials/1872",
<span class='comment'>// the credential types, which declare what data to expect in the credential</span>
"type": ["VerifiableCredential", "AlumniCredential"],
<span class='comment'>// the entity that issued the credential</span>
"issuer": "https://example.edu/issuers/565049",
<span class='comment'>// when the credential was issued</span>
"issuanceDate": "2010-01-01T19:23:24Z",
<span class='comment'>// claims about the subjects of the credential</span>
"credentialSubject": {
<span class='comment'>// identifier for the only subject of the credential</span>
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
<span class='comment'>// assertion about the only subject of the credential</span>
"alumniOf": {
"id": "did:example:c276e12ec21ebfeb1f712ebc6f1",
"name": [{
"value": "Example University",
"lang": "en"
}, {
"value": "Exemple d'Université",
"lang": "fr"
}]
}
},
<span class='comment'>// digital proof that makes the credential tamper-evident</span>
<span class='comment'>// see the NOTE at end of this section for more detail</span>
"proof": {
<span class='comment'>// the cryptographic signature suite that was used to generate the signature</span>
"type": "RsaSignature2018",
<span class='comment'>// the date the signature was created</span>
"created": "2017-06-18T21:19:10Z",
<span class='comment'>// purpose of this proof</span>
"proofPurpose": "assertionMethod",
<span class='comment'>// the identifier of the public key that can verify the signature</span>
"verificationMethod": "https://example.edu/issuers/565049#key-1",
<span class='comment'>// the digital signature value</span>
"jws": "eyJhbGciOiJSUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..TCYt5X
sITJX1CxPCT8yAV-TVkIEq_PbChOMqsLfRoPsnsgw5WEuts01mq-pQy7UJiN5mgRxD-WUc
X16dUEMGlv50aqzpqh4Qktb3rk-BuQy72IFLOqV0G_zS245-kronKb78cPN25DGlcTwLtj
PAYuNzVBAh4vGHSrQyHUdBBPM"
}
}
</pre>
<p>
Pat then attempts to redeem the alumni discount. The <a>verifier</a>, a ticket
sales system, states that any alumni of "Example University" receives a discount
on season tickets to sporting events. Using a mobile device, Pat starts the
process of purchasing a season ticket. A step in this process requests an alumni
<a>verifiable credential</a>, and this request is routed to Pat's digital wallet.
The digital wallet asks Pat if they would like to provide a previously issued
<a>verifiable credential</a>. Pat selects the alumni
<a>verifiable credential</a>, which is then composed into a
<a>verifiable presentation</a>. The <a>verifiable presentation</a> is sent to
the <a>verifier</a> and <a>verified</a>.
</p>
<pre class="example nohighlight" title="A simple example of a verifiable presentation">
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"type": "VerifiablePresentation",
<span class='comment'>// the verifiable credential issued in the previous example</span>
"verifiableCredential": [{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"id": "http://example.edu/credentials/1872",
"type": ["VerifiableCredential", "AlumniCredential"],
"issuer": "https://example.edu/issuers/565049",
"issuanceDate": "2010-01-01T19:23:24Z",
"credentialSubject": {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
"alumniOf": {
"id": "did:example:c276e12ec21ebfeb1f712ebc6f1",
"name": [{
"value": "Example University",
"lang": "en"
}, {