C# Class Tpm2Lib.TssObject

Inheritance: TpmStructureBase
Mostrar archivo Open project: Microsoft/TSS.MSR Class Usage Examples

Public Properties

Property Type Description
SecretEncodingParms byte[]
UseAuth AuthValue

Private Properties

Property Type Description
CreateSensitiveComposite ISensitiveCompositeUnion
GetSymDef SymDefObject
Transform void

Public Methods

Method Description
Copy ( ) : TssObject
CreateStorageParent ( TpmPublic keyParameters, AuthValue authVal ) : TssObject

Creates a *software* root key. The key will be random (not created from a seed). The key can be used as the root of a software hierarchy that can be translated into a duplication blob ready for import into a TPM. Depending on the type of key, the software root key can be a parent for other root keys that can comprise a migration group. The caller should specify necessary key parameters in Public.

GetDuplicationBlob ( TpmPublic newParent, SymmCipher innerWrapper, byte &encryptedWrappingKey ) : TpmPrivate

Creates a duplication blob for the current key that can be Imported as a child of newParent. Three forms are possible. GetPlaintextDuplicationBlob() allows plaintext-import. This function enables duplication with and without an inner wrapper (depending on whether innerWrapper is null)

GetName ( ) : byte[]

Get the name of the associated public object

GetPlaintextDuplicationBlob ( ) : TpmPrivate

Create a plaintext duplication blob that can be imported into a TPM

GetPrivate ( TssObject intendedParent ) : TpmPrivate

Creates a Private area for this key that will be loadable on a TPM though TPM2_Load() if the target TPM already has the parent storage key "parent" loaded. This function lets applications create key-hierarchies in software that can be loaded into a TPM once the parent has been "TPM2_Import'ed." TPM2_Import() supports plaintext import. To get this sort of import blob set intendedParent to null

TssObject ( ) : System
TssObject ( TpmPublic the_publicPart, Sensitive the_sensitivePart, TpmPrivate the_privatePart ) : System
TssObject ( TpmPublic thePublicPart, TpmPrivate thePrivatePart ) : System
TssObject ( TssObject the_TssObject ) : System
_SetTransformer ( Transformer transformer ) : void

Install a transformer callback (for debugging). Transformer is called on several code-paths in creating SW-generated keys, import blobs, and activation blobs. Transformer can arbitrarily manipulate the byte array parameter and the transformed value will be used (this allows a caller to transform parameters that are hard to affect in the raw TPM command because they are protected by crypto. Note that the transformer callback should only work on a fraction (say 10%) of the calls because the it is called several times during preparation of some data structures and if one always modifies the first then it is possible that the second is never processed by the TPM.

Private Methods

Method Description
CreateSensitiveComposite ( TpmPublic keyParms, IPublicIdUnion &publicParms ) : ISensitiveCompositeUnion

Create a new asymmetric key based on the parameters in keyParms. The resulting key data is returned in structures suitable for incorporation in a TPMT_PUBLIC and TPMS_SENSITIVE

GetSymDef ( TpmPublic keyParms ) : SymDefObject

Extract and return the SymDefObject that describes the associated symmetric algorithm that is used for key protection in storage keys.

Transform ( byte x ) : void

Method Details

Copy() public method

public Copy ( ) : TssObject
return TssObject

CreateStorageParent() public static method

Creates a *software* root key. The key will be random (not created from a seed). The key can be used as the root of a software hierarchy that can be translated into a duplication blob ready for import into a TPM. Depending on the type of key, the software root key can be a parent for other root keys that can comprise a migration group. The caller should specify necessary key parameters in Public.
public static CreateStorageParent ( TpmPublic keyParameters, AuthValue authVal ) : TssObject
keyParameters TpmPublic
authVal AuthValue
return TssObject

GetDuplicationBlob() public method

Creates a duplication blob for the current key that can be Imported as a child of newParent. Three forms are possible. GetPlaintextDuplicationBlob() allows plaintext-import. This function enables duplication with and without an inner wrapper (depending on whether innerWrapper is null)
public GetDuplicationBlob ( TpmPublic newParent, SymmCipher innerWrapper, byte &encryptedWrappingKey ) : TpmPrivate
newParent TpmPublic
innerWrapper SymmCipher
encryptedWrappingKey byte
return TpmPrivate

GetName() public method

Get the name of the associated public object
public GetName ( ) : byte[]
return byte[]

GetPlaintextDuplicationBlob() public method

Create a plaintext duplication blob that can be imported into a TPM
public GetPlaintextDuplicationBlob ( ) : TpmPrivate
return TpmPrivate

GetPrivate() public method

Creates a Private area for this key that will be loadable on a TPM though TPM2_Load() if the target TPM already has the parent storage key "parent" loaded. This function lets applications create key-hierarchies in software that can be loaded into a TPM once the parent has been "TPM2_Import'ed." TPM2_Import() supports plaintext import. To get this sort of import blob set intendedParent to null
public GetPrivate ( TssObject intendedParent ) : TpmPrivate
intendedParent TssObject
return TpmPrivate

TssObject() public method

public TssObject ( ) : System
return System

TssObject() public method

public TssObject ( TpmPublic the_publicPart, Sensitive the_sensitivePart, TpmPrivate the_privatePart ) : System
the_publicPart TpmPublic Public part of key
the_sensitivePart Sensitive Sensitive part of key
the_privatePart TpmPrivate Private part is the encrypted sensitive part of key
return System

TssObject() public method

public TssObject ( TpmPublic thePublicPart, TpmPrivate thePrivatePart ) : System
thePublicPart TpmPublic
thePrivatePart TpmPrivate
return System

TssObject() public method

public TssObject ( TssObject the_TssObject ) : System
the_TssObject TssObject
return System

_SetTransformer() public method

Install a transformer callback (for debugging). Transformer is called on several code-paths in creating SW-generated keys, import blobs, and activation blobs. Transformer can arbitrarily manipulate the byte array parameter and the transformed value will be used (this allows a caller to transform parameters that are hard to affect in the raw TPM command because they are protected by crypto. Note that the transformer callback should only work on a fraction (say 10%) of the calls because the it is called several times during preparation of some data structures and if one always modifies the first then it is possible that the second is never processed by the TPM.
public _SetTransformer ( Transformer transformer ) : void
transformer Transformer
return void

Property Details

SecretEncodingParms public_oe static_oe property

Encoding parameters for objects in the storage hierarchy
public static byte[] SecretEncodingParms
return byte[]

UseAuth public_oe property

public AuthValue,Tpm2Lib UseAuth
return AuthValue