Clarify calling update only once with CCM 25/236725/3
authorLukasz Pawelczyk <l.pawelczyk@samsung.com>
Fri, 19 Jun 2020 13:48:48 +0000 (15:48 +0200)
committerLukasz Pawelczyk <l.pawelczyk@samsung.com>
Fri, 26 Jun 2020 15:36:20 +0000 (17:36 +0200)
When using BCM_CCM yaca update function can be called only once for
the plaintext or ciphertext regardless of using AAD. Clarify that in
the docs.

Change-Id: I350404dd0be10dd7c70d565e60a73497b6601de7

api/yaca/yaca_types.h

index ea602bf..ec32158 100644 (file)
@@ -504,8 +504,9 @@ typedef enum {
         *   yaca_encrypt_update() / yaca_seal_update() in encryption / seal operation.\n
         *   Set after yaca_decrypt_initialize() / yaca_open_initialize() and before
         *   yaca_decrypt_update() / yaca_open_update() in decryption / open operation.\n
-        *   @see yaca_context_set_property()
-        *   @see yaca_context_get_property()
+        * .
+        * @see yaca_context_set_property()
+        * @see yaca_context_get_property()
         */
        YACA_BCM_GCM,
 
@@ -559,16 +560,17 @@ typedef enum {
         *   if AAD is used.\n
         *   Set after yaca_encrypt_initialize() / yaca_seal_initialize() and before
         *   yaca_encrypt_update() / yaca_seal_update() in encryption / seal operation.\n
-        *   You can only call yaca_encrypt_update() / yaca_seal_update() once for AAD
-        *   and once for the plaintext.\n
         *   The total encrypted text length must be passed to yaca_decrypt_update() /
         *   yaca_open_update() if AAD is used.\n
         *   Set after yaca_decrypt_initialize() / yaca_open_initialize() and before
         *   yaca_decrypt_update() / yaca_open_update() in decryption / open operation.\n
-        *   You can only call yaca_decrypt_update() / yaca_open_update() once for AAD
-        *   and once for the encrypted text.\n
-        *   @see yaca_context_set_property()
-        *   @see yaca_context_get_property()
+        * .
+        * You can only call yaca_encrypt_update() / yaca_seal_update() once for AAD (if used)
+        * and once for the plaintext.\n
+        * You can only call yaca_decrypt_update() / yaca_open_update() once for AAD (if used)
+        * and once for the encrypted text.\n
+        * @see yaca_context_set_property()
+        * @see yaca_context_get_property()
         */
        YACA_BCM_CCM,