1*0861b331Schristos 
2*0861b331Schristos /*
3*0861b331Schristos  * Licensed Materials - Property of IBM
4*0861b331Schristos  *
5*0861b331Schristos  * trousers - An open source TCG Software Stack
6*0861b331Schristos  *
7*0861b331Schristos  * (C) Copyright International Business Machines Corp. 2006
8*0861b331Schristos  *
9*0861b331Schristos  */
10*0861b331Schristos 
11*0861b331Schristos #ifndef PLATFORM_H_
12*0861b331Schristos #define PLATFORM_H_
13*0861b331Schristos 
14*0861b331Schristos #include "bi.h"
15*0861b331Schristos #include "daa_structs.h"
16*0861b331Schristos 
17*0861b331Schristos #if 0
18*0861b331Schristos // for RSA key
19*0861b331Schristos #include <openssl/rsa.h>
20*0861b331Schristos 
21*0861b331Schristos TSPICALL
22*0861b331Schristos Tspi_TPM_DAA_Sign_internal(TSS_HDAA hDAA,	// in
23*0861b331Schristos 			TSS_HTPM hTPM,	// in
24*0861b331Schristos 			TSS_HKEY hDaaCredential,	// in
25*0861b331Schristos 			TSS_DAA_SELECTED_ATTRIB revealAttributes,	// in
26*0861b331Schristos 			UINT32 verifierBaseNameLength,	// in
27*0861b331Schristos 			BYTE* verifierBaseName,	// in
28*0861b331Schristos 			UINT32 verifierNonceLength,	// in
29*0861b331Schristos 			BYTE* verifierNonce,	// in
30*0861b331Schristos 			TSS_DAA_SIGN_DATA signData,	// in
31*0861b331Schristos 			TSS_DAA_SIGNATURE* daaSignature	// out
32*0861b331Schristos );
33*0861b331Schristos 
34*0861b331Schristos TSS_RESULT
35*0861b331Schristos Tspi_TPM_DAA_JoinInit_internal(TSS_HDAA hDAA,
36*0861b331Schristos 				TSS_HTPM hTPM,
37*0861b331Schristos 				int daa_counter,
38*0861b331Schristos 				TSS_DAA_PK *issuer_pk,
39*0861b331Schristos 				int issuer_authentication_PKLengh,
40*0861b331Schristos 				RSA **issuer_authentication_PK,
41*0861b331Schristos 				int issuer_authentication_PK_signaturesLength,
42*0861b331Schristos 				BYTE **issuer_authentication_PK_signatures,
43*0861b331Schristos 				int *capital_UprimeLength,
44*0861b331Schristos 				BYTE **capital_Uprime,
45*0861b331Schristos 				TSS_DAA_IDENTITY_PROOF *identity_proof,
46*0861b331Schristos 				TSS_DAA_JOIN_SESSION *joinSession
47*0861b331Schristos );
48*0861b331Schristos 
49*0861b331Schristos TSPICALL Tspi_TPM_DAA_JoinCreateDaaPubKey_internal
50*0861b331Schristos (
51*0861b331Schristos 	TSS_HDAA hDAA,	// in
52*0861b331Schristos 	TSS_HTPM hTPM,	// in
53*0861b331Schristos 	UINT32 authenticationChallengeLength,	// in
54*0861b331Schristos 	BYTE* authenticationChallenge,	// in
55*0861b331Schristos 	UINT32 nonceIssuerLength,	// in
56*0861b331Schristos 	BYTE* nonceIssuer,	// in
57*0861b331Schristos 	UINT32 attributesPlatformLength,	// in
58*0861b331Schristos 	BYTE** attributesPlatform,	// in
59*0861b331Schristos 	TSS_DAA_JOIN_SESSION* joinSession,	// in, out
60*0861b331Schristos 	TSS_DAA_CREDENTIAL_REQUEST* credentialRequest	// out
61*0861b331Schristos );
62*0861b331Schristos 
63*0861b331Schristos // allocation:	endorsementKey as BYTE *
64*0861b331Schristos TSS_RESULT get_public_EK(
65*0861b331Schristos 	TSS_HDAA hDAA,
66*0861b331Schristos 	UINT32 *endorsementKeyLength,
67*0861b331Schristos 	BYTE **endorsementKey
68*0861b331Schristos );
69*0861b331Schristos 
70*0861b331Schristos #endif
71*0861b331Schristos 
72*0861b331Schristos TSS_RESULT
73*0861b331Schristos compute_join_challenge_host(TSS_HDAA_CREDENTIAL,//TSS_HDAA hDAA,
74*0861b331Schristos 				TSS_DAA_PK_internal *pk_internal,
75*0861b331Schristos 				bi_ptr capitalU,
76*0861b331Schristos 				bi_ptr capital_Uprime,
77*0861b331Schristos 				bi_ptr capital_utilde,
78*0861b331Schristos 				bi_ptr capital_utilde_prime,
79*0861b331Schristos 				bi_ptr capital_ni,
80*0861b331Schristos 				bi_ptr capital_ni_tilde,
81*0861b331Schristos 				UINT32 commitments_proofLength,
82*0861b331Schristos 				TSS_DAA_ATTRIB_COMMIT_internal *
83*0861b331Schristos 				commitments_proof,
84*0861b331Schristos 				UINT32 nonceIssuerLength,
85*0861b331Schristos 				BYTE* nonceIssuer,
86*0861b331Schristos 				UINT32 *resultLength,
87*0861b331Schristos 				BYTE **result
88*0861b331Schristos );
89*0861b331Schristos 
90*0861b331Schristos #if 0
91*0861b331Schristos 
92*0861b331Schristos TSPICALL
93*0861b331Schristos Tspi_TPM_DAA_JoinStoreCredential_internal(TSS_HDAA hDAA,	// in
94*0861b331Schristos 					TSS_HTPM hTPM,	// in
95*0861b331Schristos 					TSS_DAA_CRED_ISSUER credIssuer,	// in
96*0861b331Schristos 					TSS_DAA_JOIN_SESSION joinSession,	// in
97*0861b331Schristos 					TSS_HKEY* hDaaCredential	// out
98*0861b331Schristos );
99*0861b331Schristos 
100*0861b331Schristos TSPICALL
101*0861b331Schristos Tspi_TPM_DAA_Sign_internal(TSS_HDAA hDAA,	// in
102*0861b331Schristos 			TSS_HTPM hTPM,	// in
103*0861b331Schristos 			TSS_HKEY hDaaCredential,	// in
104*0861b331Schristos 			TSS_DAA_SELECTED_ATTRIB revealAttributes,	// in
105*0861b331Schristos 			UINT32 verifierBaseNameLength,	// in
106*0861b331Schristos 			BYTE* verifierBaseName,	// in
107*0861b331Schristos 			UINT32 verifierNonceLength,	// in
108*0861b331Schristos 			BYTE* verifierNonce,	// in
109*0861b331Schristos 			TSS_DAA_SIGN_DATA signData,	// in
110*0861b331Schristos 			TSS_DAA_SIGNATURE* daaSignature	// out
111*0861b331Schristos );
112*0861b331Schristos 
113*0861b331Schristos #endif
114*0861b331Schristos 
115*0861b331Schristos #endif
116