Improve AAD and GCM tag handling in cipher API 47/292947/6
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Mon, 15 May 2023 12:44:43 +0000 (14:44 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Mon, 5 Jun 2023 14:05:26 +0000 (16:05 +0200)
commit96cbbf19ea601d1053a0615884fe4841452eb7d8
treefd2c93cc0b5e73e6ebb6a2dd0fa6aa00470857f8
parentbf0a202bd62b029103922b92c27f9a5c76fb5503
Improve AAD and GCM tag handling in cipher API

* AAD may also be a subject of backend chunk size limitation. Allow
  calling ckmc_cipher_init multiple time do provide consecutive AAD
  portions.
* When encrypted data is split in to chunks there's no way to locate
  the trailing GCM tag part. Add optional buffer argument to
  ckmc_cipher_finalize() to allow passing the tag explicitly. This
  function will also return the tag in the output buffer during
  encryption.

Change-Id: Ic9ddb86e294f8180fb44327c1f4ac4f4650b3e4c
src/include/ckmc/ckmc-manager.h