xref: /netbsd-src/crypto/external/cpl/trousers/dist/src/include/daa/issuer.h (revision 1023804e3833a0bd94414f2545512128f6502c74)
1 
2 /*
3  * Licensed Materials - Property of IBM
4  *
5  * trousers - An open source TCG Software Stack
6  *
7  * (C) Copyright International Business Machines Corp. 2006-2007
8  *
9  */
10 #ifndef __ISSUER_H__
11 #define __ISSUER_H__
12 
13 #include "daa/daa_structs.h"
14 #include "daa/daa_parameter.h"
15 #include "tsplog.h"
16 
17 
18 TSS_RESULT
19 generate_key_pair(int num_attributes_issuer,
20 		int num_attributes_receiver,
21 		int base_nameLength,
22 		BYTE *base_name,
23 		KEY_PAIR_WITH_PROOF_internal **key_pair_with_proof
24 );
25 
26 TSS_DAA_PK_PROOF_internal *generate_proof(
27 	const bi_ptr product_PQ_prime,
28 	const TSS_DAA_PK_internal *public_key,
29 	const bi_ptr xz,
30 	const bi_ptr x0,
31 	const bi_ptr x1,
32 	bi_array_ptr x);
33 
34 #if 0
35 TSPICALL
36 Tspi_DAA_IssueInit_internal(
37 	TSS_HDAA	hDAA,	// in
38 	TSS_HKEY	issuerAuthPK,	// in
39 	TSS_HKEY	issuerKeyPair,	// in
40 	TSS_DAA_IDENTITY_PROOF	identityProof,	// in
41 	UINT32	capitalUprimeLength,	// in
42 	BYTE*	capitalUprime,	// in
43 	UINT32	daaCounter,	// in
44 	UINT32*	nonceIssuerLength,	// out
45 	BYTE**	nonceIssuer,	// out
46 	UINT32*	authenticationChallengeLength,	// out
47 	BYTE**	authenticationChallenge,	// out
48 	TSS_DAA_JOIN_ISSUER_SESSION*  joinSession	// out
49 );
50 
51 TSPICALL
52 Tspi_DAA_IssueCredential_internal(
53 	TSS_HDAA	hDAA,	// in
54 	UINT32	attributesIssuerLength,	// in
55 	BYTE**	attributesIssuer,	// in
56 	TSS_DAA_CREDENTIAL_REQUEST	credentialRequest,	// in
57 	TSS_DAA_JOIN_ISSUER_SESSION	joinSession,	// in
58 	TSS_DAA_CRED_ISSUER*	credIssuer	// out
59 );
60 #endif
61 TSS_RESULT
62 compute_join_challenge_issuer( TSS_DAA_PK_internal *pk_intern,
63 				bi_ptr v_prime_prime,
64 				bi_ptr capitalA,
65 				bi_ptr capital_Atilde,
66 				UINT32 nonceReceiverLength,
67 				BYTE *nonceReceiver,
68 				UINT32 *c_primeLength,
69 				BYTE **c_prime);  // out allocation
70 
71 #endif
72