2
0

psa_crypto_aead.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511
  1. /*
  2. * PSA AEAD driver entry points
  3. */
  4. /*
  5. * Copyright The Mbed TLS Contributors
  6. * SPDX-License-Identifier: Apache-2.0
  7. *
  8. * Licensed under the Apache License, Version 2.0 (the "License"); you may
  9. * not use this file except in compliance with the License.
  10. * You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  16. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. */
  20. #ifndef PSA_CRYPTO_AEAD_H
  21. #define PSA_CRYPTO_AEAD_H
  22. #include <psa/crypto.h>
  23. /**
  24. * \brief Process an authenticated encryption operation.
  25. *
  26. * \note The signature of this function is that of a PSA driver
  27. * aead_encrypt entry point. This function behaves as an aead_encrypt
  28. * entry point as defined in the PSA driver interface specification for
  29. * transparent drivers.
  30. *
  31. * \param[in] attributes The attributes of the key to use for the
  32. * operation.
  33. * \param[in] key_buffer The buffer containing the key context.
  34. * \param key_buffer_size Size of the \p key_buffer buffer in bytes.
  35. * \param alg The AEAD algorithm to compute.
  36. * \param[in] nonce Nonce or IV to use.
  37. * \param nonce_length Size of the nonce buffer in bytes. This must
  38. * be appropriate for the selected algorithm.
  39. * The default nonce size is
  40. * PSA_AEAD_NONCE_LENGTH(key_type, alg) where
  41. * key_type is the type of key.
  42. * \param[in] additional_data Additional data that will be authenticated
  43. * but not encrypted.
  44. * \param additional_data_length Size of additional_data in bytes.
  45. * \param[in] plaintext Data that will be authenticated and encrypted.
  46. * \param plaintext_length Size of plaintext in bytes.
  47. * \param[out] ciphertext Output buffer for the authenticated and
  48. * encrypted data. The additional data is not
  49. * part of this output. For algorithms where the
  50. * encrypted data and the authentication tag are
  51. * defined as separate outputs, the
  52. * authentication tag is appended to the
  53. * encrypted data.
  54. * \param ciphertext_size Size of the ciphertext buffer in bytes. This
  55. * must be appropriate for the selected algorithm
  56. * and key:
  57. * - A sufficient output size is
  58. * PSA_AEAD_ENCRYPT_OUTPUT_SIZE(key_type, alg,
  59. * plaintext_length) where key_type is the type
  60. * of key.
  61. * - PSA_AEAD_ENCRYPT_OUTPUT_MAX_SIZE(
  62. * plaintext_length) evaluates to the maximum
  63. * ciphertext size of any supported AEAD
  64. * encryption.
  65. * \param[out] ciphertext_length On success, the size of the output in the
  66. * ciphertext buffer.
  67. *
  68. * \retval #PSA_SUCCESS Success.
  69. * \retval #PSA_ERROR_NOT_SUPPORTED
  70. * \p alg is not supported.
  71. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY
  72. * \retval #PSA_ERROR_BUFFER_TOO_SMALL
  73. * ciphertext_size is too small.
  74. * \retval #PSA_ERROR_CORRUPTION_DETECTED
  75. */
  76. psa_status_t mbedtls_psa_aead_encrypt(
  77. const psa_key_attributes_t *attributes,
  78. const uint8_t *key_buffer, size_t key_buffer_size,
  79. psa_algorithm_t alg,
  80. const uint8_t *nonce, size_t nonce_length,
  81. const uint8_t *additional_data, size_t additional_data_length,
  82. const uint8_t *plaintext, size_t plaintext_length,
  83. uint8_t *ciphertext, size_t ciphertext_size, size_t *ciphertext_length );
  84. /**
  85. * \brief Process an authenticated decryption operation.
  86. *
  87. * \note The signature of this function is that of a PSA driver
  88. * aead_decrypt entry point. This function behaves as an aead_decrypt
  89. * entry point as defined in the PSA driver interface specification for
  90. * transparent drivers.
  91. *
  92. * \param[in] attributes The attributes of the key to use for the
  93. * operation.
  94. * \param[in] key_buffer The buffer containing the key context.
  95. * \param key_buffer_size Size of the \p key_buffer buffer in bytes.
  96. * \param alg The AEAD algorithm to compute.
  97. * \param[in] nonce Nonce or IV to use.
  98. * \param nonce_length Size of the nonce buffer in bytes. This must
  99. * be appropriate for the selected algorithm.
  100. * The default nonce size is
  101. * PSA_AEAD_NONCE_LENGTH(key_type, alg) where
  102. * key_type is the type of key.
  103. * \param[in] additional_data Additional data that has been authenticated
  104. * but not encrypted.
  105. * \param additional_data_length Size of additional_data in bytes.
  106. * \param[in] ciphertext Data that has been authenticated and
  107. * encrypted. For algorithms where the encrypted
  108. * data and the authentication tag are defined
  109. * as separate inputs, the buffer contains
  110. * encrypted data followed by the authentication
  111. * tag.
  112. * \param ciphertext_length Size of ciphertext in bytes.
  113. * \param[out] plaintext Output buffer for the decrypted data.
  114. * \param plaintext_size Size of the plaintext buffer in bytes. This
  115. * must be appropriate for the selected algorithm
  116. * and key:
  117. * - A sufficient output size is
  118. * PSA_AEAD_DECRYPT_OUTPUT_SIZE(key_type, alg,
  119. * ciphertext_length) where key_type is the
  120. * type of key.
  121. * - PSA_AEAD_DECRYPT_OUTPUT_MAX_SIZE(
  122. * ciphertext_length) evaluates to the maximum
  123. * plaintext size of any supported AEAD
  124. * decryption.
  125. * \param[out] plaintext_length On success, the size of the output in the
  126. * plaintext buffer.
  127. *
  128. * \retval #PSA_SUCCESS Success.
  129. * \retval #PSA_ERROR_INVALID_SIGNATURE
  130. * The cipher is not authentic.
  131. * \retval #PSA_ERROR_NOT_SUPPORTED
  132. * \p alg is not supported.
  133. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY
  134. * \retval #PSA_ERROR_BUFFER_TOO_SMALL
  135. * plaintext_size is too small.
  136. * \retval #PSA_ERROR_CORRUPTION_DETECTED
  137. */
  138. psa_status_t mbedtls_psa_aead_decrypt(
  139. const psa_key_attributes_t *attributes,
  140. const uint8_t *key_buffer, size_t key_buffer_size,
  141. psa_algorithm_t alg,
  142. const uint8_t *nonce, size_t nonce_length,
  143. const uint8_t *additional_data, size_t additional_data_length,
  144. const uint8_t *ciphertext, size_t ciphertext_length,
  145. uint8_t *plaintext, size_t plaintext_size, size_t *plaintext_length );
  146. /** Set the key for a multipart authenticated encryption operation.
  147. *
  148. * \note The signature of this function is that of a PSA driver
  149. * aead_encrypt_setup entry point. This function behaves as an
  150. * aead_encrypt_setup entry point as defined in the PSA driver interface
  151. * specification for transparent drivers.
  152. *
  153. * If an error occurs at any step after a call to
  154. * mbedtls_psa_aead_encrypt_setup(), the operation is reset by the PSA core by a
  155. * call to mbedtls_psa_aead_abort(). The PSA core may call
  156. * mbedtls_psa_aead_abort() at any time after the operation has been
  157. * initialized, and is required to when the operation is no longer needed.
  158. *
  159. * \param[in,out] operation The operation object to set up. It must have
  160. * been initialized as per the documentation for
  161. * #mbedtls_psa_aead_operation_t and not yet in
  162. * use.
  163. * \param[in] attributes The attributes of the key to use for the
  164. * operation.
  165. * \param[in] key_buffer The buffer containing the key context.
  166. * \param key_buffer_size Size of the \p key_buffer buffer in bytes.
  167. It must be consistent with the size in bits
  168. recorded in \p attributes.
  169. * \param alg The AEAD algorithm to compute
  170. * (\c PSA_ALG_XXX value such that
  171. * #PSA_ALG_IS_AEAD(\p alg) is true).
  172. *
  173. * \retval #PSA_SUCCESS
  174. * Success.
  175. * \retval #PSA_ERROR_INVALID_ARGUMENT
  176. * An invalid block length was supplied.
  177. * \retval #PSA_ERROR_NOT_SUPPORTED
  178. * \p alg is not supported.
  179. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY
  180. * Failed to allocate memory for key material
  181. */
  182. psa_status_t mbedtls_psa_aead_encrypt_setup(
  183. mbedtls_psa_aead_operation_t *operation,
  184. const psa_key_attributes_t *attributes,
  185. const uint8_t *key_buffer,
  186. size_t key_buffer_size,
  187. psa_algorithm_t alg );
  188. /** Set the key for a multipart authenticated decryption operation.
  189. *
  190. * \note The signature of this function is that of a PSA driver
  191. * aead_decrypt_setup entry point. This function behaves as an
  192. * aead_decrypt_setup entry point as defined in the PSA driver interface
  193. * specification for transparent drivers.
  194. *
  195. * If an error occurs at any step after a call to
  196. * mbedtls_psa_aead_decrypt_setup(), the PSA core resets the operation by a
  197. * call to mbedtls_psa_aead_abort(). The PSA core may call
  198. * mbedtls_psa_aead_abort() at any time after the operation has been
  199. * initialized, and is required to when the operation is no longer needed.
  200. *
  201. * \param[in,out] operation The operation object to set up. It must have
  202. * been initialized as per the documentation for
  203. * #mbedtls_psa_aead_operation_t and not yet in
  204. * use.
  205. * \param[in] attributes The attributes of the key to use for the
  206. * operation.
  207. * \param[in] key_buffer The buffer containing the key context.
  208. * \param key_buffer_size Size of the \p key_buffer buffer in bytes.
  209. It must be consistent with the size in bits
  210. recorded in \p attributes.
  211. * \param alg The AEAD algorithm to compute
  212. * (\c PSA_ALG_XXX value such that
  213. * #PSA_ALG_IS_AEAD(\p alg) is true).
  214. *
  215. * \retval #PSA_SUCCESS
  216. * Success.
  217. * \retval #PSA_ERROR_INVALID_ARGUMENT
  218. * An invalid block length was supplied.
  219. * \retval #PSA_ERROR_NOT_SUPPORTED
  220. * \p alg is not supported.
  221. * \retval #PSA_ERROR_INSUFFICIENT_MEMORY
  222. * Failed to allocate memory for key material
  223. */
  224. psa_status_t mbedtls_psa_aead_decrypt_setup(
  225. mbedtls_psa_aead_operation_t *operation,
  226. const psa_key_attributes_t *attributes,
  227. const uint8_t *key_buffer,
  228. size_t key_buffer_size,
  229. psa_algorithm_t alg );
  230. /** Set the nonce for an authenticated encryption or decryption operation.
  231. *
  232. * \note The signature of this function is that of a PSA driver aead_set_nonce
  233. * entry point. This function behaves as an aead_set_nonce entry point as
  234. * defined in the PSA driver interface specification for transparent
  235. * drivers.
  236. *
  237. * This function sets the nonce for the authenticated
  238. * encryption or decryption operation.
  239. *
  240. * The PSA core calls mbedtls_psa_aead_encrypt_setup() or
  241. * mbedtls_psa_aead_decrypt_setup() before calling this function.
  242. *
  243. * If this function returns an error status, the PSA core will call
  244. * mbedtls_psa_aead_abort().
  245. *
  246. * \param[in,out] operation Active AEAD operation.
  247. * \param[in] nonce Buffer containing the nonce to use.
  248. * \param nonce_length Size of the nonce in bytes.
  249. *
  250. * \retval #PSA_SUCCESS
  251. * Success.
  252. * \retval #PSA_ERROR_INVALID_ARGUMENT
  253. * The size of \p nonce is not acceptable for the chosen algorithm.
  254. * \retval #PSA_ERROR_NOT_SUPPORTED
  255. * Algorithm previously set is not supported in this configuration of
  256. * the library.
  257. */
  258. psa_status_t mbedtls_psa_aead_set_nonce(
  259. mbedtls_psa_aead_operation_t *operation,
  260. const uint8_t *nonce,
  261. size_t nonce_length );
  262. /** Declare the lengths of the message and additional data for AEAD.
  263. *
  264. * \note The signature of this function is that of a PSA driver aead_set_lengths
  265. * entry point. This function behaves as an aead_set_lengths entry point
  266. * as defined in the PSA driver interface specification for transparent
  267. * drivers.
  268. *
  269. * The PSA core calls this function before calling mbedtls_psa_aead_update_ad()
  270. * or mbedtls_psa_aead_update() if the algorithm for the operation requires it.
  271. * If the algorithm does not require it, calling this function is optional, but
  272. * if this function is called then the implementation must enforce the lengths.
  273. *
  274. * The PSA core may call this function before or after setting the nonce with
  275. * mbedtls_psa_aead_set_nonce().
  276. *
  277. * - For #PSA_ALG_CCM, calling this function is required.
  278. * - For the other AEAD algorithms defined in this specification, calling
  279. * this function is not required.
  280. *
  281. * If this function returns an error status, the PSA core calls
  282. * mbedtls_psa_aead_abort().
  283. *
  284. * \param[in,out] operation Active AEAD operation.
  285. * \param ad_length Size of the non-encrypted additional
  286. * authenticated data in bytes.
  287. * \param plaintext_length Size of the plaintext to encrypt in bytes.
  288. *
  289. * \retval #PSA_SUCCESS
  290. * Success.
  291. * \retval #PSA_ERROR_INVALID_ARGUMENT
  292. * At least one of the lengths is not acceptable for the chosen
  293. * algorithm.
  294. * \retval #PSA_ERROR_NOT_SUPPORTED
  295. * Algorithm previously set is not supported in this configuration of
  296. * the library.
  297. */
  298. psa_status_t mbedtls_psa_aead_set_lengths(
  299. mbedtls_psa_aead_operation_t *operation,
  300. size_t ad_length,
  301. size_t plaintext_length );
  302. /** Pass additional data to an active AEAD operation.
  303. *
  304. * \note The signature of this function is that of a PSA driver
  305. * aead_update_ad entry point. This function behaves as an aead_update_ad
  306. * entry point as defined in the PSA driver interface specification for
  307. * transparent drivers.
  308. *
  309. * Additional data is authenticated, but not encrypted.
  310. *
  311. * The PSA core can call this function multiple times to pass successive
  312. * fragments of the additional data. It will not call this function after
  313. * passing data to encrypt or decrypt with mbedtls_psa_aead_update().
  314. *
  315. * Before calling this function, the PSA core will:
  316. * 1. Call either mbedtls_psa_aead_encrypt_setup() or
  317. * mbedtls_psa_aead_decrypt_setup().
  318. * 2. Set the nonce with mbedtls_psa_aead_set_nonce().
  319. *
  320. * If this function returns an error status, the PSA core will call
  321. * mbedtls_psa_aead_abort().
  322. *
  323. * \param[in,out] operation Active AEAD operation.
  324. * \param[in] input Buffer containing the fragment of
  325. * additional data.
  326. * \param input_length Size of the \p input buffer in bytes.
  327. *
  328. * \retval #PSA_SUCCESS
  329. * Success.
  330. * \retval #PSA_ERROR_NOT_SUPPORTED
  331. * Algorithm previously set is not supported in this configuration of
  332. * the library.
  333. */
  334. psa_status_t mbedtls_psa_aead_update_ad(
  335. mbedtls_psa_aead_operation_t *operation,
  336. const uint8_t *input,
  337. size_t input_length );
  338. /** Encrypt or decrypt a message fragment in an active AEAD operation.
  339. *
  340. * \note The signature of this function is that of a PSA driver
  341. * aead_update entry point. This function behaves as an aead_update entry
  342. * point as defined in the PSA driver interface specification for
  343. * transparent drivers.
  344. *
  345. * Before calling this function, the PSA core will:
  346. * 1. Call either mbedtls_psa_aead_encrypt_setup() or
  347. * mbedtls_psa_aead_decrypt_setup(). The choice of setup function
  348. * determines whether this function encrypts or decrypts its input.
  349. * 2. Set the nonce with mbedtls_psa_aead_set_nonce().
  350. * 3. Call mbedtls_psa_aead_update_ad() to pass all the additional data.
  351. *
  352. * If this function returns an error status, the PSA core will call
  353. * mbedtls_psa_aead_abort().
  354. *
  355. * This function does not require the input to be aligned to any
  356. * particular block boundary. If the implementation can only process
  357. * a whole block at a time, it must consume all the input provided, but
  358. * it may delay the end of the corresponding output until a subsequent
  359. * call to mbedtls_psa_aead_update(), mbedtls_psa_aead_finish() provides
  360. * sufficient input. The amount of data that can be delayed in this way is
  361. * bounded by #PSA_AEAD_UPDATE_OUTPUT_SIZE.
  362. *
  363. * \param[in,out] operation Active AEAD operation.
  364. * \param[in] input Buffer containing the message fragment to
  365. * encrypt or decrypt.
  366. * \param input_length Size of the \p input buffer in bytes.
  367. * \param[out] output Buffer where the output is to be written.
  368. * \param output_size Size of the \p output buffer in bytes.
  369. * This must be appropriate for the selected
  370. * algorithm and key:
  371. * - A sufficient output size is
  372. * #PSA_AEAD_UPDATE_OUTPUT_SIZE(\c key_type,
  373. * \c alg, \p input_length) where
  374. * \c key_type is the type of key and \c alg is
  375. * the algorithm that were used to set up the
  376. * operation.
  377. * - #PSA_AEAD_UPDATE_OUTPUT_MAX_SIZE(\p
  378. * input_length) evaluates to the maximum
  379. * output size of any supported AEAD
  380. * algorithm.
  381. * \param[out] output_length On success, the number of bytes
  382. * that make up the returned output.
  383. *
  384. * \retval #PSA_SUCCESS
  385. * Success.
  386. *
  387. * \retval #PSA_ERROR_BUFFER_TOO_SMALL
  388. * The size of the \p output buffer is too small.
  389. * #PSA_AEAD_UPDATE_OUTPUT_SIZE(\c key_type, \c alg, \p input_length) or
  390. * #PSA_AEAD_UPDATE_OUTPUT_MAX_SIZE(\p input_length) can be used to
  391. * determine the required buffer size.
  392. */
  393. psa_status_t mbedtls_psa_aead_update(
  394. mbedtls_psa_aead_operation_t *operation,
  395. const uint8_t *input,
  396. size_t input_length,
  397. uint8_t *output,
  398. size_t output_size,
  399. size_t *output_length );
  400. /** Finish encrypting a message in an AEAD operation.
  401. *
  402. * \note The signature of this function is that of a PSA driver
  403. * aead_finish entry point. This function behaves as an aead_finish entry
  404. * point as defined in the PSA driver interface specification for
  405. * transparent drivers.
  406. *
  407. * The operation must have been set up by the PSA core with
  408. * mbedtls_psa_aead_encrypt_setup().
  409. *
  410. * This function finishes the authentication of the additional data
  411. * formed by concatenating the inputs passed to preceding calls to
  412. * mbedtls_psa_aead_update_ad() with the plaintext formed by concatenating the
  413. * inputs passed to preceding calls to mbedtls_psa_aead_update().
  414. *
  415. * This function has two output buffers:
  416. * - \p ciphertext contains trailing ciphertext that was buffered from
  417. * preceding calls to mbedtls_psa_aead_update().
  418. * - \p tag contains the authentication tag.
  419. *
  420. * Whether or not this function returns successfuly, the PSA core subsequently
  421. * calls mbedtls_psa_aead_abort() to deactivate the operation.
  422. *
  423. * \param[in,out] operation Active AEAD operation.
  424. * \param[out] ciphertext Buffer where the last part of the ciphertext
  425. * is to be written.
  426. * \param ciphertext_size Size of the \p ciphertext buffer in bytes.
  427. * This must be appropriate for the selected
  428. * algorithm and key:
  429. * - A sufficient output size is
  430. * #PSA_AEAD_FINISH_OUTPUT_SIZE(\c key_type,
  431. * \c alg) where \c key_type is the type of key
  432. * and \c alg is the algorithm that were used to
  433. * set up the operation.
  434. * - #PSA_AEAD_FINISH_OUTPUT_MAX_SIZE evaluates to
  435. * the maximum output size of any supported AEAD
  436. * algorithm.
  437. * \param[out] ciphertext_length On success, the number of bytes of
  438. * returned ciphertext.
  439. * \param[out] tag Buffer where the authentication tag is
  440. * to be written.
  441. * \param tag_size Size of the \p tag buffer in bytes.
  442. * This must be appropriate for the selected
  443. * algorithm and key:
  444. * - The exact tag size is #PSA_AEAD_TAG_LENGTH(\c
  445. * key_type, \c key_bits, \c alg) where
  446. * \c key_type and \c key_bits are the type and
  447. * bit-size of the key, and \c alg are the
  448. * algorithm that were used in the call to
  449. * mbedtls_psa_aead_encrypt_setup().
  450. * - #PSA_AEAD_TAG_MAX_SIZE evaluates to the
  451. * maximum tag size of any supported AEAD
  452. * algorithm.
  453. * \param[out] tag_length On success, the number of bytes
  454. * that make up the returned tag.
  455. *
  456. * \retval #PSA_SUCCESS
  457. * Success.
  458. * \retval #PSA_ERROR_BUFFER_TOO_SMALL
  459. * The size of the \p tag buffer is too small.
  460. * #PSA_AEAD_TAG_LENGTH(\c key_type, key_bits, \c alg) or
  461. * #PSA_AEAD_TAG_MAX_SIZE can be used to determine the required \p tag
  462. * buffer size.
  463. */
  464. psa_status_t mbedtls_psa_aead_finish(
  465. mbedtls_psa_aead_operation_t *operation,
  466. uint8_t *ciphertext,
  467. size_t ciphertext_size,
  468. size_t *ciphertext_length,
  469. uint8_t *tag,
  470. size_t tag_size,
  471. size_t *tag_length );
  472. /** Abort an AEAD operation.
  473. *
  474. * \note The signature of this function is that of a PSA driver
  475. * aead_abort entry point. This function behaves as an aead_abort entry
  476. * point as defined in the PSA driver interface specification for
  477. * transparent drivers.
  478. *
  479. * Aborting an operation frees all associated resources except for the
  480. * \p operation structure itself. Once aborted, the operation object
  481. * can be reused for another operation by the PSA core by it calling
  482. * mbedtls_psa_aead_encrypt_setup() or mbedtls_psa_aead_decrypt_setup() again.
  483. *
  484. * The PSA core may call this function any time after the operation object has
  485. * been initialized as described in #mbedtls_psa_aead_operation_t.
  486. *
  487. * In particular, calling mbedtls_psa_aead_abort() after the operation has been
  488. * terminated by a call to mbedtls_psa_aead_abort() or
  489. * mbedtls_psa_aead_finish() is safe and has no effect.
  490. *
  491. * \param[in,out] operation Initialized AEAD operation.
  492. *
  493. * \retval #PSA_SUCCESS
  494. * Success.
  495. */
  496. psa_status_t mbedtls_psa_aead_abort(
  497. mbedtls_psa_aead_operation_t *operation );
  498. #endif /* PSA_CRYPTO_AEAD */