forked from ietf-rats-wg/basic-yang-module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ietf-tpm-remote-attestation.yang
1149 lines (1103 loc) · 33.4 KB
/
ietf-tpm-remote-attestation.yang
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
module ietf-tpm-remote-attestation {
namespace "urn:ietf:params:xml:ns:yang:ietf-tpm-remote-attestation";
prefix "yang-rats-charra";
import ietf-yang-types {
prefix yang;
}
import ietf-hardware {
prefix ietfhw;
}
import ietf-crypto-types {
prefix ietfct;
}
organization
"IETF RATS (Remote ATtestation procedureS) Working Group";
contact
"WG Web : <http://datatracker.ietf.org/wg/rats/>
WG List : <mailto:[email protected]>
Author : Henk Birkholz <[email protected]>
Author : Michael Eckel <[email protected]>
Author : Shwetha Bhandari <[email protected]>
Author : Bill Sulzen <[email protected]>
Author : Eric Voit <[email protected]>
Author : Liang Xia (Frank) <[email protected]>
Author : Tom Laffey <[email protected]>
Author : Guy Fedorkow <[email protected]>";
description
"A YANG module to enable a TPM 1.2 and TPM 2.0 based
remote attestation procedure using a challenge-response
interaction model and the TPM 1.2 and TPM 2.0 Quote
primitive operations.
Copyright (c) 2020 IETF Trust and the persons identified
as authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with
or without modification, is permitted pursuant to, and
subject to the license terms contained in, the Simplified
BSD License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC
itself for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all
capitals, as shown here.";
revision "2020-03-09" {
description
"Initial version";
reference
"draft-ietf-rats-yang-tpm-charra";
}
/*****************/
/* Groupings */
/*****************/
grouping hash-algo {
description
"A selector for the hashing algorithm";
choice algo-registry-type {
mandatory true;
description
"Unfortunately, both IETF and TCG have registries here.
Choose your weapon wisely.";
case tcg {
description
"You chose the east door, the tcg space opens up to
you.";
leaf tcg-hash-algo-id {
type uint16;
description
"This is an index referencing the TCG Algorithm
Registry based on TPM_ALG_ID.";
}
}
case ietf {
description
"You chose the west door, the ietf space opens up to
you.";
leaf ietf-ni-hash-algo-id {
type uint8;
description
"This is an index referencing the Named Information
Hash Algorithm Registry.";
}
}
}
}
grouping hash {
description
"The hash value including hash-algo identifier";
list hash-digests {
description
"The list of hashes.";
container hash-digest {
description
"A hash value based on a hash algorithm registered by an
SDO.";
uses hash-algo;
leaf hash-value {
type binary;
description
"The binary representation of the hash value.";
}
}
}
}
grouping nonce {
description
"A nonce to show freshness and counter replays.";
leaf nonce-value {
type binary;
mandatory true;
description
"This nonce SHOULD be generated via a registered
cryptographic-strength algorithm. In consequence,
the length of the nonce depends on the hash algorithm
used. The algorithm used in this case is independent
from the hash algorithm used to create the hash-value
in the response of the attestor.";
}
}
grouping tpm12-pcr-selection {
description
"A Verifier can request one or more PCR values using its
individually created Attestation Key Certificate (AC).
The corresponding selection filter is represented in this
grouping.
Requesting a PCR value that is not in scope of the AC used,
detailed exposure via error msg should be avoided.";
leaf-list pcr-indices {
type uint8;
description
"The numbers/indexes of the PCRs. At the moment this is limited
to 32.";
}
}
grouping tpm20-pcr-selection {
description
"A Verifier can request one or more PCR values uses its
individually created AC. The corresponding selection filter is
represented in this grouping. Requesting a PCR value that is not
in scope of the AC used, detailed exposure via error msg should
be avoided.";
list pcr-list {
description
"For each PCR in this list an individual list of banks
(hash-algo) can be requested. It depends on the datastore, if
every bank in this grouping is included per PCR (crude), or if
each requested bank set is returned for each PCR individually
(elegant).";
container pcr {
description
"The composite of a PCR number and corresponding bank
numbers.";
leaf-list pcr-indices {
type uint8;
description
"The number of the PCR. At the moment this is limited
32";
}
uses hash-algo;
}
}
}
grouping pcr-selector {
description
"A Verifier can request the generation of an attestation
certificate (a signed public attestation key
(non-migratable, tpm-resident) wrt one or more PCR values.
The corresponding creation input is represented in this grouping.
Requesting a PCR value that is not supported results in an error,
detailed exposure via error msg should be avoided.";
list pcr-list {
description
"For each PCR in this list an individual hash-algo can be
requested.";
container pcr {
description
"The composite of a PCR number and corresponding bank
numbers.";
leaf-list pcr-index {
type uint8;
description
"The numbers of the PCRs that are associated with
the created key. At the moment the highest number is 32";
}
uses hash-algo;
}
}
}
grouping tpm12-signature-scheme {
description
"The signature scheme used to sign the evidence via a TPM 1.2.";
leaf TPM_SIG_SCHEME-value {
type uint8;
mandatory true;
description
"Selects the signature scheme that is used to sign the TPM
Quote information response. Allowed values can be found in
the table at the bottom of page 32 in the TPM 1.2 Structures
specification (Level 2 Revision 116, 1 March 2011).";
}
}
grouping tpm20-signature-scheme {
description
"The signature scheme used to sign the evidence.";
choice signature-identifier-type {
mandatory true;
description
"There are multiple ways to reference a signature type.
This used to select the signature algo to sign the quote
information response.";
case TPM_ALG_ID {
description
"This references the indices of table 9 in the TPM 2.0
structure specification.";
leaf TPM_ALG_ID-value {
type uint16;
description
"The TCG Algorithm Registry ID value.";
}
}
case COSE_Algorithm {
description
"This references the IANA COSE Algorithms Registry indices.
Every index of this registry to be used must be mapable to a
TPM_ALG_ID value.";
leaf COSE_Algorithm-value {
type int32;
description
"The IANA COSE Algorithms ID value.";
}
}
}
}
grouping tpm12-attestation-key-identifier {
description
"A selector for a suitable key identifier for a TPM 1.2.";
choice key-identifier {
description
"Identifier for the attestation key to use for signing
attestation evidence.";
case public-key {
leaf pub-key-id {
type binary;
description
"The value of the identifier for the public key.";
}
}
case TSS_UUID {
description
"Use a YANG agent generated (and maintained) attestation
key UUID that complies with the TSS_UUID datatype of the TCG
Software Stack (TSS) Specification, Version 1.10 Golden,
August 20, 2003.";
container TSS_UUID-value {
description
"A detailed structure that is used to create the
TPM 1.2 native TSS_UUID as defined in the TCG Software
Stack (TSS) Specification, Version 1.10 Golden,
August 20, 2003.";
leaf ulTimeLow {
type uint32;
description
"The low field of the timestamp.";
}
leaf usTimeMid {
type uint16;
description
"The middle field of the timestamp.";
}
leaf usTimeHigh {
type uint16;
description
"The high field of the timestamp multiplexed with the
version number.";
}
leaf bClockSeqHigh {
type uint8;
description
"The high field of the clock sequence multiplexed with
the variant.";
}
leaf bClockSeqLow {
type uint8;
description
"The low field of the clock sequence.";
}
leaf-list rgbNode {
type uint8;
description
"The spatially unique node identifier.";
}
}
}
}
}
grouping tpm20-attestation-key-identifier {
description
"A selector for a suitable key identifier.";
choice key-identifier {
description
"Identifier for the attestation key to use for signing
attestation evidence.";
case public-key {
leaf pub-key-id {
type binary;
description
"The value of the identifier for the public key.";
}
}
case uuid {
description
"Use a YANG agent generated (and maintained) attestation
key UUID.";
leaf uuid-value {
type binary;
description
"The UUID identifying the corresponding public key.";
}
}
}
}
grouping tpm-identifier {
description
"In a system with multiple-TPMs get the data from a specific TPM
identified by the name and physical-index.";
leaf tpm-name {
type string;
description
"Name value of a single TPM or 'All'";
}
leaf tpm-physical-index {
if-feature ietfhw:entity-mib;
type int32 {
range "1..2147483647";
}
config false;
description
"The entPhysicalIndex for the TPM.";
reference
"RFC 6933: Entity MIB (Version 4) - entPhysicalIndex";
}
}
grouping compute-node-identifier {
description
"In a distributed system with multiple compute nodes
this is the node identified by name and physical-index.";
leaf node-id {
type string;
description
"ID of the compute node, such as Board Serial Number.";
}
leaf node-physical-index {
if-feature ietfhw:entity-mib;
type int32 {
range "1..2147483647";
}
config false;
description
"The entPhysicalIndex for the compute node.";
reference
"RFC 6933: Entity MIB (Version 4) - entPhysicalIndex";
}
}
grouping tpm12-pcr-info-short {
description
"This structure is for defining a digest at release when the only
information that is necessary is the release configuration.";
uses tpm12-pcr-selection;
leaf locality-at-release {
type uint8;
description
"This SHALL be the locality modifier required to release the
information (TPM 1.2 type TPM_LOCALITY_SELECTION)";
}
leaf digest-at-release {
type binary;
description
"This SHALL be the digest of the PCR indices and PCR values
to verify when revealing auth data (TPM 1.2 type
TPM_COMPOSITE_HASH).";
}
}
grouping tpm12-version {
description
"This structure provides information relative the version of
the TPM.";
list version {
description
"This indicates the version of the structure
(TPM 1.2 type TPM_STRUCT_VER). This MUST be 1.1.0.0.";
leaf major {
type uint8;
description
"Indicates the major version of the structure.
MUST be 0x01.";
}
leaf minor {
type uint8;
description
"Indicates the minor version of the structure.
MUST be 0x01.";
}
leaf revMajor {
type uint8;
description
"Indicates the rev major version of the structure.
MUST be 0x00.";
}
leaf revMinor {
type uint8;
description
"Indicates the rev minor version of the structure.
MUST be 0x00.";
}
}
}
grouping tpm12-quote-info-common {
description
"These statements are used in bot quote variants of the TPM 1.2";
leaf fixed {
type binary;
description
"This SHALL always be the string ‘QUOT’ or ‘QUO2’
(length is 4 bytes).";
}
leaf external-data {
type binary;
description
"160 bits of externally supplied data, typically a nonce.";
}
leaf signature-size {
type uint32;
description
"The size of TPM 1.2 'signature' value.";
}
leaf signature {
type binary;
description
"Signature over SHA-1 hash of tpm12-quote-info2'.";
}
}
grouping tpm12-quote-info {
description
"This structure provides the mechanism for the TPM to quote the
current values of a list of PCRs (as used by the TPM_Quote2
command).";
uses tpm12-version;
leaf digest-value {
type binary;
description
"This SHALL be the result of the composite hash algorithm using
the current values of the requested PCR indices
(TPM 1.2 type TPM_COMPOSITE_HASH.)";
}
}
grouping tpm12-quote-info2 {
description
"This structure provides the mechanism for the TPM to quote the
current values of a list of PCRs
(as used by the TPM_Quote2 command).";
leaf tag {
type uint8;
description
"This SHALL be TPM_TAG_QUOTE_INFO2.";
}
uses tpm12-pcr-info-short;
}
grouping tpm12-cap-version-info {
description
"TPM returns the current version and revision of the TPM 1.2 .";
list TPM_PCR_COMPOSITE {
description
"The TPM 1.2 TPM_PCRVALUEs for the pcr-indices.";
uses tpm12-pcr-selection;
leaf value-size {
type uint32;
description
"This SHALL be the size of the 'tpm12-pcr-value' field
(not the number of PCRs).";
}
leaf-list tpm12-pcr-value {
type binary;
description
"The list of TPM_PCRVALUEs from each PCR selected in sequence
of tpm12-pcr-selection.";
}
list version-info {
description
"An optional output parameter from a TPM 1.2 TPM_Quote2.";
leaf tag {
type uint16;
description
"The TPM 1.2 version and revision
(TPM 1.2 type TPM_STRUCTURE_TAG).
This MUST be TPM_CAP_VERSION_INFO (0x0030)";
}
uses tpm12-version;
leaf spec-level {
type uint16;
description
"A number indicating the level of ordinals supported.";
}
leaf errata-rev {
type uint8;
description
"A number indicating the errata version of the
specification.";
}
leaf tpm-vendor-id {
type binary;
description
"The vendor ID unique to each TPM manufacturer.";
}
leaf vendor-specific-size {
type uint16;
description
"The size of the vendor-specific area.";
}
leaf vendor-specific {
type binary;
description
"Vendor specific information.";
}
}
}
}
grouping tpm12-pcr-composite {
description
"The actual values of the selected PCRs (a list of TPM_PCRVALUEs
(binary) and associated metadata for TPM 1.2.";
list TPM_PCR_COMPOSITE {
description
"The TPM 1.2 TPM_PCRVALUEs for the pcr-indices.";
uses tpm12-pcr-selection;
leaf value-size {
type uint32;
description
"This SHALL be the size of the 'tpm12-pcr-value' field
(not the number of PCRs).";
}
leaf-list tpm12-pcr-value {
type binary;
description
"The list of TPM_PCRVALUEs from each PCR selected in sequence
of tpm12-pcr-selection.";
}
}
}
grouping node-uptime {
description
"Uptime in seconds of the node.";
leaf up-time {
type uint32;
description
"Uptime in seconds of this node reporting its data";
}
}
identity log-type {
description
"The type of logs available.";
}
identity bios {
base log-type;
description
"Measurement log created by the BIOS/UEFI.";
}
identity ima {
base log-type;
description
"Measurement log created by IMA.";
}
grouping log-identifier {
description
"Identifier for type of log to be retrieved.";
leaf log-type {
type identityref {
base log-type;
}
mandatory true;
description
"The corresponding measurement log type identity.";
}
}
grouping boot-event-log {
description
"Defines an event log corresponding to the event that extended the
PCR";
leaf event-number {
type uint32;
description
"Unique event number of this event";
}
leaf event-type {
type uint32;
description
"log event type";
}
leaf pcr-index {
type uint16;
description
"Defines the PCR index that this event extended";
}
list digest-list {
description "Hash of event data";
uses hash-algo;
leaf-list digest {
type binary;
description
"The hash of the event data";
}
}
leaf event-size {
type uint32;
description
"Size of the event data";
}
leaf-list event-data {
type uint8;
description
"The event data size determined by event-size";
}
}
grouping ima-event {
description
"Defines an hash log extend event for IMA measurements";
leaf event-number {
type uint64;
description
"Unique number for this event for sequencing";
}
leaf ima-template {
type string;
description
"Name of the template used for event logs
for e.g. ima, ima-ng, ima-sig";
}
leaf filename-hint {
type string;
description
"File that was measured";
}
leaf filedata-hash {
type binary;
description
"Hash of filedata";
}
leaf filedata-hash-algorithm {
type string;
description
"Algorithm used for filedata-hash";
}
leaf template-hash-algorithm {
type string;
description
"Algorithm used for template-hash";
}
leaf template-hash {
type binary;
description
"hash(filedata-hash, filename-hint)";
}
leaf pcr-index {
type uint16;
description
"Defines the PCR index that this event extended";
}
leaf signature {
type binary;
description
"The file signature";
}
}
grouping bios-event-log {
description
"Measurement log created by the BIOS/UEFI.";
list bios-event-entry {
key event-number;
description
"Ordered list of TCG described event log
that extended the PCRs in the order they
were logged";
uses boot-event-log;
}
}
grouping ima-event-log {
list ima-event-entry {
key event-number;
description
"Ordered list of ima event logs by event-number";
uses ima-event;
}
description
"Measurement log created by IMA.";
}
grouping event-logs {
description
"A selector for the log and its type.";
choice log-type {
mandatory true;
description
"Event log type determines the event logs content.";
case bios {
description
"BIOS/UEFI event logs";
container bios-event-logs {
description
"This is an index referencing the TCG Algorithm
Registry based on TPM_ALG_ID.";
uses bios-event-log;
}
}
case ima {
description
"IMA event logs";
container ima-event-logs {
description
"This is an index referencing the TCG Algorithm
Registry based on TPM_ALG_ID.";
uses ima-event-log;
}
}
}
}
/**********************/
/* RPC operations */
/**********************/
rpc tpm12-challenge-response-attestation {
description
"This RPC accepts the input for TSS TPM 1.2 commands of the
managed device. ComponentIndex from the hardware manager YANG
module to refer to dedicated TPM in composite devices,
e.g. smart NICs, is still a TODO.";
input {
container tpm1-attestation-challenge {
description
"This container includes every information element defined
in the reference challenge-response interaction model for
remote attestation. Corresponding values are based on
TPM 1.2 structure definitions";
uses tpm12-pcr-selection;
uses nonce;
uses tpm12-signature-scheme;
uses tpm12-attestation-key-identifier;
leaf add-version {
type boolean;
description
"Whether or not to include TPM_CAP_VERSION_INFO; if true,
then TPM_Quote2 must be used to create the response.";
}
uses tpm-identifier;
}
}
output {
list tpm12-attestation-response {
key tpm-name;
description
"The binary output of TPM 1.2 TPM_Quote/TPM_Quote2, including
the PCR selection and other associated attestation evidence
metadata";
uses tpm-identifier;
uses node-uptime;
uses compute-node-identifier;
uses tpm12-quote-info-common;
choice tpm12-quote {
mandatory true;
description
"Either a tpm12-quote-info or tpm12-quote-info2, depending
on whether TPM_Quote or TPM_Quote2 was used
(cf. input field add-verson).";
case tpm12-quote1 {
description
"BIOS/UEFI event logs";
uses tpm12-quote-info;
uses tpm12-pcr-composite;
}
case tpm12-quote2 {
description
"BIOS/UEFI event logs";
uses tpm12-quote-info2;
}
}
}
}
}
rpc tpm20-challenge-response-attestation {
description
"This RPC accepts the input for TSS TPM 2.0 commands of the
managed device. ComponentIndex from the hardware manager YANG
module to refer to dedicated TPM in composite devices,
e.g. smart NICs, is still a TODO.";
input {
container tpm20-attestation-challenge {
description
"This container includes every information element defined
in the reference challenge-response interaction model for
remote attestation. Corresponding values are based on
TPM 2.0 structure definitions";
uses nonce;
list challenge-objects {
key "node-id tpm-name";
description
"Nodes to fetch attestation information, PCR selection
and AK identifier.";
uses compute-node-identifier;
uses tpm-identifier;
uses tpm20-pcr-selection;
uses tpm20-signature-scheme;
uses tpm20-attestation-key-identifier;
}
}
}
output {
list tpm20-attestation-response {
key "node-id tpm-name";
description
"The binary output of TPM2b_Quote in one TPM chip of the
node which identified by node-id. An TPMS_ATTEST structure
including a length, encapsulated in a signature";
uses tpm-identifier;
uses node-uptime;
uses compute-node-identifier;
leaf quote {
type binary;
description
"Quote data returned by TPM Quote, including PCR selection,
PCR digest and etc.";
}
leaf quote-signature {
type binary;
description
"Quote signature returned by TPM Quote.";
}
list pcr-bank-values {
key algo-registry-type;
description
"PCR values in each PCR bank.";
uses hash-algo;
list pcr-values {
key pcr-index;
description
"List of one PCR bank.";
leaf pcr-index {
type uint16;
description
"PCR index number.";
}
leaf pcr-value {
type binary;
description
"PCR value.";
}
}
}
container pcr-digest-algo-in-quote {
uses hash-algo;
description
"The hash algorithm for PCR value digest in
Quote output.";
}
}
}
}
rpc basic-trust-establishment {
description
"This RPC creates a tpm-resident, non-migratable key to be used
in TPM_Quote commands, an attestation certificate.";
input {
uses nonce;
uses tpm20-signature-scheme;
uses tpm-identifier;
leaf certificate-name {
type string;
description
"An arbitrary name for the identity certificate chain
requested.";
}
}
output {
list attestation-certificates {
key tpm-name;
description
"Attestation Certificate data from a TPM identified by the TPM
name";
uses tpm-identifier;
uses node-uptime;
uses compute-node-identifier;
leaf certificate-name {
type string;
description
"An arbitrary name for this identity certificate or
certificate chain.";
}
leaf attestation-certificate {
type ietfct:end-entity-cert-cms;
description
"The binary signed certificate chain data for this identity
certificate.";
}
uses tpm20-attestation-key-identifier;
}
}
}
rpc log-retrieval {
description
"Logs Entries are either identified via indices or via providing
the last line received. The number of lines returned can be
limited. The type of log is a choice that can be augmented.";
input {
list log-selector {
key "node-id tpm-name";
description
"Selection of log entries to be reported.";
uses compute-node-identifier;
uses tpm-identifier;
choice index-type {
description
"Last log entry received, log index number, or timestamp.";
case last-entry {
description
"The last entry of the log already retrieved.";
leaf last-entry-value {
type binary;
description
"Content of an log event which matches 1:1 with a
unique event record contained within the log. Log
entries subsequent to this will be passed to the
requester. Note: if log entry values are not unique,
this MUST return an error.";
}
}
case index {
description
"Numeric index of the last log entry retrieved, or zero.";
leaf last-index-number {
type uint64;
description
"The last numeric index number of a log entry.
Zero means to start at the beginning of the log.
Entries subsequent to this will be passed to the
requester.";
}
}
case timestamp {
leaf timestamp {
type yang:date-and-time;
description
"Timestamp from which to start the extraction. The next
log entry subsequent to this timestamp is to be sent.";
}
description
"Timestamp from which to start the extraction.";
}
}
leaf log-entry-quantity {