Fix ckmc_key_derive API description 07/292407/2
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 5 May 2023 12:38:16 +0000 (14:38 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 5 May 2023 12:48:19 +0000 (14:48 +0200)
Describe input and output key/secret types in detail.

Change-Id: I1f82fe45f4a8b5145b7236b9b8d5db998959b1ed

src/include/ckmc/ckmc-manager.h

index dcec32a..686d939 100644 (file)
@@ -1213,11 +1213,16 @@ int ckmc_export_wrapped_key(const ckmc_param_list_h params,
 
 
 /**
- * @brief Derives a key from another key/secret and stores it inside key manager.
+ * @brief Derives a secret or key from another key/secret and stores it inside key manager.
  *
  * @since_tizen 6.5
  *
- * @remarks The derived key will be a symmetric one. It will be stored as a #CKMC_KEY_AES.
+ * @remarks In case of #CKMC_ALGO_KBKDF algorithm, the secret pointed to by @a secret_alias must be
+ *          a binary data or a symmetric key (#CKMC_KEY_AES). The derived key pointed to by
+ *          @a new_key_alias will be a symmetric one. It will be stored as a #CKMC_KEY_AES.
+ * @remarks In case of #CKMC_ALGO_ECDH algorithm, the key pointed to by @a secret_alias must be a
+ *          private EC key (#CKMC_KEY_ECDSA_PRIVATE). The derived secret pointed to by
+ *          @a new_key_alias  will be in binary data form.
  *
  * @param[in] params Algorithm parameter list handle. See #ckmc_param_list_h and #ckmc_algo_type_e
  *                   for details. Supported algorithms:
@@ -1225,13 +1230,13 @@ int ckmc_export_wrapped_key(const ckmc_param_list_h params,
  *                   - #CKMC_ALGO_ECDH,
  * @param[in] secret_alias Alias of the secret/key to use as an input
  * @param[in] secret_password Optional password of the secret/key used as an input
- * @param[in] new_key_alias The name under which the derived key will be stored
- * @param[in] new_key_policy Policy used to store the derived key
+ * @param[in] new_key_alias The name under which the derived key or secret will be stored
+ * @param[in] new_key_policy Policy used to store the derived key or secret
  *
  * @return @c 0 on success, otherwise a negative error value
  * @retval #CKMC_ERROR_NONE Successful
  * @retval #CKMC_ERROR_PERMISSION_DENIED Insufficient permissions to access key manager, the secret
- *                                       or to create the new key
+ *                                       or to create the new key/secret
  * @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid (missing or invalid mandatory
  *                                       algorithm parameter, @a secret_alias = NULL,
  *                                       @a new_key_alias = NULL)