C# Class Tpm2Lib.SymmCipher

A helper class for doing symmetric cryptography based on TPM structure definitions.
Inheritance: IDisposable
Afficher le fichier Open project: Microsoft/TSS.MSR Class Usage Examples

Méthodes publiques

Свойство Type Description
LimitedSupport bool

Méthodes publiques

Méthode Description
Create ( SymDefObject symDef = null, byte keyData = null, byte iv = null ) : SymmCipher

Create a new SymmCipher object with a random key based on the alg and mode supplied.

CreateFromPublicParms ( IPublicParmsUnion parms ) : SymmCipher
Decrypt ( SymDefObject symDef, byte key, byte iv, byte dataToDecrypt ) : byte[]
Decrypt ( byte data, byte iv = null ) : byte[]
Dispose ( ) : void
Encrypt ( SymDefObject symDef, byte key, byte iv, byte dataToEncrypt ) : byte[]
Encrypt ( byte data, byte iv = null ) : byte[]

Performs the TPM-defined CFB encrypt using the associated algorithm. This routine assumes that the integrity value has been prepended.

GetBlockSize ( SymDefObject symDef ) : int
GetCipherMode ( TpmAlgId cipherMode ) : CipherMode
SensitiveFromDuplicateBlob ( TpmPrivate exportedPrivate, SymDefObject encAlg, byte encKey, TpmAlgId nameAlg, byte name ) : Sensitive

De-envelope inner-wrapped duplication blob. TODO: Move this to TpmPublic and make it fully general

Private Methods

Méthode Description
SymmCipher ( BCryptKey key, byte keyData, byte iv ) : System
SymmCipher ( SymmetricAlgorithm alg ) : System

Method Details

Create() public static méthode

Create a new SymmCipher object with a random key based on the alg and mode supplied.
public static Create ( SymDefObject symDef = null, byte keyData = null, byte iv = null ) : SymmCipher
symDef SymDefObject
keyData byte
iv byte
Résultat SymmCipher

CreateFromPublicParms() public static méthode

public static CreateFromPublicParms ( IPublicParmsUnion parms ) : SymmCipher
parms IPublicParmsUnion
Résultat SymmCipher

Decrypt() public static méthode

public static Decrypt ( SymDefObject symDef, byte key, byte iv, byte dataToDecrypt ) : byte[]
symDef SymDefObject
key byte
iv byte
dataToDecrypt byte
Résultat byte[]

Decrypt() public méthode

public Decrypt ( byte data, byte iv = null ) : byte[]
data byte
iv byte
Résultat byte[]

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Encrypt() public static méthode

public static Encrypt ( SymDefObject symDef, byte key, byte iv, byte dataToEncrypt ) : byte[]
symDef SymDefObject
key byte
iv byte
dataToEncrypt byte
Résultat byte[]

Encrypt() public méthode

Performs the TPM-defined CFB encrypt using the associated algorithm. This routine assumes that the integrity value has been prepended.
public Encrypt ( byte data, byte iv = null ) : byte[]
data byte
iv byte
Résultat byte[]

GetBlockSize() public static méthode

public static GetBlockSize ( SymDefObject symDef ) : int
symDef SymDefObject
Résultat int

GetCipherMode() public static méthode

public static GetCipherMode ( TpmAlgId cipherMode ) : CipherMode
cipherMode TpmAlgId
Résultat CipherMode

SensitiveFromDuplicateBlob() public static méthode

De-envelope inner-wrapped duplication blob. TODO: Move this to TpmPublic and make it fully general
public static SensitiveFromDuplicateBlob ( TpmPrivate exportedPrivate, SymDefObject encAlg, byte encKey, TpmAlgId nameAlg, byte name ) : Sensitive
exportedPrivate TpmPrivate
encAlg SymDefObject
encKey byte
nameAlg TpmAlgId
name byte
Résultat Sensitive

Property Details

LimitedSupport public_oe property

public bool LimitedSupport
Résultat bool