This example uses the PSA Crypto API to perform hash operations on the supported device.
The example redirects standard I/O to the virtual serial port (VCOM) of the kit. By default, the serial port setting is 115200 bps and 8-N-1 configuration.
Except for the Series 1 Cortex-M0+ device, the example has been instrumented with code to count the number of clock cycles spent in different operations. The results are printed on the VCOM serial port console. This feature can be disabled by defining PSA_CRYPTO_PRINT=0
(default is 1) in the IDE setting (Preprocessor->Defined symbols
).
The following payload sizes are supported in this example:
PLAIN_MSG_SIZE
/16PLAIN_MSG_SIZE
/4PLAIN_MSG_SIZE
The default PLAIN_MSG_SIZE
is 4096
, it is defined in app_process.h
.
The following hash algorithms are supported in this example:
PSA_ALG_SHA_1
(single-part and multi-part)PSA_ALG_SHA_224
(single-part and multi-part)PSA_ALG_SHA_256
(single-part and multi-part)PSA_ALG_SHA_384
(single-part and multi-part)PSA_ALG_SHA_512
(single-part and multi-part)The following PSA Crypto APIs are used in this example:
psa_crypto_init
psa_generate_random
psa_hash_compute
psa_hash_compare
psa_hash_operation_init
psa_hash_setup
psa_hash_update
psa_hash_finish
psa_hash_clone
psa_hash_verify
mbedtls_psa_crypto_free
Adapter Firmware
under General Device Information in Simplicity Studio 5 Users Guide).Secure Firmware
under General Device Information in Simplicity Studio 5 Users Guide).Device Console
in Simplicity Studio 5, Line terminator:
must be set to None
).Platform()
checkbox to browse the platform examples).Optimize for debugging (-Og)
on Simplicity IDE and None
on IAR Embedded Workbench.