Rename the PSA driver context structure headers to _primitives

This is a preparatory step in order to be able to organize the include
chain from crypto_struct in such a way that the MAC operation structure
for the PSA 'software' driver can make use of the hash operation structure.

Conceptually:
* Primitives:
  * Hash
  * Cipher
* Composites:
  * AEAD (can use cipher)
  * MAC (can use cipher and/or hash)

Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
Steven Cooreman 2021-04-26 11:54:58 +02:00
parent 5b416e95b2
commit 675501d9db
4 changed files with 14 additions and 11 deletions

View file

@ -1,6 +1,8 @@
/* /*
* Context structure declaration of the Mbed TLS software-based PSA drivers * Context structure declaration of the Mbed TLS software-based PSA drivers
* called through the PSA Crypto driver dispatch layer. * called through the PSA Crypto driver dispatch layer.
* This file contains the context structures of those algorithms which do not
* rely on other algorithms, i.e. are 'primitive' algorithms.
* *
* \note This file may not be included directly. Applications must * \note This file may not be included directly. Applications must
* include psa/crypto.h. * include psa/crypto.h.
@ -28,8 +30,8 @@
* limitations under the License. * limitations under the License.
*/ */
#ifndef PSA_CRYPTO_BUILTIN_H #ifndef PSA_CRYPTO_BUILTIN_PRIMITIVES_H
#define PSA_CRYPTO_BUILTIN_H #define PSA_CRYPTO_BUILTIN_PRIMITIVES_H
#include <psa/crypto_driver_common.h> #include <psa/crypto_driver_common.h>
@ -141,4 +143,4 @@ typedef struct {
#endif /* PSA_CRYPTO_DRIVER_TEST */ #endif /* PSA_CRYPTO_DRIVER_TEST */
#endif /* PSA_CRYPTO_BUILTIN_H */ #endif /* PSA_CRYPTO_BUILTIN_PRIMITIVES_H */

View file

@ -1,6 +1,7 @@
/* /*
* Declaration of context structures for use with the PSA driver wrapper * Declaration of context structures for use with the PSA driver wrapper
* interface. * interface. This file contains the context structures for 'primitive'
* operations, i.e. those operations which do not rely on other contexts.
* *
* Warning: This file will be auto-generated in the future. * Warning: This file will be auto-generated in the future.
* *
@ -29,8 +30,8 @@
* limitations under the License. * limitations under the License.
*/ */
#ifndef PSA_CRYPTO_DRIVER_CONTEXTS_H #ifndef PSA_CRYPTO_DRIVER_CONTEXTS_PRIMITIVES_H
#define PSA_CRYPTO_DRIVER_CONTEXTS_H #define PSA_CRYPTO_DRIVER_CONTEXTS_PRIMITIVES_H
#include "psa/crypto.h" #include "psa/crypto.h"
#include "psa/crypto_driver_common.h" #include "psa/crypto_driver_common.h"
@ -39,7 +40,7 @@
* declared during the autogeneration process. */ * declared during the autogeneration process. */
/* Include the context structure definitions for the Mbed TLS software drivers */ /* Include the context structure definitions for the Mbed TLS software drivers */
#include "psa/crypto_builtin.h" #include "psa/crypto_builtin_primitives.h"
/* Define the context to be used for an operation that is executed through the /* Define the context to be used for an operation that is executed through the
* PSA Driver wrapper layer as the union of all possible driver's contexts. * PSA Driver wrapper layer as the union of all possible driver's contexts.
@ -65,5 +66,5 @@ typedef union {
#endif #endif
} psa_driver_cipher_context_t; } psa_driver_cipher_context_t;
#endif /* PSA_CRYPTO_DRIVER_CONTEXTS_H */ #endif /* PSA_CRYPTO_DRIVER_CONTEXTS_PRIMITIVES_H */
/* End of automatically generated file. */ /* End of automatically generated file. */

View file

@ -77,7 +77,7 @@ extern "C" {
#include "mbedtls/gcm.h" #include "mbedtls/gcm.h"
/* Include the context definition for the compiled-in drivers */ /* Include the context definition for the compiled-in drivers */
#include "psa/crypto_driver_contexts.h" #include "psa/crypto_driver_contexts_primitives.h"
struct psa_hash_operation_s struct psa_hash_operation_s
{ {

View file

@ -208,11 +208,11 @@
<ClInclude Include="..\..\include\mbedtls\x509_csr.h" /> <ClInclude Include="..\..\include\mbedtls\x509_csr.h" />
<ClInclude Include="..\..\include\mbedtls\xtea.h" /> <ClInclude Include="..\..\include\mbedtls\xtea.h" />
<ClInclude Include="..\..\include\psa\crypto.h" /> <ClInclude Include="..\..\include\psa\crypto.h" />
<ClInclude Include="..\..\include\psa\crypto_builtin.h" /> <ClInclude Include="..\..\include\psa\crypto_builtin_primitives.h" />
<ClInclude Include="..\..\include\psa\crypto_compat.h" /> <ClInclude Include="..\..\include\psa\crypto_compat.h" />
<ClInclude Include="..\..\include\psa\crypto_config.h" /> <ClInclude Include="..\..\include\psa\crypto_config.h" />
<ClInclude Include="..\..\include\psa\crypto_driver_common.h" /> <ClInclude Include="..\..\include\psa\crypto_driver_common.h" />
<ClInclude Include="..\..\include\psa\crypto_driver_contexts.h" /> <ClInclude Include="..\..\include\psa\crypto_driver_contexts_primitives.h" />
<ClInclude Include="..\..\include\psa\crypto_extra.h" /> <ClInclude Include="..\..\include\psa\crypto_extra.h" />
<ClInclude Include="..\..\include\psa\crypto_platform.h" /> <ClInclude Include="..\..\include\psa\crypto_platform.h" />
<ClInclude Include="..\..\include\psa\crypto_se_driver.h" /> <ClInclude Include="..\..\include\psa\crypto_se_driver.h" />