1
.\" Copyright (C) 2006 International Business Machines Corporation
2
.\" Written by Kent Yoder 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_Key_WrapKey" 3 "2004-05-26" "TSS 1.1" "TCG Software Stack Developer's Reference"
24
Tspi_Key_WrapKey \- wrap a key with the key addressed by hWrappingKey.
29
.B #include <tss/platform.h>
30
.B #include <tss/tcpa_defines.h>
31
.B #include <tss/tcpa_typedef.h>
32
.B #include <tss/tcpa_struct.h>
33
.B #include <tss/tss_typedef.h>
34
.B #include <tss/tss_structs.h>
35
.B #include <tss/tspi.h>
37
.BI "TSS_RESULT Tspi_Key_WrapKey(TSS_HKEY " hKey ", TSS_HKEY " hWrappingKey ","
38
.BI " TSS_HPCRS " hPcrComposite ");"
46
wraps the private key \fIhKey\fR using the public key addressed by \fIhWrappingKey\fR. If hPcrComposite is not set to NULL (0), the created key blob is bound to its PCR values. The key object addressed by \fIhKey\fR must contain the key information needed for the creation. On successful return from this call, \fIhKey\fR can be loaded into a TPM. \fIhKey\fR must have been created as a migratable key and should have its usage and migrations secrets set using \fBTspi_Policy_SetSecret(3)\fR. Also, \fIhKey\fR should have had its private key set to either RSA private component, p or q.
50
The handle of the key object that is wrapped.
53
The handle to the key used to wrap the newly created key.
56
The handle to an object, if the value of the handle doesn't equal NULL, the newly create key will be bound ot the PCR values described with this object.
60
\fBTspi_Key_WrapKey\fR returns TSS_SUCCESS on success, otherwise one of the following values are returned:
62
.SM TSS_E_INVALID_HANDLE - Either \fIhKey\fR, \fIhWrappingKey\fR or \fIhPcrComposite\fR are invalid handles.
64
.SM TSS_E_INTERNAL_ERROR - An error occurred internal to the TSS.
68
\fBTspi_Key_WrapKey\fR conforms to the Trusted Computing Group Software Specification version 1.1 Golden
72
\fBTspi_Key_CreateKey\fR(3), \fBTspi_Key_CertifyKey\fR(3), \fBTspi_Key_RegisterKey\fR(3).