ndn::security::tpm::KeyHandle Class Referenceabstract

Abstraction of TPM key handle. More...

#include <ndn-cxx/security/tpm/key-handle.hpp>

+ Inheritance diagram for ndn::security::tpm::KeyHandle:
+ Collaboration diagram for ndn::security::tpm::KeyHandle:

Classes

class  Error
 

Public Member Functions

virtual ~KeyHandle ()
 
ConstBufferPtr decrypt (span< const uint8_t > cipherText) const
 Return plain text content decrypted from cipherText using this key. More...
 
ConstBufferPtr derivePublicKey () const
 
Name getKeyName () const
 
void setKeyName (const Name &keyName)
 
ConstBufferPtr sign (DigestAlgorithm digestAlgorithm, const InputBuffers &bufs) const
 Generate a digital signature for bufs using this key with digestAlgorithm. More...
 
bool verify (DigestAlgorithm digestAlgorithm, const InputBuffers &bufs, span< const uint8_t > sig) const
 Verify the signature sig over bufs using this key and digestAlgorithm. More...
 

Detailed Description

Abstraction of TPM key handle.

KeyHandle provides an interface to perform crypto operations with a key stored in the TPM.

Definition at line 35 of file key-handle.hpp.

Constructor & Destructor Documentation

◆ ~KeyHandle()

ndn::security::tpm::KeyHandle::~KeyHandle ( )
virtualdefault

Member Function Documentation

◆ decrypt()

ConstBufferPtr ndn::security::tpm::KeyHandle::decrypt ( span< const uint8_t >  cipherText) const

Return plain text content decrypted from cipherText using this key.

Definition at line 42 of file key-handle.cpp.

◆ derivePublicKey()

ConstBufferPtr ndn::security::tpm::KeyHandle::derivePublicKey ( ) const
Returns
the PCKS#8 encoded public key bits derived from this key.

Definition at line 48 of file key-handle.cpp.

◆ getKeyName()

Name ndn::security::tpm::KeyHandle::getKeyName ( ) const
inline

Definition at line 73 of file key-handle.hpp.

◆ setKeyName()

void ndn::security::tpm::KeyHandle::setKeyName ( const Name keyName)
inline

Definition at line 79 of file key-handle.hpp.

◆ sign()

ConstBufferPtr ndn::security::tpm::KeyHandle::sign ( DigestAlgorithm  digestAlgorithm,
const InputBuffers &  bufs 
) const

Generate a digital signature for bufs using this key with digestAlgorithm.

Definition at line 29 of file key-handle.cpp.

◆ verify()

bool ndn::security::tpm::KeyHandle::verify ( DigestAlgorithm  digestAlgorithm,
const InputBuffers &  bufs,
span< const uint8_t >  sig 
) const

Verify the signature sig over bufs using this key and digestAlgorithm.

Definition at line 35 of file key-handle.cpp.