1Tspi_Data_Bind(3)          Library Functions Manual          Tspi_Data_Bind(3)
2
3
4
5                   TCG Software Stack Developer's Reference
6

NAME

8       Tspi_Data_Bind - Encrypts a data blob
9

SYNOPSIS

11       #include <tss/platform.h>
12       #include <tss/tcpa_defines.h>
13       #include <tss/tcpa_typedef.h>
14       #include <tss/tcpa_struct.h>
15       #include <tss/tss_typedef.h>
16       #include <tss/tss_structs.h>
17       #include <tss/tspi.h>
18
19       TSS_RESULT Tspi_Data_Bind(TSS_HENCDATA hEncData,     TSS_HKEY hEncKey,
20                                 UINT32       ulDataLength, BYTE*    rgbDataToBind);
21
22
23

DESCRIPTION

25       Tspi_Data_Bind  encrypts a data blob in a manner that is decryptable by
26       Tspi_Data_Unbind. The data blob is encrypted using a public key  opera‐
27       tion with the key addressed by the given encryption key object. To bind
28       data that is larger than the RSA public key modulus is the responsibil‐
29       ity of the caller to perform the blocking and subsequent combination of
30       data. The bound data blob is stored in the  data  object  addressed  by
31       hEncData and can be exported from the object by Tspi_GetAttribData. The
32       caller of this function should perform validations that the public  key
33       presented to it is from a valid TPM.
34
35

PARAMETERS

37   hEncData
38       The handle of the data object which contains the encrypted data on suc‐
39       cessful completion of the command.
40
41   hEncKey
42       Handle to the key object addressing the public key which is used to en‐
43       crypt the data.
44
45   ulDataLength
46       Indicates  the  length of the data provided at the parameter rgbDataTo‐
47       Bind.
48
49   rgbDataToBind
50       A pointer to the data to be encrypted.
51
52

RETURN CODES

54       Tspi_Data_Bind returns TSS_SUCCESS on success,  otherwise  one  of  the
55       following values is returned:
56
57       TSS_E_INVALID_HANDLE
58              hHash is not a valid handle.
59
60
61       TSS_E_INTERNAL_ERROR
62              An internal SW error has been detected.
63
64
65       TSS_E_BAD_PARAMETER
66              One or more parameters is bad.
67
68
69       TSS_E_INVALID_ENCSCHEME
70              Invalid encryption scheme.
71
72
73       TSS_E_ENC_INVALID_LENGTH
74              Invalid length of data to be encypted.
75
76
77       TSS_E_ENC_NO_DATA
78              No data to encrypt.
79
80
81       TSS_E_ENC_INVALID_TYPE
82              Invalid encryption type.
83
84
85

CONFORMING TO

87       Tspi_Data_Bind  conforms to the Trusted Computing Group Software Speci‐
88       fication version 1.1 Golden
89
90

SEE ALSO

92       Tspi_Data_Unbind(3), Tspi_Data_Unseal(3), Tspi_Data_Seal(3).
93
94
95
96
97TSS 1.1                           2004-05-25                 Tspi_Data_Bind(3)
Impressum