1Tspi_Key_WrapKey(3)TCG Software Stack Developer's ReferenceTspi_Key_WrapKey(3)
2
3
4
6 Tspi_Key_WrapKey - wrap a key with the key addressed by hWrappingKey.
7
9 #include <tss/platform.h>
10 #include <tss/tcpa_defines.h>
11 #include <tss/tcpa_typedef.h>
12 #include <tss/tcpa_struct.h>
13 #include <tss/tss_typedef.h>
14 #include <tss/tss_structs.h>
15 #include <tss/tspi.h>
16
17 TSS_RESULT Tspi_Key_WrapKey(TSS_HKEY hKey, TSS_HKEY hWrappingKey,
18 TSS_HPCRS hPcrComposite);
19
20
22 TSS_Key_WrapKey wraps the private key hKey using the public key ad‐
23 dressed by hWrappingKey. If hPcrComposite is not set to NULL (0), the
24 created key blob is bound to its PCR values. The key object addressed
25 by hKey must contain the key information needed for the creation. On
26 successful return from this call, hKey can be loaded into a TPM. hKey
27 must have been created as a migratable key and should have its usage
28 and migrations secrets set using Tspi_Policy_SetSecret(3). Also, hKey
29 should have had its private key set to either RSA private component, p
30 or q.
31
33 hKey
34 The handle of the key object that is wrapped.
35
36 hWrappingKey
37 The handle to the key used to wrap the newly created key.
38
39 hPcrComposite
40 The handle to an object, if the value of the handle doesn't equal NULL,
41 the newly create key will be bound ot the PCR values described with
42 this object.
43
44
46 Tspi_Key_WrapKey returns TSS_SUCCESS on success, otherwise one of the
47 following values are returned:
48
49 TSS_E_INVALID_HANDLE - Either hKey, hWrappingKey or hPcrComposite are
50 invalid handles.
51
52 TSS_E_INTERNAL_ERROR - An error occurred internal to the TSS.
53
55 Tspi_Key_WrapKey conforms to the Trusted Computing Group Software Spec‐
56 ification version 1.1 Golden
57
59 Tspi_Key_CreateKey(3), Tspi_Key_CertifyKey(3), Tspi_Key_RegisterKey(3).
60
61
62
63TSS 1.1 2004-05-26 Tspi_Key_WrapKey(3)