Some additional API usage clarifications regarding keys 70/160670/1
authorLukasz Pawelczyk <l.pawelczyk@samsung.com>
Fri, 17 Nov 2017 10:31:23 +0000 (11:31 +0100)
committerLukasz Pawelczyk <l.pawelczyk@samsung.com>
Fri, 17 Nov 2017 10:31:23 +0000 (11:31 +0100)
Change-Id: I375ff08deedfdc4669f40dbf6a7473d216e531ed

api/yaca/yaca_key.h

index f946534..bf871f6 100644 (file)
@@ -218,6 +218,8 @@ int yaca_key_generate(yaca_key_type_e key_type, size_t key_bit_len, yaca_key_h *
  * @since_tizen 3.0
  * @remarks This function is used to generate private asymmetric keys
  *          based on pre-generated parameters.
+ * @remarks This function does not support RSA keys, as it's not possible
+ *          to extract parameters from them.
  * @remarks The @a key should be released using yaca_key_destroy().
  * @param[in] params Pre-generated parameters
  * @param[out] prv_key Newly generated private key
@@ -257,6 +259,7 @@ int yaca_key_extract_public(const yaca_key_h prv_key, yaca_key_h *pub_key);
  * @brief Extracts parameters from a private or a public key.
  * @since_tizen 3.0
  * @remarks The @a params should be released using yaca_key_destroy().
+ * @remarks This function does not support RSA keys.
  * @param[in] key A key to extract the parameters from
  * @param[out] params Extracted parameters
  * @return #YACA_ERROR_NONE on success,
@@ -276,9 +279,10 @@ int yaca_key_extract_parameters(const yaca_key_h key, yaca_key_h *params);
 /**
  * @brief Derives a shared secret using Diffie-Helmann or EC Diffie-Helmann key exchange protocol.
  * @since_tizen 3.0
- * @remarks The @a secret should not be used as a symmetric key,
- *          to produce a symmetric key pass the secret to a key derivation function (KDF)
+ * @remarks The @a secret should not be used as a symmetric key.
+ *          To produce a symmetric key pass the secret to a key derivation function (KDF)
  *          or a message digest function.
+ * @remarks Both the keys passed should be of DH type.
  * @remarks The @a secret should be freed with yaca_free().
  * @param[in] prv_key Our private key
  * @param[in] pub_key Peer public key