xref: /aosp_15_r20/external/ms-tpm-20-ref/TPMCmd/tpm/include/InternalRoutines.h (revision 5c591343844d1f9da7da26467c4bf7efc8a7a413)
1*5c591343SA. Cody Schuffelen /* Microsoft Reference Implementation for TPM 2.0
2*5c591343SA. Cody Schuffelen  *
3*5c591343SA. Cody Schuffelen  *  The copyright in this software is being made available under the BSD License,
4*5c591343SA. Cody Schuffelen  *  included below. This software may be subject to other third party and
5*5c591343SA. Cody Schuffelen  *  contributor rights, including patent rights, and no such rights are granted
6*5c591343SA. Cody Schuffelen  *  under this license.
7*5c591343SA. Cody Schuffelen  *
8*5c591343SA. Cody Schuffelen  *  Copyright (c) Microsoft Corporation
9*5c591343SA. Cody Schuffelen  *
10*5c591343SA. Cody Schuffelen  *  All rights reserved.
11*5c591343SA. Cody Schuffelen  *
12*5c591343SA. Cody Schuffelen  *  BSD License
13*5c591343SA. Cody Schuffelen  *
14*5c591343SA. Cody Schuffelen  *  Redistribution and use in source and binary forms, with or without modification,
15*5c591343SA. Cody Schuffelen  *  are permitted provided that the following conditions are met:
16*5c591343SA. Cody Schuffelen  *
17*5c591343SA. Cody Schuffelen  *  Redistributions of source code must retain the above copyright notice, this list
18*5c591343SA. Cody Schuffelen  *  of conditions and the following disclaimer.
19*5c591343SA. Cody Schuffelen  *
20*5c591343SA. Cody Schuffelen  *  Redistributions in binary form must reproduce the above copyright notice, this
21*5c591343SA. Cody Schuffelen  *  list of conditions and the following disclaimer in the documentation and/or
22*5c591343SA. Cody Schuffelen  *  other materials provided with the distribution.
23*5c591343SA. Cody Schuffelen  *
24*5c591343SA. Cody Schuffelen  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS""
25*5c591343SA. Cody Schuffelen  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26*5c591343SA. Cody Schuffelen  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27*5c591343SA. Cody Schuffelen  *  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
28*5c591343SA. Cody Schuffelen  *  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29*5c591343SA. Cody Schuffelen  *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30*5c591343SA. Cody Schuffelen  *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
31*5c591343SA. Cody Schuffelen  *  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32*5c591343SA. Cody Schuffelen  *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33*5c591343SA. Cody Schuffelen  *  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34*5c591343SA. Cody Schuffelen  */
35*5c591343SA. Cody Schuffelen #ifndef     INTERNAL_ROUTINES_H
36*5c591343SA. Cody Schuffelen #define     INTERNAL_ROUTINES_H
37*5c591343SA. Cody Schuffelen 
38*5c591343SA. Cody Schuffelen #if !defined _LIB_SUPPORT_H_ && !defined _TPM_H_
39*5c591343SA. Cody Schuffelen #error "Should not be called"
40*5c591343SA. Cody Schuffelen #endif
41*5c591343SA. Cody Schuffelen 
42*5c591343SA. Cody Schuffelen // DRTM functions
43*5c591343SA. Cody Schuffelen #include "_TPM_Hash_Start_fp.h"
44*5c591343SA. Cody Schuffelen #include "_TPM_Hash_Data_fp.h"
45*5c591343SA. Cody Schuffelen #include "_TPM_Hash_End_fp.h"
46*5c591343SA. Cody Schuffelen 
47*5c591343SA. Cody Schuffelen // Internal subsystem functions
48*5c591343SA. Cody Schuffelen #include "Object_fp.h"
49*5c591343SA. Cody Schuffelen #include "Context_spt_fp.h"
50*5c591343SA. Cody Schuffelen #include "Object_spt_fp.h"
51*5c591343SA. Cody Schuffelen #include "Entity_fp.h"
52*5c591343SA. Cody Schuffelen #include "Session_fp.h"
53*5c591343SA. Cody Schuffelen #include "Hierarchy_fp.h"
54*5c591343SA. Cody Schuffelen #include "NvReserved_fp.h"
55*5c591343SA. Cody Schuffelen #include "NvDynamic_fp.h"
56*5c591343SA. Cody Schuffelen #include "NV_spt_fp.h"
57*5c591343SA. Cody Schuffelen #include "ACT_spt_fp.h"
58*5c591343SA. Cody Schuffelen #include "PCR_fp.h"
59*5c591343SA. Cody Schuffelen #include "DA_fp.h"
60*5c591343SA. Cody Schuffelen #include "TpmFail_fp.h"
61*5c591343SA. Cody Schuffelen #include "SessionProcess_fp.h"
62*5c591343SA. Cody Schuffelen 
63*5c591343SA. Cody Schuffelen // Internal support functions
64*5c591343SA. Cody Schuffelen #include "CommandCodeAttributes_fp.h"
65*5c591343SA. Cody Schuffelen #include "Marshal.h"
66*5c591343SA. Cody Schuffelen #include "Time_fp.h"
67*5c591343SA. Cody Schuffelen #include "Locality_fp.h"
68*5c591343SA. Cody Schuffelen #include "PP_fp.h"
69*5c591343SA. Cody Schuffelen #include "CommandAudit_fp.h"
70*5c591343SA. Cody Schuffelen #include "Manufacture_fp.h"
71*5c591343SA. Cody Schuffelen #include "Handle_fp.h"
72*5c591343SA. Cody Schuffelen #include "Power_fp.h"
73*5c591343SA. Cody Schuffelen #include "Response_fp.h"
74*5c591343SA. Cody Schuffelen #include "CommandDispatcher_fp.h"
75*5c591343SA. Cody Schuffelen 
76*5c591343SA. Cody Schuffelen #ifdef CC_AC_Send
77*5c591343SA. Cody Schuffelen #   include "AC_spt_fp.h"
78*5c591343SA. Cody Schuffelen #endif // CC_AC_Send
79*5c591343SA. Cody Schuffelen 
80*5c591343SA. Cody Schuffelen // Miscellaneous
81*5c591343SA. Cody Schuffelen #include "Bits_fp.h"
82*5c591343SA. Cody Schuffelen #include "AlgorithmCap_fp.h"
83*5c591343SA. Cody Schuffelen #include "PropertyCap_fp.h"
84*5c591343SA. Cody Schuffelen #include "IoBuffers_fp.h"
85*5c591343SA. Cody Schuffelen #include "Memory_fp.h"
86*5c591343SA. Cody Schuffelen #include "ResponseCodeProcessing_fp.h"
87*5c591343SA. Cody Schuffelen 
88*5c591343SA. Cody Schuffelen // Internal cryptographic functions
89*5c591343SA. Cody Schuffelen #include "BnConvert_fp.h"
90*5c591343SA. Cody Schuffelen #include "BnMath_fp.h"
91*5c591343SA. Cody Schuffelen #include "BnMemory_fp.h"
92*5c591343SA. Cody Schuffelen #include "Ticket_fp.h"
93*5c591343SA. Cody Schuffelen #include "CryptUtil_fp.h"
94*5c591343SA. Cody Schuffelen #include "CryptHash_fp.h"
95*5c591343SA. Cody Schuffelen #include "CryptSym_fp.h"
96*5c591343SA. Cody Schuffelen #include "CryptDes_fp.h"
97*5c591343SA. Cody Schuffelen #include "CryptPrime_fp.h"
98*5c591343SA. Cody Schuffelen #include "CryptRand_fp.h"
99*5c591343SA. Cody Schuffelen #include "CryptSelfTest_fp.h"
100*5c591343SA. Cody Schuffelen #include "MathOnByteBuffers_fp.h"
101*5c591343SA. Cody Schuffelen #include "CryptSym_fp.h"
102*5c591343SA. Cody Schuffelen #include "AlgorithmTests_fp.h"
103*5c591343SA. Cody Schuffelen 
104*5c591343SA. Cody Schuffelen #if ALG_RSA
105*5c591343SA. Cody Schuffelen #include "CryptRsa_fp.h"
106*5c591343SA. Cody Schuffelen #include "CryptPrimeSieve_fp.h"
107*5c591343SA. Cody Schuffelen #endif
108*5c591343SA. Cody Schuffelen 
109*5c591343SA. Cody Schuffelen #if ALG_ECC
110*5c591343SA. Cody Schuffelen #include "CryptEccMain_fp.h"
111*5c591343SA. Cody Schuffelen #include "CryptEccSignature_fp.h"
112*5c591343SA. Cody Schuffelen #include "CryptEccKeyExchange_fp.h"
113*5c591343SA. Cody Schuffelen #include "CryptEccCrypt_fp.h"
114*5c591343SA. Cody Schuffelen #endif
115*5c591343SA. Cody Schuffelen 
116*5c591343SA. Cody Schuffelen #if CC_MAC || CC_MAC_Start
117*5c591343SA. Cody Schuffelen #   include "CryptSmac_fp.h"
118*5c591343SA. Cody Schuffelen #   if  ALG_CMAC
119*5c591343SA. Cody Schuffelen #       include "CryptCmac_fp.h"
120*5c591343SA. Cody Schuffelen #   endif
121*5c591343SA. Cody Schuffelen #endif
122*5c591343SA. Cody Schuffelen 
123*5c591343SA. Cody Schuffelen // Support library
124*5c591343SA. Cody Schuffelen #include "SupportLibraryFunctionPrototypes_fp.h"
125*5c591343SA. Cody Schuffelen 
126*5c591343SA. Cody Schuffelen // Linkage to platform functions
127*5c591343SA. Cody Schuffelen #include "Platform_fp.h"
128*5c591343SA. Cody Schuffelen 
129*5c591343SA. Cody Schuffelen #endif
130