represents the front-end of TPM More...
#include <ndn-cxx/security/tpm/tpm.hpp>
Classes | |
class | Error |
Public Member Functions | |
~Tpm () | |
ConstBufferPtr | decrypt (const uint8_t *buf, size_t size, const Name &keyName) const |
Decrypt blob using the key with name keyName . More... | |
ConstBufferPtr | getPublicKey (const Name &keyName) const |
std::string | getTpmLocator () const |
bool | hasKey (const Name &keyName) const |
Check if a private key exists. More... | |
bool | isTerminalMode () const |
Check if the TPM is in terminal mode. More... | |
bool | isTpmLocked () const |
void | setTerminalMode (bool isTerminal) const |
Set the terminal mode of the TPM. More... | |
ConstBufferPtr | sign (const uint8_t *buf, size_t size, const Name &keyName, DigestAlgorithm digestAlgorithm) const |
Sign blob using the key with name keyName and using the digest digestAlgorithm . More... | |
bool | unlockTpm (const char *password, size_t passwordLength) const |
Unlock the TPM. More... | |
Friends | |
class | v2::KeyChain |
represents the front-end of TPM
The TPM (Trusted Platform Module) stores the private portion of a user's cryptography keys. The format and location of stored information is indicated by the TpmLocator. The TPM is designed to work with a PIB (Public Information Base) which stores public keys and related information such as certificate.
The TPM also provides functionalities of crypto transformation, such as signing and decryption.
A TPM consists of a unified front-end interface and a back-end implementation. The front-end cache the handles of private keys which is provided by the back-end implementation.
BackEnd::Error | Failure with the underlying implementation having non-semantic errors |
Tpm::Error | Failure with semantic error in the underlying implementation |
|
default |
ConstBufferPtr ndn::security::tpm::Tpm::decrypt | ( | const uint8_t * | buf, |
size_t | size, | ||
const Name & | keyName | ||
) | const |
ConstBufferPtr ndn::security::tpm::Tpm::getPublicKey | ( | const Name & | keyName | ) | const |
bool ndn::security::tpm::Tpm::hasKey | ( | const Name & | keyName | ) | const |
bool ndn::security::tpm::Tpm::isTerminalMode | ( | ) | const |
bool ndn::security::tpm::Tpm::isTpmLocked | ( | ) | const |
void ndn::security::tpm::Tpm::setTerminalMode | ( | bool | isTerminal | ) | const |
ConstBufferPtr ndn::security::tpm::Tpm::sign | ( | const uint8_t * | buf, |
size_t | size, | ||
const Name & | keyName, | ||
DigestAlgorithm | digestAlgorithm | ||
) | const |
bool ndn::security::tpm::Tpm::unlockTpm | ( | const char * | password, |
size_t | passwordLength | ||
) | const |
|
friend |