Class: TpmKeyHandle

TpmKeyHandle()

new TpmKeyHandle()

TpmKeyHandle is an abstract base class for a TPM key handle, which provides an interface to perform cryptographic operations with a key in the TPM.
Source:

Methods

decryptPromise(cipherText, useSync) → {Promise|SyncPromise}

Return the plain text which is decrypted from cipherText using this key.
Parameters:
Name Type Description
cipherText Buffer The cipher text byte buffer.
useSync boolean (optional) If true then return a SyncPromise which is already fulfilled. If omitted or false, this may return a SyncPromise or an async Promise.
Source:
Returns:
A promise which returns the decrypted data Blob, or a promise rejected with TpmPrivateKey.Error for error decrypting.
Type
Promise | SyncPromise

derivePublicKey(useSync) → {Blob}

Get the encoded public key derived from this key.
Parameters:
Name Type Description
useSync boolean (optional) If true then return a SyncPromise which is already fulfilled. If omitted or false, this may return a SyncPromise or an async Promise.
Source:
Returns:
The public key encoding Blob.
Type
Blob

doDecryptPromise_(cipherText, useSync) → {Promise|SyncPromise}

A protected method to do the work of decrypt().
Parameters:
Name Type Description
cipherText Buffer The cipher text byte buffer.
useSync boolean (optional) If true then return a SyncPromise which is already fulfilled. If omitted or false, this may return a SyncPromise or an async Promise.
Source:
Returns:
A promise which returns the decrypted data Blob, or a promise rejected with TpmPrivateKey.Error for error decrypting.
Type
Promise | SyncPromise

doDerivePublicKey_(useSync) → {Blob}

A protected method to do the work of derivePublicKey().
Parameters:
Name Type Description
useSync boolean (optional) If true then return a SyncPromise which is already fulfilled. If omitted or false, this may return a SyncPromise or an async Promise.
Source:
Returns:
The public key encoding Blob.
Type
Blob

doDerivePublicKey_() → {Blob}

A protected method to do the work of derivePublicKey().
Source:
Returns:
The public key encoding Blob.
Type
Blob

doSignPromise_(data, digestAlgorithm, useSync) → {Promise|SyncPromise}

A protected method to do the work of sign().
Parameters:
Name Type Description
data Buffer The input byte buffer.
digestAlgorithm number The digest algorithm as an int from the DigestAlgorithm enum.
useSync boolean (optional) If true then return a SyncPromise which is already fulfilled. If omitted or false, this may return a SyncPromise or an async Promise.
Source:
Returns:
A promise which returns the signature Blob (or an isNull Blob for an unrecognized digestAlgorithm), or a promise rejected with TpmBackEnd.Error for an error in signing.
Type
Promise | SyncPromise

signPromise(digestAlgorithm, data, useSync) → {Promise|SyncPromise}

Compute a digital signature from the byte buffer using this key with digestAlgorithm.
Parameters:
Name Type Description
digestAlgorithm number The digest algorithm as an int from the DigestAlgorithm enum.
data Buffer The input byte buffer.
useSync boolean (optional) If true then return a SyncPromise which is already fulfilled. If omitted or false, this may return a SyncPromise or an async Promise.
Source:
Returns:
A promise which returns the signature Blob (or an isNull Blob for an unrecognized digestAlgorithm), or a promise rejected with TpmBackEnd.Error for an error in signing.
Type
Promise | SyncPromise