Skip to content

Commit 587f31a

Browse files
Update psa-arch-tests to v25.02_API1.8_CRYPTO_1.2.1
We can now test compliance with version 1.2 of the PSA Crypto API. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
1 parent 30b9838 commit 587f31a

File tree

4 files changed

+82
-19
lines changed

4 files changed

+82
-19
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ README for TF-PSA-Crypto
22
========================
33

44
The TF-PSA-Crypto repository provides an implementation of the
5-
[PSA Cryptography API](https://arm-software.github.io/psa-api) (version 1.1).
5+
[PSA Cryptography API](https://arm-software.github.io/psa-api) (version 1.2).
66
This encompasses the on-going extensions to the PSA Cryptography API (e.g. PAKE).
77

88
The PSA Cryptography API implementation is organized around the
Lines changed: 63 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/api-tests/platform/targets/tgt_dev_apis_stdc/nspe/pal_crypto_config.h b/api-tests/platform/targets/tgt_dev_apis_stdc/nspe/pal_crypto_config.h
2-
index c5a54a9..682b151 100644
2+
index dad40ec..8d19699 100644
33
--- a/api-tests/platform/targets/tgt_dev_apis_stdc/nspe/pal_crypto_config.h
44
+++ b/api-tests/platform/targets/tgt_dev_apis_stdc/nspe/pal_crypto_config.h
55
@@ -53,7 +53,7 @@
@@ -11,21 +11,6 @@ index c5a54a9..682b151 100644
1111
#define ARCH_TEST_ECC_CURVE_SECP256R1
1212
#define ARCH_TEST_ECC_CURVE_SECP384R1
1313

14-
@@ -79,10 +79,10 @@
15-
*
16-
* Comment macros to disable the types
17-
*/
18-
-#define ARCH_TEST_DES
19-
-#define ARCH_TEST_DES_1KEY
20-
-#define ARCH_TEST_DES_2KEY
21-
-#define ARCH_TEST_DES_3KEY
22-
+//#define ARCH_TEST_DES
23-
+//#define ARCH_TEST_DES_1KEY
24-
+//#define ARCH_TEST_DES_2KEY
25-
+//#define ARCH_TEST_DES_3KEY
26-
27-
/**
28-
* \def ARCH_TEST_RAW
2914
@@ -105,7 +105,7 @@
3015
*
3116
* Enable the ARC4 key type.
@@ -34,4 +19,65 @@ index c5a54a9..682b151 100644
3419
+//#define ARCH_TEST_ARC4
3520

3621
/**
37-
* \def ARCH_TEST_CIPHER_MODE_CTR
22+
* \def ARCH_TEST_CHACHA20
23+
@@ -251,8 +251,8 @@
24+
*/
25+
// #define ARCH_TEST_MD2
26+
// #define ARCH_TEST_MD4
27+
-//#define ARCH_TEST_MD5
28+
-//#define ARCH_TEST_RIPEMD160
29+
+#define ARCH_TEST_MD5
30+
+#define ARCH_TEST_RIPEMD160
31+
#define ARCH_TEST_SHA1
32+
#define ARCH_TEST_SHA224
33+
#define ARCH_TEST_SHA256
34+
@@ -260,10 +260,10 @@
35+
#define ARCH_TEST_SHA512
36+
// #define ARCH_TEST_SHA512_224
37+
// #define ARCH_TEST_SHA512_256
38+
-// #define ARCH_TEST_SHA3_224
39+
-// #define ARCH_TEST_SHA3_256
40+
-// #define ARCH_TEST_SHA3_384
41+
-// #define ARCH_TEST_SHA3_512
42+
+#define ARCH_TEST_SHA3_224
43+
+#define ARCH_TEST_SHA3_256
44+
+#define ARCH_TEST_SHA3_384
45+
+#define ARCH_TEST_SHA3_512
46+
47+
/**
48+
* \def ARCH_TEST_HKDF
49+
@@ -291,8 +291,8 @@
50+
* Enable the NIST SP800-108 Counter mode KDF algorithm
51+
*
52+
*/
53+
-#define ARCH_TEST_SP800_108_COUNTER_HMAC
54+
-#define ARCH_TEST_SP800_108_COUNTER_CMAC
55+
+//#define ARCH_TEST_SP800_108_COUNTER_HMAC
56+
+//#define ARCH_TEST_SP800_108_COUNTER_CMAC
57+
58+
/**
59+
* \def ARCH_TEST_xMAC
60+
@@ -369,7 +369,7 @@
61+
* Enable deterministic ECDSA (RFC 6979).
62+
*/
63+
#define ARCH_TEST_DETERMINISTIC_ECDSA
64+
-#define ARCH_TEST_TWISTED_EDWARDS
65+
+//#define ARCH_TEST_TWISTED_EDWARDS
66+
67+
/**
68+
* \def ARCH_TEST_ECC_ASYMMETRIC_API_SUPPORT
69+
@@ -397,10 +397,10 @@
70+
*
71+
* Enable support for augmented PAKE: SPAKE2P algorithm
72+
*/
73+
-#define ARCH_TEST_SPAKE2P
74+
-#define ARCH_TEST_SPAKE2P_HMAC
75+
-#define ARCH_TEST_SPAKE2P_CMAC
76+
-#define ARCH_TEST_SPAKE2P_MATTER
77+
+//#define ARCH_TEST_SPAKE2P
78+
+//#define ARCH_TEST_SPAKE2P_HMAC
79+
+//#define ARCH_TEST_SPAKE2P_CMAC
80+
+//#define ARCH_TEST_SPAKE2P_MATTER
81+
82+
#include "pal_crypto_config_check.h"
83+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Minimal fix for a build failure in test_c080.c (independently done
2+
upstream in 232fb5801273dbc97789cb9079f1168499e34a2a).
3+
4+
diff --git a/api-tests/dev_apis/crypto/test_c080/test_c080.c b/api-tests/dev_apis/crypto/test_c080/test_c080.c
5+
index ae62705..345a802 100644
6+
--- a/api-tests/dev_apis/crypto/test_c080/test_c080.c
7+
+++ b/api-tests/dev_apis/crypto/test_c080/test_c080.c
8+
@@ -85,7 +85,8 @@ int32_t psa_key_agreement_test(caller_security_t caller __UNUSED)
9+
TEST_ASSERT_DUAL(status, check1[i].expected_status[0],
10+
check1[i].expected_status[1], TEST_CHECKPOINT_NUM(4));
11+
12+
- if (check1[i].expected_status == PSA_SUCCESS)
13+
+ if (check1[i].expected_status[0] == PSA_SUCCESS &&
14+
+ check1[i].derv_type == PSA_KEY_TYPE_DERIVE)
15+
{
16+
/* Set up a key derivation operation */
17+
status = val->crypto_function(VAL_CRYPTO_KEY_DERIVATION_SETUP,

tests/scripts/test_psa_compliance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import scripts_path # pylint: disable=unused-import
1717
from mbedtls_framework import psa_compliance
1818

19-
PSA_ARCH_TESTS_REF = 'v23.06_API1.5_ADAC_EAC'
19+
PSA_ARCH_TESTS_REF = 'v25.02_API1.8_CRYPTO_1.2.1'
2020

2121
# PSA Compliance tests we expect to fail due to known defects in Mbed TLS /
2222
# TF-PSA-Crypto (or the test suite).

0 commit comments

Comments
 (0)