Improve introductory comments.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard 2022-01-27 11:15:33 +01:00
parent aab5258b7a
commit 0e725c33d4
2 changed files with 13 additions and 13 deletions

View file

@ -1,4 +1,7 @@
/* /*
* This is a simple example of multi-part AEAD computation using both the old
* Cipher API and the new PSA API; its goal is to help migration to PSA Crypto.
*
* Copyright The Mbed TLS Contributors * Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
@ -16,15 +19,12 @@
*/ */
/* /*
* This is a simple example of multi-part AEAD computation using both the old * When used with multi-part AEAD operations, the `mbedtls_cipher_context`
* Cipher API and the new PSA API; its goal is to help migration to PSA Crypto. * serves a triple purpose (1) hold the key, (2) store the algorithm when no
* * operation is active, and (3) save progress information for the current
* When in comes to multi-part HMAC operations, the `mbedtls_md_context` * operation. With PSA those roles are held by disinct objects: (1) a
* serves a triple purpose (1) hold the key, (2) store the algorithm, and (3) * psa_key_id_t to hold the key, a (2) psa_algorithm_t to represent the
* save progress information for the current operation. With PSA those roles * algorithm, and (3) a psa_operation_t for multi-part progress.
* are held by disinct objects: (1) a psa_key_id_t to hold the key, a (2)
* psa_algorithm_t to represent the algorithm, and (3) a psa_operation_t for
* multi-part progress.
* *
* On the other hand, with PSA, the algorithms encodes the desired tag length; * On the other hand, with PSA, the algorithms encodes the desired tag length;
* with Cipher the desired tag length needs to be tracked separately. * with Cipher the desired tag length needs to be tracked separately.

View file

@ -1,4 +1,7 @@
/* /*
* This is a simple example of multi-part HMAC computation using both the old
* MD API and the new PSA API; its goal is to help migration to PSA Crypto.
*
* Copyright The Mbed TLS Contributors * Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
* *
@ -16,9 +19,6 @@
*/ */
/* /*
* This is a simple example of multi-part HMAC computation using both the old
* MD API and the new PSA API; its goal is to help migration to PSA Crypto.
*
* When in comes to multi-part HMAC operations, the `mbedtls_md_context` * When in comes to multi-part HMAC operations, the `mbedtls_md_context`
* serves a dual purpose (1) hold the key, and (2) save progress information * serves a dual purpose (1) hold the key, and (2) save progress information
* for the current operation. With PSA those roles are held by two disinct * for the current operation. With PSA those roles are held by two disinct
@ -26,7 +26,7 @@
* multi-part progress. * multi-part progress.
* *
* This program illustrates this by doing the same sequence of multi-part HMAC * This program illustrates this by doing the same sequence of multi-part HMAC
* computation with both APIs; looking at the two function md() and mac() side * computation with both APIs; looking at the two functions md() and mac() side
* by side should make the differences and similarities clear. * by side should make the differences and similarities clear.
*/ */