1use crate::{
6 data::{
7 Tpm2b, Tpm2bAttest, Tpm2bAuth, Tpm2bCreationData, Tpm2bData, Tpm2bDigest,
8 Tpm2bEncryptedSecret, Tpm2bMaxBuffer, Tpm2bName, Tpm2bPrivate, Tpm2bPublic,
9 Tpm2bSensitiveCreate, Tpm2bSensitiveData, TpmAlgId, TpmCap, TpmCc, TpmRc, TpmRh, TpmSe,
10 TpmiYesNo, TpmlAlg, TpmlPcrSelection, TpmsAuthCommand, TpmsAuthResponse,
11 TpmsCapabilityData, TpmsContext, TpmtSignature, TpmtSymDef, TpmtSymDefObject,
12 TpmtTkCreation, TpmtTkHashcheck, TpmtTkVerified,
13 },
14 tpm_dispatch, tpm_response, tpm_struct, TpmBuild, TpmList, TpmParse, TpmPersistent, TpmSession,
15 TpmTransient,
16};
17use core::fmt::Debug;
18
19pub mod asymmetric;
20pub mod attestation;
21pub mod build;
22pub mod enhanced_authorization;
23pub mod integrity;
24pub mod non_volatile;
25pub mod object;
26pub mod parse;
27pub mod sequence;
28pub mod startup;
29
30pub use asymmetric::*;
31pub use attestation::*;
32pub use build::*;
33pub use enhanced_authorization::*;
34pub use integrity::*;
35pub use non_volatile::*;
36pub use object::*;
37pub use parse::*;
38pub use sequence::*;
39pub use startup::*;
40
41pub const MAX_HANDLES: usize = 8;
43pub const MAX_SESSIONS: usize = 8;
45
46pub type TpmHandles = TpmList<u32, MAX_HANDLES>;
48pub type TpmAuthCommands = TpmList<TpmsAuthCommand, MAX_SESSIONS>;
50pub type TpmAuthResponses = TpmList<TpmsAuthResponse, MAX_SESSIONS>;
52
53pub trait TpmHeader: TpmBuild + TpmParse + Debug {
55 const COMMAND: TpmCc;
56 const NO_SESSIONS: bool;
57 const WITH_SESSIONS: bool;
58 const HANDLES: usize;
59}
60
61pub const TPM_HEADER_SIZE: usize = 10;
62
63tpm_struct! {
64 #[derive(Debug, PartialEq, Eq, Clone)]
65 TpmContextLoadCommand,
66 TpmCc::ContextLoad,
67 true,
68 false,
69 0,
70 {
71 pub context: TpmsContext,
72 }
73}
74
75tpm_struct! {
76 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
77 TpmContextSaveCommand,
78 TpmCc::ContextSave,
79 true,
80 false,
81 1,
82 {}
83}
84
85tpm_struct! {
86 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
87 TpmDictionaryAttackLockResetCommand,
88 TpmCc::DictionaryAttackLockReset,
89 false,
90 true,
91 1,
92 {}
93}
94
95tpm_struct! {
96 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
97 TpmFlushContextCommand,
98 TpmCc::FlushContext,
99 true,
100 false,
101 0,
102 {
103 pub flush_handle: u32,
104 }
105}
106
107tpm_struct! {
108 #[derive(Debug, Default, PartialEq, Eq, Clone)]
109 TpmCreatePrimaryCommand,
110 TpmCc::CreatePrimary,
111 false,
112 true,
113 1,
114 {
115 pub in_sensitive: Tpm2bSensitiveCreate,
116 pub in_public: Tpm2bPublic,
117 pub outside_info: Tpm2b,
118 pub creation_pcr: TpmlPcrSelection,
119 }
120}
121
122tpm_struct! {
123 #[derive(Debug, PartialEq, Eq, Clone)]
124 TpmEvictControlCommand,
125 TpmCc::EvictControl,
126 false,
127 true,
128 2,
129 {
130 pub persistent_handle: TpmPersistent,
131 }
132}
133
134tpm_struct! {
135 #[derive(Debug, PartialEq, Eq, Clone)]
136 TpmGetCapabilityCommand,
137 TpmCc::GetCapability,
138 true,
139 true,
140 0,
141 {
142 pub cap: TpmCap,
143 pub property: u32,
144 pub property_count: u32,
145 }
146}
147
148tpm_struct! {
149 #[derive(Debug, PartialEq, Eq, Clone)]
150 TpmHashCommand,
151 TpmCc::Hash,
152 true,
153 false,
154 0,
155 {
156 pub data: Tpm2bMaxBuffer,
157 pub hash_alg: TpmAlgId,
158 pub hierarchy: TpmRh,
159 }
160}
161
162tpm_struct! {
163 #[derive(Debug, PartialEq, Eq, Clone)]
164 TpmImportCommand,
165 TpmCc::Import,
166 false,
167 true,
168 1,
169 {
170 pub encryption_key: Tpm2b,
171 pub object_public: Tpm2bPublic,
172 pub duplicate: Tpm2bPrivate,
173 pub in_sym_seed: Tpm2bEncryptedSecret,
174 pub symmetric_alg: TpmtSymDef,
175 }
176}
177
178tpm_struct! {
179 #[derive(Debug, Default, PartialEq, Eq, Clone)]
180 TpmStartAuthSessionCommand,
181 TpmCc::StartAuthSession,
182 true,
183 true,
184 2,
185 {
186 pub nonce_caller: Tpm2b,
187 pub encrypted_salt: Tpm2b,
188 pub session_type: TpmSe,
189 pub symmetric: TpmtSymDefObject,
190 pub auth_hash: TpmAlgId,
191 }
192}
193
194tpm_struct! {
195 #[derive(Debug, PartialEq, Eq, Clone)]
196 TpmVendorTcgTestCommand,
197 TpmCc::VendorTcgTest,
198 true,
199 false,
200 0,
201 {
202 pub input_data: Tpm2bData,
203 }
204}
205
206tpm_struct! {
207 #[derive(Debug, PartialEq, Eq, Clone)]
208 TpmContextLoadResponse,
209 TpmCc::ContextLoad,
210 true,
211 false,
212 0,
213 {
214 pub loaded_handle: TpmTransient,
215 }
216}
217
218tpm_struct! {
219 #[derive(Debug, PartialEq, Eq, Clone)]
220 TpmContextSaveResponse,
221 TpmCc::ContextSave,
222 true,
223 false,
224 0,
225 {
226 pub context: TpmsContext,
227 }
228}
229
230tpm_struct! {
231 #[derive(Debug, PartialEq, Eq, Clone)]
232 TpmHashResponse,
233 TpmCc::Hash,
234 true,
235 false,
236 0,
237 {
238 pub out_hash: Tpm2bDigest,
239 pub validation: TpmtTkHashcheck,
240 }
241}
242
243tpm_struct! {
244 #[derive(Debug, Default, PartialEq, Eq, Clone)]
245 TpmImportResponse,
246 TpmCc::Import,
247 false,
248 true,
249 0,
250 {
251 pub out_private: Tpm2bPrivate,
252 }
253}
254
255tpm_struct! {
256 #[derive(Debug, Default, PartialEq, Eq, Clone)]
257 TpmStartAuthSessionResponse,
258 TpmCc::StartAuthSession,
259 true,
260 false,
261 0,
262 {
263 pub session_handle: TpmSession,
264 pub nonce_tpm: Tpm2b,
265 }
266}
267
268tpm_struct! {
269 #[derive(Debug, PartialEq, Eq, Clone)]
270 TpmVendorTcgTestResponse,
271 TpmCc::VendorTcgTest,
272 true,
273 false,
274 0,
275 {
276 pub output_data: Tpm2bData,
277 }
278}
279
280tpm_response! {
281 #[derive(Debug, PartialEq, Eq, Clone)]
282 TpmCreatePrimaryResponse,
283 TpmCc::CreatePrimary,
284 false,
285 true,
286 pub object_handle: TpmTransient,
287 {
288 pub out_public: Tpm2bPublic,
289 pub creation_data: Tpm2bCreationData,
290 pub creation_hash: Tpm2bDigest,
291 pub creation_ticket: TpmtTkCreation,
292 pub name: Tpm2bName,
293 }
294}
295
296tpm_struct! {
297 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
298 TpmDictionaryAttackLockResetResponse,
299 TpmCc::DictionaryAttackLockReset,
300 false,
301 true,
302 0,
303 {}
304}
305
306tpm_struct! {
307 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
308 TpmEvictControlResponse,
309 TpmCc::EvictControl,
310 false,
311 true,
312 0,
313 {}
314}
315
316tpm_struct! {
317 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
318 TpmFlushContextResponse,
319 TpmCc::FlushContext,
320 true,
321 false,
322 0,
323 {}
324}
325
326tpm_struct! {
327 #[derive(Debug, PartialEq, Eq, Clone)]
328 TpmGetCapabilityResponse,
329 TpmCc::GetCapability,
330 true,
331 false,
332 0,
333 {
334 pub more_data: TpmiYesNo,
335 pub capability_data: TpmsCapabilityData,
336 }
337}
338
339tpm_struct! {
340 #[derive(Debug, PartialEq, Eq, Clone)]
341 TpmQuoteCommand,
342 TpmCc::Quote,
343 false,
344 true,
345 1,
346 {
347 pub qualifying_data: Tpm2bData,
348 pub in_scheme: TpmtSignature,
349 pub pcr_select: TpmlPcrSelection,
350 }
351}
352
353tpm_response! {
354 #[derive(Debug, PartialEq, Eq, Clone)]
355 TpmQuoteResponse,
356 TpmCc::Quote,
357 false,
358 true,
359 {
360 pub quoted: Tpm2bAttest,
361 pub signature: TpmtSignature,
362 }
363}
364
365tpm_struct! {
366 #[derive(Debug, PartialEq, Eq, Clone)]
367 TpmSignCommand,
368 TpmCc::Sign,
369 false,
370 true,
371 1,
372 {
373 pub digest: Tpm2bDigest,
374 pub in_scheme: TpmtSignature,
375 pub validation: TpmtTkHashcheck,
376 }
377}
378
379tpm_response! {
380 #[derive(Debug, PartialEq, Eq, Clone)]
381 TpmSignResponse,
382 TpmCc::Sign,
383 false,
384 true,
385 {
386 pub signature: TpmtSignature,
387 }
388}
389
390tpm_struct! {
391 #[derive(Debug, PartialEq, Eq, Clone)]
392 TpmVerifySignatureCommand,
393 TpmCc::VerifySignature,
394 true,
395 false,
396 1,
397 {
398 pub digest: Tpm2bDigest,
399 pub signature: TpmtSignature,
400 }
401}
402
403tpm_response! {
404 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
405 TpmVerifySignatureResponse,
406 TpmCc::VerifySignature,
407 true,
408 false,
409 {
410 pub validation: TpmtTkVerified,
411 }
412}
413
414tpm_struct! {
415 #[derive(Debug, PartialEq, Eq, Clone)]
416 TpmSelfTestCommand,
417 TpmCc::SelfTest,
418 true,
419 true,
420 0,
421 {
422 pub full_test: TpmiYesNo,
423 }
424}
425
426tpm_response! {
427 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
428 TpmSelfTestResponse,
429 TpmCc::SelfTest,
430 true,
431 true,
432 {}
433}
434
435tpm_struct! {
436 #[derive(Debug, PartialEq, Eq, Clone)]
437 TpmIncrementalSelfTestCommand,
438 TpmCc::IncrementalSelfTest,
439 true,
440 true,
441 0,
442 {
443 pub to_test: TpmlAlg,
444 }
445}
446
447tpm_response! {
448 #[derive(Debug, Default, PartialEq, Eq, Clone)]
449 TpmIncrementalSelfTestResponse,
450 TpmCc::IncrementalSelfTest,
451 true,
452 true,
453 {
454 pub to_do_list: TpmlAlg,
455 }
456}
457
458tpm_struct! {
459 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
460 TpmGetTestResultCommand,
461 TpmCc::GetTestResult,
462 true,
463 true,
464 0,
465 {}
466}
467
468tpm_response! {
469 #[derive(Debug, PartialEq, Eq, Clone)]
470 TpmGetTestResultResponse,
471 TpmCc::GetTestResult,
472 true,
473 true,
474 {
475 pub out_data: Tpm2bMaxBuffer,
476 pub test_result: TpmRc,
477 }
478}
479
480tpm_struct! {
481 #[derive(Debug, PartialEq, Eq, Clone)]
482 TpmDuplicateCommand,
483 TpmCc::Duplicate,
484 false,
485 true,
486 2,
487 {
488 pub encryption_key_in: Tpm2bData,
489 pub symmetric_alg: TpmtSymDefObject,
490 }
491}
492
493tpm_response! {
494 #[derive(Debug, PartialEq, Eq, Clone)]
495 TpmDuplicateResponse,
496 TpmCc::Duplicate,
497 false,
498 true,
499 {
500 pub encryption_key_out: Tpm2bData,
501 pub duplicate: Tpm2bPrivate,
502 pub out_sym_seed: Tpm2bEncryptedSecret,
503 }
504}
505
506tpm_struct! {
507 #[derive(Debug, PartialEq, Eq, Clone)]
508 TpmRewrapCommand,
509 TpmCc::Rewrap,
510 false,
511 true,
512 2,
513 {
514 pub in_duplicate: Tpm2bPrivate,
515 pub name: Tpm2bName,
516 pub in_sym_seed: Tpm2bEncryptedSecret,
517 }
518}
519
520tpm_response! {
521 #[derive(Debug, PartialEq, Eq, Clone)]
522 TpmRewrapResponse,
523 TpmCc::Rewrap,
524 false,
525 true,
526 {
527 pub out_duplicate: Tpm2bPrivate,
528 pub out_sym_seed: Tpm2bEncryptedSecret,
529 }
530}
531
532tpm_struct! {
533 #[derive(Debug, PartialEq, Eq, Clone)]
534 TpmEncryptDecrypt2Command,
535 TpmCc::EncryptDecrypt2,
536 false,
537 true,
538 1,
539 {
540 pub in_data: Tpm2bMaxBuffer,
541 pub decrypt: TpmiYesNo,
542 pub mode: TpmAlgId,
543 pub iv_in: Tpm2b,
544 }
545}
546
547tpm_response! {
548 #[derive(Debug, PartialEq, Eq, Clone)]
549 TpmEncryptDecrypt2Response,
550 TpmCc::EncryptDecrypt2,
551 false,
552 true,
553 {
554 pub out_data: Tpm2bMaxBuffer,
555 pub iv_out: Tpm2b,
556 }
557}
558
559tpm_struct! {
560 #[derive(Debug, PartialEq, Eq, Clone, Copy)]
561 TpmGetRandomCommand,
562 TpmCc::GetRandom,
563 true,
564 true,
565 0,
566 {
567 pub bytes_requested: u16,
568 }
569}
570
571tpm_response! {
572 #[derive(Debug, Default, PartialEq, Eq, Clone)]
573 TpmGetRandomResponse,
574 TpmCc::GetRandom,
575 true,
576 true,
577 {
578 pub random_bytes: Tpm2bDigest,
579 }
580}
581
582tpm_struct! {
583 #[derive(Debug, PartialEq, Eq, Clone)]
584 TpmStirRandomCommand,
585 TpmCc::StirRandom,
586 true,
587 true,
588 0,
589 {
590 pub in_data: Tpm2bSensitiveData,
591 }
592}
593
594tpm_response! {
595 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
596 TpmStirRandomResponse,
597 TpmCc::StirRandom,
598 true,
599 true,
600 {}
601}
602
603tpm_struct! {
604 #[derive(Debug, PartialEq, Eq, Clone)]
605 TpmHierarchyControlCommand,
606 TpmCc::HierarchyControl,
607 false,
608 true,
609 1,
610 {
611 pub enable: TpmRh,
612 pub state: TpmiYesNo,
613 }
614}
615
616tpm_response! {
617 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
618 TpmHierarchyControlResponse,
619 TpmCc::HierarchyControl,
620 false,
621 true,
622 {}
623}
624
625tpm_struct! {
626 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
627 TpmChangePpsCommand,
628 TpmCc::ChangePps,
629 false,
630 true,
631 1,
632 {}
633}
634
635tpm_response! {
636 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
637 TpmChangePpsResponse,
638 TpmCc::ChangePps,
639 false,
640 true,
641 {}
642}
643
644tpm_struct! {
645 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
646 TpmChangeEpsCommand,
647 TpmCc::ChangeEps,
648 false,
649 true,
650 1,
651 {}
652}
653
654tpm_response! {
655 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
656 TpmChangeEpsResponse,
657 TpmCc::ChangeEps,
658 false,
659 true,
660 {}
661}
662
663tpm_struct! {
664 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
665 TpmClearCommand,
666 TpmCc::Clear,
667 false,
668 true,
669 1,
670 {}
671}
672
673tpm_response! {
674 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
675 TpmClearResponse,
676 TpmCc::Clear,
677 false,
678 true,
679 {}
680}
681
682tpm_struct! {
683 #[derive(Debug, PartialEq, Eq, Clone)]
684 TpmClearControlCommand,
685 TpmCc::ClearControl,
686 false,
687 true,
688 1,
689 {
690 pub disable: TpmiYesNo,
691 }
692}
693
694tpm_response! {
695 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
696 TpmClearControlResponse,
697 TpmCc::ClearControl,
698 false,
699 true,
700 {}
701}
702
703tpm_struct! {
704 #[derive(Debug, PartialEq, Eq, Clone)]
705 TpmHierarchyChangeAuthCommand,
706 TpmCc::HierarchyChangeAuth,
707 false,
708 true,
709 1,
710 {
711 pub new_auth: Tpm2bAuth,
712 }
713}
714
715tpm_response! {
716 #[derive(Debug, Default, PartialEq, Eq, Copy, Clone)]
717 TpmHierarchyChangeAuthResponse,
718 TpmCc::HierarchyChangeAuth,
719 false,
720 true,
721 {}
722}
723
724tpm_dispatch! {
725 (TpmNvUndefineSpaceSpecialCommand, TpmNvUndefineSpaceSpecialResponse, NvUndefineSpaceSpecial),
726 (TpmEvictControlCommand, TpmEvictControlResponse, EvictControl),
727 (TpmHierarchyControlCommand, TpmHierarchyControlResponse, HierarchyControl),
728 (TpmNvUndefineSpaceCommand, TpmNvUndefineSpaceResponse, NvUndefineSpace),
729 (TpmChangeEpsCommand, TpmChangeEpsResponse, ChangeEps),
730 (TpmChangePpsCommand, TpmChangePpsResponse, ChangePps),
731 (TpmClearCommand, TpmClearResponse, Clear),
732 (TpmClearControlCommand, TpmClearControlResponse, ClearControl),
733 (TpmHierarchyChangeAuthCommand, TpmHierarchyChangeAuthResponse, HierarchyChangeAuth),
734 (TpmNvDefineSpaceCommand, TpmNvDefineSpaceResponse, NvDefineSpace),
735 (TpmPcrAllocateCommand, TpmPcrAllocateResponse, PcrAllocate),
736 (TpmPcrSetAuthPolicyCommand, TpmPcrSetAuthPolicyResponse, PcrSetAuthPolicy),
737 (TpmSetPrimaryPolicyCommand, TpmSetPrimaryPolicyResponse, SetPrimaryPolicy),
738 (TpmCreatePrimaryCommand, TpmCreatePrimaryResponse, CreatePrimary),
739 (TpmNvGlobalWriteLockCommand, TpmNvGlobalWriteLockResponse, NvGlobalWriteLock),
740 (TpmGetCommandAuditDigestCommand, TpmGetCommandAuditDigestResponse, GetCommandAuditDigest),
741 (TpmNvIncrementCommand, TpmNvIncrementResponse, NvIncrement),
742 (TpmNvSetBitsCommand, TpmNvSetBitsResponse, NvSetBits),
743 (TpmNvExtendCommand, TpmNvExtendResponse, NvExtend),
744 (TpmNvWriteCommand, TpmNvWriteResponse, NvWrite),
745 (TpmNvWriteLockCommand, TpmNvWriteLockResponse, NvWriteLock),
746 (TpmDictionaryAttackLockResetCommand, TpmDictionaryAttackLockResetResponse, DictionaryAttackLockReset),
747 (TpmNvChangeAuthCommand, TpmNvChangeAuthResponse, NvChangeAuth),
748 (TpmPcrEventCommand, TpmPcrEventResponse, PcrEvent),
749 (TpmPcrResetCommand, TpmPcrResetResponse, PcrReset),
750 (TpmSequenceCompleteCommand, TpmSequenceCompleteResponse, SequenceComplete),
751 (TpmIncrementalSelfTestCommand, TpmIncrementalSelfTestResponse, IncrementalSelfTest),
752 (TpmSelfTestCommand, TpmSelfTestResponse, SelfTest),
753 (TpmStartupCommand, TpmStartupResponse, Startup),
754 (TpmShutdownCommand, TpmShutdownResponse, Shutdown),
755 (TpmStirRandomCommand, TpmStirRandomResponse, StirRandom),
756 (TpmActivateCredentialCommand, TpmActivateCredentialResponse, ActivateCredential),
757 (TpmCertifyCommand, TpmCertifyResponse, Certify),
758 (TpmCertifyCreationCommand, TpmCertifyCreationResponse, CertifyCreation),
759 (TpmDuplicateCommand, TpmDuplicateResponse, Duplicate),
760 (TpmGetTimeCommand, TpmGetTimeResponse, GetTime),
761 (TpmGetSessionAuditDigestCommand, TpmGetSessionAuditDigestResponse, GetSessionAuditDigest),
762 (TpmNvReadCommand, TpmNvReadResponse, NvRead),
763 (TpmNvReadLockCommand, TpmNvReadLockResponse, NvReadLock),
764 (TpmObjectChangeAuthCommand, TpmObjectChangeAuthResponse, ObjectChangeAuth),
765 (TpmPolicySecretCommand, TpmPolicySecretResponse, PolicySecret),
766 (TpmRewrapCommand, TpmRewrapResponse, Rewrap),
767 (TpmCreateCommand, TpmCreateResponse, Create),
768 (TpmEcdhZGenCommand, TpmEcdhZGenResponse, EcdhZGen),
769 (TpmZGen2PhaseCommand, TpmZGen2PhaseResponse, ZGen2Phase),
770 (TpmImportCommand, TpmImportResponse, Import),
771 (TpmLoadCommand, TpmLoadResponse, Load),
772 (TpmQuoteCommand, TpmQuoteResponse, Quote),
773 (TpmRsaDecryptCommand, TpmRsaDecryptResponse, RsaDecrypt),
774 (TpmEccEncryptCommand, TpmEccEncryptResponse, EccEncrypt),
775 (TpmEccDecryptCommand, TpmEccDecryptResponse, EccDecrypt),
776 (TpmSequenceUpdateCommand, TpmSequenceUpdateResponse, SequenceUpdate),
777 (TpmSignCommand, TpmSignResponse, Sign),
778 (TpmUnsealCommand, TpmUnsealResponse, Unseal),
779 (TpmPolicySignedCommand, TpmPolicySignedResponse, PolicySigned),
780 (TpmContextLoadCommand, TpmContextLoadResponse, ContextLoad),
781 (TpmContextSaveCommand, TpmContextSaveResponse, ContextSave),
782 (TpmEcdhKeyGenCommand, TpmEcdhKeyGenResponse, EcdhKeyGen),
783 (TpmFlushContextCommand, TpmFlushContextResponse, FlushContext),
784 (TpmLoadExternalCommand, TpmLoadExternalResponse, LoadExternal),
785 (TpmMakeCredentialCommand, TpmMakeCredentialResponse, MakeCredential),
786 (TpmNvReadPublicCommand, TpmNvReadPublicResponse, NvReadPublic),
787 (TpmPolicyAuthValueCommand, TpmPolicyAuthValueResponse, PolicyAuthValue),
788 (TpmPolicyCommandCodeCommand, TpmPolicyCommandCodeResponse, PolicyCommandCode),
789 (TpmPolicyCpHashCommand, TpmPolicyCpHashResponse, PolicyCpHash),
790 (TpmPolicyLocalityCommand, TpmPolicyLocalityResponse, PolicyLocality),
791 (TpmPolicyOrCommand, TpmPolicyOrResponse, PolicyOr),
792 (TpmPolicyTicketCommand, TpmPolicyTicketResponse, PolicyTicket),
793 (TpmReadPublicCommand, TpmReadPublicResponse, ReadPublic),
794 (TpmRsaEncryptCommand, TpmRsaEncryptResponse, RsaEncrypt),
795 (TpmStartAuthSessionCommand, TpmStartAuthSessionResponse, StartAuthSession),
796 (TpmVerifySignatureCommand, TpmVerifySignatureResponse, VerifySignature),
797 (TpmEccParametersCommand, TpmEccParametersResponse, EccParameters),
798 (TpmGetCapabilityCommand, TpmGetCapabilityResponse, GetCapability),
799 (TpmGetRandomCommand, TpmGetRandomResponse, GetRandom),
800 (TpmGetTestResultCommand, TpmGetTestResultResponse, GetTestResult),
801 (TpmHashCommand, TpmHashResponse, Hash),
802 (TpmPcrReadCommand, TpmPcrReadResponse, PcrRead),
803 (TpmPolicyPcrCommand, TpmPolicyPcrResponse, PolicyPcr),
804 (TpmPolicyRestartCommand, TpmPolicyRestartResponse, PolicyRestart),
805 (TpmPcrExtendCommand, TpmPcrExtendResponse, PcrExtend),
806 (TpmPcrSetAuthValueCommand, TpmPcrSetAuthValueResponse, PcrSetAuthValue),
807 (TpmNvCertifyCommand, TpmNvCertifyResponse, NvCertify),
808 (TpmEventSequenceCompleteCommand, TpmEventSequenceCompleteResponse, EventSequenceComplete),
809 (TpmHashSequenceStartCommand, TpmHashSequenceStartResponse, HashSequenceStart),
810 (TpmPolicyPhysicalPresenceCommand, TpmPolicyPhysicalPresenceResponse, PolicyPhysicalPresence),
811 (TpmPolicyGetDigestCommand, TpmPolicyGetDigestResponse, PolicyGetDigest),
812 (TpmPolicyPasswordCommand, TpmPolicyPasswordResponse, PolicyPassword),
813 (TpmEncryptDecrypt2Command, TpmEncryptDecrypt2Response, EncryptDecrypt2),
814 (TpmVendorTcgTestCommand, TpmVendorTcgTestResponse, VendorTcgTest),
815}