• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /***********************************************************************;
3  * Copyright (c) 2015-2018, Intel Corporation
4  *
5  * Copyright 2015, Andreas Fuchs @ Fraunhofer SIT
6  *
7  * All rights reserved.
8  ***********************************************************************/
9 
10 #ifndef TSS2_SYS_H
11 #define TSS2_SYS_H
12 
13 #include "tss2_common.h"
14 #include "tss2_tcti.h"
15 #include "tss2_tpm2_types.h"
16 
17 #ifndef TSS2_API_VERSION_1_2_1_108
18 #error Version mismatch among TSS2 header files.
19 #endif  /* TSS2_API_VERSION_1_2_1_108 */
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 /* SAPI context blob */
26 typedef struct _TSS2_SYS_OPAQUE_CONTEXT_BLOB TSS2_SYS_CONTEXT;
27 
28 #define TSS2_SYS_MAX_SESSIONS 3
29 
30 /* Input structure for authorization area(s). */
31 typedef struct {
32     uint16_t count;
33     TPMS_AUTH_COMMAND auths[TSS2_SYS_MAX_SESSIONS];
34 } TSS2L_SYS_AUTH_COMMAND;
35 
36 typedef struct {
37     uint16_t count;
38     TPMS_AUTH_RESPONSE auths[TSS2_SYS_MAX_SESSIONS];
39 } TSS2L_SYS_AUTH_RESPONSE;
40 
41 size_t  Tss2_Sys_GetContextSize(
42     size_t maxCommandResponseSize);
43 
44 TSS2_RC Tss2_Sys_Initialize(
45     TSS2_SYS_CONTEXT *sysContext,
46     size_t contextSize,
47     TSS2_TCTI_CONTEXT *tctiContext,
48     TSS2_ABI_VERSION *abiVersion);
49 
50 void Tss2_Sys_Finalize(
51     TSS2_SYS_CONTEXT *sysContext);
52 
53 TSS2_RC Tss2_Sys_GetTctiContext(
54     TSS2_SYS_CONTEXT *sysContext,
55     TSS2_TCTI_CONTEXT **tctiContext);
56 
57 /* Command Preparation Functions */
58 TSS2_RC Tss2_Sys_GetDecryptParam(
59     TSS2_SYS_CONTEXT *sysContext,
60     size_t *decryptParamSize,
61     const uint8_t **decryptParamBuffer);
62 
63 TSS2_RC Tss2_Sys_SetDecryptParam(
64     TSS2_SYS_CONTEXT *sysContext,
65     size_t decryptParamSize,
66     const uint8_t *decryptParamBuffer);
67 
68 TSS2_RC Tss2_Sys_GetCpBuffer(
69     TSS2_SYS_CONTEXT *sysContext,
70     size_t *cpBufferUsedSize,
71     const uint8_t **cpBuffer);
72 
73 TSS2_RC Tss2_Sys_SetCmdAuths(
74     TSS2_SYS_CONTEXT *sysContext,
75     const TSS2L_SYS_AUTH_COMMAND *cmdAuthsArray);
76 
77 /* Command Execution Functions */
78 TSS2_RC Tss2_Sys_ExecuteAsync(
79     TSS2_SYS_CONTEXT *sysContext);
80 
81 TSS2_RC Tss2_Sys_ExecuteFinish(
82     TSS2_SYS_CONTEXT *sysContext,
83     int32_t timeout);
84 
85 TSS2_RC Tss2_Sys_Execute(
86     TSS2_SYS_CONTEXT *sysContext);
87 
88 /* Command Completion functions */
89 TSS2_RC Tss2_Sys_GetCommandCode(
90     TSS2_SYS_CONTEXT *sysContext,
91     UINT8 *commandCode);
92 
93 TSS2_RC Tss2_Sys_GetRspAuths(
94     TSS2_SYS_CONTEXT *sysContext,
95     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
96 
97 TSS2_RC Tss2_Sys_GetEncryptParam(
98     TSS2_SYS_CONTEXT *sysContext,
99     size_t *encryptParamSize,
100     const uint8_t **encryptParamBuffer);
101 
102 TSS2_RC Tss2_Sys_SetEncryptParam(
103     TSS2_SYS_CONTEXT *sysContext,
104     size_t encryptParamSize,
105     const uint8_t *encryptParamBuffer);
106 
107 TSS2_RC Tss2_Sys_GetRpBuffer(
108     TSS2_SYS_CONTEXT *sysContext,
109     size_t *rpBufferUsedSize,
110     const uint8_t **rpBuffer);
111 
112 TSS2_RC Tss2_Sys_Startup_Prepare(
113     TSS2_SYS_CONTEXT *sysContext,
114     TPM2_SU startupType);
115 
116 TSS2_RC Tss2_Sys_Startup_Complete(
117     TSS2_SYS_CONTEXT *sysContext);
118 
119 TSS2_RC Tss2_Sys_Startup(
120     TSS2_SYS_CONTEXT *sysContext,
121     TPM2_SU startupType);
122 
123 TSS2_RC Tss2_Sys_Shutdown_Prepare(
124     TSS2_SYS_CONTEXT *sysContext,
125     TPM2_SU shutdownType);
126 
127 TSS2_RC Tss2_Sys_Shutdown_Complete(
128     TSS2_SYS_CONTEXT *sysContext);
129 
130 TSS2_RC Tss2_Sys_Shutdown(
131     TSS2_SYS_CONTEXT *sysContext,
132     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
133     TPM2_SU shutdownType,
134     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
135 
136 TSS2_RC Tss2_Sys_SelfTest_Prepare(
137     TSS2_SYS_CONTEXT *sysContext,
138     TPMI_YES_NO fullTest);
139 
140 TSS2_RC Tss2_Sys_SelfTest_Complete(
141     TSS2_SYS_CONTEXT *sysContext);
142 
143 TSS2_RC Tss2_Sys_SelfTest(
144     TSS2_SYS_CONTEXT *sysContext,
145     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
146     TPMI_YES_NO fullTest,
147     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
148 
149 TSS2_RC Tss2_Sys_IncrementalSelfTest_Prepare(
150     TSS2_SYS_CONTEXT *sysContext,
151     const TPML_ALG *toTest);
152 
153 TSS2_RC Tss2_Sys_IncrementalSelfTest_Complete(
154     TSS2_SYS_CONTEXT *sysContext,
155     TPML_ALG *toDoList);
156 
157 TSS2_RC Tss2_Sys_IncrementalSelfTest(
158     TSS2_SYS_CONTEXT *sysContext,
159     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
160     const TPML_ALG *toTest,
161     TPML_ALG *toDoList,
162     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
163 
164 TSS2_RC Tss2_Sys_GetTestResult_Prepare(
165     TSS2_SYS_CONTEXT *sysContext);
166 
167 TSS2_RC Tss2_Sys_GetTestResult_Complete(
168     TSS2_SYS_CONTEXT *sysContext,
169     TPM2B_MAX_BUFFER *outData,
170     TPM2_RC *testResult);
171 
172 TSS2_RC Tss2_Sys_GetTestResult(
173     TSS2_SYS_CONTEXT *sysContext,
174     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
175     TPM2B_MAX_BUFFER *outData,
176     TPM2_RC *testResult,
177     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
178 
179 TSS2_RC Tss2_Sys_StartAuthSession_Prepare(
180     TSS2_SYS_CONTEXT *sysContext,
181     TPMI_DH_OBJECT tpmKey,
182     TPMI_DH_ENTITY bind,
183     const TPM2B_NONCE *nonceCaller,
184     const TPM2B_ENCRYPTED_SECRET *encryptedSalt,
185     TPM2_SE sessionType,
186     const TPMT_SYM_DEF    *symmetric,
187     TPMI_ALG_HASH authHash);
188 
189 TSS2_RC Tss2_Sys_StartAuthSession_Complete(
190     TSS2_SYS_CONTEXT *sysContext,
191     TPMI_SH_AUTH_SESSION *sessionHandle,
192     TPM2B_NONCE *nonceTPM);
193 
194 TSS2_RC Tss2_Sys_StartAuthSession(
195     TSS2_SYS_CONTEXT *sysContext,
196     TPMI_DH_OBJECT tpmKey,
197     TPMI_DH_ENTITY bind,
198     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
199     const TPM2B_NONCE *nonceCaller,
200     const TPM2B_ENCRYPTED_SECRET *encryptedSalt,
201     TPM2_SE sessionType,
202     const TPMT_SYM_DEF    *symmetric,
203     TPMI_ALG_HASH authHash,
204     TPMI_SH_AUTH_SESSION *sessionHandle,
205     TPM2B_NONCE *nonceTPM,
206     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
207 
208 TSS2_RC Tss2_Sys_PolicyRestart_Prepare(
209     TSS2_SYS_CONTEXT *sysContext,
210     TPMI_SH_POLICY sessionHandle);
211 
212 TSS2_RC Tss2_Sys_PolicyRestart_Complete(
213     TSS2_SYS_CONTEXT *sysContext);
214 
215 TSS2_RC Tss2_Sys_PolicyRestart(
216     TSS2_SYS_CONTEXT *sysContext,
217     TPMI_SH_POLICY sessionHandle,
218     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
219     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
220 
221 TSS2_RC Tss2_Sys_Create_Prepare(
222     TSS2_SYS_CONTEXT *sysContext,
223     TPMI_DH_OBJECT parentHandle,
224     const TPM2B_SENSITIVE_CREATE *inSensitive,
225     const TPM2B_PUBLIC *inPublic,
226     const TPM2B_DATA *outsideInfo,
227     const TPML_PCR_SELECTION *creationPCR);
228 
229 TSS2_RC Tss2_Sys_Create_Complete(
230     TSS2_SYS_CONTEXT *sysContext,
231     TPM2B_PRIVATE *outPrivate,
232     TPM2B_PUBLIC *outPublic,
233     TPM2B_CREATION_DATA *creationData,
234     TPM2B_DIGEST *creationHash,
235     TPMT_TK_CREATION *creationTicket);
236 
237 TSS2_RC Tss2_Sys_Create(
238     TSS2_SYS_CONTEXT *sysContext,
239     TPMI_DH_OBJECT parentHandle,
240     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
241     const TPM2B_SENSITIVE_CREATE *inSensitive,
242     const TPM2B_PUBLIC *inPublic,
243     const TPM2B_DATA *outsideInfo,
244     const TPML_PCR_SELECTION *creationPCR,
245     TPM2B_PRIVATE *outPrivate,
246     TPM2B_PUBLIC *outPublic,
247     TPM2B_CREATION_DATA *creationData,
248     TPM2B_DIGEST *creationHash,
249     TPMT_TK_CREATION *creationTicket,
250     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray
251     );
252 
253 TSS2_RC Tss2_Sys_Load_Prepare(
254     TSS2_SYS_CONTEXT *sysContext,
255     TPMI_DH_OBJECT parentHandle,
256     const TPM2B_PRIVATE *inPrivate,
257     const TPM2B_PUBLIC *inPublic
258     );
259 
260 TSS2_RC Tss2_Sys_Load_Complete(
261     TSS2_SYS_CONTEXT *sysContext,
262     TPM2_HANDLE *objectHandle,
263     TPM2B_NAME *name
264     );
265 
266 TSS2_RC Tss2_Sys_Load(
267     TSS2_SYS_CONTEXT *sysContext,
268     TPMI_DH_OBJECT parentHandle,
269     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
270     const TPM2B_PRIVATE *inPrivate,
271     const TPM2B_PUBLIC *inPublic,
272     TPM2_HANDLE *objectHandle,
273     TPM2B_NAME *name,
274     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray
275     );
276 
277 TSS2_RC Tss2_Sys_LoadExternal_Prepare(
278     TSS2_SYS_CONTEXT *sysContext,
279     const TPM2B_SENSITIVE *inPrivate,
280     const TPM2B_PUBLIC *inPublic,
281     TPMI_RH_HIERARCHY hierarchy);
282 
283 TSS2_RC Tss2_Sys_LoadExternal_Complete(
284     TSS2_SYS_CONTEXT *sysContext,
285     TPM2_HANDLE *objectHandle,
286     TPM2B_NAME *name);
287 
288 TSS2_RC Tss2_Sys_LoadExternal(
289     TSS2_SYS_CONTEXT *sysContext,
290     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
291     const TPM2B_SENSITIVE *inPrivate,
292     const TPM2B_PUBLIC *inPublic,
293     TPMI_RH_HIERARCHY hierarchy,
294     TPM2_HANDLE *objectHandle,
295     TPM2B_NAME *name,
296     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
297 
298 TSS2_RC Tss2_Sys_ReadPublic_Prepare(
299     TSS2_SYS_CONTEXT *sysContext,
300     TPMI_DH_OBJECT objectHandle);
301 
302 TSS2_RC Tss2_Sys_ReadPublic_Complete(
303     TSS2_SYS_CONTEXT *sysContext,
304     TPM2B_PUBLIC *outPublic,
305     TPM2B_NAME *name,
306     TPM2B_NAME *qualifiedName);
307 
308 TSS2_RC Tss2_Sys_ReadPublic(
309     TSS2_SYS_CONTEXT *sysContext,
310     TPMI_DH_OBJECT objectHandle,
311     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
312     TPM2B_PUBLIC *outPublic,
313     TPM2B_NAME *name,
314     TPM2B_NAME *qualifiedName,
315     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
316 
317 TSS2_RC Tss2_Sys_ActivateCredential_Prepare(
318     TSS2_SYS_CONTEXT *sysContext,
319     TPMI_DH_OBJECT activateHandle,
320     TPMI_DH_OBJECT keyHandle,
321     const TPM2B_ID_OBJECT *credentialBlob,
322     const TPM2B_ENCRYPTED_SECRET *secret);
323 
324 TSS2_RC Tss2_Sys_ActivateCredential_Complete(
325     TSS2_SYS_CONTEXT *sysContext,
326     TPM2B_DIGEST *certInfo);
327 
328 TSS2_RC Tss2_Sys_ActivateCredential(
329     TSS2_SYS_CONTEXT *sysContext,
330     TPMI_DH_OBJECT activateHandle,
331     TPMI_DH_OBJECT keyHandle,
332     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
333     const TPM2B_ID_OBJECT *credentialBlob,
334     const TPM2B_ENCRYPTED_SECRET *secret,
335     TPM2B_DIGEST *certInfo,
336     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
337 
338 TSS2_RC Tss2_Sys_MakeCredential_Prepare(
339     TSS2_SYS_CONTEXT *sysContext,
340     TPMI_DH_OBJECT handle,
341     const TPM2B_DIGEST *credential,
342     const TPM2B_NAME *objectName);
343 
344 TSS2_RC Tss2_Sys_MakeCredential_Complete(
345     TSS2_SYS_CONTEXT *sysContext,
346     TPM2B_ID_OBJECT *credentialBlob,
347     TPM2B_ENCRYPTED_SECRET *secret);
348 
349 TSS2_RC Tss2_Sys_MakeCredential(
350     TSS2_SYS_CONTEXT *sysContext,
351     TPMI_DH_OBJECT handle,
352     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
353     const TPM2B_DIGEST *credential,
354     const TPM2B_NAME *objectName,
355     TPM2B_ID_OBJECT *credentialBlob,
356     TPM2B_ENCRYPTED_SECRET *secret,
357     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
358 
359 TSS2_RC Tss2_Sys_Unseal_Prepare(
360     TSS2_SYS_CONTEXT *sysContext,
361     TPMI_DH_OBJECT itemHandle);
362 
363 TSS2_RC Tss2_Sys_Unseal_Complete(
364     TSS2_SYS_CONTEXT *sysContext,
365     TPM2B_SENSITIVE_DATA *outData);
366 
367 TSS2_RC Tss2_Sys_Unseal(
368     TSS2_SYS_CONTEXT *sysContext,
369     TPMI_DH_OBJECT itemHandle,
370     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
371     TPM2B_SENSITIVE_DATA *outData,
372     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
373 
374 TSS2_RC Tss2_Sys_ObjectChangeAuth_Prepare(
375     TSS2_SYS_CONTEXT *sysContext,
376     TPMI_DH_OBJECT objectHandle,
377     TPMI_DH_OBJECT parentHandle,
378     const TPM2B_AUTH *newAuth);
379 
380 TSS2_RC Tss2_Sys_ObjectChangeAuth_Complete(
381     TSS2_SYS_CONTEXT *sysContext,
382     TPM2B_PRIVATE *outPrivate);
383 
384 TSS2_RC Tss2_Sys_ObjectChangeAuth(
385     TSS2_SYS_CONTEXT *sysContext,
386     TPMI_DH_OBJECT objectHandle,
387     TPMI_DH_OBJECT parentHandle,
388     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
389     const TPM2B_AUTH *newAuth,
390     TPM2B_PRIVATE *outPrivate,
391     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
392 
393 TSS2_RC Tss2_Sys_Duplicate_Prepare(
394     TSS2_SYS_CONTEXT *sysContext,
395     TPMI_DH_OBJECT objectHandle,
396     TPMI_DH_OBJECT newParentHandle,
397     const TPM2B_DATA *encryptionKeyIn,
398     const TPMT_SYM_DEF_OBJECT *symmetricAlg);
399 
400 TSS2_RC Tss2_Sys_Duplicate_Complete(
401     TSS2_SYS_CONTEXT *sysContext,
402     TPM2B_DATA *encryptionKeyOut,
403     TPM2B_PRIVATE *duplicate,
404     TPM2B_ENCRYPTED_SECRET *outSymSeed);
405 
406 TSS2_RC Tss2_Sys_Duplicate(
407     TSS2_SYS_CONTEXT *sysContext,
408     TPMI_DH_OBJECT objectHandle,
409     TPMI_DH_OBJECT newParentHandle,
410     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
411     const TPM2B_DATA *encryptionKeyIn,
412     const TPMT_SYM_DEF_OBJECT *symmetricAlg,
413     TPM2B_DATA *encryptionKeyOut,
414     TPM2B_PRIVATE *duplicate,
415     TPM2B_ENCRYPTED_SECRET *outSymSeed,
416     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
417 
418 TSS2_RC Tss2_Sys_Rewrap_Prepare(
419     TSS2_SYS_CONTEXT *sysContext,
420     TPMI_DH_OBJECT oldParent,
421     TPMI_DH_OBJECT newParent,
422     const TPM2B_PRIVATE *inDuplicate,
423     const TPM2B_NAME *name,
424     const TPM2B_ENCRYPTED_SECRET *inSymSeed);
425 
426 TSS2_RC Tss2_Sys_Rewrap_Complete(
427     TSS2_SYS_CONTEXT *sysContext,
428     TPM2B_PRIVATE *outDuplicate,
429     TPM2B_ENCRYPTED_SECRET *outSymSeed);
430 
431 TSS2_RC Tss2_Sys_Rewrap(
432     TSS2_SYS_CONTEXT *sysContext,
433     TPMI_DH_OBJECT oldParent,
434     TPMI_DH_OBJECT newParent,
435     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
436     const TPM2B_PRIVATE *inDuplicate,
437     const TPM2B_NAME *name,
438     const TPM2B_ENCRYPTED_SECRET *inSymSeed,
439     TPM2B_PRIVATE *outDuplicate,
440     TPM2B_ENCRYPTED_SECRET *outSymSeed,
441     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
442 
443 TSS2_RC Tss2_Sys_Import_Prepare(
444     TSS2_SYS_CONTEXT *sysContext,
445     TPMI_DH_OBJECT parentHandle,
446     const TPM2B_DATA *encryptionKey,
447     const TPM2B_PUBLIC *objectPublic,
448     const TPM2B_PRIVATE *duplicate,
449     const TPM2B_ENCRYPTED_SECRET *inSymSeed,
450     const TPMT_SYM_DEF_OBJECT *symmetricAlg);
451 
452 TSS2_RC Tss2_Sys_Import_Complete(
453     TSS2_SYS_CONTEXT *sysContext,
454     TPM2B_PRIVATE *outPrivate);
455 
456 TSS2_RC Tss2_Sys_Import(
457     TSS2_SYS_CONTEXT *sysContext,
458     TPMI_DH_OBJECT parentHandle,
459     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
460     const TPM2B_DATA *encryptionKey,
461     const TPM2B_PUBLIC *objectPublic,
462     const TPM2B_PRIVATE *duplicate,
463     const TPM2B_ENCRYPTED_SECRET *inSymSeed,
464     const TPMT_SYM_DEF_OBJECT *symmetricAlg,
465     TPM2B_PRIVATE *outPrivate,
466     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
467 
468 TSS2_RC Tss2_Sys_RSA_Encrypt_Prepare(
469     TSS2_SYS_CONTEXT *sysContext,
470     TPMI_DH_OBJECT keyHandle,
471     const TPM2B_PUBLIC_KEY_RSA *message,
472     const TPMT_RSA_DECRYPT *inScheme,
473     const TPM2B_DATA *label);
474 
475 TSS2_RC Tss2_Sys_RSA_Encrypt_Complete(
476     TSS2_SYS_CONTEXT *sysContext,
477     TPM2B_PUBLIC_KEY_RSA *outData);
478 
479 TSS2_RC Tss2_Sys_RSA_Encrypt(
480     TSS2_SYS_CONTEXT *sysContext,
481     TPMI_DH_OBJECT keyHandle,
482     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
483     const TPM2B_PUBLIC_KEY_RSA *message,
484     const TPMT_RSA_DECRYPT *inScheme,
485     const TPM2B_DATA *label,
486     TPM2B_PUBLIC_KEY_RSA *outData,
487     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
488 
489 TSS2_RC Tss2_Sys_RSA_Decrypt_Prepare(
490     TSS2_SYS_CONTEXT *sysContext,
491     TPMI_DH_OBJECT keyHandle,
492     const TPM2B_PUBLIC_KEY_RSA *cipherText,
493     const TPMT_RSA_DECRYPT *inScheme,
494     const TPM2B_DATA *label);
495 
496 TSS2_RC Tss2_Sys_RSA_Decrypt_Complete(
497     TSS2_SYS_CONTEXT *sysContext,
498     TPM2B_PUBLIC_KEY_RSA *message);
499 
500 TSS2_RC Tss2_Sys_RSA_Decrypt(
501     TSS2_SYS_CONTEXT *sysContext,
502     TPMI_DH_OBJECT keyHandle,
503     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
504     const TPM2B_PUBLIC_KEY_RSA *cipherText,
505     const TPMT_RSA_DECRYPT *inScheme,
506     const TPM2B_DATA *label,
507     TPM2B_PUBLIC_KEY_RSA *message,
508     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
509 
510 TSS2_RC Tss2_Sys_ECDH_KeyGen_Prepare(
511     TSS2_SYS_CONTEXT *sysContext,
512     TPMI_DH_OBJECT keyHandle);
513 
514 TSS2_RC Tss2_Sys_ECDH_KeyGen_Complete(
515     TSS2_SYS_CONTEXT *sysContext,
516     TPM2B_ECC_POINT *zPoint,
517     TPM2B_ECC_POINT *pubPoint);
518 
519 TSS2_RC Tss2_Sys_ECDH_KeyGen(
520     TSS2_SYS_CONTEXT *sysContext,
521     TPMI_DH_OBJECT keyHandle,
522     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
523     TPM2B_ECC_POINT *zPoint,
524     TPM2B_ECC_POINT *pubPoint,
525     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
526 
527 TSS2_RC Tss2_Sys_ECDH_ZGen_Prepare(
528     TSS2_SYS_CONTEXT *sysContext,
529     TPMI_DH_OBJECT keyHandle,
530     const TPM2B_ECC_POINT *inPoint);
531 
532 TSS2_RC Tss2_Sys_ECDH_ZGen_Complete(
533     TSS2_SYS_CONTEXT *sysContext,
534     TPM2B_ECC_POINT *outPoint);
535 
536 TSS2_RC Tss2_Sys_ECDH_ZGen(
537     TSS2_SYS_CONTEXT *sysContext,
538     TPMI_DH_OBJECT keyHandle,
539     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
540     const TPM2B_ECC_POINT *inPoint,
541     TPM2B_ECC_POINT *outPoint,
542     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
543 
544 TSS2_RC Tss2_Sys_ECC_Parameters_Prepare(
545     TSS2_SYS_CONTEXT *sysContext,
546     TPMI_ECC_CURVE curveID);
547 
548 TSS2_RC Tss2_Sys_ECC_Parameters_Complete(
549     TSS2_SYS_CONTEXT *sysContext,
550     TPMS_ALGORITHM_DETAIL_ECC *parameters);
551 
552 TSS2_RC Tss2_Sys_ECC_Parameters(
553     TSS2_SYS_CONTEXT *sysContext,
554     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
555     TPMI_ECC_CURVE curveID,
556     TPMS_ALGORITHM_DETAIL_ECC *parameters,
557     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
558 
559 TSS2_RC Tss2_Sys_ZGen_2Phase_Prepare(
560     TSS2_SYS_CONTEXT *sysContext,
561     TPMI_DH_OBJECT keyA,
562     const TPM2B_ECC_POINT *inQsB,
563     const TPM2B_ECC_POINT *inQeB,
564     TPMI_ECC_KEY_EXCHANGE inScheme,
565     UINT16 counter);
566 
567 TSS2_RC Tss2_Sys_ZGen_2Phase_Complete(
568     TSS2_SYS_CONTEXT *sysContext,
569     TPM2B_ECC_POINT *outZ1,
570     TPM2B_ECC_POINT *outZ2);
571 
572 TSS2_RC Tss2_Sys_ZGen_2Phase(
573     TSS2_SYS_CONTEXT *sysContext,
574     TPMI_DH_OBJECT keyA,
575     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
576     const TPM2B_ECC_POINT *inQsB,
577     const TPM2B_ECC_POINT *inQeB,
578     TPMI_ECC_KEY_EXCHANGE inScheme,
579     UINT16 counter,
580     TPM2B_ECC_POINT *outZ1,
581     TPM2B_ECC_POINT *outZ2,
582     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
583 
584 TSS2_RC Tss2_Sys_EncryptDecrypt_Prepare(
585     TSS2_SYS_CONTEXT *sysContext,
586     TPMI_DH_OBJECT keyHandle,
587     TPMI_YES_NO decrypt,
588     TPMI_ALG_SYM_MODE mode,
589     const TPM2B_IV *ivIn,
590     const TPM2B_MAX_BUFFER *inData);
591 
592 TSS2_RC Tss2_Sys_EncryptDecrypt_Complete(
593     TSS2_SYS_CONTEXT *sysContext,
594     TPM2B_MAX_BUFFER *outData,
595     TPM2B_IV *ivOut);
596 
597 TSS2_RC Tss2_Sys_EncryptDecrypt(
598     TSS2_SYS_CONTEXT *sysContext,
599     TPMI_DH_OBJECT keyHandle,
600     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
601     TPMI_YES_NO decrypt,
602     TPMI_ALG_SYM_MODE mode,
603     const TPM2B_IV *ivIn,
604     const TPM2B_MAX_BUFFER *inData,
605     TPM2B_MAX_BUFFER *outData,
606     TPM2B_IV *ivOut,
607     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
608 
609 TSS2_RC Tss2_Sys_EncryptDecrypt2_Prepare(
610     TSS2_SYS_CONTEXT *sysContext,
611     TPMI_DH_OBJECT keyHandle,
612     const TPM2B_MAX_BUFFER *inData,
613     TPMI_YES_NO decrypt,
614     TPMI_ALG_SYM_MODE mode,
615     const TPM2B_IV *ivIn);
616 
617 TSS2_RC Tss2_Sys_EncryptDecrypt2_Complete(
618     TSS2_SYS_CONTEXT *sysContext,
619     TPM2B_MAX_BUFFER *outData,
620     TPM2B_IV *ivOut);
621 
622 TSS2_RC Tss2_Sys_EncryptDecrypt2(
623     TSS2_SYS_CONTEXT *sysContext,
624     TPMI_DH_OBJECT keyHandle,
625     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
626     const TPM2B_MAX_BUFFER *inData,
627     TPMI_YES_NO decrypt,
628     TPMI_ALG_SYM_MODE mode,
629     const TPM2B_IV *ivIn,
630     TPM2B_MAX_BUFFER *outData,
631     TPM2B_IV *ivOut,
632     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
633 
634 TSS2_RC Tss2_Sys_Hash_Prepare(
635     TSS2_SYS_CONTEXT *sysContext,
636     const TPM2B_MAX_BUFFER *data,
637     TPMI_ALG_HASH hashAlg,
638     TPMI_RH_HIERARCHY hierarchy);
639 
640 TSS2_RC Tss2_Sys_Hash_Complete(
641     TSS2_SYS_CONTEXT *sysContext,
642     TPM2B_DIGEST *outHash,
643     TPMT_TK_HASHCHECK *validation);
644 
645 TSS2_RC Tss2_Sys_Hash(
646     TSS2_SYS_CONTEXT *sysContext,
647     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
648     const TPM2B_MAX_BUFFER *data,
649     TPMI_ALG_HASH hashAlg,
650     TPMI_RH_HIERARCHY hierarchy,
651     TPM2B_DIGEST *outHash,
652     TPMT_TK_HASHCHECK *validation,
653     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
654 
655 TSS2_RC Tss2_Sys_HMAC_Prepare(
656     TSS2_SYS_CONTEXT *sysContext,
657     TPMI_DH_OBJECT handle,
658     const TPM2B_MAX_BUFFER *buffer,
659     TPMI_ALG_HASH hashAlg);
660 
661 TSS2_RC Tss2_Sys_HMAC_Complete(
662     TSS2_SYS_CONTEXT *sysContext,
663     TPM2B_DIGEST *outHMAC);
664 
665 TSS2_RC Tss2_Sys_HMAC(
666     TSS2_SYS_CONTEXT *sysContext,
667     TPMI_DH_OBJECT handle,
668     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
669     const TPM2B_MAX_BUFFER *buffer,
670     TPMI_ALG_HASH hashAlg,
671     TPM2B_DIGEST *outHMAC,
672     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
673 
674 TSS2_RC Tss2_Sys_GetRandom_Prepare(
675     TSS2_SYS_CONTEXT *sysContext,
676     UINT16 bytesRequested);
677 
678 TSS2_RC Tss2_Sys_GetRandom_Complete(
679     TSS2_SYS_CONTEXT *sysContext,
680     TPM2B_DIGEST *randomBytes);
681 
682 TSS2_RC Tss2_Sys_GetRandom(
683     TSS2_SYS_CONTEXT *sysContext,
684     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
685     UINT16 bytesRequested,
686     TPM2B_DIGEST *randomBytes,
687     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
688 
689 TSS2_RC Tss2_Sys_StirRandom_Prepare(
690     TSS2_SYS_CONTEXT *sysContext,
691     const TPM2B_SENSITIVE_DATA *inData);
692 
693 TSS2_RC Tss2_Sys_StirRandom_Complete(
694     TSS2_SYS_CONTEXT *sysContext);
695 
696 TSS2_RC Tss2_Sys_StirRandom(
697     TSS2_SYS_CONTEXT *sysContext,
698     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
699     const TPM2B_SENSITIVE_DATA *inData,
700     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
701 
702 TSS2_RC Tss2_Sys_HMAC_Start_Prepare(
703     TSS2_SYS_CONTEXT *sysContext,
704     TPMI_DH_OBJECT handle,
705     const TPM2B_AUTH *auth,
706     TPMI_ALG_HASH hashAlg);
707 
708 TSS2_RC Tss2_Sys_HMAC_Start_Complete(
709     TSS2_SYS_CONTEXT *sysContext,
710     TPMI_DH_OBJECT *sequenceHandle);
711 
712 TSS2_RC Tss2_Sys_HMAC_Start(
713     TSS2_SYS_CONTEXT *sysContext,
714     TPMI_DH_OBJECT handle,
715     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
716     const TPM2B_AUTH *auth,
717     TPMI_ALG_HASH hashAlg,
718     TPMI_DH_OBJECT *sequenceHandle,
719     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
720 
721 TSS2_RC Tss2_Sys_HashSequenceStart_Prepare(
722     TSS2_SYS_CONTEXT *sysContext,
723     const TPM2B_AUTH *auth,
724     TPMI_ALG_HASH hashAlg);
725 
726 TSS2_RC Tss2_Sys_HashSequenceStart_Complete(
727     TSS2_SYS_CONTEXT *sysContext,
728     TPMI_DH_OBJECT *sequenceHandle);
729 
730 TSS2_RC Tss2_Sys_HashSequenceStart(
731     TSS2_SYS_CONTEXT *sysContext,
732     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
733     const TPM2B_AUTH *auth,
734     TPMI_ALG_HASH hashAlg,
735     TPMI_DH_OBJECT *sequenceHandle,
736     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
737 
738 TSS2_RC Tss2_Sys_SequenceUpdate_Prepare(
739     TSS2_SYS_CONTEXT *sysContext,
740     TPMI_DH_OBJECT sequenceHandle,
741     const TPM2B_MAX_BUFFER *buffer);
742 
743 TSS2_RC Tss2_Sys_SequenceUpdate_Complete(
744     TSS2_SYS_CONTEXT *sysContext);
745 
746 TSS2_RC Tss2_Sys_SequenceUpdate(
747     TSS2_SYS_CONTEXT *sysContext,
748     TPMI_DH_OBJECT sequenceHandle,
749     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
750     const TPM2B_MAX_BUFFER *buffer,
751     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
752 
753 TSS2_RC Tss2_Sys_SequenceComplete_Prepare(
754     TSS2_SYS_CONTEXT *sysContext,
755     TPMI_DH_OBJECT sequenceHandle,
756     const TPM2B_MAX_BUFFER *buffer,
757     TPMI_RH_HIERARCHY hierarchy);
758 
759 TSS2_RC Tss2_Sys_SequenceComplete_Complete(
760     TSS2_SYS_CONTEXT *sysContext,
761     TPM2B_DIGEST *result,
762     TPMT_TK_HASHCHECK *validation);
763 
764 TSS2_RC Tss2_Sys_SequenceComplete(
765     TSS2_SYS_CONTEXT *sysContext,
766     TPMI_DH_OBJECT sequenceHandle,
767     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
768     const TPM2B_MAX_BUFFER *buffer,
769     TPMI_RH_HIERARCHY hierarchy,
770     TPM2B_DIGEST *result,
771     TPMT_TK_HASHCHECK *validation,
772     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
773 
774 TSS2_RC Tss2_Sys_EventSequenceComplete_Prepare(
775     TSS2_SYS_CONTEXT *sysContext,
776     TPMI_DH_PCR pcrHandle,
777     TPMI_DH_OBJECT sequenceHandle,
778     const TPM2B_MAX_BUFFER *buffer);
779 
780 TSS2_RC Tss2_Sys_EventSequenceComplete_Complete(
781     TSS2_SYS_CONTEXT *sysContext,
782     TPML_DIGEST_VALUES *results);
783 
784 TSS2_RC Tss2_Sys_EventSequenceComplete(
785     TSS2_SYS_CONTEXT *sysContext,
786     TPMI_DH_PCR pcrHandle,
787     TPMI_DH_OBJECT sequenceHandle,
788     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
789     const TPM2B_MAX_BUFFER *buffer,
790     TPML_DIGEST_VALUES *results,
791     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
792 
793 TSS2_RC Tss2_Sys_Certify_Prepare(
794     TSS2_SYS_CONTEXT *sysContext,
795     TPMI_DH_OBJECT objectHandle,
796     TPMI_DH_OBJECT signHandle,
797     const TPM2B_DATA *qualifyingData,
798     const TPMT_SIG_SCHEME *inScheme);
799 
800 TSS2_RC Tss2_Sys_Certify_Complete(
801     TSS2_SYS_CONTEXT *sysContext,
802     TPM2B_ATTEST *certifyInfo,
803     TPMT_SIGNATURE *signature);
804 
805 TSS2_RC Tss2_Sys_Certify(
806     TSS2_SYS_CONTEXT *sysContext,
807     TPMI_DH_OBJECT objectHandle,
808     TPMI_DH_OBJECT signHandle,
809     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
810     const TPM2B_DATA *qualifyingData,
811     const TPMT_SIG_SCHEME *inScheme,
812     TPM2B_ATTEST *certifyInfo,
813     TPMT_SIGNATURE *signature,
814     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
815 
816 TSS2_RC Tss2_Sys_CertifyCreation_Prepare(
817     TSS2_SYS_CONTEXT *sysContext,
818     TPMI_DH_OBJECT signHandle,
819     TPMI_DH_OBJECT objectHandle,
820     const TPM2B_DATA *qualifyingData,
821     const TPM2B_DIGEST *creationHash,
822     const TPMT_SIG_SCHEME *inScheme,
823     const TPMT_TK_CREATION *creationTicket);
824 
825 TSS2_RC Tss2_Sys_CertifyCreation_Complete(
826     TSS2_SYS_CONTEXT *sysContext,
827     TPM2B_ATTEST *certifyInfo,
828     TPMT_SIGNATURE *signature);
829 
830 TSS2_RC Tss2_Sys_CertifyCreation(
831     TSS2_SYS_CONTEXT *sysContext,
832     TPMI_DH_OBJECT signHandle,
833     TPMI_DH_OBJECT objectHandle,
834     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
835     const TPM2B_DATA *qualifyingData,
836     const TPM2B_DIGEST *creationHash,
837     const TPMT_SIG_SCHEME *inScheme,
838     const TPMT_TK_CREATION *creationTicket,
839     TPM2B_ATTEST *certifyInfo,
840     TPMT_SIGNATURE *signature,
841     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
842 
843 TSS2_RC Tss2_Sys_Quote_Prepare(
844     TSS2_SYS_CONTEXT *sysContext,
845     TPMI_DH_OBJECT signHandle,
846     const TPM2B_DATA *qualifyingData,
847     const TPMT_SIG_SCHEME *inScheme,
848     const TPML_PCR_SELECTION *PCRselect);
849 
850 TSS2_RC Tss2_Sys_Quote_Complete(
851     TSS2_SYS_CONTEXT *sysContext,
852     TPM2B_ATTEST *quoted,
853     TPMT_SIGNATURE *signature);
854 
855 TSS2_RC Tss2_Sys_Quote(
856     TSS2_SYS_CONTEXT *sysContext,
857     TPMI_DH_OBJECT signHandle,
858     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
859     const TPM2B_DATA *qualifyingData,
860     const TPMT_SIG_SCHEME *inScheme,
861     const TPML_PCR_SELECTION *PCRselect,
862     TPM2B_ATTEST *quoted,
863     TPMT_SIGNATURE *signature,
864     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
865 
866 TSS2_RC Tss2_Sys_GetSessionAuditDigest_Prepare(
867     TSS2_SYS_CONTEXT *sysContext,
868     TPMI_RH_ENDORSEMENT privacyAdminHandle,
869     TPMI_DH_OBJECT signHandle,
870     TPMI_SH_HMAC sessionHandle,
871     const TPM2B_DATA *qualifyingData,
872     const TPMT_SIG_SCHEME *inScheme);
873 
874 TSS2_RC Tss2_Sys_GetSessionAuditDigest_Complete(
875     TSS2_SYS_CONTEXT *sysContext,
876     TPM2B_ATTEST *auditInfo,
877     TPMT_SIGNATURE *signature);
878 
879 TSS2_RC Tss2_Sys_GetSessionAuditDigest(
880     TSS2_SYS_CONTEXT *sysContext,
881     TPMI_RH_ENDORSEMENT privacyAdminHandle,
882     TPMI_DH_OBJECT signHandle,
883     TPMI_SH_HMAC sessionHandle,
884     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
885     const TPM2B_DATA *qualifyingData,
886     const TPMT_SIG_SCHEME *inScheme,
887     TPM2B_ATTEST *auditInfo,
888     TPMT_SIGNATURE *signature,
889     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
890 
891 TSS2_RC Tss2_Sys_GetCommandAuditDigest_Prepare(
892     TSS2_SYS_CONTEXT *sysContext,
893     TPMI_RH_ENDORSEMENT privacyHandle,
894     TPMI_DH_OBJECT signHandle,
895     const TPM2B_DATA *qualifyingData,
896     const TPMT_SIG_SCHEME *inScheme);
897 
898 TSS2_RC Tss2_Sys_GetCommandAuditDigest_Complete(
899     TSS2_SYS_CONTEXT *sysContext,
900     TPM2B_ATTEST *auditInfo,
901     TPMT_SIGNATURE *signature);
902 
903 TSS2_RC Tss2_Sys_GetCommandAuditDigest(
904     TSS2_SYS_CONTEXT *sysContext,
905     TPMI_RH_ENDORSEMENT privacyHandle,
906     TPMI_DH_OBJECT signHandle,
907     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
908     const TPM2B_DATA *qualifyingData,
909     const TPMT_SIG_SCHEME *inScheme,
910     TPM2B_ATTEST *auditInfo,
911     TPMT_SIGNATURE *signature,
912     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
913 
914 TSS2_RC Tss2_Sys_GetTime_Prepare(
915     TSS2_SYS_CONTEXT *sysContext,
916     TPMI_RH_ENDORSEMENT privacyAdminHandle,
917     TPMI_DH_OBJECT signHandle,
918     const TPM2B_DATA *qualifyingData,
919     const TPMT_SIG_SCHEME *inScheme);
920 
921 TSS2_RC Tss2_Sys_GetTime_Complete(
922     TSS2_SYS_CONTEXT *sysContext,
923     TPM2B_ATTEST *timeInfo,
924     TPMT_SIGNATURE *signature);
925 
926 TSS2_RC Tss2_Sys_GetTime(
927     TSS2_SYS_CONTEXT *sysContext,
928     TPMI_RH_ENDORSEMENT privacyAdminHandle,
929     TPMI_DH_OBJECT signHandle,
930     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
931     const TPM2B_DATA *qualifyingData,
932     const TPMT_SIG_SCHEME *inScheme,
933     TPM2B_ATTEST *timeInfo,
934     TPMT_SIGNATURE *signature,
935     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
936 
937 TSS2_RC Tss2_Sys_Commit_Prepare(
938     TSS2_SYS_CONTEXT *sysContext,
939     TPMI_DH_OBJECT signHandle,
940     const TPM2B_ECC_POINT *P1,
941     const TPM2B_SENSITIVE_DATA *s2,
942     const TPM2B_ECC_PARAMETER *y2);
943 
944 TSS2_RC Tss2_Sys_Commit_Complete(
945     TSS2_SYS_CONTEXT *sysContext,
946     TPM2B_ECC_POINT *K,
947     TPM2B_ECC_POINT *L,
948     TPM2B_ECC_POINT *E,
949     UINT16 *counter);
950 
951 TSS2_RC Tss2_Sys_Commit(
952     TSS2_SYS_CONTEXT *sysContext,
953     TPMI_DH_OBJECT signHandle,
954     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
955     const TPM2B_ECC_POINT *P1,
956     const TPM2B_SENSITIVE_DATA *s2,
957     const TPM2B_ECC_PARAMETER *y2,
958     TPM2B_ECC_POINT *K,
959     TPM2B_ECC_POINT *L,
960     TPM2B_ECC_POINT *E,
961     UINT16 *counter,
962     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
963 
964 TSS2_RC Tss2_Sys_EC_Ephemeral_Prepare(
965     TSS2_SYS_CONTEXT *sysContext,
966     TPMI_ECC_CURVE curveID);
967 
968 TSS2_RC Tss2_Sys_EC_Ephemeral_Complete(
969     TSS2_SYS_CONTEXT *sysContext,
970     TPM2B_ECC_POINT *Q,
971     UINT16 *counter);
972 
973 TSS2_RC Tss2_Sys_EC_Ephemeral(
974     TSS2_SYS_CONTEXT *sysContext,
975     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
976     TPMI_ECC_CURVE curveID,
977     TPM2B_ECC_POINT *Q,
978     UINT16 *counter,
979     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
980 
981 TSS2_RC Tss2_Sys_VerifySignature_Prepare(
982     TSS2_SYS_CONTEXT *sysContext,
983     TPMI_DH_OBJECT keyHandle,
984     const TPM2B_DIGEST *digest,
985     const TPMT_SIGNATURE *signature);
986 
987 TSS2_RC Tss2_Sys_VerifySignature_Complete(
988     TSS2_SYS_CONTEXT *sysContext,
989     TPMT_TK_VERIFIED *validation);
990 
991 TSS2_RC Tss2_Sys_VerifySignature(
992     TSS2_SYS_CONTEXT *sysContext,
993     TPMI_DH_OBJECT keyHandle,
994     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
995     const TPM2B_DIGEST *digest,
996     const TPMT_SIGNATURE *signature,
997     TPMT_TK_VERIFIED *validation,
998     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
999 
1000 TSS2_RC Tss2_Sys_Sign_Prepare(
1001     TSS2_SYS_CONTEXT *sysContext,
1002     TPMI_DH_OBJECT keyHandle,
1003     const TPM2B_DIGEST *digest,
1004     const TPMT_SIG_SCHEME *inScheme,
1005     const TPMT_TK_HASHCHECK *validation);
1006 
1007 TSS2_RC Tss2_Sys_Sign_Complete(
1008     TSS2_SYS_CONTEXT *sysContext,
1009     TPMT_SIGNATURE *signature);
1010 
1011 TSS2_RC Tss2_Sys_Sign(
1012     TSS2_SYS_CONTEXT *sysContext,
1013     TPMI_DH_OBJECT keyHandle,
1014     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1015     const TPM2B_DIGEST *digest,
1016     const TPMT_SIG_SCHEME *inScheme,
1017     const TPMT_TK_HASHCHECK *validation,
1018     TPMT_SIGNATURE *signature,
1019     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1020 
1021 TSS2_RC Tss2_Sys_SetCommandCodeAuditStatus_Prepare(
1022     TSS2_SYS_CONTEXT *sysContext,
1023     TPMI_RH_PROVISION auth,
1024     TPMI_ALG_HASH auditAlg,
1025     const TPML_CC *setList,
1026     const TPML_CC *clearList);
1027 
1028 TSS2_RC Tss2_Sys_SetCommandCodeAuditStatus_Complete(
1029     TSS2_SYS_CONTEXT *sysContext);
1030 
1031 TSS2_RC Tss2_Sys_SetCommandCodeAuditStatus(
1032     TSS2_SYS_CONTEXT *sysContext,
1033     TPMI_RH_PROVISION auth,
1034     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1035     TPMI_ALG_HASH auditAlg,
1036     const TPML_CC *setList,
1037     const TPML_CC *clearList,
1038     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1039 
1040 TSS2_RC Tss2_Sys_PCR_Extend_Prepare(
1041     TSS2_SYS_CONTEXT *sysContext,
1042     TPMI_DH_PCR pcrHandle,
1043     const TPML_DIGEST_VALUES *digests);
1044 
1045 TSS2_RC Tss2_Sys_PCR_Extend_Complete(
1046     TSS2_SYS_CONTEXT *sysContext);
1047 
1048 TSS2_RC Tss2_Sys_PCR_Extend(
1049     TSS2_SYS_CONTEXT *sysContext,
1050     TPMI_DH_PCR pcrHandle,
1051     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1052     const TPML_DIGEST_VALUES *digests,
1053     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1054 
1055 TSS2_RC Tss2_Sys_PCR_Event_Prepare(
1056     TSS2_SYS_CONTEXT *sysContext,
1057     TPMI_DH_PCR pcrHandle,
1058     const TPM2B_EVENT *eventData);
1059 
1060 TSS2_RC Tss2_Sys_PCR_Event_Complete(
1061     TSS2_SYS_CONTEXT *sysContext,
1062     TPML_DIGEST_VALUES *digests);
1063 
1064 TSS2_RC Tss2_Sys_PCR_Event(
1065     TSS2_SYS_CONTEXT *sysContext,
1066     TPMI_DH_PCR pcrHandle,
1067     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1068     const TPM2B_EVENT *eventData,
1069     TPML_DIGEST_VALUES *digests,
1070     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1071 
1072 TSS2_RC Tss2_Sys_PCR_Read_Prepare(
1073     TSS2_SYS_CONTEXT *sysContext,
1074     const TPML_PCR_SELECTION *pcrSelectionIn);
1075 
1076 TSS2_RC Tss2_Sys_PCR_Read_Complete(
1077     TSS2_SYS_CONTEXT *sysContext,
1078     UINT32 *pcrUpdateCounter,
1079     TPML_PCR_SELECTION *pcrSelectionOut,
1080     TPML_DIGEST *pcrValues);
1081 
1082 TSS2_RC Tss2_Sys_PCR_Read(
1083     TSS2_SYS_CONTEXT *sysContext,
1084     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1085     const TPML_PCR_SELECTION *pcrSelectionIn,
1086     UINT32 *pcrUpdateCounter,
1087     TPML_PCR_SELECTION *pcrSelectionOut,
1088     TPML_DIGEST *pcrValues,
1089     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1090 
1091 TSS2_RC Tss2_Sys_PCR_Allocate_Prepare(
1092     TSS2_SYS_CONTEXT *sysContext,
1093     TPMI_RH_PLATFORM authHandle,
1094     const TPML_PCR_SELECTION *pcrAllocation);
1095 
1096 TSS2_RC Tss2_Sys_PCR_Allocate_Complete(
1097     TSS2_SYS_CONTEXT *sysContext,
1098     TPMI_YES_NO *allocationSuccess,
1099     UINT32 *maxPCR,
1100     UINT32 *sizeNeeded,
1101     UINT32 *sizeAvailable);
1102 
1103 TSS2_RC Tss2_Sys_PCR_Allocate(
1104     TSS2_SYS_CONTEXT *sysContext,
1105     TPMI_RH_PLATFORM authHandle,
1106     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1107     const TPML_PCR_SELECTION *pcrAllocation,
1108     TPMI_YES_NO *allocationSuccess,
1109     UINT32 *maxPCR,
1110     UINT32 *sizeNeeded,
1111     UINT32 *sizeAvailable,
1112     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1113 
1114 TSS2_RC Tss2_Sys_PCR_SetAuthPolicy_Prepare(
1115     TSS2_SYS_CONTEXT *sysContext,
1116     TPMI_RH_PLATFORM authHandle,
1117     const TPM2B_DIGEST *authPolicy,
1118     TPMI_ALG_HASH hashAlg,
1119     TPMI_DH_PCR pcrNum);
1120 
1121 TSS2_RC Tss2_Sys_PCR_SetAuthPolicy_Complete(
1122     TSS2_SYS_CONTEXT *sysContext);
1123 
1124 TSS2_RC Tss2_Sys_PCR_SetAuthPolicy(
1125     TSS2_SYS_CONTEXT *sysContext,
1126     TPMI_RH_PLATFORM authHandle,
1127     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1128     const TPM2B_DIGEST *authPolicy,
1129     TPMI_ALG_HASH hashAlg,
1130     TPMI_DH_PCR pcrNum,
1131     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1132 
1133 TSS2_RC Tss2_Sys_PCR_SetAuthValue_Prepare(
1134     TSS2_SYS_CONTEXT *sysContext,
1135     TPMI_DH_PCR pcrHandle,
1136     const TPM2B_DIGEST *auth);
1137 
1138 TSS2_RC Tss2_Sys_PCR_SetAuthValue_Complete(
1139     TSS2_SYS_CONTEXT *sysContext);
1140 
1141 TSS2_RC Tss2_Sys_PCR_SetAuthValue(
1142     TSS2_SYS_CONTEXT *sysContext,
1143     TPMI_DH_PCR pcrHandle,
1144     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1145     const TPM2B_DIGEST *auth,
1146     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1147 
1148 TSS2_RC Tss2_Sys_PCR_Reset_Prepare(
1149     TSS2_SYS_CONTEXT *sysContext,
1150     TPMI_DH_PCR pcrHandle);
1151 
1152 TSS2_RC Tss2_Sys_PCR_Reset_Complete(
1153     TSS2_SYS_CONTEXT *sysContext);
1154 
1155 TSS2_RC Tss2_Sys_PCR_Reset(
1156     TSS2_SYS_CONTEXT *sysContext,
1157     TPMI_DH_PCR pcrHandle,
1158     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1159     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1160 
1161 TSS2_RC Tss2_Sys_PolicySigned_Prepare(
1162     TSS2_SYS_CONTEXT *sysContext,
1163     TPMI_DH_OBJECT authObject,
1164     TPMI_SH_POLICY policySession,
1165     const TPM2B_NONCE *nonceTPM,
1166     const TPM2B_DIGEST *cpHashA,
1167     const TPM2B_NONCE *policyRef,
1168     INT32 expiration,
1169     const TPMT_SIGNATURE *auth);
1170 
1171 TSS2_RC Tss2_Sys_PolicySigned_Complete(
1172     TSS2_SYS_CONTEXT *sysContext,
1173     TPM2B_TIMEOUT *timeout,
1174     TPMT_TK_AUTH *policyTicket);
1175 
1176 TSS2_RC Tss2_Sys_PolicySigned(
1177     TSS2_SYS_CONTEXT *sysContext,
1178     TPMI_DH_OBJECT authObject,
1179     TPMI_SH_POLICY policySession,
1180     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1181     const TPM2B_NONCE *nonceTPM,
1182     const TPM2B_DIGEST *cpHashA,
1183     const TPM2B_NONCE *policyRef,
1184     INT32 expiration,
1185     const TPMT_SIGNATURE *auth,
1186     TPM2B_TIMEOUT *timeout,
1187     TPMT_TK_AUTH *policyTicket,
1188     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1189 
1190 TSS2_RC Tss2_Sys_PolicySecret_Prepare(
1191     TSS2_SYS_CONTEXT *sysContext,
1192     TPMI_DH_ENTITY authHandle,
1193     TPMI_SH_POLICY policySession,
1194     const TPM2B_NONCE *nonceTPM,
1195     const TPM2B_DIGEST *cpHashA,
1196     const TPM2B_NONCE *policyRef,
1197     INT32 expiration);
1198 
1199 TSS2_RC Tss2_Sys_PolicySecret_Complete(
1200     TSS2_SYS_CONTEXT *sysContext,
1201     TPM2B_TIMEOUT *timeout,
1202     TPMT_TK_AUTH *policyTicket);
1203 
1204 TSS2_RC Tss2_Sys_PolicySecret(
1205     TSS2_SYS_CONTEXT *sysContext,
1206     TPMI_DH_ENTITY authHandle,
1207     TPMI_SH_POLICY policySession,
1208     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1209     const TPM2B_NONCE *nonceTPM,
1210     const TPM2B_DIGEST *cpHashA,
1211     const TPM2B_NONCE *policyRef,
1212     INT32 expiration,
1213     TPM2B_TIMEOUT *timeout,
1214     TPMT_TK_AUTH *policyTicket,
1215     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1216 
1217 TSS2_RC Tss2_Sys_PolicyTicket_Prepare(
1218     TSS2_SYS_CONTEXT *sysContext,
1219     TPMI_SH_POLICY policySession,
1220     const TPM2B_TIMEOUT *timeout,
1221     const TPM2B_DIGEST *cpHashA,
1222     const TPM2B_NONCE *policyRef,
1223     const TPM2B_NAME *authName,
1224     const TPMT_TK_AUTH *ticket);
1225 
1226 TSS2_RC Tss2_Sys_PolicyTicket_Complete(
1227     TSS2_SYS_CONTEXT *sysContext);
1228 
1229 TSS2_RC Tss2_Sys_PolicyTicket(
1230     TSS2_SYS_CONTEXT *sysContext,
1231     TPMI_SH_POLICY policySession,
1232     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1233     const TPM2B_TIMEOUT *timeout,
1234     const TPM2B_DIGEST *cpHashA,
1235     const TPM2B_NONCE *policyRef,
1236     const TPM2B_NAME *authName,
1237     const TPMT_TK_AUTH *ticket,
1238     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1239 
1240 TSS2_RC Tss2_Sys_PolicyOR_Prepare(
1241     TSS2_SYS_CONTEXT *sysContext,
1242     TPMI_SH_POLICY policySession,
1243     const TPML_DIGEST *pHashList);
1244 
1245 TSS2_RC Tss2_Sys_PolicyOR_Complete(
1246     TSS2_SYS_CONTEXT *sysContext);
1247 
1248 TSS2_RC Tss2_Sys_PolicyOR(
1249     TSS2_SYS_CONTEXT *sysContext,
1250     TPMI_SH_POLICY policySession,
1251     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1252     const TPML_DIGEST *pHashList,
1253     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1254 
1255 TSS2_RC Tss2_Sys_PolicyPCR_Prepare(
1256     TSS2_SYS_CONTEXT *sysContext,
1257     TPMI_SH_POLICY policySession,
1258     const TPM2B_DIGEST *pcrDigest,
1259     const TPML_PCR_SELECTION *pcrs);
1260 
1261 TSS2_RC Tss2_Sys_PolicyPCR_Complete(
1262     TSS2_SYS_CONTEXT *sysContext);
1263 
1264 TSS2_RC Tss2_Sys_PolicyPCR(
1265     TSS2_SYS_CONTEXT *sysContext,
1266     TPMI_SH_POLICY policySession,
1267     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1268     const TPM2B_DIGEST *pcrDigest,
1269     const TPML_PCR_SELECTION *pcrs,
1270     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1271 
1272 TSS2_RC Tss2_Sys_PolicyLocality_Prepare(
1273     TSS2_SYS_CONTEXT *sysContext,
1274     TPMI_SH_POLICY policySession,
1275     TPMA_LOCALITY locality);
1276 
1277 TSS2_RC Tss2_Sys_PolicyLocality_Complete(
1278     TSS2_SYS_CONTEXT *sysContext);
1279 
1280 TSS2_RC Tss2_Sys_PolicyLocality(
1281     TSS2_SYS_CONTEXT *sysContext,
1282     TPMI_SH_POLICY policySession,
1283     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1284     TPMA_LOCALITY locality,
1285     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1286 
1287 TSS2_RC Tss2_Sys_PolicyNV_Prepare(
1288     TSS2_SYS_CONTEXT *sysContext,
1289     TPMI_RH_NV_AUTH authHandle,
1290     TPMI_RH_NV_INDEX nvIndex,
1291     TPMI_SH_POLICY policySession,
1292     const TPM2B_OPERAND *operandB,
1293     UINT16 offset,
1294     TPM2_EO operation);
1295 
1296 TSS2_RC Tss2_Sys_PolicyNV_Complete(
1297     TSS2_SYS_CONTEXT *sysContext);
1298 
1299 TSS2_RC Tss2_Sys_PolicyNV(
1300     TSS2_SYS_CONTEXT *sysContext,
1301     TPMI_RH_NV_AUTH authHandle,
1302     TPMI_RH_NV_INDEX nvIndex,
1303     TPMI_SH_POLICY policySession,
1304     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1305     const TPM2B_OPERAND *operandB,
1306     UINT16 offset,
1307     TPM2_EO operation,
1308     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1309 
1310 TSS2_RC Tss2_Sys_PolicyCounterTimer_Prepare(
1311     TSS2_SYS_CONTEXT *sysContext,
1312     TPMI_SH_POLICY policySession,
1313     const TPM2B_OPERAND *operandB,
1314     UINT16 offset,
1315     TPM2_EO operation);
1316 
1317 TSS2_RC Tss2_Sys_PolicyCounterTimer_Complete(
1318     TSS2_SYS_CONTEXT *sysContext);
1319 
1320 TSS2_RC Tss2_Sys_PolicyCounterTimer(
1321     TSS2_SYS_CONTEXT *sysContext,
1322     TPMI_SH_POLICY policySession,
1323     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1324     const TPM2B_OPERAND *operandB,
1325     UINT16 offset,
1326     TPM2_EO operation,
1327     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1328 
1329 TSS2_RC Tss2_Sys_PolicyCommandCode_Prepare(
1330     TSS2_SYS_CONTEXT *sysContext,
1331     TPMI_SH_POLICY policySession,
1332     TPM2_CC code);
1333 
1334 TSS2_RC Tss2_Sys_PolicyCommandCode_Complete(
1335     TSS2_SYS_CONTEXT *sysContext);
1336 
1337 TSS2_RC Tss2_Sys_PolicyCommandCode(
1338     TSS2_SYS_CONTEXT *sysContext,
1339     TPMI_SH_POLICY policySession,
1340     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1341     TPM2_CC code,
1342     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1343 
1344 TSS2_RC Tss2_Sys_PolicyPhysicalPresence_Prepare(
1345     TSS2_SYS_CONTEXT *sysContext,
1346     TPMI_SH_POLICY policySession);
1347 
1348 TSS2_RC Tss2_Sys_PolicyPhysicalPresence_Complete(
1349     TSS2_SYS_CONTEXT *sysContext);
1350 
1351 TSS2_RC Tss2_Sys_PolicyPhysicalPresence(
1352     TSS2_SYS_CONTEXT *sysContext,
1353     TPMI_SH_POLICY policySession,
1354     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1355     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1356 
1357 TSS2_RC Tss2_Sys_PolicyCpHash_Prepare(
1358     TSS2_SYS_CONTEXT *sysContext,
1359     TPMI_SH_POLICY policySession,
1360     const TPM2B_DIGEST *cpHashA);
1361 
1362 TSS2_RC Tss2_Sys_PolicyCpHash_Complete(
1363     TSS2_SYS_CONTEXT *sysContext);
1364 
1365 TSS2_RC Tss2_Sys_PolicyCpHash(
1366     TSS2_SYS_CONTEXT *sysContext,
1367     TPMI_SH_POLICY policySession,
1368     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1369     const TPM2B_DIGEST *cpHashA,
1370     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1371 
1372 TSS2_RC Tss2_Sys_PolicyNameHash_Prepare(
1373     TSS2_SYS_CONTEXT *sysContext,
1374     TPMI_SH_POLICY policySession,
1375     const TPM2B_DIGEST *nameHash);
1376 
1377 TSS2_RC Tss2_Sys_PolicyNameHash_Complete(
1378     TSS2_SYS_CONTEXT *sysContext);
1379 
1380 TSS2_RC Tss2_Sys_PolicyNameHash(
1381     TSS2_SYS_CONTEXT *sysContext,
1382     TPMI_SH_POLICY policySession,
1383     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1384     const TPM2B_DIGEST *nameHash,
1385     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1386 
1387 TSS2_RC Tss2_Sys_PolicyDuplicationSelect_Prepare(
1388     TSS2_SYS_CONTEXT *sysContext,
1389     TPMI_SH_POLICY policySession,
1390     const TPM2B_NAME *objectName,
1391     const TPM2B_NAME *newParentName,
1392     TPMI_YES_NO includeObject);
1393 
1394 TSS2_RC Tss2_Sys_PolicyDuplicationSelect_Complete(
1395     TSS2_SYS_CONTEXT *sysContext);
1396 
1397 TSS2_RC Tss2_Sys_PolicyDuplicationSelect(
1398     TSS2_SYS_CONTEXT *sysContext,
1399     TPMI_SH_POLICY policySession,
1400     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1401     const TPM2B_NAME *objectName,
1402     const TPM2B_NAME *newParentName,
1403     TPMI_YES_NO includeObject,
1404     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1405 
1406 TSS2_RC Tss2_Sys_PolicyAuthorize_Prepare(
1407     TSS2_SYS_CONTEXT *sysContext,
1408     TPMI_SH_POLICY policySession,
1409     const TPM2B_DIGEST *approvedPolicy,
1410     const TPM2B_NONCE *policyRef,
1411     const TPM2B_NAME *keySign,
1412     const TPMT_TK_VERIFIED *checkTicket);
1413 
1414 TSS2_RC Tss2_Sys_PolicyAuthorize_Complete(
1415     TSS2_SYS_CONTEXT *sysContext);
1416 
1417 TSS2_RC Tss2_Sys_PolicyAuthorize(
1418     TSS2_SYS_CONTEXT *sysContext,
1419     TPMI_SH_POLICY policySession,
1420     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1421     const TPM2B_DIGEST *approvedPolicy,
1422     const TPM2B_NONCE *policyRef,
1423     const TPM2B_NAME *keySign,
1424     const TPMT_TK_VERIFIED *checkTicket,
1425     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1426 
1427 TSS2_RC Tss2_Sys_PolicyAuthValue_Prepare(
1428     TSS2_SYS_CONTEXT *sysContext,
1429     TPMI_SH_POLICY policySession);
1430 
1431 TSS2_RC Tss2_Sys_PolicyAuthValue_Complete(
1432     TSS2_SYS_CONTEXT *sysContext);
1433 
1434 TSS2_RC Tss2_Sys_PolicyAuthValue(
1435     TSS2_SYS_CONTEXT *sysContext,
1436     TPMI_SH_POLICY policySession,
1437     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1438     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1439 
1440 TSS2_RC Tss2_Sys_PolicyPassword_Prepare(
1441     TSS2_SYS_CONTEXT *sysContext,
1442     TPMI_SH_POLICY policySession);
1443 
1444 TSS2_RC Tss2_Sys_PolicyPassword_Complete(
1445     TSS2_SYS_CONTEXT *sysContext);
1446 
1447 TSS2_RC Tss2_Sys_PolicyPassword(
1448     TSS2_SYS_CONTEXT *sysContext,
1449     TPMI_SH_POLICY policySession,
1450     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1451     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1452 
1453 TSS2_RC Tss2_Sys_PolicyGetDigest_Prepare(
1454     TSS2_SYS_CONTEXT *sysContext,
1455     TPMI_SH_POLICY policySession);
1456 
1457 TSS2_RC Tss2_Sys_PolicyGetDigest_Complete(
1458     TSS2_SYS_CONTEXT *sysContext,
1459     TPM2B_DIGEST *policyDigest);
1460 
1461 TSS2_RC Tss2_Sys_PolicyGetDigest(
1462     TSS2_SYS_CONTEXT *sysContext,
1463     TPMI_SH_POLICY policySession,
1464     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1465     TPM2B_DIGEST *policyDigest,
1466     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1467 
1468 TSS2_RC Tss2_Sys_PolicyNvWritten_Prepare(
1469     TSS2_SYS_CONTEXT *sysContext,
1470     TPMI_SH_POLICY policySession,
1471     TPMI_YES_NO writtenSet);
1472 
1473 TSS2_RC Tss2_Sys_PolicyNvWritten_Complete(
1474     TSS2_SYS_CONTEXT *sysContext);
1475 
1476 TSS2_RC Tss2_Sys_PolicyNvWritten(
1477     TSS2_SYS_CONTEXT *sysContext,
1478     TPMI_SH_POLICY policySession,
1479     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1480     TPMI_YES_NO writtenSet,
1481     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1482 
1483 TSS2_RC Tss2_Sys_CreatePrimary_Prepare(
1484     TSS2_SYS_CONTEXT *sysContext,
1485     TPMI_RH_HIERARCHY primaryHandle,
1486     const TPM2B_SENSITIVE_CREATE *inSensitive,
1487     const TPM2B_PUBLIC *inPublic,
1488     const TPM2B_DATA *outsideInfo,
1489     const TPML_PCR_SELECTION *creationPCR);
1490 
1491 TSS2_RC Tss2_Sys_CreatePrimary_Complete(
1492     TSS2_SYS_CONTEXT *sysContext,
1493     TPM2_HANDLE *objectHandle,
1494     TPM2B_PUBLIC *outPublic,
1495     TPM2B_CREATION_DATA *creationData,
1496     TPM2B_DIGEST *creationHash,
1497     TPMT_TK_CREATION *creationTicket,
1498     TPM2B_NAME *name);
1499 
1500 TSS2_RC Tss2_Sys_CreatePrimary(
1501     TSS2_SYS_CONTEXT *sysContext,
1502     TPMI_RH_HIERARCHY primaryHandle,
1503     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1504     const TPM2B_SENSITIVE_CREATE *inSensitive,
1505     const TPM2B_PUBLIC *inPublic,
1506     const TPM2B_DATA *outsideInfo,
1507     const TPML_PCR_SELECTION *creationPCR,
1508     TPM2_HANDLE *objectHandle,
1509     TPM2B_PUBLIC *outPublic,
1510     TPM2B_CREATION_DATA *creationData,
1511     TPM2B_DIGEST *creationHash,
1512     TPMT_TK_CREATION *creationTicket,
1513     TPM2B_NAME *name,
1514     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1515 
1516 TSS2_RC Tss2_Sys_HierarchyControl_Prepare(
1517     TSS2_SYS_CONTEXT *sysContext,
1518     TPMI_RH_HIERARCHY authHandle,
1519     TPMI_RH_ENABLES enable,
1520     TPMI_YES_NO state);
1521 
1522 TSS2_RC Tss2_Sys_HierarchyControl_Complete(
1523     TSS2_SYS_CONTEXT *sysContext);
1524 
1525 TSS2_RC Tss2_Sys_HierarchyControl(
1526     TSS2_SYS_CONTEXT *sysContext,
1527     TPMI_RH_HIERARCHY authHandle,
1528     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1529     TPMI_RH_ENABLES enable,
1530     TPMI_YES_NO state,
1531     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1532 
1533 TSS2_RC Tss2_Sys_SetPrimaryPolicy_Prepare(
1534     TSS2_SYS_CONTEXT *sysContext,
1535     TPMI_RH_HIERARCHY_AUTH authHandle,
1536     const TPM2B_DIGEST *authPolicy,
1537     TPMI_ALG_HASH hashAlg);
1538 
1539 TSS2_RC Tss2_Sys_SetPrimaryPolicy_Complete(
1540     TSS2_SYS_CONTEXT *sysContext);
1541 
1542 TSS2_RC Tss2_Sys_SetPrimaryPolicy(
1543     TSS2_SYS_CONTEXT *sysContext,
1544     TPMI_RH_HIERARCHY_AUTH authHandle,
1545     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1546     const TPM2B_DIGEST *authPolicy,
1547     TPMI_ALG_HASH hashAlg,
1548     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1549 
1550 TSS2_RC Tss2_Sys_ChangePPS_Prepare(
1551     TSS2_SYS_CONTEXT *sysContext,
1552     TPMI_RH_PLATFORM authHandle);
1553 
1554 TSS2_RC Tss2_Sys_ChangePPS_Complete(
1555     TSS2_SYS_CONTEXT *sysContext);
1556 
1557 TSS2_RC Tss2_Sys_ChangePPS(
1558     TSS2_SYS_CONTEXT *sysContext,
1559     TPMI_RH_PLATFORM authHandle,
1560     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1561     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1562 
1563 TSS2_RC Tss2_Sys_ChangeEPS_Prepare(
1564     TSS2_SYS_CONTEXT *sysContext,
1565     TPMI_RH_PLATFORM authHandle);
1566 
1567 TSS2_RC Tss2_Sys_ChangeEPS_Complete(
1568     TSS2_SYS_CONTEXT *sysContext);
1569 
1570 TSS2_RC Tss2_Sys_ChangeEPS(
1571     TSS2_SYS_CONTEXT *sysContext,
1572     TPMI_RH_PLATFORM authHandle,
1573     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1574     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1575 
1576 TSS2_RC Tss2_Sys_Clear_Prepare(
1577     TSS2_SYS_CONTEXT *sysContext,
1578     TPMI_RH_CLEAR authHandle);
1579 
1580 TSS2_RC Tss2_Sys_Clear_Complete(
1581     TSS2_SYS_CONTEXT *sysContext);
1582 
1583 TSS2_RC Tss2_Sys_Clear(
1584     TSS2_SYS_CONTEXT *sysContext,
1585     TPMI_RH_CLEAR authHandle,
1586     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1587     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1588 
1589 TSS2_RC Tss2_Sys_ClearControl_Prepare(
1590     TSS2_SYS_CONTEXT *sysContext,
1591     TPMI_RH_CLEAR auth,
1592     TPMI_YES_NO disable);
1593 
1594 TSS2_RC Tss2_Sys_ClearControl_Complete(
1595     TSS2_SYS_CONTEXT *sysContext);
1596 
1597 TSS2_RC Tss2_Sys_ClearControl(
1598     TSS2_SYS_CONTEXT *sysContext,
1599     TPMI_RH_CLEAR auth,
1600     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1601     TPMI_YES_NO disable,
1602     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1603 
1604 TSS2_RC Tss2_Sys_HierarchyChangeAuth_Prepare(
1605     TSS2_SYS_CONTEXT *sysContext,
1606     TPMI_RH_HIERARCHY_AUTH authHandle,
1607     const TPM2B_AUTH *newAuth);
1608 
1609 TSS2_RC Tss2_Sys_HierarchyChangeAuth_Complete(
1610     TSS2_SYS_CONTEXT *sysContext);
1611 
1612 TSS2_RC Tss2_Sys_HierarchyChangeAuth(
1613     TSS2_SYS_CONTEXT *sysContext,
1614     TPMI_RH_HIERARCHY_AUTH authHandle,
1615     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1616     const TPM2B_AUTH *newAuth,
1617     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1618 
1619 TSS2_RC Tss2_Sys_DictionaryAttackLockReset_Prepare(
1620     TSS2_SYS_CONTEXT *sysContext,
1621     TPMI_RH_LOCKOUT lockHandle);
1622 
1623 TSS2_RC Tss2_Sys_DictionaryAttackLockReset_Complete(
1624     TSS2_SYS_CONTEXT *sysContext);
1625 
1626 TSS2_RC Tss2_Sys_DictionaryAttackLockReset(
1627     TSS2_SYS_CONTEXT *sysContext,
1628     TPMI_RH_LOCKOUT lockHandle,
1629     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1630     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1631 
1632 TSS2_RC Tss2_Sys_DictionaryAttackParameters_Prepare(
1633     TSS2_SYS_CONTEXT *sysContext,
1634     TPMI_RH_LOCKOUT lockHandle,
1635     UINT32 newMaxTries,
1636     UINT32 newRecoveryTime,
1637     UINT32 lockoutRecovery);
1638 
1639 TSS2_RC Tss2_Sys_DictionaryAttackParameters_Complete(
1640     TSS2_SYS_CONTEXT *sysContext);
1641 
1642 TSS2_RC Tss2_Sys_DictionaryAttackParameters(
1643     TSS2_SYS_CONTEXT *sysContext,
1644     TPMI_RH_LOCKOUT lockHandle,
1645     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1646     UINT32 newMaxTries,
1647     UINT32 newRecoveryTime,
1648     UINT32 lockoutRecovery,
1649     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1650 
1651 TSS2_RC Tss2_Sys_PP_Commands_Prepare(
1652     TSS2_SYS_CONTEXT *sysContext,
1653     TPMI_RH_PLATFORM auth,
1654     const TPML_CC *setList,
1655     const TPML_CC *clearList);
1656 
1657 TSS2_RC Tss2_Sys_PP_Commands_Complete(
1658     TSS2_SYS_CONTEXT *sysContext);
1659 
1660 TSS2_RC Tss2_Sys_PP_Commands(
1661     TSS2_SYS_CONTEXT *sysContext,
1662     TPMI_RH_PLATFORM auth,
1663     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1664     const TPML_CC *setList,
1665     const TPML_CC *clearList,
1666     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1667 
1668 TSS2_RC Tss2_Sys_SetAlgorithmSet_Prepare(
1669     TSS2_SYS_CONTEXT *sysContext,
1670     TPMI_RH_PLATFORM authHandle,
1671     UINT32 algorithmSet);
1672 
1673 TSS2_RC Tss2_Sys_SetAlgorithmSet_Complete(
1674     TSS2_SYS_CONTEXT *sysContext);
1675 
1676 TSS2_RC Tss2_Sys_SetAlgorithmSet(
1677     TSS2_SYS_CONTEXT *sysContext,
1678     TPMI_RH_PLATFORM authHandle,
1679     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1680     UINT32 algorithmSet,
1681     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1682 
1683 TSS2_RC Tss2_Sys_FieldUpgradeStart_Prepare(
1684     TSS2_SYS_CONTEXT *sysContext,
1685     TPMI_RH_PLATFORM authorization,
1686     TPMI_DH_OBJECT keyHandle,
1687     TPM2B_DIGEST const *fuDigest,
1688     TPMT_SIGNATURE const *manifestSignature);
1689 
1690 TSS2_RC Tss2_Sys_FieldUpgradeStart_Complete(
1691     TSS2_SYS_CONTEXT *sysContext);
1692 
1693 TSS2_RC Tss2_Sys_FieldUpgradeStart(
1694     TSS2_SYS_CONTEXT *sysContext,
1695     TPMI_RH_PLATFORM authorization,
1696     TPMI_DH_OBJECT keyHandle,
1697     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1698     TPM2B_DIGEST const *fuDigest,
1699     TPMT_SIGNATURE const *manifestSignature,
1700     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1701 
1702 TSS2_RC Tss2_Sys_FieldUpgradeData_Prepare(
1703     TSS2_SYS_CONTEXT *sysContext,
1704     TPM2B_MAX_BUFFER const *fuData);
1705 
1706 TSS2_RC Tss2_Sys_FieldUpgradeData_Complete(
1707     TSS2_SYS_CONTEXT *sysContext,
1708     TPMT_HA *nextDigest,
1709     TPMT_HA *firstDigest);
1710 
1711 TSS2_RC Tss2_Sys_FieldUpgradeData(
1712     TSS2_SYS_CONTEXT *sysContext,
1713     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1714     TPM2B_MAX_BUFFER const *fuData,
1715     TPMT_HA *nextDigest,
1716     TPMT_HA *firstDigest,
1717     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1718 
1719 TSS2_RC Tss2_Sys_FirmwareRead_Prepare(
1720     TSS2_SYS_CONTEXT *sysContext,
1721     UINT32 sequenceNumber);
1722 
1723 TSS2_RC Tss2_Sys_FirmwareRead_Complete(
1724     TSS2_SYS_CONTEXT *sysContext,
1725     TPM2B_MAX_BUFFER *fuData);
1726 
1727 TSS2_RC Tss2_Sys_FirmwareRead(
1728     TSS2_SYS_CONTEXT *sysContext,
1729     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1730     UINT32 sequenceNumber,
1731     TPM2B_MAX_BUFFER *fuData,
1732     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1733 
1734 TSS2_RC Tss2_Sys_ContextSave_Prepare(
1735     TSS2_SYS_CONTEXT *sysContext,
1736     TPMI_DH_CONTEXT saveHandle);
1737 
1738 TSS2_RC Tss2_Sys_ContextSave_Complete(
1739     TSS2_SYS_CONTEXT *sysContext,
1740     TPMS_CONTEXT *context);
1741 
1742 TSS2_RC Tss2_Sys_ContextSave(
1743     TSS2_SYS_CONTEXT *sysContext,
1744     TPMI_DH_CONTEXT saveHandle,
1745     TPMS_CONTEXT *context);
1746 
1747 TSS2_RC Tss2_Sys_ContextLoad_Prepare(
1748     TSS2_SYS_CONTEXT *sysContext,
1749     const TPMS_CONTEXT *context);
1750 
1751 TSS2_RC Tss2_Sys_ContextLoad_Complete(
1752     TSS2_SYS_CONTEXT *sysContext,
1753     TPMI_DH_CONTEXT *loadedHandle);
1754 
1755 TSS2_RC Tss2_Sys_ContextLoad(
1756     TSS2_SYS_CONTEXT *sysContext,
1757     const TPMS_CONTEXT *context,
1758     TPMI_DH_CONTEXT *loadedHandle);
1759 
1760 TSS2_RC Tss2_Sys_FlushContext_Prepare(
1761     TSS2_SYS_CONTEXT *sysContext,
1762     TPMI_DH_CONTEXT flushHandle);
1763 
1764 TSS2_RC Tss2_Sys_FlushContext_Complete(
1765     TSS2_SYS_CONTEXT *sysContext);
1766 
1767 TSS2_RC Tss2_Sys_FlushContext(
1768     TSS2_SYS_CONTEXT *sysContext,
1769     TPMI_DH_CONTEXT flushHandle);
1770 
1771 TSS2_RC Tss2_Sys_EvictControl_Prepare(
1772     TSS2_SYS_CONTEXT *sysContext,
1773     TPMI_RH_PROVISION auth,
1774     TPMI_DH_OBJECT objectHandle,
1775     TPMI_DH_PERSISTENT persistentHandle);
1776 
1777 TSS2_RC Tss2_Sys_EvictControl_Complete(
1778     TSS2_SYS_CONTEXT *sysContext);
1779 
1780 TSS2_RC Tss2_Sys_EvictControl(
1781     TSS2_SYS_CONTEXT *sysContext,
1782     TPMI_RH_PROVISION auth,
1783     TPMI_DH_OBJECT objectHandle,
1784     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1785     TPMI_DH_PERSISTENT persistentHandle,
1786     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1787 
1788 TSS2_RC Tss2_Sys_ReadClock_Prepare(
1789     TSS2_SYS_CONTEXT *sysContext);
1790 
1791 TSS2_RC Tss2_Sys_ReadClock_Complete(
1792     TSS2_SYS_CONTEXT *sysContext,
1793     TPMS_TIME_INFO *currentTime);
1794 
1795 TSS2_RC Tss2_Sys_ReadClock(
1796     TSS2_SYS_CONTEXT *sysContext,
1797     TPMS_TIME_INFO *currentTime);
1798 
1799 TSS2_RC Tss2_Sys_ClockSet_Prepare(
1800     TSS2_SYS_CONTEXT *sysContext,
1801     TPMI_RH_PROVISION auth,
1802     UINT64 newTime);
1803 
1804 TSS2_RC Tss2_Sys_ClockSet_Complete(
1805     TSS2_SYS_CONTEXT *sysContext);
1806 
1807 TSS2_RC Tss2_Sys_ClockSet(
1808     TSS2_SYS_CONTEXT *sysContext,
1809     TPMI_RH_PROVISION auth,
1810     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1811     UINT64 newTime,
1812     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1813 
1814 TSS2_RC Tss2_Sys_ClockRateAdjust_Prepare(
1815     TSS2_SYS_CONTEXT *sysContext,
1816     TPMI_RH_PROVISION auth,
1817     TPM2_CLOCK_ADJUST rateAdjust);
1818 
1819 TSS2_RC Tss2_Sys_ClockRateAdjust_Complete(
1820     TSS2_SYS_CONTEXT *sysContext);
1821 
1822 TSS2_RC Tss2_Sys_ClockRateAdjust(
1823     TSS2_SYS_CONTEXT *sysContext,
1824     TPMI_RH_PROVISION auth,
1825     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1826     TPM2_CLOCK_ADJUST rateAdjust,
1827     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1828 
1829 TSS2_RC Tss2_Sys_GetCapability_Prepare(
1830     TSS2_SYS_CONTEXT *sysContext,
1831     TPM2_CAP capability,
1832     UINT32 property,
1833     UINT32 propertyCount);
1834 
1835 TSS2_RC Tss2_Sys_GetCapability_Complete(
1836     TSS2_SYS_CONTEXT *sysContext,
1837     TPMI_YES_NO *moreData,
1838     TPMS_CAPABILITY_DATA *capabilityData);
1839 
1840 TSS2_RC Tss2_Sys_GetCapability(
1841     TSS2_SYS_CONTEXT *sysContext,
1842     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1843     TPM2_CAP capability,
1844     UINT32 property,
1845     UINT32 propertyCount,
1846     TPMI_YES_NO *moreData,
1847     TPMS_CAPABILITY_DATA *capabilityData,
1848     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1849 
1850 TSS2_RC Tss2_Sys_TestParms_Prepare(
1851     TSS2_SYS_CONTEXT *sysContext,
1852     const TPMT_PUBLIC_PARMS *parameters);
1853 
1854 TSS2_RC Tss2_Sys_TestParms_Complete(
1855     TSS2_SYS_CONTEXT *sysContext);
1856 
1857 TSS2_RC Tss2_Sys_TestParms(
1858     TSS2_SYS_CONTEXT *sysContext,
1859     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1860     const TPMT_PUBLIC_PARMS *parameters,
1861     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1862 
1863 TSS2_RC Tss2_Sys_NV_DefineSpace_Prepare(
1864     TSS2_SYS_CONTEXT *sysContext,
1865     TPMI_RH_PROVISION authHandle,
1866     const TPM2B_AUTH *auth,
1867     const TPM2B_NV_PUBLIC *publicInfo);
1868 
1869 TSS2_RC Tss2_Sys_NV_DefineSpace_Complete(
1870     TSS2_SYS_CONTEXT *sysContext);
1871 
1872 TSS2_RC Tss2_Sys_NV_DefineSpace(
1873     TSS2_SYS_CONTEXT *sysContext,
1874     TPMI_RH_PROVISION authHandle,
1875     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1876     const TPM2B_AUTH *auth,
1877     const TPM2B_NV_PUBLIC *publicInfo,
1878     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1879 
1880 TSS2_RC Tss2_Sys_NV_UndefineSpace_Prepare(
1881     TSS2_SYS_CONTEXT *sysContext,
1882     TPMI_RH_PROVISION authHandle,
1883     TPMI_RH_NV_INDEX nvIndex);
1884 
1885 TSS2_RC Tss2_Sys_NV_UndefineSpace_Complete(
1886     TSS2_SYS_CONTEXT *sysContext);
1887 
1888 TSS2_RC Tss2_Sys_NV_UndefineSpace(
1889     TSS2_SYS_CONTEXT *sysContext,
1890     TPMI_RH_PROVISION authHandle,
1891     TPMI_RH_NV_INDEX nvIndex,
1892     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1893     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1894 
1895 TSS2_RC Tss2_Sys_NV_UndefineSpaceSpecial_Prepare(
1896     TSS2_SYS_CONTEXT *sysContext,
1897     TPMI_RH_NV_INDEX nvIndex,
1898     TPMI_RH_PLATFORM platform);
1899 
1900 TSS2_RC Tss2_Sys_NV_UndefineSpaceSpecial_Complete(
1901     TSS2_SYS_CONTEXT *sysContext);
1902 
1903 TSS2_RC Tss2_Sys_NV_UndefineSpaceSpecial(
1904     TSS2_SYS_CONTEXT *sysContext,
1905     TPMI_RH_NV_INDEX nvIndex,
1906     TPMI_RH_PLATFORM platform,
1907     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1908     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1909 
1910 TSS2_RC Tss2_Sys_NV_ReadPublic_Prepare(
1911     TSS2_SYS_CONTEXT *sysContext,
1912     TPMI_RH_NV_INDEX nvIndex);
1913 
1914 TSS2_RC Tss2_Sys_NV_ReadPublic_Complete(
1915     TSS2_SYS_CONTEXT *sysContext,
1916     TPM2B_NV_PUBLIC *nvPublic,
1917     TPM2B_NAME *nvName);
1918 
1919 TSS2_RC Tss2_Sys_NV_ReadPublic(
1920     TSS2_SYS_CONTEXT *sysContext,
1921     TPMI_RH_NV_INDEX nvIndex,
1922     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1923     TPM2B_NV_PUBLIC *nvPublic,
1924     TPM2B_NAME *nvName,
1925     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1926 
1927 TSS2_RC Tss2_Sys_NV_Write_Prepare(
1928     TSS2_SYS_CONTEXT *sysContext,
1929     TPMI_RH_NV_AUTH authHandle,
1930     TPMI_RH_NV_INDEX nvIndex,
1931     const TPM2B_MAX_NV_BUFFER *data,
1932     UINT16 offset);
1933 
1934 TSS2_RC Tss2_Sys_NV_Write_Complete(
1935     TSS2_SYS_CONTEXT *sysContext);
1936 
1937 TSS2_RC Tss2_Sys_NV_Write(
1938     TSS2_SYS_CONTEXT *sysContext,
1939     TPMI_RH_NV_AUTH authHandle,
1940     TPMI_RH_NV_INDEX nvIndex,
1941     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1942     const TPM2B_MAX_NV_BUFFER *data,
1943     UINT16 offset,
1944     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1945 
1946 TSS2_RC Tss2_Sys_NV_Increment_Prepare(
1947     TSS2_SYS_CONTEXT *sysContext,
1948     TPMI_RH_NV_AUTH authHandle,
1949     TPMI_RH_NV_INDEX nvIndex);
1950 
1951 TSS2_RC Tss2_Sys_NV_Increment_Complete(
1952     TSS2_SYS_CONTEXT *sysContext);
1953 
1954 TSS2_RC Tss2_Sys_NV_Increment(
1955     TSS2_SYS_CONTEXT *sysContext,
1956     TPMI_RH_NV_AUTH authHandle,
1957     TPMI_RH_NV_INDEX nvIndex,
1958     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1959     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1960 
1961 TSS2_RC Tss2_Sys_NV_Extend_Prepare(
1962     TSS2_SYS_CONTEXT *sysContext,
1963     TPMI_RH_NV_AUTH authHandle,
1964     TPMI_RH_NV_INDEX nvIndex,
1965     const TPM2B_MAX_NV_BUFFER *data);
1966 
1967 TSS2_RC Tss2_Sys_NV_Extend_Complete(
1968     TSS2_SYS_CONTEXT *sysContext);
1969 
1970 TSS2_RC Tss2_Sys_NV_Extend(
1971     TSS2_SYS_CONTEXT *sysContext,
1972     TPMI_RH_NV_AUTH authHandle,
1973     TPMI_RH_NV_INDEX nvIndex,
1974     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1975     const TPM2B_MAX_NV_BUFFER *data,
1976     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1977 
1978 TSS2_RC Tss2_Sys_NV_SetBits_Prepare(
1979     TSS2_SYS_CONTEXT *sysContext,
1980     TPMI_RH_NV_AUTH authHandle,
1981     TPMI_RH_NV_INDEX nvIndex,
1982     UINT64 bits);
1983 
1984 TSS2_RC Tss2_Sys_NV_SetBits_Complete(
1985     TSS2_SYS_CONTEXT *sysContext);
1986 
1987 TSS2_RC Tss2_Sys_NV_SetBits(
1988     TSS2_SYS_CONTEXT *sysContext,
1989     TPMI_RH_NV_AUTH authHandle,
1990     TPMI_RH_NV_INDEX nvIndex,
1991     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
1992     UINT64 bits,
1993     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
1994 
1995 TSS2_RC Tss2_Sys_NV_WriteLock_Prepare(
1996     TSS2_SYS_CONTEXT *sysContext,
1997     TPMI_RH_NV_AUTH authHandle,
1998     TPMI_RH_NV_INDEX nvIndex);
1999 
2000 TSS2_RC Tss2_Sys_NV_WriteLock_Complete(
2001     TSS2_SYS_CONTEXT *sysContext);
2002 
2003 TSS2_RC Tss2_Sys_NV_WriteLock(
2004     TSS2_SYS_CONTEXT *sysContext,
2005     TPMI_RH_NV_AUTH authHandle,
2006     TPMI_RH_NV_INDEX nvIndex,
2007     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
2008     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
2009 
2010 TSS2_RC Tss2_Sys_NV_GlobalWriteLock_Prepare(
2011     TSS2_SYS_CONTEXT *sysContext,
2012     TPMI_RH_PROVISION authHandle);
2013 
2014 TSS2_RC Tss2_Sys_NV_GlobalWriteLock_Complete(
2015     TSS2_SYS_CONTEXT *sysContext);
2016 
2017 TSS2_RC Tss2_Sys_NV_GlobalWriteLock(
2018     TSS2_SYS_CONTEXT *sysContext,
2019     TPMI_RH_PROVISION authHandle,
2020     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
2021     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
2022 
2023 TSS2_RC Tss2_Sys_NV_Read_Prepare(
2024     TSS2_SYS_CONTEXT *sysContext,
2025     TPMI_RH_NV_AUTH authHandle,
2026     TPMI_RH_NV_INDEX nvIndex,
2027     UINT16 size,
2028     UINT16 offset);
2029 
2030 TSS2_RC Tss2_Sys_NV_Read_Complete(
2031     TSS2_SYS_CONTEXT *sysContext,
2032     TPM2B_MAX_NV_BUFFER *data);
2033 
2034 TSS2_RC Tss2_Sys_NV_Read(
2035     TSS2_SYS_CONTEXT *sysContext,
2036     TPMI_RH_NV_AUTH authHandle,
2037     TPMI_RH_NV_INDEX nvIndex,
2038     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
2039     UINT16 size,
2040     UINT16 offset,
2041     TPM2B_MAX_NV_BUFFER *data,
2042     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
2043 
2044 TSS2_RC Tss2_Sys_NV_ReadLock_Prepare(
2045     TSS2_SYS_CONTEXT *sysContext,
2046     TPMI_RH_NV_AUTH authHandle,
2047     TPMI_RH_NV_INDEX nvIndex);
2048 
2049 TSS2_RC Tss2_Sys_NV_ReadLock_Complete(
2050     TSS2_SYS_CONTEXT *sysContext);
2051 
2052 TSS2_RC Tss2_Sys_NV_ReadLock(
2053     TSS2_SYS_CONTEXT *sysContext,
2054     TPMI_RH_NV_AUTH authHandle,
2055     TPMI_RH_NV_INDEX nvIndex,
2056     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
2057     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
2058 
2059 TSS2_RC Tss2_Sys_NV_ChangeAuth_Prepare(
2060     TSS2_SYS_CONTEXT *sysContext,
2061     TPMI_RH_NV_INDEX nvIndex,
2062     const TPM2B_AUTH *newAuth);
2063 
2064 TSS2_RC Tss2_Sys_NV_ChangeAuth_Complete(
2065     TSS2_SYS_CONTEXT *sysContext);
2066 
2067 TSS2_RC Tss2_Sys_NV_ChangeAuth(
2068     TSS2_SYS_CONTEXT *sysContext,
2069     TPMI_RH_NV_INDEX nvIndex,
2070     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
2071     const TPM2B_AUTH *newAuth,
2072     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
2073 
2074 TSS2_RC Tss2_Sys_NV_Certify_Prepare(
2075     TSS2_SYS_CONTEXT *sysContext,
2076     TPMI_DH_OBJECT signHandle,
2077     TPMI_RH_NV_AUTH authHandle,
2078     TPMI_RH_NV_INDEX nvIndex,
2079     const TPM2B_DATA *qualifyingData,
2080     const TPMT_SIG_SCHEME *inScheme,
2081     UINT16 size,
2082     UINT16 offset);
2083 
2084 TSS2_RC Tss2_Sys_NV_Certify_Complete(
2085     TSS2_SYS_CONTEXT *sysContext,
2086     TPM2B_ATTEST *certifyInfo,
2087     TPMT_SIGNATURE *signature);
2088 
2089 TSS2_RC Tss2_Sys_NV_Certify(
2090     TSS2_SYS_CONTEXT *sysContext,
2091     TPMI_DH_OBJECT signHandle,
2092     TPMI_RH_NV_AUTH authHandle,
2093     TPMI_RH_NV_INDEX nvIndex,
2094     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
2095     const TPM2B_DATA *qualifyingData,
2096     const TPMT_SIG_SCHEME *inScheme,
2097     UINT16 size,
2098     UINT16 offset,
2099     TPM2B_ATTEST *certifyInfo,
2100     TPMT_SIGNATURE *signature,
2101     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
2102 
2103 TSS2_RC Tss2_Sys_Vendor_TCG_Test_Prepare(
2104     TSS2_SYS_CONTEXT *sysContext,
2105     const TPM2B_DATA *inputData);
2106 
2107 TSS2_RC Tss2_Sys_Vendor_TCG_Test_Complete(
2108     TSS2_SYS_CONTEXT *sysContext,
2109     TPM2B_DATA *outputData);
2110 
2111 TSS2_RC Tss2_Sys_Vendor_TCG_Test(
2112     TSS2_SYS_CONTEXT *sysContext,
2113     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
2114     const TPM2B_DATA *inputData,
2115     TPM2B_DATA *outputData,
2116     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
2117 
2118 TSS2_RC Tss2_Sys_AC_GetCapability_Prepare(
2119     TSS2_SYS_CONTEXT *sysContext,
2120     TPMI_RH_AC ac,
2121     TPM_AT capability,
2122     UINT32 count);
2123 
2124 TSS2_RC Tss2_Sys_AC_GetCapability_Complete(
2125     TSS2_SYS_CONTEXT *sysContext,
2126     TPMI_YES_NO *moreData,
2127     TPML_AC_CAPABILITIES *capabilityData);
2128 
2129 TSS2_RC Tss2_Sys_AC_GetCapability(
2130     TSS2_SYS_CONTEXT *sysContext,
2131     TPMI_RH_AC ac,
2132     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
2133     TPM_AT capability,
2134     UINT32 count,
2135     TPMI_YES_NO *moreData,
2136     TPML_AC_CAPABILITIES *capabilityData,
2137     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
2138 
2139 TSS2_RC Tss2_Sys_AC_Send_Prepare(
2140     TSS2_SYS_CONTEXT *sysContext,
2141     TPMI_DH_OBJECT sendObject,
2142     TPMI_RH_NV_AUTH authHandle,
2143     TPMI_RH_AC ac,
2144     TPM2B_MAX_BUFFER *acDataIn);
2145 
2146 TSS2_RC Tss2_Sys_AC_Send_Complete(
2147     TSS2_SYS_CONTEXT *sysContext,
2148     TPMS_AC_OUTPUT *acDataOut);
2149 
2150 TSS2_RC Tss2_Sys_AC_Send(
2151     TSS2_SYS_CONTEXT *sysContext,
2152     TPMI_DH_OBJECT sendObject,
2153     TPMI_RH_NV_AUTH authHandle,
2154     TPMI_RH_AC ac,
2155     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
2156     TPM2B_MAX_BUFFER *acDataIn,
2157     TPMS_AC_OUTPUT *acDataOut,
2158     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
2159 
2160 TSS2_RC Tss2_Sys_Policy_AC_SendSelect_Prepare(
2161     TSS2_SYS_CONTEXT *sysContext,
2162     TPMI_SH_POLICY policySession,
2163     TPM2B_NAME *objectName,
2164     TPM2B_NAME *authHandleName,
2165     TPM2B_NAME *acName,
2166     TPMI_YES_NO includeObject);
2167 
2168 TSS2_RC Tss2_Sys_Policy_AC_SendSelect_Complete(
2169     TSS2_SYS_CONTEXT *sysContext);
2170 
2171 TSS2_RC Tss2_Sys_Policy_AC_SendSelect(
2172     TSS2_SYS_CONTEXT *sysContext,
2173     TPMI_SH_POLICY policySession,
2174     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
2175     TPM2B_NAME *objectName,
2176     TPM2B_NAME *authHandleName,
2177     TPM2B_NAME *acName,
2178     TPMI_YES_NO includeObject,
2179     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
2180 
2181 TSS2_RC Tss2_Sys_PolicyTemplate_Prepare(
2182     TSS2_SYS_CONTEXT *sysContext,
2183     TPMI_SH_POLICY policySession,
2184     const TPM2B_DIGEST *templateHash);
2185 
2186 TSS2_RC Tss2_Sys_PolicyTemplate_Complete(
2187     TSS2_SYS_CONTEXT *sysContext);
2188 
2189 TSS2_RC Tss2_Sys_PolicyTemplate(
2190     TSS2_SYS_CONTEXT *sysContext,
2191     TPMI_SH_POLICY policySession,
2192     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
2193     const TPM2B_DIGEST *templateHash,
2194     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
2195 
2196 TSS2_RC Tss2_Sys_CreateLoaded_Prepare(
2197     TSS2_SYS_CONTEXT *sysContext,
2198     TPMI_RH_HIERARCHY parentHandle,
2199     const TPM2B_SENSITIVE_CREATE *inSensitive,
2200     const TPM2B_TEMPLATE *inPublic);
2201 
2202 TSS2_RC Tss2_Sys_CreateLoaded_Complete(
2203     TSS2_SYS_CONTEXT *sysContext,
2204     TPM2_HANDLE *objectHandle,
2205     TPM2B_PRIVATE *outPrivate,
2206     TPM2B_PUBLIC *outPublic,
2207     TPM2B_NAME *name);
2208 
2209 TSS2_RC Tss2_Sys_CreateLoaded(
2210     TSS2_SYS_CONTEXT *sysContext,
2211     TPMI_RH_HIERARCHY parentHandle,
2212     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
2213     const TPM2B_SENSITIVE_CREATE *inSensitive,
2214     const TPM2B_TEMPLATE *inPublic,
2215     TPM2_HANDLE *objectHandle,
2216     TPM2B_PRIVATE *outPrivate,
2217     TPM2B_PUBLIC *outPublic,
2218     TPM2B_NAME *name,
2219     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
2220 
2221 TSS2_RC Tss2_Sys_PolicyAuthorizeNV_Prepare(
2222     TSS2_SYS_CONTEXT *sysContext,
2223     TPMI_RH_NV_AUTH authHandle,
2224     TPMI_RH_NV_INDEX nvIndex,
2225     TPMI_SH_POLICY policySession);
2226 
2227 TSS2_RC Tss2_Sys_PolicyAuthorizeNV_Complete(
2228     TSS2_SYS_CONTEXT *sysContext);
2229 
2230 TSS2_RC Tss2_Sys_PolicyAuthorizeNV(
2231     TSS2_SYS_CONTEXT *sysContext,
2232     TPMI_RH_NV_AUTH authHandle,
2233     TPMI_RH_NV_INDEX nvIndex,
2234     TPMI_SH_POLICY policySession,
2235     TSS2L_SYS_AUTH_COMMAND const *cmdAuthsArray,
2236     TSS2L_SYS_AUTH_RESPONSE *rspAuthsArray);
2237 
2238 #ifdef __cplusplus
2239 }
2240 #endif
2241 #endif /* TSS2_SYS_H */
2242