Hi experts,

We tested the latest trusted-firmware-m code with tf-m-tests on stm32l562e_dk discovery board,but some crypto failures occured,

The test log is showed below:

[INF] Starting bootloader
[INF] Swap type: none
[INF] Swap type: none
[INF] Bootloader chainload address offset: 0x19000
[INF] Jumping to the first image slot
[Sec Thread] Secure image initializing!
TF-M isolation level is: 0x00000001
Booting TFM v1.3.0
Non-Secure system starting...

#### Execute test suites for the Non-secure area ####
Running Test Suite PSA internal trusted storage NS interface tests (TFM_NS_ITS_TEST_1XXX)...
> Executing 'TFM_NS_ITS_TEST_1001'
  Description: 'Set interface'
  TEST: TFM_NS_ITS_TEST_1001 - PASSED!
> Executing 'TFM_NS_ITS_TEST_1002'
  Description: 'Set interface with create flags'
Note: The UID in this test has already been created with
the PSA_STORAGE_FLAG_WRITE_ONCE flag in a previous test
run. Wipe the storage area to run the full test.
  TEST: TFM_NS_ITS_TEST_1002 - PASSED!
> Executing 'TFM_NS_ITS_TEST_1003'
  Description: 'Set interface with NULL data pointer'
  TEST: TFM_NS_ITS_TEST_1003 - PASSED!
> Executing 'TFM_NS_ITS_TEST_1004'
  Description: 'Set interface with write once UID'
  TEST: TFM_NS_ITS_TEST_1004 - PASSED!
....
> Executing 'TFM_NS_ITS_TEST_1019'
  Description: 'Set, get and remove interface with different asset sizes'
  TEST: TFM_NS_ITS_TEST_1019 - PASSED!
TESTSUITE PASSED!
Running Test Suite Crypto non-secure interface test (TFM_NS_CRYPTO_TEST_1XXX)...
> Executing 'TFM_NS_CRYPTO_TEST_1001'
  Description: 'Non Secure Key management interface'
  TEST: TFM_NS_CRYPTO_TEST_1001 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1002'
  Description: 'Non Secure Symmetric encryption (AES-128-CBC) interface'
  Error destroying a key (Failed at /home/a/workspace1/TF-M/trustedfirmware-m/tf-m-tests/test/suites/crypto/crypto_tests_common.c:345)
  TEST: TFM_NS_CRYPTO_TEST_1002 - FAILED!
> Executing 'TFM_NS_CRYPTO_TEST_1003'
  Description: 'Non Secure Symmetric encryption (AES-128-CFB) interface'
  Error destroying a key (Failed at /home/a/workspace1/TF-M/trustedfirmware-m/tf-m-tests/test/suites/crypto/crypto_tests_common.c:345)
  TEST: TFM_NS_CRYPTO_TEST_1003 - FAILED!
> Executing 'TFM_NS_CRYPTO_TEST_1005'
  Description: 'Non Secure Symmetric encryption (AES-128-CTR) interface'
  Error destroying a key (Failed at /home/a/workspace1/TF-M/trustedfirmware-m/tf-m-tests/test/suites/crypto/crypto_tests_common.c:345)
  TEST: TFM_NS_CRYPTO_TEST_1005 - FAILED!
> Executing 'TFM_NS_CRYPTO_TEST_1007'
  Description: 'Non Secure Symmetric encryption invalid cipher'
  TEST: TFM_NS_CRYPTO_TEST_1007 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1008'
  Description: 'Non Secure Symmetric encryption invalid cipher (AES-152)'
  TEST: TFM_NS_CRYPTO_TEST_1008 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1009'
  Description: 'Non Secure Symmetric encryption invalid cipher (HMAC-128-CFB)'
  TEST: TFM_NS_CRYPTO_TEST_1009 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1010'
  Description: 'Non Secure Unsupported Hash (SHA-1) interface'
  TEST: TFM_NS_CRYPTO_TEST_1010 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1011'
  Description: 'Non Secure Hash (SHA-224) interface'
  TEST: TFM_NS_CRYPTO_TEST_1011 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1012'
  Description: 'Non Secure Hash (SHA-256) interface'
  TEST: TFM_NS_CRYPTO_TEST_1012 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1013'
  Description: 'Non Secure Hash (SHA-384) interface'
  TEST: TFM_NS_CRYPTO_TEST_1013 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1014'
  Description: 'Non Secure Hash (SHA-512) interface'
  TEST: TFM_NS_CRYPTO_TEST_1014 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1019'
  Description: 'Non Secure Unsupported HMAC (SHA-1) interface'
  TEST: TFM_NS_CRYPTO_TEST_1019 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1020'
  Description: 'Non Secure HMAC (SHA-256) interface'
  Error importing a key (Failed at /home/a/workspace1/TF-M/trustedfirmware-m/tf-m-tests/test/suites/crypto/crypto_tests_common.c:628)
  TEST: TFM_NS_CRYPTO_TEST_1020 - FAILED!
