Improve introductory comments.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
aab5258b7a
commit
0e725c33d4
2 changed files with 13 additions and 13 deletions
|
@ -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
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
|
@ -16,15 +19,12 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* When in comes to multi-part HMAC operations, the `mbedtls_md_context`
|
||||
* serves a triple purpose (1) hold the key, (2) store the algorithm, and (3)
|
||||
* save progress information for the current operation. With PSA those roles
|
||||
* 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.
|
||||
* When used with multi-part AEAD operations, the `mbedtls_cipher_context`
|
||||
* 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
|
||||
* operation. With PSA those roles 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;
|
||||
* with Cipher the desired tag length needs to be tracked separately.
|
||||
|
|
|
@ -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
|
||||
* 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`
|
||||
* 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
|
||||
|
@ -26,7 +26,7 @@
|
|||
* multi-part progress.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
|
Loading…
Reference in a new issue