/*
- * Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2000 - 2019 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
const Policy &keyPolicy,
const Policy &certPolicy);
- /*
- * Data must be extractable. If you set extractable bit to false function will
- * return ERROR_INPUT_PARAM.
- */
int saveData(const Alias &alias, const RawBuffer &data, const Policy &policy);
int removeAlias(const Alias &alias);
// send request for list of all keys/certificates/data that application/user may use
int getKeyAliasVector(AliasVector &aliasVector);
+ int getKeyAliasPwdVector(AliasPwdVector &aliasPwdVector);
+ int getKeyEncryptionStatus(const Alias &alias, bool &status);
int getCertificateAliasVector(AliasVector &aliasVector);
+ int getCertificateAliasPwdVector(AliasPwdVector &aliasPwdVector);
+ int getCertificateEncryptionStatus(const Alias &alias, bool &status);
int getDataAliasVector(AliasVector &aliasVector);
+ int getDataAliasPwdVector(AliasPwdVector &aliasPwdVector);
+ int getDataEncryptionStatus(const Alias &alias, bool &status);
int createKeyPairRSA(
const int size, // size in bits [1024, 2048, 4096]
int ocspCheck(const CertificateShPtrVector &certificateChainVector,
int &ocspStatus);
- int setPermission(const Alias &alias, const Label &accessor,
+ int setPermission(const Alias &alias, const ClientId &accessor,
PermissionMask permissionMask);
+ // This function will encrypt data.
+ // Since Tizen 5.0, on chosen images using TEE backend:
+ // * maximum size of data can be limited to TEE-specific value; minimum 500 kB is supported)
+ // * GCM modes with short tags (32 and 64 bits) are not supported
+ // In these cases, key-manager can return a CKM_API_ERROR_SERVER_ERROR
int encrypt(const CryptoAlgorithm &algo,
const Alias &keyAlias,
const Password &password,
const RawBuffer &plain,
RawBuffer &encrypted);
+ // This function will decrypt data.
+ // Since Tizen 5.0, on chosen images using TEE backend:
+ // * maximum size of data can be limited to TEE-specific value; minimum 500 kB is supported)
+ // * GCM modes with short tags (32 and 64 bits) are not supported
+ // In these cases, key-manager can return a CKM_API_ERROR_SERVER_ERROR
int decrypt(const CryptoAlgorithm &algo,
const Alias &keyAlias,
const Password &password,
const RawBuffer &encrypted,
RawBuffer &decrypted);
+ int deriveKey(const CryptoAlgorithm &algo,
+ const Alias &secretAlias,
+ const Password &secretPassword,
+ const Alias &newKeyAlias,
+ const Policy &newKeyPolicy);
+
static ManagerShPtr create();
+ int importWrappedKey(const CryptoAlgorithm ¶ms,
+ const Alias &wrappingKeyAlias,
+ const Password &wrappingKeyPassword,
+ const Alias &alias,
+ const RawBuffer &encryptedKey,
+ const KeyType keyType,
+ const Policy &policy);
+
private:
std::unique_ptr<Impl> m_impl;
};
} // namespace CKM
-