forked from ietf-rats-wg/basic-yang-module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdraft-ietf-rats-yang-tpm-charra.txt
3136 lines (2478 loc) · 89.5 KB
/
draft-ietf-rats-yang-tpm-charra.txt
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
RATS Working Group H. Birkholz
Internet-Draft M. Eckel
Intended status: Standards Track Fraunhofer SIT
Expires: March 22, 2021 S. Bhandari
E. Voit
B. Sulzen
Cisco
L. Xia
Huawei
T. Laffey
HPE
G. Fedorkow
Juniper
September 18, 2020
A YANG Data Model for Challenge-Response-based Remote Attestation
Procedures using TPMs
draft-ietf-rats-yang-tpm-charra-latest
Abstract
This document defines a YANG RPC and a minimal datastore required to
retrieve attestation evidence about integrity measurements from a
device following the operational context defined in
[I-D.ietf-rats-tpm-based-network-device-attest]. Complementary
measurement logs are also provided by the YANG RPC originating from
one or more roots of trust of measurement. The module defined
requires at least one TPM 1.2 or TPM 2.0 and corresponding Trusted
Software Stack included in the device components of the composite
device the YANG server is running on.
Status of This Memo
This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
This Internet-Draft will expire on March 22, 2021.
Birkholz, et al. Expires March 22, 2021 [Page 1]
Internet-Draft YANG-CHARRA for TPMs September 2020
Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Requirements notation . . . . . . . . . . . . . . . . . . 3
2. The YANG Module for Basic Remote Attestation Procedures . . . 3
2.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 3
2.2. YANG Modules . . . . . . . . . . . . . . . . . . . . . . 6
2.2.1. ietf-tpm-remote-attestation . . . . . . . . . . . . . 6
2.2.2. ietf-tcg-algs . . . . . . . . . . . . . . . . . . . . 35
3. IANA considerations . . . . . . . . . . . . . . . . . . . . . 51
4. Security Considerations . . . . . . . . . . . . . . . . . . . 51
5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 52
6. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 52
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.1. Normative References . . . . . . . . . . . . . . . . . . 53
7.2. Informative References . . . . . . . . . . . . . . . . . 55
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 55
1. Introduction
This document is based on the terminology defined in the
[I-D.ietf-rats-architecture] and uses the operational context defined
in [I-D.ietf-rats-tpm-based-network-device-attest] as well as the
interaction model and information elements defined in
[I-D.birkholz-rats-reference-interaction-model]. The currently
supported hardware security modules (HWM) are the Trusted Platform
Module (TPM) [TPM1.2] and [TPM2.0] specified by the Trusted Computing
Group (TCG). One ore more TPMs embedded in the components of a
composite device - sometimes also referred to as an aggregate device
- are required in order to use the YANG module defined in this
document. A TPM is used as a root of trust for reporting (RTR) in
order to retrieve attestation evidence from a composite device (quote
primitive operation). Additionally, it is used as a root of trust
Birkholz, et al. Expires March 22, 2021 [Page 2]
Internet-Draft YANG-CHARRA for TPMs September 2020
for storage (RTS) in order to retain shielded secrets and store
system measurements using a folding hash function (extend primitive
operation).
1.1. Requirements notation
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 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
2. The YANG Module for Basic Remote Attestation Procedures
One or more TPMs MUST be embedded in the composite device that is
providing attestation evidence via the YANG module defined in this
document. The ietf-basic-remote-attestation YANG module enables a
composite device to take on the role of Claimant and Attester in
accordance with the Remote Attestation Procedures (RATS) architecture
[I-D.ietf-rats-architecture] and the corresponding challenge-response
interaction model defined in the
[I-D.birkholz-rats-reference-interaction-model] document. A fresh
nonce with an appropriate amount of entropy MUST be supplied by the
YANG client in order to enable a proof-of-freshness with respect to
the attestation evidence provided by the attester running the YANG
datastore. The functions of this YANG module are restricted to 0-1
TPMs per hardware component.
2.1. Tree Diagram
module: ietf-tpm-remote-attestation
+--rw rats-support-structures
+--rw compute-nodes!
| +--ro compute-node* [node-id]
| +--ro node-id string
| +--ro node-physical-index? int32 {ietfhw:entity-mib}?
| +--ro node-name? string
| +--ro node-location? string
+--rw tpms
| +--rw tpm* [tpm-name]
| +--rw tpm-name string
| +--ro hardware-based? boolean
| +--ro tpm-physical-index? int32 {ietfhw:entity-mib}?
| +--ro tpm-path? string
| +--ro compute-node compute-node-ref
| +--ro tpm-manufacturer? string
| +--rw tpm-firmware-version identityref
| +--rw TPM12-hash-algo? identityref
Birkholz, et al. Expires March 22, 2021 [Page 3]
Internet-Draft YANG-CHARRA for TPMs September 2020
| +--rw TPM12-pcrs* pcr
| +--rw tpm20-pcr-bank* [TPM20-hash-algo]
| | +--rw TPM20-hash-algo identityref
| | +--rw pcr-index* tpm:pcr
| +--ro tpm-status enumeration
| +--rw certificates
| +--rw certificate* [certificate-name]
| +--rw certificate-name string
| +--rw certificate-keystore-ref? leafref
| +--rw certificate-type? enumeration
+--rw attester-supported-algos
+--rw tpm12-asymmetric-signing* identityref {taa:TPM12}?
+--rw tpm12-hash* identityref {taa:TPM12}?
+--rw tpm20-asymmetric-signing* identityref {taa:TPM20}?
+--rw tpm20-hash* identityref {taa:TPM20}?
rpcs:
+---x tpm12-challenge-response-attestation {taa:TPM12}?
| +---w input
| | +---w tpm12-attestation-challenge
| | +---w pcr-index* pcr
| | +---w nonce-value binary
| | +---w add-version? boolean
| | +---w certificate-name* certificate-name-ref
| +--ro output
| +--ro tpm12-attestation-response* []
| +--ro certificate-name? certificate-name-ref
| +--ro up-time? uint32
| +--ro node-id? string
| +--ro node-physical-index? int32
| | {ietfhw:entity-mib}?
| +--ro fixed? binary
| +--ro external-data? binary
| +--ro signature-size? uint32
| +--ro signature? binary
| +--ro (tpm12-quote)
| +--:(tpm12-quote1)
| | +--ro version* []
| | | +--ro major? uint8
| | | +--ro minor? uint8
| | | +--ro rev-Major? uint8
| | | +--ro rev-Minor? uint8
| | +--ro digest-value? binary
| | +--ro TPM_PCR_COMPOSITE* []
| | +--ro pcr-index* pcr
| | +--ro value-size? uint32
| | +--ro tpm12-pcr-value* binary
| +--:(tpm12-quote2)
Birkholz, et al. Expires March 22, 2021 [Page 4]
Internet-Draft YANG-CHARRA for TPMs September 2020
| +--ro tag? uint8
| +--ro pcr-index* pcr
| +--ro locality-at-release? uint8
| +--ro digest-at-release? binary
+---x tpm20-challenge-response-attestation {taa:TPM20}?
| +---w input
| | +---w tpm20-attestation-challenge
| | +---w nonce-value binary
| | +---w tpm20-pcr-selection* []
| | | +---w TPM20-hash-algo? identityref
| | | +---w pcr-index* tpm:pcr
| | +---w certificate-name* certificate-name-ref
| +--ro output
| +--ro tpm20-attestation-response* []
| +--ro certificate-name? certificate-name-ref
| +--ro TPMS_QUOTE_INFO binary
| +--ro quote-signature? binary
| +--ro up-time? uint32
| +--ro node-id? string
| +--ro node-physical-index? int32 {ietfhw:entity-mib}?
| +--ro unsigned-pcr-values* []
| +--ro TPM20-hash-algo? identityref
| +--ro pcr-values* [pcr-index]
| +--ro pcr-index pcr
| +--ro pcr-value? binary
+---x log-retrieval
+---w input
| +---w log-selector* []
| | +---w tpm-name* string
| | +---w (index-type)?
| | | +--:(last-entry)
| | | | +---w last-entry-value? binary
| | | +--:(index)
| | | | +---w last-index-number? uint64
| | | +--:(timestamp)
| | | +---w timestamp? yang:date-and-time
| | +---w log-entry-quantity? uint16
| +---w log-type identityref
+--ro output
+--ro system-event-logs
+--ro node-data* []
+--ro tpm-name? string
+--ro up-time? uint32
+--ro log-result
+--ro (attested_event_log_type)
+--:(bios)
| +--ro bios-event-logs
| +--ro bios-event-entry* [event-number]
Birkholz, et al. Expires March 22, 2021 [Page 5]
Internet-Draft YANG-CHARRA for TPMs September 2020
| +--ro event-number uint32
| +--ro event-type? uint32
| +--ro pcr-index? pcr
| +--ro digest-list* []
| | +--ro hash-algo? identityref
| | +--ro digest* binary
| +--ro event-size? uint32
| +--ro event-data* uint8
+--:(ima)
| +--ro ima-event-logs
| +--ro ima-event-entry* [event-number]
| +--ro event-number uint64
| +--ro ima-template? string
| +--ro filename-hint? string
| +--ro filedata-hash? binary
| +--ro filedata-hash-algorithm? string
| +--ro template-hash-algorithm? string
| +--ro template-hash? binary
| +--ro pcr-index? pcr
| +--ro signature? binary
+--:(netequip_boot)
+--ro boot-event-logs
+--ro boot-event-entry* [event-number]
+--ro event-number uint64
+--ro filename-hint? string
+--ro filedata-hash? binary
+--ro filedata-hash-algorithm? string
+--ro file-version? string
+--ro file-type? string
+--ro pcr-index? pcr
2.2. YANG Modules
2.2.1. ietf-tpm-remote-attestation
This YANG module imports modules from [RFC6991], [RFC8348],
[I-D.ietf-netconf-keystore], ietf-tcg-algs.yang.
2.2.1.1. Identities
This module supports the following types of attestation event logs:
<ima>, <bios>, and <netequip_boot>.
Birkholz, et al. Expires March 22, 2021 [Page 6]
Internet-Draft YANG-CHARRA for TPMs September 2020
2.2.1.2. RPCs
<tpm12-challenge-response-attestation> - Allows a Verifier to request
a quote of PCRs from a TPM1.2 compliant cryptoprocessor. When one or
more <certificate-name> is not provided, all TPM1.2 compliant
cryptoprocessors will respond.
<tpm20-challenge-response-attestation> - Allows a Verifier to request
a quote of PCRs from a TPM2.0 compliant cryptoprocessor. When one or
more <certificate-name> is not provided, all TPM2.0 compliant
cryptoprocessors will respond.
<log-retrieval> - Allows a Verifier to acquire the evidence which was
extended into specific PCRs.
2.2.1.3. Data Nodes
container <rats-support-structures> - This exists when there are more
than one TPM for a particular Attester. This allows each specific
TPM to identify on which <compute-node> it belongs.
container <tpms> - Provides configuration and operational details for
each supported TPM, including the tpm-firmware-version, PCRs which
may be quoted, certificates which are associated with that TPM, and
the current operational status. Of note is the certificates which
are associated with that TPM. As a certificate is associated with a
single Attestation key, knowledge of the certificate allows a
specific TPM to be identified.
container <attester-supported-algos> - Identifies which TCG
algorithms are available for use the Attesting platform. This allows
an operator to limit algorithms available for use by RPCs to just a
desired set from the universe of all allowed by TCG.
2.2.1.4. YANG Module
<CODE BEGINS> file [email protected]
module ietf-tpm-remote-attestation {
namespace "urn:ietf:params:xml:ns:yang:ietf-tpm-remote-attestation";
prefix "tpm";
import ietf-yang-types {
prefix yang;
}
import ietf-hardware {
prefix ietfhw;
}
import ietf-keystore {
Birkholz, et al. Expires March 22, 2021 [Page 7]
Internet-Draft YANG-CHARRA for TPMs September 2020
prefix ks;
}
import ietf-tcg-algs {
prefix taa;
}
organization
"IETF RATS (Remote ATtestation procedureS) Working Group";
contact
"WG Web : <http://datatracker.ietf.org/wg/rats/>
WG List : <mailto:[email protected]>
Author : Eric Voit <[email protected]>
Author : Henk Birkholz <[email protected]>
Author : Michael Eckel <[email protected]>
Author : Shwetha Bhandari <[email protected]>
Author : Bill Sulzen <[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).
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.
Birkholz, et al. Expires March 22, 2021 [Page 8]
Internet-Draft YANG-CHARRA for TPMs September 2020
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-09-18" {
description
"Initial version";
reference
"draft-ietf-rats-yang-tpm-charra";
}
/*****************/
/* Typedefs */
/*****************/
typedef pcr {
type uint8 {
range "0..31";
}
description
"Valid index number for a PCR. At this point 0-31 is viable.";
}
typedef compute-node-ref {
type leafref {
path "/tpm:rats-support-structures/tpm:compute-nodes" +
"/tpm:compute-node/tpm:node-name";
}
description
"This type is used to reference a hardware node. It is quite
possible this leafref will eventually point to another YANG
module's node.";
}
typedef certificate-name-ref {
type leafref {
path "/tpm:rats-support-structures/tpm:tpms/tpm:tpm" +
"/tpm:certificates/tpm:certificate/tpm:certificate-name";
}
description
"A type which allows identification of a TPM based certificate.";
}
Birkholz, et al. Expires March 22, 2021 [Page 9]
Internet-Draft YANG-CHARRA for TPMs September 2020
/******************/
/* Identities */
/******************/
identity attested_event_log_type {
description
"Base identity allowing categorization of the reasons why and
attested measurement has been taken on an Attester.";
}
identity ima {
base attested_event_log_type;
description
"An event type recorded in IMA.";
}
identity bios {
base attested_event_log_type;
description
"An event type associated with BIOS/UEFI.";
}
identity netequip_boot {
base attested_event_log_type;
description
"An event type associated with Network Equipment Boot.";
}
/*****************/
/* Groupings */
/*****************/
grouping TPM20-asymmetric-signing-algo {
description
"The signature scheme that is used to sign the TPM2 Quote
information response.";
leaf TPM20-asymmetric-signing-algo {
must "/tpm:rats-support-structures/tpm:attester-supported-algos"
+ "/tpm:tpm20-asymmetric-signing" {
error-message "Not a platform supported " +
"TPM20-asymmetric-signing-algo";
}
type identityref {
base taa:asymmetric;
}
description
"The signature scheme that is used to sign the TPM2.0
Quote information response. This must be one of those
Birkholz, et al. Expires March 22, 2021 [Page 10]
Internet-Draft YANG-CHARRA for TPMs September 2020
supported by a platform.";
default taa:TPM_ALG_RSA;
}
}
grouping TPM12-asymmetric-signing-algo {
description
"The signature scheme that is used to sign the TPM12 Quote
information response.";
leaf TPM12-asymmetric-signing-algo {
must "/tpm:rats-support-structures/tpm:attester-supported-algos"
+ "/tpm:tpm12-asymmetric-signing" {
error-message "Not a platform supported " +
"TPM12-asymmetric-signing-algo";
}
type identityref {
base taa:asymmetric;
}
description
"The signature scheme that is used to sign the TPM1.2
Quote information response. This must be one of those
supported by a platform.";
default taa:TPM_ALG_RSA;
}
}
grouping TPM20-hash-algo {
description
"The cryptographic algorithm used to hash the TPM2 PCRs. This
must be from the list of platform supported options.";
leaf TPM20-hash-algo {
must "/tpm:rats-support-structures/tpm:attester-supported-algos"
+ "/tpm:tpm20-hash" {
error-message "Not a platform supported TPM20-hash-algo";
}
type identityref {
base taa:hash;
}
description
"The hash scheme that is used to hash a TPM1.2 PCR. This
must be one of those supported by a platform.";
default taa:TPM_ALG_SHA256;
}
}
grouping TPM12-hash-algo {
description
"The cryptographic algorithm used to hash the TPM1.2 PCRs.";
Birkholz, et al. Expires March 22, 2021 [Page 11]
Internet-Draft YANG-CHARRA for TPMs September 2020
leaf TPM12-hash-algo {
must "/tpm:rats-support-structures/tpm:attester-supported-algos"
+ "/tpm:tpm12-hash" {
error-message "Not a platform supported TPM12-hash-algo";
}
type identityref {
base taa:hash;
}
description
"The hash scheme that is used to hash a TPM1.2 PCR. This
must be one of those supported by a platform. This assumes
that an algorithm other than SHA1 can be supported on some
TPM1.2 cryptoprocessor variant.";
default taa:TPM_ALG_SHA1;
}
}
grouping nonce {
description
"A nonce to show freshness and to allow the detection
of replay attacks.";
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-index {
/* the following XPATH must be updated to ensure that only
selectable PCRs are allowed in the RPC
must "/tpm:rats-support-structures/tpm:tpms" +
"/tpm:tpm[tpm-name = current()]" +
"/tpm:tpm[TPM12-pcrs = current()]" {
Birkholz, et al. Expires March 22, 2021 [Page 12]
Internet-Draft YANG-CHARRA for TPMs September 2020
error-message "Acquiring this PCR index is not supported";
}
*/
type pcr;
description
"The numbers/indexes of the PCRs. At the moment this is limited
to 32.";
}
}
grouping tpm20-pcr-selection {
description
"A Verifier can acquire one or more PCR values, which are hashed
together in a TPM2B_DIGEST coming from the TPM2. The selection
list of desired PCRs and the Hash Algorithm is represented in
this grouping.";
list tpm20-pcr-selection {
unique "TPM20-hash-algo";
description
"Specifies the list of PCRs and Hash Algorithms that can be
returned within a TPM2B_DIGEST.";
reference
"https://www.trustedcomputinggroup.org/wp-content/uploads/
TPM-Rev-2.0-Part-2-Structures-01.38.pdf Section 10.9.7";
uses TPM20-hash-algo;
leaf-list pcr-index {
/* the following XPATH must be updated to ensure that only
selectable PCRs are allowed in the RPC
must "/tpm:rats-support-structures/tpm:tpms" +
"/tpm:tpm[tpm-name = current()]" +
"/tpm:tpm20-pcr-bank[pcr-index = current()]" {
error-message "Acquiring this PCR index is not supported";
}
*/
type tpm:pcr;
description
"The numbers of the PCRs that which are being tracked
with a hash based on the TPM20-hash-algo.";
}
}
}
grouping certificate-name-ref {
description
"Identifies a certificate in a keystore.";
leaf certificate-name {
type certificate-name-ref;
description
Birkholz, et al. Expires March 22, 2021 [Page 13]
Internet-Draft YANG-CHARRA for TPMs September 2020
"Identifies a certificate in a keystore.";
}
}
grouping tpm-name {
description
"A unique TPM on a device.";
leaf tpm-name {
type string;
description
"Unique system generated name for a TPM on a device.";
}
}
grouping tpm-name-selector {
description
"One or more TPM on a device.";
leaf-list tpm-name {
type string;
config false;
description
"Name of one or more unique TPMs on a device. If this object
exists, a selection should pull only the objects related to
these TPM(s). If it does not exist, all qualifying TPMs that
are 'hardware-based' equals true on the device are selected.";
}
}
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";
}
Birkholz, et al. Expires March 22, 2021 [Page 14]
Internet-Draft YANG-CHARRA for TPMs September 2020
}
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)";
reference
"TPM Main Part 2 TPM Structures v1.2 July 2007
Section 8.6";
}
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).";
reference
"TPM Main Part 2 TPM Structures v1.2 July 2007
Section 5.4.1.";
}
}
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.";
reference
"TPM Main Part 2 TPM Structures v1.2 July 2007
Section 5.1.";
leaf major {
type uint8;
description
"Indicates the major version of the structure.
MUST be 0x01.";
}
leaf minor {
type uint8;
description
Birkholz, et al. Expires March 22, 2021 [Page 15]
Internet-Draft YANG-CHARRA for TPMs September 2020
"Indicates the minor version of the structure.
MUST be 0x01.";
}
leaf rev-Major {
type uint8;
description
"Indicates the rev major version of the structure.
MUST be 0x00.";
}
leaf rev-Minor {
type uint8;
description
"Indicates the rev minor version of the structure.
MUST be 0x00.";
}
}
}
grouping tpm12-quote-info-common {
description
"These statements are within both quote variants of the TPM 1.2";
reference
"TPM Main Part 2 TPM Structures v1.2 July 2007,
Section 11.3 & 11.4.";
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 hash of tpm12-quote-info2'.";
}
}
grouping tpm12-quote-info {
Birkholz, et al. Expires March 22, 2021 [Page 16]
Internet-Draft YANG-CHARRA for TPMs September 2020
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.";
reference
"TPM Main Part 2 TPM Structures v1.2 July 2007, Section 8.2";
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.";
}
Birkholz, et al. Expires March 22, 2021 [Page 17]
Internet-Draft YANG-CHARRA for TPMs September 2020
list version-info {
description
"An optional output parameter from a TPM 1.2 TPM_Quote2.";
leaf tag {
type uint16; /* This should be converted into an ENUM */
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