Implement public key extraction in TZ backend
[platform/core/security/key-manager.git] / src / manager / crypto / tz-backend / internals.h
index cb6b814..bb8e444 100644 (file)
@@ -62,7 +62,7 @@ void importData(const Data &key,
                                         RawBuffer &tag,
                                         const RawBuffer &hash);
 
-void importWrappedKey(const RawBuffer &wrappingKey,
+void importWrappedKey(const RawBuffer &wrappingKeyId,
                                          const Pwd &wrappingKeyPwd,
                                          const CryptoAlgorithm &alg,
                                          const Data &encryptedKey,
@@ -71,7 +71,7 @@ void importWrappedKey(const RawBuffer &wrappingKey,
                                          RawBuffer &encryptedKeyTag,
                                          const RawBuffer &encryptedKeyId);
 
-RawBuffer exportWrappedKey(const RawBuffer &wrappingKey,
+RawBuffer exportWrappedKey(const RawBuffer &wrappingKeyId,
                                                   const Pwd &wrappingKeyPwd,
                                                   const CryptoAlgorithm &alg,
                                                   const RawBuffer &keyToWrapId,
@@ -82,47 +82,47 @@ RawBuffer getData(const RawBuffer &dataId,
 
 void destroyData(const RawBuffer &dataId);
 
-void destroyKey(const RawBuffer &key);
+void destroyKey(const RawBuffer &keyId);
 
 RawBuffer symmetricEncrypt(
-       const RawBuffer &key,
+       const RawBuffer &keyId,
        const Pwd &pwd,
        const CryptoAlgorithm &alg,
        const RawBuffer &data);
 
 RawBuffer symmetricDecrypt(
-       const RawBuffer &key,
+       const RawBuffer &keyId,
        const Pwd &pwd,
        const CryptoAlgorithm &alg,
        const RawBuffer &cipher);
 
 RawBuffer asymmetricEncrypt(
-       const RawBuffer &key,
+       const RawBuffer &keyId,
        const Pwd &pwd,
        const CryptoAlgorithm &alg,
        const RawBuffer &data);
 
 RawBuffer asymmetricDecrypt(
-       const RawBuffer &key,
+       const RawBuffer &keyId,
        const Pwd &pwd,
        const CryptoAlgorithm &alg,
        const RawBuffer &cipher);
 
-BufferPair encryptDataAesGcm(const RawBuffer &key,
+BufferPair encryptDataAesGcm(const RawBuffer &keyId,
                                                        const Pwd &pwd,
                                                        const RawBuffer &iv,
                                                        int tagSize,
                                                        const RawBuffer &data,
                                                        const RawBuffer &aad = RawBuffer());
 
-RawBuffer decryptDataAesGcm(const RawBuffer &key,
+RawBuffer decryptDataAesGcm(const RawBuffer &keyId,
                                                        const Pwd &pwd,
                                                        const RawBuffer &iv,
                                                        const RawBuffer &tag,
                                                        const RawBuffer &data,
                                                        const RawBuffer &aad = RawBuffer());
 
-uint32_t initCipher(const RawBuffer &key,
+uint32_t initCipher(const RawBuffer &keyId,
                                        const Pwd &pwd,
                                        const CryptoAlgorithm &alg,
                                        bool encrypt);
@@ -136,18 +136,18 @@ RawBuffer updateCipher(uint32_t opId,
 RawBuffer finalizeCipher(uint32_t opId,
                                                 const RawBuffer &data);
 
-RawBuffer sign(const RawBuffer &pkey,
+RawBuffer sign(const RawBuffer &pkeyId,
                        const Pwd &pwd,
                        const CryptoAlgorithm &alg,
                        const RawBuffer &message);
 
-int verify(const RawBuffer &pkey,
+int verify(const RawBuffer &pkeyId,
                const Pwd &pwd,
                const CryptoAlgorithm &alg,
                const RawBuffer &message,
                const RawBuffer &signature);
 
-void deriveECDH(const RawBuffer &prvKey,
+void deriveECDH(const RawBuffer &prvKeyId,
                                const Pwd &prvKeyPwd,
                                const RawBuffer &pubKey,
                                const Password &secretPwd,
@@ -155,7 +155,7 @@ void deriveECDH(const RawBuffer &prvKey,
                                RawBuffer &secretTag,
                                const RawBuffer &secretHash);
 
-void deriveKBKDF(const RawBuffer &secret,
+void deriveKBKDF(const RawBuffer &secretId,
                                 const CryptoAlgorithm &alg,
                                 const Password &keyPwd,
                                 const RawBuffer &keyPwdIV,