Documentation improvement for Escrow Vault 2.0 support 27/312827/3
authorFilip Skrzeczkowski <f.skrzeczkow@samsung.com>
Fri, 14 Jun 2024 14:56:01 +0000 (16:56 +0200)
committerFilip Skrzeczkowski <f.skrzeczkow@samsung.com>
Mon, 17 Jun 2024 09:43:03 +0000 (11:43 +0200)
The following changes in the CAPI documentation were made according
to requests made during the ACR approval process:
 - CAPI_KEY_MANAGER_CLIENT_EXTENDED_MODULE description
 - concatenated data (un)wrapping: code examples of memory handling
 - 3072 bit RSA clarification: minimum Tizen release

Change-Id: I095c088534e56d032041e46a263791877f1176e9

doc/key-manager_doc.h
src/include/ckmc/ckmc-extended.h
src/include/ckmc/ckmc-manager.h

index 62b5fce..97d2935 100644 (file)
  *     <td> @ref CAPI_KEY_MANAGER_TYPES_MODULE</td>
  *     <td> Defines data types used in these APIs and provides utility methods handling them.</td>
  *   </tr>
+ *   <tr>
+ *     <td> @ref CAPI_KEY_MANAGER_CLIENT_EXTENDED_MODULE</td>
+ *     <td> Provides APIs for extended functionality including concatenated data (un)wrapping.</td>
+ *   </tr>
  * </table>
  * It provides a secure repository for keys, certificates, and sensitive data of users and/or their APPs which are protected by Tizen platform.
  * Additionally, it provides secure cryptographic operations for non-exportable keys without revealing key values to clients.
index 2154cd1..a96d2ea 100644 (file)
@@ -57,6 +57,21 @@ extern "C" {
  *          @c 1024 bits.
  * @remarks The @a ppwrapped_key should be released using ckmc_key_free().
  *
+ * @code
+ * ckmc_param_list_h params;    // Initialized elsewhere
+ * ckmc_raw_buffer_s *data;     // Initialized elsewhere
+ * ckmc_key_s *ppwrapped_key;
+ * int ret = ckmc_wrap_concatenated_data(params,
+ *                                       "wrapping_key_alias",
+ *                                       "wrapping_key_password",
+ *                                       "alias",
+ *                                       "password",
+ *                                       data,
+ *                                       &ppwrapped_key);
+ *  ...
+ * ckmc_key_free(ppwrapped_key);
+ * @endcode
+ *
  * @param[in] params Algorithm parameter list handle. See #ckmc_param_list_h and #ckmc_algo_type_e
  *                   for details. Supported algorithms:
  *                   - #CKMC_ALGO_RSA_OAEP
@@ -118,12 +133,29 @@ int ckmc_wrap_concatenated_data(const ckmc_param_list_h params,
  *          wrapped form.
  * @remarks The @a ppdata should be released using ckmc_buffer_free().
  *
+ * @code
+ * ckmc_param_list_h params;    // Initialized elsewhere
+ * ckmc_key_s *wrapped_key;     // Initialized elsewhere
+ * ckmc_policy_s policy;        // Initialized elsewhere
+ * ckmc_raw_buffer_s *ppdata;
+ * int ret = ckmc_unwrap_concatenated_data(params,
+ *                                         "wrapping_key_alias",
+ *                                         "wrapping_key_password",
+ *                                         wrapped_key,
+ *                                         "alias,"
+ *                                         192,
+ *                                         policy,
+ *                                         &ppdata);
+ *  ...
+ * ckmc_buffer_free(ppdata);
+ * @endcode
+ *
  * @param[in] params Algorithm parameter list handle. See #ckmc_param_list_h and #ckmc_algo_type_e
  *                   for details. Supported algorithms:
  *                   - #CKMC_ALGO_RSA_OAEP
  * @param[in] wrapping_key_alias The name of the wrapping key
  * @param[in] wrapping_key_password An optional password of the wrapping key
- * @param[in] wrapped_key The wrapped key to be unwrapped, splitted and stored
+ * @param[in] wrapped_key The wrapped key to be unwrapped, split and stored
  * @param[in] alias The name of a key to be stored
  * @param[in] size The size in bits of the key to be stored. @c 128, @c 192 and @c 256 are supported
  * @param[in] policy The policy about how to store a key securely
index a78d37a..0b3ee77 100644 (file)
@@ -570,8 +570,8 @@ int ckmc_create_key_pair_rsa(const size_t size,
  *          use this function since 3.0.
  * @remarks If password in the policy is provided, the key is additionally encrypted with the
  *          password in the policy.
- * @param[in] size The size of key strength to be created. @c 1024, @c 2048, @c 3072 and @c 4096 are
- *                 supported
+ * @param[in] size The size of key strength to be created. @c 1024, @c 2048, @c 3072 (Since 7.0)
+ *                 and @c 4096 are supported
  * @param[in] private_key_alias The name of private key to be stored
  * @param[in] public_key_alias The name of public key to be stored
  * @param[in] policy_private_key The policy about how to store a private key securely