1
.\" Copyright (C) 2004 International Business Machines Corporation
2
.\" Written by Megan Schneider based on the Trusted Computing Group Software Stack Specification Version 1.1 Golden
12
.de Sp \" Vertical space (when we can't use .PP)
18
.ie \\n(.$>=3 .ne \\$3
22
.TH "Tspi_Data_Bind" 3 "2004-05-25" "TSS 1.1"
24
TCG Software Stack Developer's Reference
26
Tspi_Data_Bind \- Encrypts a data blob
31
.B #include <tss/platform.h>
32
.B #include <tss/tcpa_defines.h>
33
.B #include <tss/tcpa_typedef.h>
34
.B #include <tss/tcpa_struct.h>
35
.B #include <tss/tss_typedef.h>
36
.B #include <tss/tss_structs.h>
37
.B #include <tss/tspi.h>
39
.BI "TSS_RESULT Tspi_Data_Bind(TSS_HENCDATA " hEncData ", TSS_HKEY " hEncKey ","
40
.BI " UINT32 " ulDataLength ", BYTE* " rgbDataToBind ");"
48
\fBTspi_Data_Bind\fR encrypts a data blob in a manner
49
that is decryptable by \fBTspi_Data_Unbind\fR. The data blob is
50
encrypted using a public key operation with the key addressed by the
51
given encryption key object. To bind data that is larger than the RSA
52
public key modulus is the responsibility of the caller to perform the
53
blocking and subsequent combination of data. The bound data blob is
54
stored in the data object addressed by \fIhEncData\fR and can be
55
exported from the object by \fBTspi_GetAttribData\fR. The caller of
56
this function should perform validations that the public key presented
57
to it is from a valid TPM.
62
The handle of the data object which contains the encrypted data on
63
successful completion of the command.
65
Handle to the key object addressing the public key which is used
68
Indicates the length of the data provided at the parameter \fIrgbDataToBind\fR.
70
A pointer to the data to be encrypted.
74
\fBTspi_Data_Bind\fR returns TSS_SUCCESS on success, otherwise one of
75
the following values is returned:
77
.SM TSS_E_INVALID_HANDLE
78
\fIhHash\fR is not a valid handle.
81
.SM TSS_E_INTERNAL_ERROR
82
An internal SW error has been detected.
85
.SM TSS_E_BAD_PARAMETER
86
One or more parameters is bad.
89
.SM TSS_E_INVALID_ENCSCHEME
90
Invalid encryption scheme.
93
.SM TSS_E_ENC_INVALID_LENGTH
94
Invalid length of data to be encypted.
101
.SM TSS_E_ENC_INVALID_TYPE
102
Invalid encryption type.
108
\fBTspi_Data_Bind\fR conforms to the Trusted Computing Group Software
109
Specification version 1.1 Golden
114
\fBTspi_Data_Unbind\fR(3), \fBTspi_Data_Unseal\fR(3),
115
\fBTspi_Data_Seal\fR(3).