Extend E2EE API support back to 6.0 85/293885/2
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 7 Jun 2023 08:32:58 +0000 (10:32 +0200)
committerDariusz Michaluk <d.michaluk@samsung.com>
Wed, 7 Jun 2023 10:44:21 +0000 (10:44 +0000)
Change-Id: I7aff7fb9a35fa26804303a11a4cf0a8c03fb287c

src/include/ckmc/ckmc-manager.h
src/include/ckmc/ckmc-type.h

index 76cca21fd10918370af3b7c6e5a23d03f6fea83b..6386f23cfd7178adff29f31042f13924ba4b0e0a 100644 (file)
@@ -1104,7 +1104,7 @@ int ckmc_decrypt_data(ckmc_param_list_h params,
 /**
  * @brief Unwraps one key with another and stores it inside key manager.
  *
- * @since_tizen 6.5
+ * @since_tizen 6.0
  *
  * @remarks The wrapping key must be either symmetric (#CKMC_KEY_AES) or private RSA
  *          (#CKMC_KEY_RSA_PRIVATE).
@@ -1165,7 +1165,7 @@ int ckmc_import_wrapped_key(const ckmc_param_list_h params,
 /**
  * @brief Wraps one key with another and returns it to the client.
  *
- * @since_tizen 6.5
+ * @since_tizen 6.0
  *
  * @remarks The wrapping key must be either symmetric (#CKMC_KEY_AES) or public RSA
  *          (#CKMC_KEY_RSA_PUBLIC).
@@ -1217,7 +1217,7 @@ int ckmc_export_wrapped_key(const ckmc_param_list_h params,
 /**
  * @brief Derives a secret or key from another key/secret and stores it inside key manager.
  *
- * @since_tizen 6.5
+ * @since_tizen 6.0
  *
  * @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
@@ -1267,7 +1267,7 @@ int ckmc_key_derive(const ckmc_param_list_h params,
 /**
  * @brief Sets up a symmetric encryption or decryption context with given key and parameters.
  *
- * @since_tizen 6.5
+ * @since_tizen 6.0
  *
  * @remarks The newly created @a context must be destroyed using ckmc_cipher_free() when it's no
  *          longer needed.
@@ -1316,7 +1316,7 @@ int ckmc_cipher_initialize(ckmc_param_list_h params,
  * @brief Performs symmetric encryption or decryption of the input and places the result in the
  *        output.
  *
- * @since_tizen 6.5
+ * @since_tizen 6.0
  *
  * @remarks The function may be called multiple times to encrypt succcessive blocks of data.
  * @remarks The newly created @a ppout must be destroyed using ckmc_buffer_free() when it's no
@@ -1344,7 +1344,7 @@ int ckmc_cipher_update(ckmc_cipher_ctx_h context,
 /**
  * @brief Finalizes symmetric encryption or decryption and returns remaining output if any.
  *
- * @since_tizen 6.5
+ * @since_tizen 6.0
  *
  * @remarks After the call to this function the ckmc_cipher_update() can be called no more.
  * @remarks The newly created @a ppout must be destroyed using ckmc_buffer_free() when it's no
@@ -1375,7 +1375,7 @@ int ckmc_cipher_finalize(ckmc_cipher_ctx_h context,
 /**
  * @brief Destroys the encryption/decryption context and releases all its resources.
  *
- * @since_tizen 6.5
+ * @since_tizen 6.0
  *
  * @param[in] context Encryption/decryption context created with ckmc_cipher_initialize()
  *
@@ -1389,7 +1389,7 @@ void ckmc_cipher_free(ckmc_cipher_ctx_h context);
 /**
  * @brief Retrieves backend information.
  *
- * @since_tizen 6.5
+ * @since_tizen 6.0
  *
  * @remarks The newly created @a ppinfo must be destroyed using ckmc_backend_info_free() when it's
  *          no longer needed.
index 192598bb4ff6683856a603ba882a9a2d4ae5e87f..1d6d9ccbe85641beadd72b732f6bb043ca8eec0b 100644 (file)
@@ -300,45 +300,45 @@ typedef enum __ckmc_param_name {
        CKMC_PARAM_ED_LABEL, /**< buffer - RSA OAEP label (not supported at the moment) */
 
        CKMC_PARAM_KDF_PRF = 401, /**< integer - pseudo-random function number (see #ckmc_kdf_prf_e)
-                                 (Since 6.5) */
+                                 (Since 6.0) */
        CKMC_PARAM_KDF_LEN, /**< integer - length of the derived key in bytes. The value must be one of
-                           {16, 24, 32} (Since 6.5) */
+                           {16, 24, 32} (Since 6.0) */
 
-       CKMC_PARAM_KBKDF_MODE, /**< integer - KDF mode number (see #ckmc_kbkdf_mode_e) (Since 6.5) */
+       CKMC_PARAM_KBKDF_MODE, /**< integer - KDF mode number (see #ckmc_kbkdf_mode_e) (Since 6.0) */
        CKMC_PARAM_KBKDF_LABEL, /**< buffer - the purpose for the derived key. Conflicts with
-                               #CKMC_PARAM_KBKDF_FIXED_INPUT (Since 6.5) */
+                               #CKMC_PARAM_KBKDF_FIXED_INPUT (Since 6.0) */
 
        CKMC_PARAM_KBKDF_CONTEXT, /**< buffer - information related to the derived key. Conflicts with
-                                 #CKMC_PARAM_KBKDF_FIXED_INPUT (Since 6.5) */
+                                 #CKMC_PARAM_KBKDF_FIXED_INPUT (Since 6.0) */
 
        CKMC_PARAM_KBKDF_FIXED_INPUT, /**< buffer - KBKDF fixed input replacing context and label
-                                      (Since 6.5). Conflicts with:
+                                      (Since 6.0). Conflicts with:
                                      - #CKMC_PARAM_KBKDF_LABEL,
                                      - #CKMC_PARAM_KBKDF_CONTEXT,
                                      - #CKMC_PARAM_KBKDF_LLEN,
                                      - #CKMC_PARAM_KBKDF_NO_SEPARATOR */
        CKMC_PARAM_KBKDF_COUNTER_LOCATION, /**< integer - specifies location of the counter in KBKDF
-                                          (see #ckmc_kbkdf_counter_location_e) (Since 6.5) */
+                                          (see #ckmc_kbkdf_counter_location_e) (Since 6.0) */
        CKMC_PARAM_KBKDF_RLEN, /**< integer - specifies the length of the counter representation in bits
                               in KBKDF. The value must be one of {8, 16, 24, 32}. If not set, the
-                              default value = 32 will be used. (Since 6.5) */
+                              default value = 32 will be used. (Since 6.0) */
        CKMC_PARAM_KBKDF_LLEN, /**< integer - specifies the length of the length suffix representation
                               in bits in KBKDF. The value must be one of {0, 8, 16, 24, 32}. If set to
                               0 the length suffix will be skipped. If not set, the default value = 32
                               will be used. The length suffix is skipped if
                               #CKMC_PARAM_KBKDF_FIXED_INPUT is passed and this parameter conflicts
-                              with it. (Since 6.5) */
+                              with it. (Since 6.0) */
        CKMC_PARAM_KBKDF_NO_SEPARATOR, /**< integer - presence of this parameter will skip the zero
                                       octet separator between label and context in KBKDF.
                                       All values are allowed. This parameter conflicts with
-                                      #CKMC_PARAM_KBKDF_FIXED_INPUT. (Since 6.5) */
+                                      #CKMC_PARAM_KBKDF_FIXED_INPUT. (Since 6.0) */
 
-       CKMC_PARAM_ECDH_PUBKEY, /**< buffer - EC public key in DER form (see #ckmc_key_s) (Since 6.5) */
+       CKMC_PARAM_ECDH_PUBKEY, /**< buffer - EC public key in DER form (see #ckmc_key_s) (Since 6.0) */
 } ckmc_param_name_e;
 
 /**
  * @brief Enumeration for key derivation function pseudo-random function parameter.
- * @since_tizen 6.5
+ * @since_tizen 6.0
  *
  * @see ckmc_key_derive()
  * @see #ckmc_param_name_e
@@ -351,7 +351,7 @@ typedef enum __ckmc_kdf_prf {
 
 /**
  * @brief Enumeration for key based key derivation function mode.
- * @since_tizen 6.5
+ * @since_tizen 6.0
  *
  * @see ckmc_key_derive()
  * @see #ckmc_param_name_e
@@ -362,7 +362,7 @@ typedef enum __ckmc_kbkdf_mode {
 
 /**
  * @brief Enumeration for KBKDF counter location relative to fixed input.
- * @since_tizen 6.5
+ * @since_tizen 6.0
  *
  * @see ckmc_key_derive()
  * @see #ckmc_param_name_e
@@ -463,7 +463,7 @@ typedef enum __ckmc_algo_type {
 
 /**
  * @brief Enumeration for backend identifiers.
- * @since_tizen 6.5
+ * @since_tizen 6.0
  * @see ckmc_get_backend_info()
  * @see ckmc_alias_info_get_backend()
  */
@@ -476,7 +476,7 @@ struct __ckmc_backend_info_s;
 
 /**
  * @brief Backend information handle.
- * @since_tizen 6.5
+ * @since_tizen 6.0
  * @see ckmc_alias_info_get_backend()
  * @see ckmc_get_backend_info()
  * @see ckmc_backend_get_max_chunk_size()
@@ -486,7 +486,7 @@ typedef struct __ckmc_backend_info_s *ckmc_backend_info_h;
 
 /**
  * @brief Encryption/decryption context handle.
- * @since_tizen 6.5
+ * @since_tizen 6.0
  * @see ckmc_cipher_initialize()
  * @see ckmc_cipher_update()
  * @see ckmc_cipher_finalize()
@@ -525,7 +525,7 @@ int ckmc_alias_info_is_password_protected(const ckmc_alias_info_s* info,
 
 /**
  * @brief Gets the backend identifier from #ckmc_alias_info_s structure.
- * @since_tizen 6.5
+ * @since_tizen 6.0
  * @param[in] info The pointer to the #ckmc_alias_info_s structure
  * @param[out] backend The pointer to the backend identifier
  * @return #CKMC_ERROR_NONE on success, otherwise a negative error value
@@ -1097,7 +1097,7 @@ int ckmc_generate_new_params(ckmc_algo_type_e type, ckmc_param_list_h *pparams);
  * @brief Retrieves maximum data chunk size that can be passed to given backend. This is the maximum
  *        size of data passed for encryption/decryption.
  *
- * @since_tizen 6.5
+ * @since_tizen 6.0
  *
  * @param[in] info Backend info handle
  * @param[out] size Maximum chunk size
@@ -1115,7 +1115,7 @@ int ckmc_backend_get_max_chunk_size(const ckmc_backend_info_h info, size_t* size
 /**
  * @brief Destroys the backend information handle and releases all its resources.
  *
- * @since_tizen 6.5
+ * @since_tizen 6.0
  *
  * @param[in] info Backend information handle created with ckmc_get_backend_info()
  *