NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::tpm::KeyHandle Class Referenceabstract

Abstraction of TPM key handle. More...

#include <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 sign (DigestAlgorithm digestAlgorithm, const uint8_t *buf, size_t size) const
 
bool verify (DigestAlgorithm digestAlgorithm, const uint8_t *buf, size_t bufLen, const uint8_t *sig, size_t sigLen) const
 Verify the signature sig created on buf using this key and digestAlgorithm. More...
 
ConstBufferPtr decrypt (const uint8_t *cipherText, size_t cipherTextLen) const
 
ConstBufferPtr derivePublicKey () const
 
Name getKeyName () const
 
void setKeyName (const Name &keyName)
 

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 37 of file key-handle.hpp.

Constructor & Destructor Documentation

◆ ~KeyHandle()

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

Member Function Documentation

◆ sign()

ConstBufferPtr ndn::security::tpm::KeyHandle::sign ( DigestAlgorithm  digestAlgorithm,
const uint8_t *  buf,
size_t  size 
) const
Returns
a digital signature created on buf using this key with digestAlgorithm.

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

References buf.

Referenced by ndn::security::tpm::Tpm::sign().

◆ verify()

bool ndn::security::tpm::KeyHandle::verify ( DigestAlgorithm  digestAlgorithm,
const uint8_t *  buf,
size_t  bufLen,
const uint8_t *  sig,
size_t  sigLen 
) const

Verify the signature sig created on buf using this key and digestAlgorithm.

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

References buf, bufLen, sig, and sigLen.

Referenced by ndn::security::tpm::Tpm::verify().

◆ decrypt()

ConstBufferPtr ndn::security::tpm::KeyHandle::decrypt ( const uint8_t *  cipherText,
size_t  cipherTextLen 
) const
Returns
plain text content decrypted from cipherText using this key.

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

Referenced by ndn::security::tpm::Tpm::decrypt().

◆ derivePublicKey()

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

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

Referenced by ndn::security::tpm::BackEnd::constructAsymmetricKeyName(), and ndn::security::tpm::Tpm::getPublicKey().

◆ getKeyName()

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

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

◆ setKeyName()

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

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


The documentation for this class was generated from the following files: