This is an automated email from the ASF dual-hosted git repository.

GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 99aed5972 testing/crypto: add the psa-arch-tests PAL layer
99aed5972 is described below

commit 99aed59728d70333478c192595d724de259f1c8e
Author: makejian <[email protected]>
AuthorDate: Fri Nov 27 19:57:59 2026 +0800

    testing/crypto: add the psa-arch-tests PAL layer
    
    Add the platform abstraction layer for the ARM PSA arch-tests, ported
    from Vela.  The suite itself is fetched from
    https://github.com/ARM-software/psa-arch-tests (13 MB, 529 test
    sources for the crypto and storage API compliance suites), so only the
    NuttX-side glue is in tree:
    
    - Kconfig: PSA_ARCH_TESTS with the crypto and its sub-suites,
      program name, priority and stack size
    - Makefile / CMakeLists.txt: fetch, unpack and build the suite; the
      two builds rename iv and plaintext to psa_iv and psa_plaintext
      because those identifiers clash with NuttX test globals when the
      suite links in FLAT mode
    - include/: PAL headers - pal_crypto_config.h configures the crypto
      tests against mbedtls, target_database.h and the two .inc files
      carry the suite's test entry tables, pal_storage_config.h and
      pal_config.h configure the storage tests and the platform includes
    - src/pal_crypto.c: the PAL shim for PSA functions the suite calls
      that mbedtls does not implement (key agreement, PAKE, all return
      PSA_ERROR_NOT_SUPPORTED)
    
    Not enabled in any defconfig.  The suite currently builds against the
    mbedtls fetched tree with the PSA Crypto API; the SE driver route
    (PSA_KEY_LOCATION_LOCAL_CRYPTODEV) is available to route key storage
    through the NuttX cryptodev.
    
    Signed-off-by: makejian <[email protected]>
---
 testing/crypto/psa-arch-tests/CMakeLists.txt       | 119 +++++
 testing/crypto/psa-arch-tests/Kconfig              |  34 ++
 testing/crypto/psa-arch-tests/Make.defs            |  23 +
 testing/crypto/psa-arch-tests/Makefile             |  90 ++++
 testing/crypto/psa-arch-tests/include/pal_config.h | 141 ++++++
 .../psa-arch-tests/include/pal_crypto_config.h     | 505 +++++++++++++++++++++
 .../psa-arch-tests/include/pal_storage_config.h    |  33 ++
 .../psa-arch-tests/include/target_database.h       |  74 +++
 .../include/test_entry_fn_declare_list.inc         | 124 +++++
 .../psa-arch-tests/include/test_entry_list.inc     | 134 ++++++
 testing/crypto/psa-arch-tests/src/pal_crypto.c     |  77 ++++
 11 files changed, 1354 insertions(+)

