26 #ifndef NDN_SECURITY_SEC_TPM_FILE_HPP 27 #define NDN_SECURITY_SEC_TPM_FILE_HPP 29 #include "../common.hpp" 67 m_inTerminal = inTerminal;
83 unlockTpm(
const char* password,
size_t passwordLength,
bool usePassword)
94 virtual shared_ptr<PublicKey>
98 signInTpm(
const uint8_t* data,
size_t dataLength,
102 decryptInTpm(
const uint8_t* data,
size_t dataLength,
const Name& keyName,
bool isSymmetric);
105 encryptInTpm(
const uint8_t* data,
size_t dataLength,
const Name& keyName,
bool isSymmetric);
142 unique_ptr<Impl> m_impl;
148 #endif // NDN_SECURITY_SEC_TPM_FILE_HPP Copyright (c) 2011-2015 Regents of the University of California.
virtual bool unlockTpm(const char *password, size_t passwordLength, bool usePassword)
Unlock the TPM.
virtual void addAppToAcl(const Name &keyName, KeyClass keyClass, const std::string &appPath, AclType acl)
Add the application into the ACL of a particular key.
virtual void resetTpmPassword()
reset password of TPM
Error(const std::string &what)
virtual bool doesKeyExistInTpm(const Name &keyName, KeyClass keyClass)
Check if a particular key exists.
virtual void setTpmPassword(const uint8_t *password, size_t passwordLength)
set password of TPM
Class representing a wire element of NDN-TLV packet format.
SecTpmFile(const std::string &dir="")
static const std::string SCHEME
virtual void generateKeyPairInTpm(const Name &keyName, const KeyParams ¶ms)
Generate a pair of asymmetric keys.
virtual void deleteKeyPairInTpm(const Name &keyName)
Delete a key pair of asymmetric keys.
virtual bool isLocked()
Check if TPM is locked.
virtual shared_ptr< PublicKey > getPublicKeyFromTpm(const Name &keyName)
Get a public key.
virtual ConstBufferPtr decryptInTpm(const uint8_t *data, size_t dataLength, const Name &keyName, bool isSymmetric)
Decrypt data.
SecTpm is the base class of the TPM classes.
virtual bool generateRandomBlock(uint8_t *res, size_t size)
Generate a random block.
Name abstraction to represent an absolute name.
virtual ConstBufferPtr exportPrivateKeyPkcs8FromTpm(const Name &keyName)
Export a private key in PKCS#8 format.
virtual void setInTerminal(bool inTerminal)
Set inTerminal flag to.
virtual Block signInTpm(const uint8_t *data, size_t dataLength, const Name &keyName, DigestAlgorithm digestAlgorithm)
Sign data.
virtual bool importPublicKeyPkcs1IntoTpm(const Name &keyName, const uint8_t *buf, size_t size)
Import a public key in PKCS#1 formatted.
virtual ConstBufferPtr encryptInTpm(const uint8_t *data, size_t dataLength, const Name &keyName, bool isSymmetric)
Encrypt data.
virtual void generateSymmetricKeyInTpm(const Name &keyName, const KeyParams ¶ms)
Generate a symmetric key.
Base class of key parameters.
virtual bool importPrivateKeyPkcs8IntoTpm(const Name &keyName, const uint8_t *buf, size_t size)
Import a private key from PKCS#8 formatted.
shared_ptr< const Buffer > ConstBufferPtr
virtual bool getInTerminal() const
Get value of inTerminal flag.
virtual std::string getScheme()