> Executing 'TFM_NS_CRYPTO_TEST_1021'
  Description: 'Non Secure HMAC (SHA-384) interface'
  Error importing a key (Failed at /home/a/workspace1/TF-M/trustedfirmware-m/tf-m-tests/test/suites/crypto/crypto_tests_common.c:628)
  TEST: TFM_NS_CRYPTO_TEST_1021 - FAILED!
> Executing 'TFM_NS_CRYPTO_TEST_1022'
  Description: 'Non Secure HMAC (SHA-512) interface'
  Error importing a key (Failed at /home/a/workspace1/TF-M/trustedfirmware-m/tf-m-tests/test/suites/crypto/crypto_tests_common.c:628)
  TEST: TFM_NS_CRYPTO_TEST_1022 - FAILED!
> Executing 'TFM_NS_CRYPTO_TEST_1024'
  Description: 'Non Secure HMAC with long key (SHA-224) interface'
  Error importing a key (Failed at /home/a/workspace1/TF-M/trustedfirmware-m/tf-m-tests/test/suites/crypto/crypto_tests_common.c:628)
  TEST: TFM_NS_CRYPTO_TEST_1024 - FAILED!
> Executing 'TFM_NS_CRYPTO_TEST_1030'
  Description: 'Non Secure AEAD (AES-128-CCM) interface'
  TEST: TFM_NS_CRYPTO_TEST_1030 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1031'
  Description: 'Non Secure AEAD (AES-128-GCM) interface'
  TEST: TFM_NS_CRYPTO_TEST_1031 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1032'
  Description: 'Non Secure key policy interface'
  TEST: TFM_NS_CRYPTO_TEST_1032 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1033'
  Description: 'Non Secure key policy check permissions'
  TEST: TFM_NS_CRYPTO_TEST_1033 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1034'
  Description: 'Non Secure persistent key interface'
  Failed to import a key (Failed at /home/a/workspace1/TF-M/trustedfirmware-m/tf-m-tests/test/suites/crypto/crypto_tests_common.c:107)
  TEST: TFM_NS_CRYPTO_TEST_1034 - FAILED!
> Executing 'TFM_NS_CRYPTO_TEST_1035'
  Description: 'Non Secure AEAD interface with truncated auth tag (AES-128-CCM-8)'
  TEST: TFM_NS_CRYPTO_TEST_1035 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1036'
  Description: 'Non Secure TLS 1.2 PRF key derivation'
  TEST: TFM_NS_CRYPTO_TEST_1036 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1037'
  Description: 'Non Secure TLS-1.2 PSK-to-MasterSecret key derivation'
  TEST: TFM_NS_CRYPTO_TEST_1037 - PASSED!
> Executing 'TFM_NS_CRYPTO_TEST_1038'
  Description: 'Non Secure HKDF key derivation'
  TEST: TFM_NS_CRYPTO_TEST_1038 - PASSED!
TESTSUITE FAILED!
Number of failed tests: 8 of 26

....
The detailed software versions are as follows:


trusted-firmware-m:commit 07c2e6868cb7027325a0b84dd4c14bf619f5dc34

tf-m-tests:commit e1a8c9fb8394b1f6ea66d2611c070915b0d4b573

mcuboot:commit 4f8091318b4026d14af9e5a7036825bff62fb612

mbedtls:commit 8df2f8e7b9c7bb9390ac74bb7bace27edca81a2b


And below is the build command ,

root@Thinos16-dev:~/workspace1/TF-M/trustedfirmware-m/trusted-firmware-m/cmake_test# cmake .. -DTFM_PLATFORM=stm/stm32l562e_dk -DTFM_TOOLCHAIN_FILE=../toolchain_GNUARM.cmake -DTEST_NS=ON -DTFM_PSA_API=ON  -DTFM_SPM_LOG_LEVEL=TFM_SPM_LOG_LEVEL_DEBUG
-- The C compiler identification is GNU 9.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /home/a/Tools/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-gcc
-- Found Python3: /home/a/python3.6/bin/python3.6 (found version "3.6.12") found components:
...

Please refer to the attachment for detailed build procedure.






Best Regards,
Poppy Wu

Macronix Microelectronics (Suzhou) Co.,Ltd
http://www.mxic.com.cn

CONFIDENTIALITY NOTE:

This e-mail and any attachments may contain confidential information and/or personal data, which is protected by applicable laws. Please be reminded that duplication, disclosure, distribution, or use of this e-mail (and/or its attachments) or any part thereof is prohibited. If you receive this e-mail in error, please notify us immediately and delete this mail as well as it attachments from your system. In addition, please be informed that collection, processing, and/or use of personal data is prohibited unless expressly permitted by personal data protection laws. Thank you for your attention and cooperation.

Macronix International Co., Ltd.

=====================================================================