diff --git a/testing/crypto/psa-arch-tests/CMakeLists.txt 
b/testing/crypto/psa-arch-tests/CMakeLists.txt
new file mode 100644
index 000000000..1df1f7f03
--- /dev/null
+++ b/testing/crypto/psa-arch-tests/CMakeLists.txt
@@ -0,0 +1,119 @@
+# 
##############################################################################
+# apps/testing/crypto/psa-arch-tests/CMakeLists.txt
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
+# license agreements.  See the NOTICE file distributed with this work for
+# additional information regarding copyright ownership.  The ASF licenses this
+# file to you under the Apache License, Version 2.0 (the "License"); you may 
not
+# use this file except in compliance with the License.  You may obtain a copy 
of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+# 
##############################################################################
+
+if(CONFIG_PSA_ARCH_TESTS)
+  set(PSA_DIR ${CMAKE_CURRENT_LIST_DIR}/psa-arch-tests)
+  set(PSA_API_DIR ${PSA_DIR}/api-tests)
+
+  if(NOT EXISTS ${PSA_DIR})
+    set(PSA_ARCH_TESTS_URL
+        "https://github.com/ARM-software/psa-arch-tests/archive/main.zip";)
+    set(PSA_ARCH_TESTS_ZIP "psa-arch-tests-main.zip")
+    set(PSA_ARCH_TESTS_PACKNAME "psa-arch-tests-main")
+
+    file(
+      DOWNLOAD ${PSA_ARCH_TESTS_URL}
+      ${CMAKE_CURRENT_LIST_DIR}/${PSA_ARCH_TESTS_ZIP}
+      TIMEOUT 30
+      SHOW_PROGRESS)
+
+    execute_process(
+      COMMAND ${CMAKE_COMMAND} -E tar xzf
+              ${CMAKE_CURRENT_LIST_DIR}/${PSA_ARCH_TESTS_ZIP}
+      WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
+
+    execute_process(
+      COMMAND ${CMAKE_COMMAND} -E rename ${PSA_ARCH_TESTS_PACKNAME} ${PSA_DIR}
+      WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
+
+    file(REMOVE ${CMAKE_CURRENT_LIST_DIR}/${PSA_ARCH_TESTS_ZIP})
+  endif()
+
+  file(GLOB_RECURSE PSA_VAL_NSPE_SRCS ${PSA_API_DIR}/val/nspe/*.c)
+  file(GLOB_RECURSE PSA_VAL_COMMON_SRCS ${PSA_API_DIR}/val/common/*.c)
+
+  set(PSA_SRCS
+      ${PSA_VAL_NSPE_SRCS} ${PSA_VAL_COMMON_SRCS}
+      ${PSA_API_DIR}/platform/targets/tgt_dev_apis_linux/nspe/pal_driver_intf.c
+      ${PSA_API_DIR}/platform/targets/common/nspe/pal_weak.c)
+
+  set(PSA_INCLUDES
+      ${NUTTX_APPS_DIR}/crypto/mbedtls/mbedtls/include
+      ${NUTTX_APPS_DIR}/crypto/mbedtls/mbedtls/library
+      ${NUTTX_APPS_DIR}/testing/crypto/psa-arch-tests/include
+      ${PSA_API_DIR}/val/nspe
+      ${PSA_API_DIR}/val/common
+      ${PSA_API_DIR}/platform/targets/common/nspe
+      ${PSA_API_DIR}/platform/targets/common/nspe/crypto
+      ${PSA_API_DIR}/platform/targets/tgt_dev_apis_linux/nspe/crypto)
+
+  set(PSA_WARNING_FLAGS -Wno-undef -Wno-shadow -Wno-unused-variable
+                        -Wno-misleading-indentation -Wno-uninitialized)
+
+  set(PSA_DEFINES "-Dmd5_hash=psa_md5_hash" "-Div=psa_iv"
+                  "-Dplaintext=psa_plaintext")
+
+  if(CONFIG_PSA_ARCH_CRYPTO_TESTS)
+    file(GLOB_RECURSE PSA_CRYPTO_SRCS ${PSA_API_DIR}/dev_apis/crypto/*.c)
+    file(GLOB_RECURSE PSA_CRYPTO_PLATFORM_SRCS
+         ${PSA_API_DIR}/platform/targets/common/nspe/crypto/*.c)
+    list(APPEND PSA_CRYPTO_SRCS src/pal_crypto.c)
+    list(REMOVE_ITEM PSA_CRYPTO_SRCS
+         ${PSA_API_DIR}/dev_apis/crypto/test_c078/test_c078.c)
+    list(APPEND PSA_SRCS ${PSA_CRYPTO_SRCS} ${PSA_CRYPTO_PLATFORM_SRCS})
+    list(APPEND PSA_DEFINES -DCRYPTO)
+    list(APPEND PSA_INCLUDES ${PSA_API_DIR}/dev_apis/crypto/common)
+  endif()
+
+  if(CONFIG_PSA_ARCH_ITS_TESTS)
+    file(GLOB_RECURSE PSA_STORAGE_SRCS ${PSA_API_DIR}/dev_apis/storage/*.c)
+    file(
+      GLOB_RECURSE PSA_STORAGE_PLATFORM_SRCS
+      ${PSA_API_DIR}/platform/targets/common/nspe/internal_trusted_storage/*.c)
+    list(REMOVE_ITEM PSA_STORAGE_SRCS
+         ${PSA_API_DIR}/dev_apis/storage/test_s016/test_s016.c)
+    list(REMOVE_ITEM PSA_STORAGE_SRCS
+         ${PSA_API_DIR}/dev_apis/storage/test_s017/test_s017.c)
+    list(APPEND PSA_SRCS ${PSA_STORAGE_SRCS} ${PSA_STORAGE_PLATFORM_SRCS})
+    list(APPEND PSA_DEFINES -DINTERNAL_TRUSTED_STORAGE)
+    list(APPEND PSA_INCLUDES ${PSA_API_DIR}/dev_apis/storage/common)
+  endif()
+
+  set(SRCS ${PSA_API_DIR}/platform/targets/tgt_dev_apis_linux/nspe/main.c
+           ${PSA_SRCS})
+
+  nuttx_add_application(
+    MODULE
+    ${CONFIG_PSA_ARCH_TESTS}
+    NAME
+    ${CONFIG_PSA_ARCH_TESTS_PROGNAME}
+    SRCS
+    ${SRCS}
+    STACKSIZE
+    ${CONFIG_PSA_ARCH_TESTS_STACKSIZE}
+    PRIORITY
+    ${CONFIG_PSA_ARCH_TESTS_PRIORITY}
+    INCLUDE_DIRECTORIES
+    ${PSA_INCLUDES}
+    COMPILE_FLAGS
+    ${PSA_WARNING_FLAGS}
+    DEFINITIONS
+    ${PSA_DEFINES})
+endif()
diff --git a/testing/crypto/psa-arch-tests/Kconfig 
b/testing/crypto/psa-arch-tests/Kconfig
new file mode 100644
index 000000000..60419e73b
--- /dev/null
+++ b/testing/crypto/psa-arch-tests/Kconfig
@@ -0,0 +1,34 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config PSA_ARCH_TESTS
+       tristate "psa testing"
+       default n
+       ---help---
+               Enable the psa testing
+
+if PSA_ARCH_TESTS
+
+config PSA_ARCH_CRYPTO_TESTS
+       bool "Enable the psa arch crypto tests"
+       default n
+
+config PSA_ARCH_ITS_TESTS
+       bool "ENABLE the psa_arch its tests"
+       default n
+
+config PSA_ARCH_TESTS_PROGNAME
+       string "Program name"
+       default "psa_arch_test"
+
+config PSA_ARCH_TESTS_PRIORITY
+       int "psa arch test task priority"
+       default 100
+
+config PSA_ARCH_TESTS_STACKSIZE
+       int "psa arch test stack size"
+       default 8192
+
+endif
diff --git a/testing/crypto/psa-arch-tests/Make.defs 
b/testing/crypto/psa-arch-tests/Make.defs
new file mode 100644
index 000000000..c197e59c8
--- /dev/null
+++ b/testing/crypto/psa-arch-tests/Make.defs
@@ -0,0 +1,23 @@
+############################################################################
+# apps/testing/crypto/psa_arch_tests/Make.defs
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+ifneq ($(CONFIG_PSA_ARCH_TESTS),)
+CONFIGURED_APPS += $(APPDIR)/testing/crypto/psa-arch-tests
+endif
diff --git a/testing/crypto/psa-arch-tests/Makefile 
b/testing/crypto/psa-arch-tests/Makefile
new file mode 100644
index 000000000..d890076ab
--- /dev/null
+++ b/testing/crypto/psa-arch-tests/Makefile
@@ -0,0 +1,90 @@
+############################################################################
+# apps/testing/crypto/psa-arch-test/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+PROGNAME  = $(CONFIG_PSA_ARCH_TESTS_PROGNAME)
+PRIORITY  = $(CONFIG_PSA_ARCH_TESTS_PRIORITY)
+STACKSIZE = $(CONFIG_PSA_ARCH_TESTS_STACKSIZE)
+MODULE    = $(CONFIG_PSA_ARCH_TESTS)
+
+PSA_ARCH_TESTS_URL ?= "https://github.com/ARM-software/psa-arch-tests/archive";
+
+PSA_ARCH_TESTS_UNPACKNAME  = psa-arch-tests
+PSA_ARCH_TESTS_PACKNAME    = psa-arch-tests-main
+PSA_ARCH_TESTS_ZIP         = psa-arch-tests-main.zip
+UNPACK                    ?= unzip -q -o
+PSA_API_DIR = $(PSA_ARCH_TESTS_UNPACKNAME)$(DELIM)api-tests
+
+$(PSA_ARCH_TESTS_ZIP):
+       @echo "Downloading: $(PSA_ARCH_TESTS_ZIP)"
+       $(Q) $(call DOWNLOAD,${PSA_ARCH_TESTS_URL},${PSA_ARCH_TESTS_ZIP})
+
+$(PSA_ARCH_TESTS_UNPACKNAME): $(PSA_ARCH_TESTS_ZIP)
+       @echo "Unpacking: $(PSA_ARCH_TESTS_ZIP) -> $(PSA_ARCH_TESTS_UNPACKNAME)"
+       ${Q} $(UNPACK) $(PSA_ARCH_TESTS_ZIP)
+       ${Q} mv $(PSA_ARCH_TESTS_PACKNAME) $(PSA_ARCH_TESTS_UNPACKNAME)
+       $(Q) touch $(PSA_ARCH_TESTS_UNPACKNAME)
+
+MAINSRC   = ${PSA_API_DIR}/platform/targets/tgt_dev_apis_linux/nspe/main.c
+CSRCS    += $(shell find psa-arch-tests/api-tests/val/nspe -name "*.c")
+CSRCS    += $(shell find psa-arch-tests/api-tests/val/common -name "*.c")
+CSRCS    += 
${PSA_API_DIR}/platform/targets/tgt_dev_apis_linux/nspe/pal_driver_intf.c
+CSRCS    += ${PSA_API_DIR}/platform/targets/common/nspe/pal_weak.c
+CFLAGS   += ${INCDIR_PREFIX}${PSA_API_DIR}/val/common
+CFLAGS   += ${INCDIR_PREFIX}${PSA_API_DIR}/val/nspe
+CFLAGS   += ${INCDIR_PREFIX}${PSA_API_DIR}/platform/targets/common/nspe
+CFLAGS   += ${INCDIR_PREFIX}${PSA_API_DIR}/dev_apis/crypto/common
+CFLAGS   += ${INCDIR_PREFIX}${PSA_API_DIR}/dev_apis/storage/common
+CFLAGS   += ${INCDIR_PREFIX}$(APPDIR)/crypto/mbedtls/mbedtls/include
+CFLAGS   += ${INCDIR_PREFIX}$(APPDIR)/crypto/mbedtls/mbedtls/library
+CFLAGS   += ${INCDIR_PREFIX}$(APPDIR)/testing/crypto/psa-arch-tests/include
+CFLAGS   += -Dmd5_hash=psa_md5_hash
+CFLAGS   += -Div=psa_iv -Dplaintext=psa_plaintext
+CFLAGS   += -Wno-undef -Wno-shadow -Wno-unused-variable 
-Wno-misleading-indentation -Wno-uninitialized
+
+# Download and unpack tarball if no git repo found
+ifeq ($(wildcard $(PSA_ARCH_TESTS_UNPACKNAME)/.git),)
+context:: $(PSA_ARCH_TESTS_UNPACKNAME)
+
+distclean::
+    $(call DELDIR, $(PSA_ARCH_TESTS_UNPACKNAME))
+    $(call DELFILE, $(PSA_ARCH_TESTS_ZIP))
+endif
+
+ifeq ($(CONFIG_PSA_ARCH_CRYPTO_TESTS),y)
+CSRCS  += $(shell find psa-arch-tests/api-tests/dev_apis/crypto  -name "*.c")
+CSRCS  += $(shell find 
psa-arch-tests/api-tests/platform/targets/common/nspe/crypto -name "*.c")
+CSRCS  += $(APPDIR)/testing/crypto/psa-arch-tests/src/pal_crypto.c
+CFLAGS += ${INCDIR_PREFIX}${PSA_API_DIR}/platform/targets/common/nspe/crypto
+CFLAGS += -DCRYPTO
+# testcase 078 conflicts with psa crypto api
+CSRCS  := $(filter-out 
psa-arch-tests/api-tests/dev_apis/crypto/test_c078/test_c078.c, $(CSRCS))
+endif
+
+ifeq ($(CONFIG_PSA_ARCH_ITS_TESTS),y)
+CSRCS  += $(shell find psa-arch-tests/api-tests/dev_apis/storage -name "*.c")
+CSRCS  += $(shell find 
psa-arch-tests/api-tests/platform/targets/common/nspe/internal_trusted_storage 
-name "*.c")
+CFLAGS += -DINTERNAL_TRUSTED_STORAGE
+CSRCS  := $(filter-out 
psa-arch-tests/api-tests/dev_apis/storage/test_s016/test_s016.c, $(CSRCS))
+CSRCS  := $(filter-out 
psa-arch-tests/api-tests/dev_apis/storage/test_s017/test_s017.c, $(CSRCS))
+endif
+
+include $(APPDIR)/Application.mk
diff --git a/testing/crypto/psa-arch-tests/include/pal_config.h 
b/testing/crypto/psa-arch-tests/include/pal_config.h
new file mode 100644
index 000000000..19ae82072
--- /dev/null
+++ b/testing/crypto/psa-arch-tests/include/pal_config.h
@@ -0,0 +1,141 @@
+/****************************************************************************
+ * apps/testing/crypto/psa-arch-tests/include/pal_config.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ ****************************************************************************/
+
+#ifndef _PAL_CONFIG_H_
+#define _PAL_CONFIG_H_
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+/* Include of PSA defined Header files */
+
+#ifdef IPC
+
+/* psa/client.h: Contains the PSA Client API elements */
+
+#include "psa/client.h"
+
+/* psa_manifest/sid.h:  Macro definitions derived from manifest files
+ * that map from RoT Service names to Service IDs (SIDs). Partition manifest
+ * parse build tool must provide the implementation
+ * of this file.
+ */
+
+#include "psa_manifest/sid.h"
+
+/* psa_manifest/pid.h: Secure Partition IDs
+ * Macro definitions that map from Secure Partition names to
+ * Secure Partition IDs. Partition manifest parse build tool must
+ * provide the implementation of this file.
+ */
+
+#include "psa_manifest/pid.h"
+#endif
+
+#ifdef CRYPTO
+
+/* psa/crypto.h: Contains the PSA Crypto API elements */
+
+#include "pal_crypto_config.h"
+#include "psa/crypto.h"
+#endif
+
+#if defined(INTERNAL_TRUSTED_STORAGE) || defined(STORAGE)
+
+/* psa_crypto_its.h: Contains the PSA ITS API elements */
+
+#include "pal_storage_config.h"
+#include "psa_crypto_its.h"
+#endif
+
+#if defined(PROTECTED_STORAGE) || defined(STORAGE)
+
+/* psa/protected_storage.h: Contains the PSA PS API elements */
+
+#include "psa/protected_storage.h"
+#endif
+
+#ifdef INITIAL_ATTESTATION
+
+/* psa/initial_attestation.h:
+ * Contains the PSA Initial Attestation API elements
+ */
+
+#include "pal_attestation_config.h"
+#include "psa/initial_attestation.h"
+#endif
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Define PSA test suite dependent macros for non-cmake build */
+
+#if !defined(PSA_CMAKE_BUILD)
+
+/* Print verbosity = TEST */
+
+#define VERBOSE 3
+
+/* NSPE or SPE VAL build? */
+
+#define VAL_NSPE_BUILD
+
+/* NSPE or SPE TEST build? */
+
+#define NONSECURE_TEST_BUILD
+
+/* If not defined, skip watchdog programming */
+
+#define WATCHDOG_AVAILABLE
+
+/* Are Dynamic memory APIs available to secure partition? */
+
+#define SP_HEAP_MEM_SUPP
+
+/* PSA Isolation level supported by platform */
+
+#define PLATFORM_PSA_ISOLATION_LEVEL 3
+#endif /* PSA_CMAKE_BUILD */
+
+/* Version of crypto spec used in attestation */
+
+#define CRYPTO_VERSION_BETA3
+#ifndef PLATFORM_HAS_ATTEST_PK
+
+/* Use hardcoded public key */
+
+#define PLATFORM_OVERRIDE_ATTEST_PK
+#endif
+
+#define TARGET_SPECIFIC_TYPES
+
+#ifdef TARGET_SPECIFIC_TYPES
+/* typedef's */
+
+typedef uint8_t             bool_t;
+typedef uintptr_t           addr_t;
+typedef uint32_t            test_id_t;
+typedef uint32_t            block_id_t;
+typedef char                char8_t;
+typedef uint32_t            cfg_id_t;
+#endif
+
+#endif /* _PAL_CONFIG_H_ */
diff --git a/testing/crypto/psa-arch-tests/include/pal_crypto_config.h 
b/testing/crypto/psa-arch-tests/include/pal_crypto_config.h
new file mode 100644
index 000000000..f718956c3
--- /dev/null
+++ b/testing/crypto/psa-arch-tests/include/pal_crypto_config.h
@@ -0,0 +1,505 @@
+/****************************************************************************
+ * apps/testing/crypto/psa-arch-tests/include/pal_crypto_config.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ ****************************************************************************/
+
+#ifndef _PAL_CRYPTO_CONFIG_H_
+#define _PAL_CRYPTO_CONFIG_H_
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include "pal_crypto_config_check.h"
+#include <psa/crypto.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* \file pal_crypto_config.h
+ *
+ * \brief Configuration options for crypto tests (set of defines)
+ *
+ *  This set of compile-time options may be used to enable
+ *  or disable features selectively for crypto test suite
+ */
+
+#define PSA_PAKE_STEP_CONFIRM                  ((psa_pake_step_t)0x04)
+#define PSA_PAKE_CONFIRMED_KEY                 0
+#define PSA_ALG_IS_JPAKE(alg)                  0
+#define PSA_ALG_IS_SPAKE2P(alg)                0
+#define PSA_KEY_TYPE_SPAKE2P_KEY_PAIR(curve)   0
+#define PSA_KEY_TYPE_SPAKE2P_PUBLIC_KEY(curve) 0
+
+/**
+ * @brief A key confirmation value that indicates an unconfirmed key
+ *        in a PAKE cipher suite.
+ */
+
+#define PSA_PAKE_UNCONFIRMED_KEY               1
+
+/**
+ * \def ARCH_TEST_RSA
+ *
+ * Enable the RSA public-key cryptosystem.
+ * By default all supported keys are enabled.
+ *
+ * Comment macros to disable the types
+ */
+
+#define ARCH_TEST_RSA
+#define ARCH_TEST_RSA_1024
+#define ARCH_TEST_RSA_2048
+#define ARCH_TEST_RSA_3072
+
+/**
+ * \def  ARCH_TEST_ECC
+ * \def  ARCH_TEST_ECC_CURVE_SECPXXXR1
+ *
+ * Enable the elliptic curve
+ * Enable specific curves within the Elliptic Curve
+ * module.  By default all supported curves are enabled.
+ *
+ * Requires: ARCH_TEST_ECC
+ * Comment macros to disable the curve
+ */
+
+#define ARCH_TEST_ECC
+#define ARCH_TEST_ECC_CURVE_SECP192R1
+#define ARCH_TEST_ECC_CURVE_SECP224R1
+#define ARCH_TEST_ECC_CURVE_SECP256R1
+#define ARCH_TEST_ECC_CURVE_SECP384R1
+
+/**
+ * \def ARCH_TEST_AES
+ *
+ * Enable the AES block cipher.
+ * By default all supported keys are enabled.
+ *
+ * Comment macros to disable the types
+ */
+
+#define ARCH_TEST_AES
+#define ARCH_TEST_AES_128
+#define ARCH_TEST_AES_192
+#define ARCH_TEST_AES_256
+#define ARCH_TEST_AES_512
+
+/**
+ * \def  ARCH_TEST_DES
+ *
+ * Enable the DES block cipher.
+ * By default all supported keys are enabled.
+ *
+ * Comment macros to disable the types
+ */
+
+#define ARCH_TEST_DES
+#define ARCH_TEST_DES_1KEY
+#define ARCH_TEST_DES_2KEY
+#define ARCH_TEST_DES_3KEY
+
+/**
+ * \def  ARCH_TEST_RAW
+ *
+ * A "key" of this type cannot be used for any cryptographic operation.
+ * Applications may use this type to store arbitrary data in the keystore.
+ */
+
+#define ARCH_TEST_RAW
+
+/**
+ * \def ARCH_TEST_CIPHER
+ *
+ * Enable the generic cipher layer.
+ */
+
+#define ARCH_TEST_CIPHER
+
+/**
+ * \def ARCH_TEST_ARC4
+ *
+ * Enable the ARC4 key type.
+ */
+
+#define ARCH_TEST_ARC4
+
+/**
+ * \def ARCH_TEST_CHACHA20
+ *
+ * Enable CHACHA20 key type
+ */
+
+#define ARCH_TEST_CHACHA20
+
+/**
+ * \def ARCH_TEST_XCHACHA20
+ *
+ * Enable XCHACHA20 key type
+ */
+
+/* #define ARCH_TEST_XCHACHA20 */
+
+/**
+ * \def ARCH_TEST_CIPHER_MODE_CTR
+ *
+ * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
+ *
+ * Requires: ARCH_TEST_CIPHER
+ */
+
+#define ARCH_TEST_CIPHER_MODE_CTR
+
+/**
+ * \def ARCH_TEST_CIPHER_MODE_CFB
+ *
+ * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
+ *
+ * Requires: ARCH_TEST_CIPHER
+ */
+
+#define ARCH_TEST_CIPHER_MODE_CFB
+
+/**
+ * \def ARCH_TEST_CIPHER_MODE_CBC
+ *
+ * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
+ *
+ * Requires: ARCH_TEST_CIPHER
+ */
+
+#define ARCH_TEST_CIPHER_MODE_CBC
+
+/**
+ * \def ARCH_TEST_CTR_AES
+ *
+ * Requires: ARCH_TEST_CIPHER, ARCH_TEST_AES, ARCH_TEST_CIPHER_MODE_CTR
+ */
+
+#define ARCH_TEST_CTR_AES
+
+/**
+ * \def ARCH_TEST_CBC_AES
+ *
+ * Requires: ARCH_TEST_CIPHER, ARCH_TEST_AES, ARCH_TEST_CIPHER_MODE_CBC
+ *
+ * Comment macros to disable the types
+ */
+
+#define ARCH_TEST_CBC_AES
+#define ARCH_TEST_CBC_AES_NO_PADDING
+
+/**
+ * \def ARCH_TEST_CBC_NO_PADDING
+ *
+ * Requires: ARCH_TEST_CIPHER, ARCH_TEST_CIPHER_MODE_CBC
+ *
+ * Comment macros to disable the types
+ */
+
+#define ARCH_TEST_CBC_NO_PADDING
+
+/**
+ * \def ARCH_TEST_CFB_AES
+ *
+ * Requires: ARCH_TEST_CIPHER, ARCH_TEST_AES, ARCH_TEST_CIPHER_MODE_CFB
+ */
+
+#define ARCH_TEST_CFB_AES
+
+/**
+ * \def ARCH_TEST_PKCS1V15_*
+ *
+ * Enable support for PKCS#1 v1.5 encoding.
+ * Enable support for PKCS#1 v1.5 operations.
+ * Enable support for RSA-OAEP
+ *
+ * Requires: ARCH_TEST_RSA, ARCH_TEST_PKCS1V15
+ *
+ * Comment macros to disable the types
+ */
+
+#define ARCH_TEST_PKCS1V15
+#define ARCH_TEST_RSA_PKCS1V15_SIGN
+#define ARCH_TEST_RSA_PKCS1V15_SIGN_RAW
+#define ARCH_TEST_RSA_PKCS1V15_CRYPT
+#define ARCH_TEST_RSA_OAEP
+
+/**
+ * \def ARCH_TEST_CBC_PKCS7
+ *
+ * Requires: ARCH_TEST_CIPHER_MODE_CBC
+ *
+ * Comment macros to disable the types
+ */
+
+#define ARCH_TEST_CBC_PKCS7
+
+/**
+ * \def ARCH_TEST_ASYMMETRIC_ENCRYPTION
+ *
+ * Enable support for Asymmetric encryption algorithms
+ */
+
+#define ARCH_TEST_ASYMMETRIC_ENCRYPTION
+
+/**
+ * \def ARCH_TEST_HASH
+ *
+ * Enable the hash algorithm.
+ */
+
+#define ARCH_TEST_HASH
+
+/**
+ * \def  ARCH_TEST_HMAC
+ *
+ * The key policy determines which underlying hash algorithm the key can be
+ * used for.
+ *
+ * Requires: ARCH_TEST_HASH
+ */
+
+#define ARCH_TEST_HMAC
+
+/**
+ * Enable ZIGBEE MMO HASH algorithm
+ * Requires : ARCH_TEST_AES
+ *
+ */
+
+/* #define ARCH_TEST_AES_MMO_ZIGBEE */
+
+/**
+ * \def ARCH_TEST_MDX
+ * \def ARCH_TEST_SHAXXX
+ *
+ * Enable the MDX algorithm.
+ * Enable the SHAXXX algorithm.
+ *
+ * Requires: ARCH_TEST_HASH
+ *
+ * Comment macros to disable the types
+ */
+
+/* #define ARCH_TEST_MD2
+ * #define ARCH_TEST_MD4
+ */
+
+#define ARCH_TEST_MD5
+#define ARCH_TEST_RIPEMD160
+#define ARCH_TEST_SHA1
+#define ARCH_TEST_SHA224
+#define ARCH_TEST_SHA256
+#define ARCH_TEST_SHA384
+#define ARCH_TEST_SHA512
+/* #define ARCH_TEST_SHA512_224
+ * #define ARCH_TEST_SHA512_256
+ * #define ARCH_TEST_SHA3_224
+ * #define ARCH_TEST_SHA3_256
+ * #define ARCH_TEST_SHA3_384
+ * #define ARCH_TEST_SHA3_512
+ */
+
+/**
+ * \def ARCH_TEST_HKDF
+ *
+ * Enable the HKDF algorithm (RFC 5869).
+ *
+ * Requires: ARCH_TEST_HASH
+ */
+
+#define ARCH_TEST_HKDF
+#define ARCH_TEST_HKDF_EXTRACT
+#define ARCH_TEST_HKDF_EXPAND
+
+/**
+ * \def ARCH_TEST_TLS12_PRF
+ *
+ * Enable the TLS-1.2 PRF algorithm (RFC 5246).
+ *
+ * Requires: ARCH_TEST_HASH
+ */
+
+#define ARCH_TEST_TLS12_PRF
+#define ARCH_TEST_TLS12_PSK_TO_MS
+
+/**
+ * \def ARCH_TEST_SP800_108
+ *
+ * Enable the NIST SP800-108 Counter mode KDF algorithm
+ */
+
+/* #define ARCH_TEST_SP800_108_COUNTER_HMAC
+ * #define ARCH_TEST_SP800_108_COUNTER_CMAC
+ */
+
+/**
+ * \def ARCH_TEST_xMAC
+ *
+ * Enable the xMAC (Cipher/Hash/G-based Message Authentication Code)
+ * mode for block ciphers.
+ * Requires: ARCH_TEST_AES or ARCH_TEST_DES
+ *
+ * Comment macros to disable the types
+ */
+
+#define ARCH_TEST_CMAC
+#define ARCH_TEST_HMAC
+
+/**
+ * \def ARCH_TEST_CCM
+ *
+ * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
+ *
+ * Requires: ARCH_TEST_AES
+ */
+
+#define ARCH_TEST_CCM
+
+/**
+ * \def ARCH_TEST_GCM
+ *
+ * Enable the Galois/Counter Mode (GCM) for AES.
+ *
+ * Requires: ARCH_TEST_AES
+ *
+ */
+
+/**
+ * \def ARCH_TEST_CCM_STAR_NO_TAG
+ *
+ * Enable CBC-MAC (CCM) mode without authentication.
+ *
+ * Requires: ARCH_TEST_AES
+ */
+
+#define ARCH_TEST_CCM_STAR_NO_TAG
+#define ARCH_TEST_CCM_STAR_ANY_TAG
+#define ARCH_TEST_GCM
+
+/**
+ * \def ARCH_TEST_TRUNCATED_MAC
+ *
+ * Enable support for RFC 6066 truncated HMAC in SSL.
+ *
+ * Comment this macro to disable support for truncated HMAC in SSL
+ */
+
+#define ARCH_TEST_TRUNCATED_MAC
+
+/**
+ * \def ARCH_TEST_ECDH
+ *
+ * Enable the elliptic curve Diffie-Hellman library.
+ *
+ * Requires: ARCH_TEST_ECC
+ */
+
+#define ARCH_TEST_ECDH
+
+/**
+ * \def ARCH_TEST_ECDSA
+ *
+ * Enable the elliptic curve DSA library.
+ * Requires: ARCH_TEST_ECC
+ */
+
+#define ARCH_TEST_ECDSA
+
+/**
+ * \def ARCH_TEST_DETERMINISTIC_ECDSA
+ *
+ * Enable deterministic ECDSA (RFC 6979).
+ */
+
+#define ARCH_TEST_DETERMINISTIC_ECDSA
+/* #define ARCH_TEST_TWISTED_EDWARDS */
+
+/**
+ * \def ARCH_TEST_ECC_ASYMMETRIC_API_SUPPORT
+ *
+ * Enable ECC support for asymmetric API.
+ */
+
+/* #define ARCH_TEST_ECC_ASYMMETRIC_API_SUPPORT
+ */
+
+/**
+ * \def ARCH_TEST_PBKDF2
+ *
+ * Enable the Password-based Key derivation functions - 2.
+ */
+
+/* #define ARCH_TEST_PBKDF2 */
+
+/**
+ * \def ARCH_TEST_JAPKE
+ *
+ * Enable support for balanced PAKE: ECJPAKE algorithm
+ */
+
+/* #define ARCH_TEST_JPAKE
+ */
+
+/**
+ * \def ARCH_TEST_SPAKE2P
+ *
+ * Enable support for augmented PAKE: SPAKE2P algorithm
+ */
+
+/* #define ARCH_TEST_SPAKE2P
+ * #define ARCH_TEST_SPAKE2P_HMAC
+ * #define ARCH_TEST_SPAKE2P_CMAC
+ * #define ARCH_TEST_SPAKE2P_MATTER
+ */
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+psa_status_t psa_key_agreement(psa_key_id_t private_key,
+                               FAR const uint8_t *peer_key,
+                               size_t peer_key_length,
+                               psa_algorithm_t alg,
+                               FAR const psa_key_attributes_t *attributes,
+                               FAR psa_key_id_t *key);
+
+psa_status_t psa_pake_set_context(FAR psa_pake_operation_t *operation,
+                                  FAR const uint8_t *context,
+                                  size_t context_len);
+
+psa_status_t psa_pake_get_shared_key(
+                     FAR psa_pake_operation_t *operation,
+                     FAR const psa_key_attributes_t *attributes,
+                     FAR psa_key_id_t *key);
+
+void psa_pake_cs_set_key_confirmation(
+                     FAR psa_pake_cipher_suite_t *cipher_suite,
+                     uint32_t key_confirmation);
+
+psa_status_t psa_key_derivation_verify_bytes(
+                     FAR psa_key_derivation_operation_t *operation,
+                     FAR const uint8_t *expected_output,
+                     size_t output_length);
+
+psa_status_t
+psa_key_derivation_verify_key(FAR psa_key_derivation_operation_t *operation,
+                              psa_key_id_t expected);
+
+#endif /* _PAL_CRYPTO_CONFIG_H_ */
diff --git a/testing/crypto/psa-arch-tests/include/pal_storage_config.h 
b/testing/crypto/psa-arch-tests/include/pal_storage_config.h
new file mode 100644
index 000000000..f4cfe1f00
--- /dev/null
+++ b/testing/crypto/psa-arch-tests/include/pal_storage_config.h
@@ -0,0 +1,33 @@
+/****************************************************************************
+ * apps/testing/crypto/psa-arch-tests/include/pal_storage_config.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ ****************************************************************************/
+
+#ifndef _PAL_STORAGE_CONFIG_H_
+#define _PAL_STORAGE_CONFIG_H_
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Platform specific max UID's size */
+
+#define ARCH_TEST_STORAGE_UID_MAX_SIZE        512
+#define PSA_STORAGE_FLAG_NO_CONFIDENTIALITY   (1u << 1)
+#define PSA_STORAGE_FLAG_NO_REPLAY_PROTECTION (1u << 2)
+
+#endif /* _PAL_STORAGE_CONFIG_H_ */
diff --git a/testing/crypto/psa-arch-tests/include/target_database.h 
b/testing/crypto/psa-arch-tests/include/target_database.h
new file mode 100644
index 000000000..846e090cd
--- /dev/null
+++ b/testing/crypto/psa-arch-tests/include/target_database.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+ * apps/testing/crypto/psa-arch-tests/include/target_database.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ ****************************************************************************/
+
+#ifndef _TARGET_DATABASE_H_
+#define _TARGET_DATABASE_H_
+
+static const uint32_t target_database[] =
+{
+  0x54425341,
+  0x5f434647,
+  0x7467745f,
+  0x5f434647,
+  0x00000001,
+  0x000000b8,
+  0x01000000,
+  0x0000007c,
+  0x00000002,
+  0x01010000,
+  0x01000038,
+  0x00000000,
+  0x00000000,
+  0x40013800,
+  0x00000fff,
+  0x000000ff,
+  0x00000012,
+  0x00000000,
+  0x00000000,
+  0x00000000,
+  0x00000000,
+  0x00000000,
+  0x00000000,
+  0x01030000,
+  0x01000038,
+  0x00000000,
+  0x00000000,
+  0x40002c00,
+  0x00000fff,
+  0x000000ff,
+  0x00000012,
+  0x000f4240,
+  0x001e8480,
+  0x004c4b40,
+  0x01312d00,
+  0x00000003,
+  0x00000000,
+  0x02000000,
+  0x00000024,
+  0x00000001,
+  0x02020000,
+  0x01000018,
+  0x00000000,
+  0x00000000,
+  0x00000000,
+  0x00000012,
+  0xffffffff
+};
+
+#endif
diff --git 
a/testing/crypto/psa-arch-tests/include/test_entry_fn_declare_list.inc 
b/testing/crypto/psa-arch-tests/include/test_entry_fn_declare_list.inc
new file mode 100644
index 000000000..b9a1c3a46
--- /dev/null
+++ b/testing/crypto/psa-arch-tests/include/test_entry_fn_declare_list.inc
@@ -0,0 +1,124 @@
+/****************************************************************************
+ * apps/testing/crypto/psa-arch-tests/include/test_entry_fn_declare_list.inc
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ ****************************************************************************/
+
+#ifdef CONFIG_PSA_ARCH_CRYPTO_TESTS
+void test_entry_c001(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c002(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c003(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c004(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c005(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c006(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c007(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c008(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c009(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c010(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c011(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c012(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c013(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c014(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c015(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c016(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c017(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c018(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c019(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c020(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c021(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c022(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c023(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c024(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c025(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c026(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c027(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c028(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c029(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c030(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c031(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c032(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c033(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c034(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c035(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c036(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c037(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c038(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c039(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c040(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c041(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c042(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c043(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c044(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c045(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c046(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c047(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c048(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c049(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c050(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c051(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c052(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c053(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c054(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c055(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c056(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c057(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c058(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c059(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c060(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c061(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c062(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c063(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c064(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c065(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c066(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c067(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c068(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c069(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c070(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c071(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c072(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c073(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c074(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c075(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c076(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c077(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c078(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c079(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_c080(val_api_t *val_api, psa_api_t *psa_api);
+#endif
+#ifdef CONFIG_PSA_ARCH_ITS_TESTS
+void test_entry_s001(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s002(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s003(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s004(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s005(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s006(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s007(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s008(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s009(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s010(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s011(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s012(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s013(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s014(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s015(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s015(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s016(val_api_t *val_api, psa_api_t *psa_api);
+void test_entry_s017(val_api_t *val_api, psa_api_t *psa_api);
+#endif
+#ifdef CONFIG_PSA_ARCH_ATTESTATION_TESTS
+void test_entry_a001(val_api_t *val_api, psa_api_t *psa_api);
+#endif
diff --git a/testing/crypto/psa-arch-tests/include/test_entry_list.inc 
b/testing/crypto/psa-arch-tests/include/test_entry_list.inc
new file mode 100644
index 000000000..03e3cb1a1
--- /dev/null
+++ b/testing/crypto/psa-arch-tests/include/test_entry_list.inc
@@ -0,0 +1,134 @@
+/****************************************************************************
+ * apps/testing/crypto/psa-arch-tests/include/test_entry_list.inc
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ ****************************************************************************/
+
+#ifdef CONFIG_PSA_ARCH_CRYPTO_TESTS
+  {201, &test_entry_c001},
+  {202, &test_entry_c002},
+  {203, &test_entry_c003},
+  {204, &test_entry_c004},
+  {205, &test_entry_c005},
+  {206, &test_entry_c006},
+  {207, &test_entry_c007},
+  {208, &test_entry_c008},
+  {209, &test_entry_c009},
+  {210, &test_entry_c010},
+  {211, &test_entry_c011},
+  {212, &test_entry_c012},
+  {213, &test_entry_c013},
+  {214, &test_entry_c014},
+  {215, &test_entry_c015},
+  {216, &test_entry_c016},
+  {217, &test_entry_c017},
+  {218, &test_entry_c018},
+  {219, &test_entry_c019},
+  {220, &test_entry_c020},
+  {221, &test_entry_c021},
+  {222, &test_entry_c022},
+  {223, &test_entry_c023},
+  {224, &test_entry_c024},
+  {225, &test_entry_c025},
+  {226, &test_entry_c026},
+  {227, &test_entry_c027},
+  {228, &test_entry_c028},
+  {229, &test_entry_c029},
+  {230, &test_entry_c030},
+  {231, &test_entry_c031},
+  {232, &test_entry_c032},
+  {233, &test_entry_c033},
+  {234, &test_entry_c034},
+  {235, &test_entry_c035},
+  {236, &test_entry_c036},
+  {237, &test_entry_c037},
+  {238, &test_entry_c038},
+  // {239, &test_entry_c039},
+  {240, &test_entry_c040},
+  // {241, &test_entry_c041},
+  {242, &test_entry_c042},
+  {243, &test_entry_c043},
+  {244, &test_entry_c044},
+  // {245, &test_entry_c045},
+  {246, &test_entry_c046},
+  {247, &test_entry_c047},
+  {248, &test_entry_c048},
+  {249, &test_entry_c049},
+  {250, &test_entry_c050},
+  {251, &test_entry_c051},
+  {252, &test_entry_c052},
+  {253, &test_entry_c053},
+  {254, &test_entry_c054},
+  {255, &test_entry_c055},
+  {256, &test_entry_c056},
+  {257, &test_entry_c057},
+  {258, &test_entry_c058},
+  {259, &test_entry_c059},
+  {260, &test_entry_c060},
+  {261, &test_entry_c061},
+  {262, &test_entry_c062},
+  {263, &test_entry_c063},
+
+  /* not support suspend and resume psa hash */
+
+  //  {264, &test_entry_c064},
+  //  {265, &test_entry_c065},
+
+  /* not support pake interfaces */
+
+  // {266, &test_entry_c066},
+  // {267, &test_entry_c067},
+  // {268, &test_entry_c068},
+  // {269, &test_entry_c069},
+  // {270, &test_entry_c070},
+  // {271, &test_entry_c071},
+  // {272, &test_entry_c072},
+  // {273, &test_entry_c073},
+  // {274, &test_entry_c074},
+  // {275, &test_entry_c075},
+  // {276, &test_entry_c076},
+  // {277, &test_entry_c077},
+  // {278, &test_entry_c078},
+  // {279, &test_entry_c079},
+#endif
+#ifdef CONFIG_PSA_ARCH_ITS_TESTS
+  {401, &test_entry_s001},
+  // {402, &test_entry_s002},
+
+  /* Memory overflow test, emulator couldn't execute */
+
+  // {403, &test_entry_s003},
+  // {404, &test_entry_s004},
+  {405, &test_entry_s005},
+  {406, &test_entry_s006},
+  // {407, &test_entry_s007},
+  // {408, &test_entry_s008},
+  {409, &test_entry_s009},
+  // {410, &test_entry_s010},
+
+  /* Optional Test */
+
+  // {411, &test_entry_s011},
+  // {412, &test_entry_s012},
+  // {413, &test_entry_s013},
+  // {414, &test_entry_s014},
+  // {415, &test_entry_s015},
+  // {416, &test_entry_s016},
+  // {417, &test_entry_s017},
+#endif
+#ifdef CONFIG_PSA_ARCH_ATTESTATION_TESTS
+  {601, &test_entry_a001},
+#endif
diff --git a/testing/crypto/psa-arch-tests/src/pal_crypto.c 
b/testing/crypto/psa-arch-tests/src/pal_crypto.c
new file mode 100644
index 000000000..95440517d
--- /dev/null
+++ b/testing/crypto/psa-arch-tests/src/pal_crypto.c
@@ -0,0 +1,77 @@
+/****************************************************************************
+ * apps/testing/crypto/psa-arch-tests/src/pal_crypto.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <pal_crypto_config.h>
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+psa_status_t psa_key_agreement(psa_key_id_t private_key,
+                               FAR const uint8_t *peer_key,
+                               size_t peer_key_length,
+                               psa_algorithm_t alg,
+                               FAR const psa_key_attributes_t *attributes,
+                               FAR psa_key_id_t *key)
+{
+  return PSA_ERROR_NOT_SUPPORTED;
+}
+
+psa_status_t psa_pake_set_context(FAR psa_pake_operation_t *operation,
+                                  FAR const uint8_t *context,
+                                  size_t context_len)
+{
+  return PSA_ERROR_NOT_SUPPORTED;
+}
+
+psa_status_t psa_pake_get_shared_key(
+                  FAR psa_pake_operation_t *operation,
+                  FAR const psa_key_attributes_t *attributes,
+                  FAR psa_key_id_t *key)
+{
+  return PSA_ERROR_NOT_SUPPORTED;
+}
+
+void psa_pake_cs_set_key_confirmation(
+                     FAR psa_pake_cipher_suite_t *cipher_suite,
+                     uint32_t key_confirmation)
+{
+}
+
+psa_status_t psa_key_derivation_verify_bytes(
+                     FAR psa_key_derivation_operation_t *operation,
+                     FAR const uint8_t *expected_output,
+                     size_t output_length)
+{
+  return PSA_ERROR_NOT_SUPPORTED;
+}
+
+psa_status_t psa_key_derivation_verify_key(
+                     FAR psa_key_derivation_operation_t *operation,
+                     psa_key_id_t expected)
+{
+  return PSA_ERROR_NOT_SUPPORTED;
+}

Reply via email to