psa arch test v1.3 release candidate 1
diff --git a/api-tests/CMakeLists.txt b/api-tests/CMakeLists.txt
index 31b7ef7..bc62946 100644
--- a/api-tests/CMakeLists.txt
+++ b/api-tests/CMakeLists.txt
@@ -136,6 +136,9 @@
 list(APPEND PLATFORM_PSA_ISOLATION_LEVEL_OPTIONS 1 2 3)
 endif()
 
+#list of INCLUDE_PANIC_TESTS options
+list(APPEND PSA_INCLUDE_PANIC_TESTS_OPTIONS 0 1)
+
 # list of available spec version
 if("${SUITE}" STREQUAL "STORAGE" OR ${SUITE} STREQUAL "INTERNAL_TRUSTED_STORAGE" OR ${SUITE} STREQUAL "PROTECTED_STORAGE")
 list(APPEND PSA_SPEC_VERSION
@@ -160,7 +163,6 @@
         1.0
         1.1
 )
-
 endif()
 
 #list of values available for connection based
@@ -168,6 +170,12 @@
 list(APPEND PSA_STATELESS_ROT 0 1)
 endif()
 
+#list of TESTS_COVERAGE available options
+list(APPEND PSA_TESTS_COVERAGE_OPTIONS
+		"ALL"
+        "PASS"
+)
+
 message(STATUS "[PSA] : ----------Process input arguments- start-------------")
 
 # Check for TARGET command line argument
@@ -386,6 +394,9 @@
 	set(INCLUDE_PANIC_TESTS 0 CACHE INTERNAL "Default INCLUDE_PANIC_TESTS value" FORCE)
         message(STATUS "[PSA] : Defaulting INCLUDE_PANIC_TESTS to ${INCLUDE_PANIC_TESTS}")
 else()
+	if(NOT ${INCLUDE_PANIC_TESTS} IN_LIST PSA_INCLUDE_PANIC_TESTS_OPTIONS)
+		message(FATAL_ERROR "[PSA] : Error: Unsupported value for -DINCLUDE_PANIC_TESTS=${INCLUDE_PANIC_TESTS}, supported values are : ${PSA_INCLUDE_PANIC_TESTS_OPTIONS}")
+	endif()
 	if(INCLUDE_PANIC_TESTS EQUAL 1)
 		message(STATUS "[PSA] : "
 		"INCLUDE_PANIC_TESTS set to 1, therefore including PSA APIs panic tests into the regression,\n"
@@ -486,6 +497,25 @@
 	endif()
 endif()
 
+if(NOT DEFINED TESTS_COVERAGE)
+	#By default all tests are included
+	set(TESTS_COVERAGE "ALL" CACHE INTERNAL "Default TESTS_COVERAGE value" FORCE)
+        message(STATUS "[PSA] : Defaulting TESTS_COVERAGE to ${TESTS_COVERAGE}")
+else()
+	if(NOT ${TESTS_COVERAGE} IN_LIST PSA_TESTS_COVERAGE_OPTIONS)
+		message(FATAL_ERROR "[PSA] : Error: Unsupported value for -DTESTS_COVERAGE=${TESTS_COVERAGE}, supported values are : ${PSA_TESTS_COVERAGE_OPTIONS}")
+	endif()
+	if(TESTS_COVERAGE STREQUAL ALL)
+                message(STATUS "[PSA] : "
+                "TESTS_COVERAGE set to ALL, therefore all tests are included.")
+        endif()
+	if(TESTS_COVERAGE STREQUAL PASS)
+		message(STATUS "[PSA] : "
+		"TESTS_COVERAGE set to PASS, therefore known failure tests are not included.")
+		add_definitions(-DTESTS_COVERAGE)
+	endif()
+endif()
+
 message(STATUS "[PSA] : ----------Process input arguments- complete-------------")
 
 
@@ -526,6 +556,7 @@
 					${SUITE_LOWER}
 					${TESTSUITE_DB}
 					${INCLUDE_PANIC_TESTS}
+					${TESTS_COVERAGE}
 					${PSA_TESTLIST_FILE}
 					${PSA_TEST_ENTRY_LIST_INC}
 					${PSA_TEST_ENTRY_FUN_DECLARE_INC}
diff --git a/api-tests/dev_apis/README.md b/api-tests/dev_apis/README.md
index 36af1cb..24a5820 100644
--- a/api-tests/dev_apis/README.md
+++ b/api-tests/dev_apis/README.md
@@ -14,7 +14,7 @@
 For more information on the architecture test suite framework and methodology to run the tests, refer to the [Validation Methodology](../docs/Arm_PSA_APIs_Arch_Test_Validation_Methodology.pdf) document.
 
 ## This release
- - Code Quality : REL v1.2
+ - Code Quality : REL v1.3
  - This release contains following PSA Functional APIs tests: <br />
 
 | Test Category            | Specification Version                |
@@ -30,7 +30,8 @@
 
 | Release version | Release tag  | PSA Crypto API | PSA Storage API | PSA Attestation API |
 |-----------------|---------------|----------------|-----------------|---------------------|
-| REL v1.2 | [v21.07_API1.2_ADAC_ALPHA](https://github.com/ARM-software/psa-arch-tests/tree//api-tests/dev_apis) | 1.0.0  | 1.0.0 | 1.0.2 |
+| REL v1.3 | [v21.10_API1.3_ADAC_ALPHA-1](https://github.com/ARM-software/psa-arch-tests/tree/v21.10_API1.3_ADAC_ALPHA-1/api-tests/dev_apis) | 1.0.0  | 1.0.0 | 1.0.2 |
+| REL v1.2 | [v21.07_API1.2_ADAC_ALPHA](https://github.com/ARM-software/psa-arch-tests/tree/v21.07_API1.2_ADAC_ALPHA/api-tests/dev_apis) | 1.0.0  | 1.0.0 | 1.0.2 |
 | REL v1.1 | [v20.11_API1.1](https://github.com/ARM-software/psa-arch-tests/tree/v20.11_API1.1/api-tests/dev_apis) | 1.0-Beta3  | 1.0.0 | 1.0.0 |
 | REL v1.0 | [v20.03_API1.0](https://github.com/ARM-software/psa-arch-tests/tree/v20.03_API1.0/api-tests/dev_apis) | 1.0-Beta3  | 1.0.0 | 1.0.0 |
 | v0.9 | [v19.06_API0.9](https://github.com/ARM-software/psa-arch-tests/tree/v19.06_API0.9/api-tests/dev_apis) | 1.0-Beta2 | 1.0-Beta2 | 1.0-Beta0 |
@@ -81,6 +82,7 @@
 ```
     -DPSA_INCLUDE_PATHS=`readlink -f <relative_include_path>`
 ```
+-   -DTESTS_COVERAGE=<tests_coverage_value> is used to skip known failure tests by selecting value PASS. Supported values are ALL and PASS. ALL value will include all the tests and PASS value will skip the known failure tests and will include pass tests. Default is ALL.
 
 To compile Crypto tests for **tgt_dev_apis_tfm_an521** platform, execute the following commands:
 ```
diff --git a/api-tests/dev_apis/crypto/common/test_crypto_common.c b/api-tests/dev_apis/crypto/common/test_crypto_common.c
index a97b7df..a102b21 100644
--- a/api-tests/dev_apis/crypto/common/test_crypto_common.c
+++ b/api-tests/dev_apis/crypto/common/test_crypto_common.c
@@ -451,6 +451,12 @@
  0xC2, 0xE2, 0x19, 0xF8, 0xAD, 0xF8, 0x6F, 0x7D, 0xC6, 0x4C, 0xA8, 0x03, 0xBC, 0x18, 0x5B, 0x4E,
  0x60, 0xD0, 0xB9, 0xFC, 0x23, 0xB0, 0x20, 0x7A, 0x84, 0x83, 0x38, 0xB8, 0xA1, 0x15, 0x81, 0xA1};
 
+const uint8_t signature_6[] = {0xC6, 0x54, 0x59, 0xB1, 0xC9, 0x50, 0x8F, 0xE6, 0xBD, 0x97, 0x3F,
+0x43, 0xAA, 0xBF, 0x58, 0x12, 0xAF, 0xF6, 0xA8, 0xDB, 0x40, 0x2F, 0x77, 0x3D, 0x74, 0x0E, 0xF1,
+0x41, 0x8D, 0xDC, 0x54, 0xA8, 0xD6, 0xFE, 0x52, 0x4C, 0xD3, 0x78, 0xEB, 0xE2, 0xC2, 0xAF, 0x80,
+0xF6, 0xAF, 0xFC, 0x0F, 0xB0, 0x4B, 0xEA, 0x36, 0x0C, 0x92, 0xE5, 0x64, 0x4A, 0x60, 0x41, 0xB2,
+0xF4, 0x53, 0x49, 0xD4, 0x22};
+
 const uint8_t hmac_sha224[] = {
  0x2D, 0x39, 0x37, 0x90, 0xE1, 0xDA, 0x9A, 0x86, 0xEC, 0x0D, 0x1B, 0x17, 0x59, 0xC1, 0x23, 0xF9,
  0xBA, 0xA4, 0x38, 0xF9, 0x11, 0xA7, 0x3F, 0xEA, 0x1E, 0x9E, 0xA1, 0x7D};
@@ -469,8 +475,8 @@
  0x91, 0xD1, 0x35, 0x52, 0x7F, 0xF2, 0xC3, 0x67, 0x43, 0x99, 0xDC, 0x20, 0x2A, 0xC4, 0x77, 0xB4,
  0x4C, 0x51, 0xD0, 0xFE, 0x1D, 0xB6, 0xC8, 0x28, 0x34, 0x02, 0x6A, 0x6D, 0x8D, 0xD3, 0x20, 0xDB};
 
-const uint8_t cmac_aes_128[] = {
-};
+const uint8_t cmac_aes_128[] = {0x7F, 0x97, 0x9B, 0xA0, 0xFF, 0xF1, 0x35, 0x98, 0x61, 0x38, 0xF2,
+                                0xAB, 0x05, 0x4B, 0x28, 0x4B};
 
 /* test inputs */
 const uint8_t hash_input                               = 0xbd;
diff --git a/api-tests/dev_apis/crypto/common/test_crypto_common.h b/api-tests/dev_apis/crypto/common/test_crypto_common.h
index e4ae071..dd99d9a 100644
--- a/api-tests/dev_apis/crypto/common/test_crypto_common.h
+++ b/api-tests/dev_apis/crypto/common/test_crypto_common.h
@@ -38,9 +38,11 @@
 #define INPUT_SEED_LEN                 4
 #define INPUT_LABEL_LEN                5
 
+#define PSA_ERROR_PROGRAMMER_ERROR      ((psa_status_t)-129)
+
 /* min and max finding macro */
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
+#define MIN(a, b) (((a) < (b))?(a):(b))
+#define MAX(a, b) (((a) > (b))?(a):(b))
 
 extern const uint8_t key_data[];
 
@@ -108,6 +110,7 @@
 extern const uint8_t signature_4[];
 extern const uint8_t signature_4_invalid[];
 extern const uint8_t signature_5[];
+extern const uint8_t signature_6[];
 
 extern const uint8_t hmac_sha224[];
 extern const uint8_t hmac_sha224_invalid[];
diff --git a/api-tests/dev_apis/crypto/suite.cmake b/api-tests/dev_apis/crypto/suite.cmake
index f7b13de..48e59ba 100644
--- a/api-tests/dev_apis/crypto/suite.cmake
+++ b/api-tests/dev_apis/crypto/suite.cmake
@@ -1,5 +1,5 @@
 #/** @file
-# * Copyright (c) 2019-2020, Arm Limited or its affiliates. All rights reserved.
+# * Copyright (c) 2019-2021, Arm Limited or its affiliates. All rights reserved.
 # * SPDX-License-Identifier : Apache-2.0
 # *
 # * Licensed under the Apache License, Version 2.0 (the "License");
@@ -33,7 +33,7 @@
 
 add_definitions(${CC_OPTIONS})
 add_definitions(${AS_OPTIONS})
-add_definitions(-DHOST_GCC_MISSING_CRYPTO_1_0=1)
+add_definitions(-DMISSING_CRYPTO_1_0=0)
 
 # append common crypto file to list of source collected
 list(APPEND SUITE_CC_SOURCE ${PSA_SUITE_DIR}/common/test_crypto_common.c)
diff --git a/api-tests/dev_apis/crypto/test_c003/test_data.h b/api-tests/dev_apis/crypto/test_c003/test_data.h
index d6314c8..9fb7f4c 100644
--- a/api-tests/dev_apis/crypto/test_c003/test_data.h
+++ b/api-tests/dev_apis/crypto/test_c003/test_data.h
@@ -189,7 +189,6 @@
 
 #ifdef ARCH_TEST_CIPHER_MODE_CTR
 #ifdef ARCH_TEST_AES_128
-#ifdef CRYPTO_1_0
 {
     .test_desc            = "Test psa_export_key with key policy verify\n",
     .type                 = PSA_KEY_TYPE_AES,
@@ -202,7 +201,6 @@
     .expected_data_length = AES_16B_KEY_SIZE,
     .expected_status      = PSA_ERROR_NOT_PERMITTED
 },
-#endif
 
 {
     .test_desc            = "Test psa_export_key with less buffer size\n",
diff --git a/api-tests/dev_apis/crypto/test_c016/test_data.h b/api-tests/dev_apis/crypto/test_c016/test_data.h
index 23f1e2b..e6c24e0 100644
--- a/api-tests/dev_apis/crypto/test_c016/test_data.h
+++ b/api-tests/dev_apis/crypto/test_c016/test_data.h
@@ -105,6 +105,7 @@
 #ifdef ARCH_TEST_RSA
 #ifdef ARCH_TEST_RSA_2048
 #ifdef ARCH_TEST_RSA_PKCS1V15_SIGN_RAW
+#ifndef ARCH_TEST_SKIP_RSA_2048_GEN_KEY
 {
     .test_desc       = "Test psa_generate_key with RSA 2048 Keypair\n",
     .type            = PSA_KEY_TYPE_RSA_KEY_PAIR,
@@ -112,7 +113,7 @@
 	                   | PSA_KEY_USAGE_SIGN_MESSAGE | PSA_KEY_USAGE_VERIFY_MESSAGE,
     .alg             = PSA_ALG_RSA_PKCS1V15_SIGN_RAW,
     .bits            = 2048,
-    .expected_range  = {1, BITS_TO_BYTES(MIN(PSA_EXPORT_KEY_OUTPUT_SIZE(\
+    .expected_range  = {1, (MIN(PSA_EXPORT_KEY_OUTPUT_SIZE(\
 	                    PSA_KEY_TYPE_RSA_KEY_PAIR, 2048), \
                         PSA_EXPORT_KEY_PAIR_MAX_SIZE))},
 
@@ -121,6 +122,7 @@
 #endif
 #endif
 #endif
+#endif
 
 #ifdef ARCH_TEST_ECC_CURVE_SECP224R1
 #ifdef ARCH_TEST_ASYMMETRIC_ENCRYPTION
diff --git a/api-tests/dev_apis/crypto/test_c021/test_c021.c b/api-tests/dev_apis/crypto/test_c021/test_c021.c
index 540f9fd..63760fd 100644
--- a/api-tests/dev_apis/crypto/test_c021/test_c021.c
+++ b/api-tests/dev_apis/crypto/test_c021/test_c021.c
@@ -59,9 +59,6 @@
     {
         val->print(PRINT_TEST, "[Check %d] ", g_test_count++);
         val->print(PRINT_TEST, check1[i].test_desc, 0);
-	//memset(&operation,0,sizeof(psa_key_derivation_operation_t));
-        //attributes = PSA_KEY_ATTRIBUTES_INIT;
-        //derv_attributes = PSA_KEY_ATTRIBUTES_INIT;
 
         /* Setting up the watchdog timer for each check */
         status = val->wd_reprogram_timer(WD_CRYPTO_TIMEOUT);
@@ -73,7 +70,6 @@
         val->crypto_function(VAL_CRYPTO_SET_KEY_USAGE_FLAGS, &attributes, check1[i].usage);
 
         /* Import the key if the derivation input is key */
-        if (check1[i].step == PSA_KEY_DERIVATION_INPUT_SECRET)
         {
             /* Import the key data into the key slot */
             status = val->crypto_function(VAL_CRYPTO_IMPORT_KEY, &attributes, check1[i].key_data,
@@ -99,60 +95,91 @@
                      check1[i].step, key);
             TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(6));
             status = val->crypto_function(VAL_CRYPTO_KEY_DERIVATION_INPUT_BYTES, &operation,
-                                              PSA_KEY_DERIVATION_INPUT_INFO,
-                                              input_info,
-                                              INPUT_INFO_LEN);
+                                          PSA_KEY_DERIVATION_INPUT_INFO,
+                                          input_info,
+                                          INPUT_INFO_LEN);
             TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(7));
         }
         else
         {
-            status = val->crypto_function(VAL_CRYPTO_KEY_DERIVATION_INPUT_BYTES, &operation,
-                     check1[i].step, check1[i].data, check1[i].data_length);
-            TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(6));
+           if (check1[i].step != PSA_KEY_DERIVATION_INPUT_SALT)
+           {
+                status = val->crypto_function(VAL_CRYPTO_KEY_DERIVATION_INPUT_KEY, &operation,
+                                              check1[0].step, key);
+				TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(8));
+
+                status = val->crypto_function(VAL_CRYPTO_KEY_DERIVATION_INPUT_BYTES, &operation,
+                                              check1[i].step,
+                                              check1[i].data,
+                                              check1[i].data_length);
+				TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(9));
+				if (check1[i].step != PSA_KEY_DERIVATION_INPUT_INFO)
+				{
+                   status = val->crypto_function(VAL_CRYPTO_KEY_DERIVATION_INPUT_BYTES,
+                                                  &operation,
+                                                  PSA_KEY_DERIVATION_INPUT_INFO,
+                                                  input_info,
+                                                  INPUT_INFO_LEN);
+                   TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(10));
+				}
+            } else {
+                status = val->crypto_function(VAL_CRYPTO_KEY_DERIVATION_INPUT_BYTES, &operation,
+                                              check1[i].step, check1[i].data,
+                                              check1[i].data_length);
+                TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(11));
+                status = val->crypto_function(VAL_CRYPTO_KEY_DERIVATION_INPUT_KEY, &operation,
+						 check1[0].step, key);
+				TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(12));
+                status = val->crypto_function(VAL_CRYPTO_KEY_DERIVATION_INPUT_BYTES, &operation,
+                                              PSA_KEY_DERIVATION_INPUT_INFO,
+                                              input_info,
+                                              INPUT_INFO_LEN);
+				TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(13));
+            }
         }
 
         /* Setup the attributes for the key */
-        val->crypto_function(VAL_CRYPTO_SET_KEY_TYPE, &derv_attributes, check1[i].derive_key_type);
-        val->crypto_function(VAL_CRYPTO_SET_KEY_BITS, &derv_attributes, check1[i].derive_key_bits);
+        val->crypto_function(VAL_CRYPTO_SET_KEY_TYPE, &derv_attributes,
+		                     check1[i].derive_key_type);
+        val->crypto_function(VAL_CRYPTO_SET_KEY_BITS, &derv_attributes,
+                             check1[i].derive_key_bits);
         val->crypto_function(VAL_CRYPTO_SET_KEY_ALGORITHM, &derv_attributes,
-        check1[i].derive_key_alg);
+                             check1[i].derive_key_alg);
         val->crypto_function(VAL_CRYPTO_SET_KEY_USAGE_FLAGS, &derv_attributes,
-        check1[i].derive_usage);
+                             check1[i].derive_usage);
 
         /*  Derive a key from an ongoing key derivation operation */
         status = val->crypto_function(VAL_CRYPTO_KEY_DERIVATION_OUTPUT_KEY, &derv_attributes,
-                 &operation, &keys[SLOT_1]);
-        TEST_ASSERT_EQUAL(status, check1[i].expected_status, TEST_CHECKPOINT_NUM(9));
+                                      &operation, &keys[SLOT_1]);
+        TEST_ASSERT_EQUAL(status, check1[i].expected_status, TEST_CHECKPOINT_NUM(14));
 
-        if (check1[i].step == PSA_KEY_DERIVATION_INPUT_SECRET)
         {
             status = val->crypto_function(VAL_CRYPTO_DESTROY_KEY, key);
-            TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(10));
-
+            TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(15));
         }
 
         if (check1[i].expected_status != PSA_SUCCESS)
         {
             status = val->crypto_function(VAL_CRYPTO_KEY_DERIVATION_ABORT, &operation);
-            TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(11));
+            TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(16));
 
             continue;
         }
 
         /* Read some key from a key derivation operation with no data in the operation */
         status = val->crypto_function(VAL_CRYPTO_KEY_DERIVATION_OUTPUT_KEY, &derv_attributes,
-                 &operation, &keys[SLOT_2]);
-        TEST_ASSERT_EQUAL(status, PSA_ERROR_INSUFFICIENT_DATA, TEST_CHECKPOINT_NUM(12));
+                                      &operation, &keys[SLOT_2]);
+        TEST_ASSERT_EQUAL(status, PSA_ERROR_INSUFFICIENT_DATA, TEST_CHECKPOINT_NUM(17));
 
         /* Abort the derivation operation */
         status = val->crypto_function(VAL_CRYPTO_KEY_DERIVATION_ABORT, &operation);
-        TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(13));
+        TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(18));
 
         /* Expect bad state when derivation is called on an aborted operation */
         status = val->crypto_function(VAL_CRYPTO_KEY_DERIVATION_OUTPUT_KEY, &derv_attributes,
-                 &operation, &keys[SLOT_2]);
-        TEST_ASSERT_EQUAL(status, PSA_ERROR_BAD_STATE, TEST_CHECKPOINT_NUM(14));
-    }
+                                      &operation, &keys[SLOT_2]);
+        TEST_ASSERT_EQUAL(status, PSA_ERROR_BAD_STATE, TEST_CHECKPOINT_NUM(19));
 
+    }
     return VAL_STATUS_SUCCESS;
 }
diff --git a/api-tests/dev_apis/crypto/test_c021/test_data.h b/api-tests/dev_apis/crypto/test_c021/test_data.h
index 5deaa1c..98e9d4c 100644
--- a/api-tests/dev_apis/crypto/test_c021/test_data.h
+++ b/api-tests/dev_apis/crypto/test_c021/test_data.h
@@ -69,7 +69,7 @@
  PSA_ALG_CTR,
  PSA_SUCCESS
 },
-
+#ifdef IS_DES_SUPPORTED
 {"Test psa_key_derivation_output_key - DES key export\n", PSA_KEY_TYPE_DERIVE,
 {0x49, 0x8E, 0xC7, 0x7D, 0x01, 0x95, 0x0D, 0x94, 0x2C, 0x16, 0xA5, 0x3E, 0x99,
  0x5F, 0xC9, 0x77},
@@ -80,7 +80,7 @@
  PSA_ALG_CTR,
  PSA_SUCCESS
 },
-
+#endif
 {"Test psa_key_derivation_output_key - Greater Capacity than available\n", PSA_KEY_TYPE_DERIVE,
 {0x49, 0x8E, 0xC7, 0x7D, 0x01, 0x95, 0x0D, 0x94, 0x2C, 0x16, 0xA5, 0x3E, 0x99,
  0x5F, 0xC9, 0x77},
@@ -91,7 +91,6 @@
  PSA_ALG_CTR,
  PSA_ERROR_INSUFFICIENT_DATA
 },
-
 {"Test psa_key_derivation_output_key - ECC Public key\n", PSA_KEY_TYPE_DERIVE,
 {0x49, 0x8E, 0xC7, 0x7D, 0x01, 0x95, 0x0D, 0x94, 0x2C, 0x16, 0xA5, 0x3E, 0x99,
  0x5F, 0xC9, 0x77},
@@ -100,7 +99,7 @@
  PSA_KEY_DERIVATION_INPUT_SECRET, 256, {0}, 0,
  PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1), 256, PSA_KEY_USAGE_EXPORT,
  PSA_ALG_ECDSA_ANY,
- PSA_ERROR_NOT_SUPPORTED
+ PSA_ERROR_INVALID_ARGUMENT
 },
 
 {"Test psa_key_derivation_output_key -  ECC keypair\n", PSA_KEY_TYPE_DERIVE,
@@ -111,7 +110,7 @@
  PSA_KEY_DERIVATION_INPUT_SECRET, 224, {0}, 0,
  PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1), 224, PSA_KEY_USAGE_EXPORT,
  PSA_ALG_ECDSA_ANY,
- PSA_SUCCESS
+ PSA_ERROR_INVALID_ARGUMENT
 },
 
 {"Test psa_key_derivation_output_key -  RSA Public Key", PSA_KEY_TYPE_DERIVE,
@@ -122,7 +121,7 @@
  PSA_KEY_DERIVATION_INPUT_SECRET, 256, {0}, 0,
  PSA_KEY_TYPE_RSA_PUBLIC_KEY, 2048, PSA_KEY_USAGE_EXPORT,
  PSA_ALG_RSA_PKCS1V15_SIGN_RAW,
- PSA_ERROR_NOT_SUPPORTED,
+ PSA_ERROR_INVALID_ARGUMENT
 },
 
 {"Test psa_key_derivation_output_key -  RSA keypair\n", PSA_KEY_TYPE_DERIVE,
@@ -133,7 +132,7 @@
  PSA_KEY_DERIVATION_INPUT_SECRET, 256, {0}, 0,
  PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1), 2046, PSA_KEY_USAGE_EXPORT,
  PSA_ALG_RSA_PKCS1V15_SIGN_RAW,
- PSA_SUCCESS
+ PSA_ERROR_INVALID_ARGUMENT
 },
 
 {"Test psa_key_derivation_output_key - Invalid key size\n", PSA_KEY_TYPE_DERIVE,
@@ -144,6 +143,6 @@
  PSA_KEY_DERIVATION_INPUT_SECRET, 32, {0}, 0,
  PSA_KEY_TYPE_AES, BYTES_TO_BITS(AES_18B_KEY_SIZE), PSA_KEY_USAGE_EXPORT,
  PSA_ALG_CTR,
- PSA_ERROR_NOT_SUPPORTED
+ PSA_ERROR_INVALID_ARGUMENT
 },
 };
diff --git a/api-tests/dev_apis/crypto/test_c026/test_data.h b/api-tests/dev_apis/crypto/test_c026/test_data.h
index 50221af..d9c4bfe 100644
--- a/api-tests/dev_apis/crypto/test_c026/test_data.h
+++ b/api-tests/dev_apis/crypto/test_c026/test_data.h
@@ -28,7 +28,6 @@
 } test_data;
 
 static const test_data check1[] = {
-#ifdef CRYPTO_1_0
 #ifdef ARCH_TEST_HMAC
 #ifdef ARCH_TEST_SHA256
 {
@@ -66,7 +65,7 @@
     .data_length     = 64,
     .usage_flags     = PSA_KEY_USAGE_SIGN_MESSAGE,
     .alg             = PSA_ALG_CMAC,
-    .expected_status = PSA_ERROR_NOT_SUPPORTED
+    .expected_status = PSA_ERROR_INVALID_ARGUMENT
 },
 #endif
 #endif
@@ -144,6 +143,5 @@
 },
 #endif
 #endif
-#endif
 
 };
diff --git a/api-tests/dev_apis/crypto/test_c027/test_data.h b/api-tests/dev_apis/crypto/test_c027/test_data.h
index 6025948..838f28f 100644
--- a/api-tests/dev_apis/crypto/test_c027/test_data.h
+++ b/api-tests/dev_apis/crypto/test_c027/test_data.h
@@ -31,7 +31,6 @@
 } test_data;
 
 static const test_data check1[] = {
-#ifdef CRYPTO_1_0
 #ifdef ARCH_TEST_HMAC
 #ifdef ARCH_TEST_SHA256
 {
@@ -95,5 +94,4 @@
 },
 #endif
 #endif
-#endif
 };
diff --git a/api-tests/dev_apis/crypto/test_c028/test_data.h b/api-tests/dev_apis/crypto/test_c028/test_data.h
index c13a006..6387390 100644
--- a/api-tests/dev_apis/crypto/test_c028/test_data.h
+++ b/api-tests/dev_apis/crypto/test_c028/test_data.h
@@ -34,8 +34,9 @@
     psa_status_t            expected_status;
 } test_data;
 
+const unsigned char cmac_key[] = {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
+                                  0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c};
 static const test_data check1[] = {
-#ifdef CRYPTO_1_0
 #ifdef ARCH_TEST_HMAC
 #ifdef ARCH_TEST_SHA224
 {
@@ -168,5 +169,4 @@
 },
 #endif
 #endif
-#endif
 };
diff --git a/api-tests/dev_apis/crypto/test_c029/test_data.h b/api-tests/dev_apis/crypto/test_c029/test_data.h
index 10358eb..ca4bcd6 100644
--- a/api-tests/dev_apis/crypto/test_c029/test_data.h
+++ b/api-tests/dev_apis/crypto/test_c029/test_data.h
@@ -28,7 +28,6 @@
 } test_data;
 
 static const test_data check1[] = {
-#ifdef CRYPTO_1_0
 #ifdef ARCH_TEST_HMAC
 #ifdef ARCH_TEST_SHA256
 {
@@ -66,7 +65,7 @@
     .alg             = PSA_ALG_CMAC,
     .data            = key_data,
     .data_length     = AES_16B_KEY_SIZE,
-    .expected_status = PSA_ERROR_NOT_SUPPORTED
+    .expected_status = PSA_ERROR_INVALID_ARGUMENT
 },
 #endif
 #endif
@@ -76,7 +75,7 @@
 {
     .test_desc       = "Test psa_mac_verify_setup - Invalid usage flag\n",
     .type            = PSA_KEY_TYPE_HMAC,
-    .usage_flags     = PSA_KEY_USAGE_VERIFY_MESSAGE,
+    .usage_flags     = PSA_KEY_USAGE_DERIVE,
     .alg             = PSA_ALG_HMAC(PSA_ALG_SHA_256),
     .data            = key_data,
     .data_length     = 64,
@@ -145,5 +144,4 @@
 },
 #endif
 #endif
-#endif
 };
diff --git a/api-tests/dev_apis/crypto/test_c030/test_data.h b/api-tests/dev_apis/crypto/test_c030/test_data.h
index 708eb81..db8f79b 100644
--- a/api-tests/dev_apis/crypto/test_c030/test_data.h
+++ b/api-tests/dev_apis/crypto/test_c030/test_data.h
@@ -33,7 +33,6 @@
 } test_data;
 
 static const test_data check1[] = {
-#ifdef CRYPTO_1_0
 #ifdef ARCH_TEST_HMAC
 #ifdef ARCH_TEST_SHA224
 {
@@ -167,5 +166,4 @@
 },
 #endif
 #endif
-#endif
 };
diff --git a/api-tests/dev_apis/crypto/test_c039/test_c039.c b/api-tests/dev_apis/crypto/test_c039/test_c039.c
index bf4ebad..8edc6ca 100644
--- a/api-tests/dev_apis/crypto/test_c039/test_c039.c
+++ b/api-tests/dev_apis/crypto/test_c039/test_c039.c
@@ -117,8 +117,9 @@
             TEST_ASSERT_EQUAL(get_output_length, check1[i].input_length, TEST_CHECKPOINT_NUM(8));
 
             /* Check if the output matches with the given input data */
-            TEST_ASSERT_MEMCMP(check1[i].output + check1[i].expected_output_length, check1[i].input,
-                               get_output_length, TEST_CHECKPOINT_NUM(9));
+            TEST_ASSERT_MEMCMP((check1[i].output + check1[i].expected_output_length),\
+			                    check1[i].input, get_output_length,\
+								TEST_CHECKPOINT_NUM(9));
         }
 
         /* Destroy the key */
diff --git a/api-tests/dev_apis/crypto/test_c041/test_c041.c b/api-tests/dev_apis/crypto/test_c041/test_c041.c
index ec6c47a..0fe0ef5 100644
--- a/api-tests/dev_apis/crypto/test_c041/test_c041.c
+++ b/api-tests/dev_apis/crypto/test_c041/test_c041.c
@@ -92,15 +92,35 @@
         TEST_ASSERT_EQUAL(get_signature_length, check1[i].expected_signature_length,
                           TEST_CHECKPOINT_NUM(6));
 
-        /* Check if the output matches with the expected data */
-        TEST_ASSERT_MEMCMP(check1[i].signature, check1[i].expected_signature, get_signature_length,
-                           TEST_CHECKPOINT_NUM(7));
 
-        /* Destroy the key */
+        /* Destroy a key and restore the slot to its default state */
         status = val->crypto_function(VAL_CRYPTO_DESTROY_KEY, key);
-        TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(8));
+        TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(7));
 
-        if (valid_test_input_index < 0)
+       /* verify the expected signature for the hash */
+       memset(&attributes, 0, sizeof(psa_key_attributes_t));
+       val->crypto_function(VAL_CRYPTO_SET_KEY_TYPE,        &attributes, check1[i].type);
+       val->crypto_function(VAL_CRYPTO_SET_KEY_ALGORITHM,   &attributes, check1[i].alg);
+       val->crypto_function(VAL_CRYPTO_SET_KEY_USAGE_FLAGS, &attributes, PSA_KEY_USAGE_VERIFY_HASH);
+       /* Import the key data into the key slot */
+       status = val->crypto_function(VAL_CRYPTO_IMPORT_KEY, &attributes, check1[i].data,
+                                      check1[i].data_length, &key);
+       TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(8));
+
+	  /* Verify the signature a hash or short message using a public key */
+       status = val->crypto_function(VAL_CRYPTO_VERIFY_HASH,
+                                 key,
+                                 check1[i].alg,
+                                 check1[i].hash,
+                                 check1[i].hash_length,
+                                 check1[i].expected_signature,
+                                 check1[i].expected_signature_length);
+       TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(9));
+       /* Destroy the key */
+       status = val->crypto_function(VAL_CRYPTO_DESTROY_KEY, key);
+       TEST_ASSERT_EQUAL(status, PSA_SUCCESS, TEST_CHECKPOINT_NUM(10));
+
+       if (valid_test_input_index < 0)
             valid_test_input_index = i;
     }
 
diff --git a/api-tests/dev_apis/crypto/test_c048/test_c048.c b/api-tests/dev_apis/crypto/test_c048/test_c048.c
index 559c9b9..8cf24fa 100644
--- a/api-tests/dev_apis/crypto/test_c048/test_c048.c
+++ b/api-tests/dev_apis/crypto/test_c048/test_c048.c
@@ -28,7 +28,7 @@
 
 extern  uint32_t g_test_count;
 
-static uint8_t    output[SIZE_32B];
+static uint8_t    output[64];
 
 int32_t psa_cipher_encrypt_test(caller_security_t caller __UNUSED)
 {
@@ -71,6 +71,7 @@
         status = val->crypto_function(VAL_CRYPTO_CIPHER_ENCRYPT, key,
                  check1[i].key_alg, check1[i].input, check1[i].input_length, output,
                  check1[i].output_size, &output_length);
+
         TEST_ASSERT_EQUAL(status, check1[i].expected_status, TEST_CHECKPOINT_NUM(4));
 
         /* Destroy the key */
@@ -86,17 +87,11 @@
         /* Check if the output length matches the expected length */
         TEST_ASSERT_EQUAL(output_length, check1[i].expected_output_length, TEST_CHECKPOINT_NUM(6));
 
-        /* Check if the output data matches the expected data */
-        TEST_ASSERT_MEMCMP(output, check1[i].expected_output, output_length,
-        TEST_CHECKPOINT_NUM(7));
-
         /* Encrypt a message using a symmetric cipher on an aborted key handle should be an error */
         status = val->crypto_function(VAL_CRYPTO_CIPHER_ENCRYPT, key,
                  check1[i].key_alg, check1[i].input, check1[i].input_length, output,
                  check1[i].output_size, &output_length);
-        TEST_ASSERT_EQUAL(status, PSA_ERROR_INVALID_HANDLE, TEST_CHECKPOINT_NUM(8));
-
+        TEST_ASSERT_EQUAL(status, PSA_ERROR_INVALID_HANDLE, TEST_CHECKPOINT_NUM(7));
     }
-
     return VAL_STATUS_SUCCESS;
 }
diff --git a/api-tests/dev_apis/crypto/test_c048/test_data.h b/api-tests/dev_apis/crypto/test_c048/test_data.h
index b8eea61..4eefc20 100644
--- a/api-tests/dev_apis/crypto/test_c048/test_data.h
+++ b/api-tests/dev_apis/crypto/test_c048/test_data.h
@@ -1,5 +1,5 @@
 /** @file
- * Copyright (c) 2019-2020, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2019-2021, Arm Limited or its affiliates. All rights reserved.
  * SPDX-License-Identifier : Apache-2.0
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,6 +16,7 @@
 **/
 
 #include "val_crypto.h"
+#include "test_crypto_common.h"
 
 typedef struct {
     char                    test_desc[75];
@@ -39,18 +40,18 @@
 {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09,
  0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
  PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CBC_NO_PADDING,
-{0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
- 0x93, 0x17, 0x2a}, 16, SIZE_32B,
-{0xA0, 0x76, 0xEC, 0x9D, 0xFB, 0xE4, 0x7D, 0x52, 0xAF, 0xC3, 0x57, 0x33, 0x6F,
- 0x20, 0x74, 0x3B}, 0, PSA_SUCCESS
+{0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a},
+ 16, PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE(16),
+{0x76, 0x49, 0xab, 0xac, 0x81, 0x19, 0xb2, 0x46, 0xce, 0xe9, 0x8e, 0x9b, 0x12, 0xe9, 0x19, 0x7d},
+32, PSA_SUCCESS
 },
 
 {"Test psa_cipher_encrypt - Encrypt - AES CBC_NO_PADDING (Short input)\n", PSA_KEY_TYPE_AES,
 {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09,
  0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
  PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CBC_NO_PADDING,
-{0x6b, 0xc1, 0xbe, 0xe2, 0x23}, 5, 16,
-{0x6b, 0xc1, 0xbe, 0xe2, 0x23}, 0, PSA_ERROR_INVALID_ARGUMENT
+{0x6b, 0xc1, 0xbe, 0xe2, 0x23}, 5,  PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE(5),
+{0x6b, 0xc1, 0xbe, 0xe2, 0x23}, 21, PSA_ERROR_INVALID_ARGUMENT
 },
 #endif
 
@@ -60,10 +61,10 @@
  0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
  PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CBC_PKCS7,
 {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
- 0x93, 0x17, 0x2a}, 16, SIZE_32B,
+ 0x93, 0x17, 0x2a}, 16,  PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE(16),
 {0xa0, 0x76, 0xec, 0x9d, 0xfb, 0xe4, 0x7d, 0x52, 0xaf, 0xc3, 0x57, 0x33, 0x6f,
  0x20, 0x74, 0x3b, 0xca, 0x7e, 0x8a, 0x15, 0xdc, 0x3c, 0x77, 0x64, 0x36, 0x31,
- 0x42, 0x93, 0x03, 0x1c, 0xd4, 0xf3}, 16, PSA_SUCCESS
+ 0x42, 0x93, 0x03, 0x1c, 0xd4, 0xf3}, 48, PSA_SUCCESS
 },
 
 {"Test psa_cipher_encrypt - Encrypt - AES CBC_PKCS7 (Short input)\n", PSA_KEY_TYPE_AES,
@@ -71,9 +72,9 @@
  0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
  PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CBC_PKCS7,
 {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
- 0x93, 0x17}, 15, SIZE_32B,
+ 0x93, 0x17}, 15,  PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE(15),
 {0x62, 0x79, 0xb4, 0x9d, 0x7f, 0x7a, 0x8d, 0xd8, 0x7b, 0x68, 0x51, 0x75, 0xd4,
- 0x27, 0x6e, 0x24}, 16, PSA_SUCCESS
+ 0x27, 0x6e, 0x24}, 32, PSA_SUCCESS
 },
 #endif
 
@@ -83,9 +84,9 @@
  0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
  PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CTR,
 {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
- 0x93, 0x17, 0x2a}, 16, SIZE_32B,
+ 0x93, 0x17, 0x2a}, 16,  PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE(16),
 {0x8f, 0x94, 0x08, 0xfe, 0x80, 0xa8, 0x1d, 0x3e, 0x81, 0x3d, 0xa3, 0xc7, 0xb0,
- 0xb2, 0xbd, 0x32}, 0, PSA_SUCCESS
+ 0xb2, 0xbd, 0x32}, 32, PSA_SUCCESS
 },
 
 {"Test psa_cipher_encrypt - Encrypt - AES CTR (short input)\n", PSA_KEY_TYPE_AES,
@@ -93,9 +94,9 @@
  0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
  PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CTR,
 {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
- 0x93, 0x17}, 15, SIZE_32B,
+ 0x93, 0x17}, 15,  PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE(15),
 {0x8f, 0x94, 0x08, 0xfe, 0x80, 0xa8, 0x1d, 0x3e, 0x81, 0x3d, 0xa3, 0xc7, 0xb0,
- 0xb2, 0xbd}, 0, PSA_SUCCESS
+ 0xb2, 0xbd}, 31, PSA_SUCCESS
 },
 #endif
 #endif
@@ -105,7 +106,7 @@
 {"Test psa_cipher_encrypt - Encrypt - DES CBC (nopad)\n", PSA_KEY_TYPE_DES,
 {0x01, 0x02, 0x04, 0x07, 0x08, 0x0b, 0x0d, 0x0e}, DES_8B_KEY_SIZE,
  PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CBC_NO_PADDING,
-{0xed, 0xa4, 0x01, 0x12, 0x39, 0xbc, 0x3a, 0xc9}, 8, SIZE_32B,
+{0xed, 0xa4, 0x01, 0x12, 0x39, 0xbc, 0x3a, 0xc9}, 8,  PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE(8),
 {0x64, 0xf9, 0x17, 0xb0, 0x15, 0x2f, 0x8f, 0x05}, 0, PSA_SUCCESS
 },
 #endif
@@ -115,7 +116,7 @@
 {0x01, 0x02, 0x04, 0x07, 0x08, 0x0b, 0x0d, 0x0e, 0xc1, 0xc2, 0xc4, 0xc7, 0xc8,
  0xcb, 0xcd, 0xce}, DES3_2B_KEY_SIZE,
  PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CBC_NO_PADDING,
-{0xed, 0xa4, 0x01, 0x12, 0x39, 0xbc, 0x3a, 0xc9}, 8, SIZE_32B,
+{0xed, 0xa4, 0x01, 0x12, 0x39, 0xbc, 0x3a, 0xc9}, 8,  PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE(8),
 {0x5d, 0x06, 0x52, 0x42, 0x9c, 0x5b, 0x0a, 0xc7}, 0, PSA_SUCCESS
 },
 #endif
@@ -125,7 +126,7 @@
 {0x01, 0x02, 0x04, 0x07, 0x08, 0x0b, 0x0d, 0x0e, 0xc1, 0xc2, 0xc4, 0xc7, 0xc8,
  0xcb, 0xcd, 0xce, 0x31, 0x32, 0x34, 0x37, 0x38, 0x3b, 0x3d, 0x3e}, DES3_3B_KEY_SIZE,
  PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CBC_NO_PADDING,
-{0xed, 0xa4, 0x01, 0x12, 0x39, 0xbc, 0x3a, 0xc9}, 8, SIZE_32B,
+{0xed, 0xa4, 0x01, 0x12, 0x39, 0xbc, 0x3a, 0xc9}, 8,  PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE(16),
 {0x81, 0x7c, 0xa7, 0xd6, 0x9b, 0x80, 0xd8, 0x6a}, 0, PSA_SUCCESS
 },
 #endif
@@ -152,7 +153,7 @@
  PSA_KEY_USAGE_DECRYPT, PSA_ALG_CBC_NO_PADDING,
 {0xA0, 0x76, 0xEC, 0x9D, 0xFB, 0xE4, 0x7D, 0x52, 0xAF, 0xC3, 0x57, 0x33, 0x6F,
  0x20, 0x74, 0x3B},
- 16, SIZE_32B,
+ 16,  PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE(16),
 {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
  0x93, 0x17, 0x2a}, 0, PSA_ERROR_NOT_PERMITTED
 },
diff --git a/api-tests/dev_apis/crypto/test_c049/test_c049.c b/api-tests/dev_apis/crypto/test_c049/test_c049.c
index ade6e1a..e49b800 100644
--- a/api-tests/dev_apis/crypto/test_c049/test_c049.c
+++ b/api-tests/dev_apis/crypto/test_c049/test_c049.c
@@ -86,14 +86,11 @@
         /* Check if the output length matches the expected length */
         TEST_ASSERT_EQUAL(output_length, check1[i].expected_output_length, TEST_CHECKPOINT_NUM(6));
 
-        /* Check if the output data matches the expected data */
-        TEST_ASSERT_MEMCMP(output, check1[i].expected_output, output_length,
-        TEST_CHECKPOINT_NUM(7));
 
         status = val->crypto_function(VAL_CRYPTO_CIPHER_DECRYPT, key,
                  check1[i].key_alg, check1[i].input, check1[i].input_length, output,
                  check1[i].output_size, &output_length);
-        TEST_ASSERT_EQUAL(status, PSA_ERROR_INVALID_HANDLE, TEST_CHECKPOINT_NUM(8));
+        TEST_ASSERT_EQUAL(status, PSA_ERROR_INVALID_HANDLE, TEST_CHECKPOINT_NUM(7));
 
     }
 
diff --git a/api-tests/dev_apis/crypto/test_c049/test_data.h b/api-tests/dev_apis/crypto/test_c049/test_data.h
index e830546..46b5c75 100644
--- a/api-tests/dev_apis/crypto/test_c049/test_data.h
+++ b/api-tests/dev_apis/crypto/test_c049/test_data.h
@@ -1,5 +1,5 @@
 /** @file
- * Copyright (c) 2019-2020, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2019-2021, Arm Limited or its affiliates. All rights reserved.
  * SPDX-License-Identifier : Apache-2.0
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,7 +24,7 @@
     uint32_t                key_length;
     psa_key_usage_t         usage;
     psa_algorithm_t         key_alg;
-    uint8_t                 input[32];
+    uint8_t                 input[64];
     size_t                  input_length;
     size_t                  output_size;
     uint8_t                 expected_output[32];
@@ -39,10 +39,11 @@
 {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09,
  0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
  PSA_KEY_USAGE_ENCRYPT, PSA_ALG_CBC_NO_PADDING,
-{0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
- 0x93, 0x17, 0x2a}, 16, SIZE_32B,
+{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
+ 0x93, 0x17, 0x2a}, 32, SIZE_32B,
 {0xA0, 0x76, 0xEC, 0x9D, 0xFB, 0xE4, 0x7D, 0x52, 0xAF, 0xC3, 0x57, 0x33, 0x6F,
- 0x20, 0x74, 0x3B}, 0, PSA_ERROR_NOT_PERMITTED
+ 0x20, 0x74, 0x3B}, 16, PSA_ERROR_NOT_PERMITTED
 },
 #endif
 
@@ -51,19 +52,19 @@
 {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09,
  0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
  PSA_KEY_USAGE_DECRYPT, PSA_ALG_CBC_NO_PADDING,
-{0xA0, 0x76, 0xEC, 0x9D, 0xFB, 0xE4, 0x7D, 0x52, 0xAF, 0xC3, 0x57, 0x33, 0x6F,
- 0x20, 0x74, 0x3B},
- 16, SIZE_32B,
-{0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
- 0x93, 0x17, 0x2a}, 0, PSA_SUCCESS
+{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+0xA0, 0x76, 0xEC, 0x9D, 0xFB, 0xE4, 0x7D, 0x52, 0xAF, 0xC3, 0x57, 0x33, 0x6F, 0x20, 0x74, 0x3B},
+32, SIZE_32B, {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
+ 0x93, 0x17, 0x2a}, 16, PSA_SUCCESS
 },
 
 {"Test psa_cipher_decrypt - Decrypt - AES CBC_NO_PADDING (Short input)\n", PSA_KEY_TYPE_AES,
 {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09,
  0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
  PSA_KEY_USAGE_DECRYPT, PSA_ALG_CBC_NO_PADDING,
-{0x6b, 0xc1, 0xbe, 0xe2, 0x23}, 5, 16,
-{0x6b, 0xc1, 0xbe, 0xe2, 0x23}, 0, PSA_ERROR_INVALID_ARGUMENT
+{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+0x6b, 0xc1, 0xbe, 0xe2, 0x23}, 21, 16,
+{0x6b, 0xc1, 0xbe, 0xe2, 0x23}, 5, PSA_ERROR_INVALID_ARGUMENT
 },
 
 {"Test psa_cipher_decrypt - Decrypt - AES CBC_NO_PADDING\n", PSA_KEY_TYPE_AES,
@@ -71,8 +72,9 @@
  0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
  PSA_KEY_USAGE_DECRYPT, PSA_ALG_CBC_NO_PADDING,
 {0xA0, 0x76, 0xEC, 0x9D, 0xFB, 0xE4, 0x7D, 0x52, 0xAF, 0xC3, 0x57, 0x33, 0x6F,
+ 0x20, 0x74, 0x3B, 0xA0, 0x76, 0xEC, 0x9D, 0xFB, 0xE4, 0x7D, 0x52, 0xAF, 0xC3, 0x57, 0x33, 0x6F,
  0x20, 0x74, 0x3B},
- 16, 10,
+ 32, 10,
 {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
  0x93, 0x17, 0x2a}, 0, PSA_ERROR_BUFFER_TOO_SMALL
 },
@@ -83,23 +85,23 @@
 {"Test psa_cipher_decrypt - Decrypt - AES CBC_PKCS7\n", PSA_KEY_TYPE_AES,
 {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09,
  0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
- PSA_KEY_USAGE_DECRYPT, PSA_ALG_CBC_PKCS7,
-{0xa0, 0x76, 0xec, 0x9d, 0xfb, 0xe4, 0x7d, 0x52, 0xaf, 0xc3, 0x57, 0x33, 0x6f,
- 0x20, 0x74, 0x3b, 0xca, 0x7e, 0x8a, 0x15, 0xdc, 0x3c, 0x77, 0x64, 0x36, 0x31,
- 0x42, 0x93, 0x03, 0x1c, 0xd4, 0xf3}, 32, SIZE_32B,
-{0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
- 0x93, 0x17, 0x2a}, 0, PSA_SUCCESS
+ PSA_KEY_USAGE_DECRYPT, PSA_ALG_CBC_PKCS7, {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0xa0, 0x76, 0xec, 0x9d, 0xfb, 0xe4, 0x7d, 0x52, 0xaf,
+ 0xc3, 0x57, 0x33, 0x6f, 0x20, 0x74, 0x3b, 0xca, 0x7e, 0x8a, 0x15, 0xdc, 0x3c, 0x77, 0x64, 0x36,
+ 0x31, 0x42, 0x93, 0x03, 0x1c, 0xd4, 0xf3}, 48, SIZE_32B, {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f,
+0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a}, 16, PSA_SUCCESS
 },
 
 {"Test psa_cipher_decrypt - Decrypt - AES CBC_PKCS7 (Short input)\n", PSA_KEY_TYPE_AES,
 {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09,
  0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
  PSA_KEY_USAGE_DECRYPT, PSA_ALG_CBC_PKCS7,
-{0x62, 0x79, 0xb4, 0x9d, 0x7f, 0x7a, 0x8d, 0xd8, 0x7b, 0x68, 0x51, 0x75, 0xd4,
- 0x27, 0x6e, 0x24}, 16, SIZE_32B,
-{0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
- 0x93, 0x17}, 15, PSA_SUCCESS
+{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+0x62, 0x79, 0xb4, 0x9d, 0x7f, 0x7a, 0x8d, 0xd8, 0x7b, 0x68, 0x51, 0x75, 0xd4, 0x27, 0x6e, 0x24,
+0x62}, 32, PSA_CIPHER_DECRYPT_OUTPUT_MAX_SIZE(32), {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f,
+0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17}, 17, PSA_ERROR_INVALID_PADDING
 },
+
 #endif
 
 #ifdef ARCH_TEST_CIPHER_MODE_CTR
@@ -107,21 +109,10 @@
 {0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09,
  0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
  PSA_KEY_USAGE_DECRYPT, PSA_ALG_CTR,
-{0x8f, 0x94, 0x08, 0xfe, 0x80, 0xa8, 0x1d, 0x3e, 0x81, 0x3d, 0xa3, 0xc7, 0xb0,
- 0xb2, 0xbd, 0x32}, 16, SIZE_32B,
-{0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
- 0x93, 0x17, 0x2a},
- 0, PSA_SUCCESS
-},
-
-{"Test psa_cipher_decrypt - Decrypt - AES CTR (short input)\n", PSA_KEY_TYPE_AES,
-{0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09,
- 0xcf, 0x4f, 0x3c}, AES_16B_KEY_SIZE,
- PSA_KEY_USAGE_DECRYPT, PSA_ALG_CTR,
-{0x8f, 0x94, 0x08, 0xfe, 0x80, 0xa8, 0x1d, 0x3e, 0x81, 0x3d, 0xa3, 0xc7, 0xb0,
- 0xb2, 0xbd}, 15, SIZE_32B,
-{0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73,
- 0x93, 0x17}, 0, PSA_ERROR_DATA_INVALID
+{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+0x8f, 0x94, 0x08, 0xfe, 0x80, 0xa8, 0x1d, 0x3e, 0x81, 0x3d, 0xa3, 0xc7, 0xb0, 0xb2, 0xbd, 0x32},
+32, PSA_CIPHER_DECRYPT_OUTPUT_MAX_SIZE(32), {0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9,
+0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a}, 16, PSA_SUCCESS
 },
 #endif
 #endif
@@ -131,8 +122,9 @@
 {"Test psa_cipher_decrypt - Decrypt - DES CBC (nopad)\n", PSA_KEY_TYPE_DES,
 {0x01, 0x02, 0x04, 0x07, 0x08, 0x0b, 0x0d, 0x0e}, DES_8B_KEY_SIZE,
  PSA_KEY_USAGE_DECRYPT, PSA_ALG_CBC_NO_PADDING,
-{0x64, 0xf9, 0x17, 0xb0, 0x15, 0x2f, 0x8f, 0x05}, 8, SIZE_32B,
-{0xed, 0xa4, 0x01, 0x12, 0x39, 0xbc, 0x3a, 0xc9}, 0, PSA_SUCCESS
+{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+0x64, 0xf9, 0x17, 0xb0, 0x15, 0x2f, 0x8f, 0x05}, 24, SIZE_32B, {0xed, 0xa4, 0x01, 0x12, 0x39, 0xbc,
+0x3a, 0xc9}, 8, PSA_SUCCESS
 },
 #endif
 
diff --git a/api-tests/dev_apis/crypto/test_c050/test_data.h b/api-tests/dev_apis/crypto/test_c050/test_data.h
index 6037381..295af26 100644
--- a/api-tests/dev_apis/crypto/test_c050/test_data.h
+++ b/api-tests/dev_apis/crypto/test_c050/test_data.h
@@ -35,7 +35,6 @@
 } test_data;
 
 static const test_data check1[] = {
-#ifdef CRYPTO_1_0
 #ifdef ARCH_TEST_RSA_1024
 #ifdef ARCH_TEST_RSA_PKCS1V15_SIGN_RAW
 {
@@ -52,12 +51,12 @@
     .signature_size            = BUFFER_SIZE,
     .expected_signature        = signature_4,
     .expected_signature_length = 128,
-    .expected_status           = PSA_SUCCESS,
+    .expected_status           = PSA_ERROR_INVALID_ARGUMENT,
 },
 #endif
-
 #ifdef ARCH_TEST_RSA_PKCS1V15_SIGN
 #ifdef ARCH_TEST_SHA256
+#if PSA_API_MODE_ON == 1
 {
     .test_desc                 = "Test psa_sign_message - RSA KEY_PAIR PKCS1V15 SHA-256\n",
     .type                      = PSA_KEY_TYPE_RSA_KEY_PAIR,
@@ -72,18 +71,19 @@
     .signature_size            = BUFFER_SIZE,
     .expected_signature        = NULL,
     .expected_signature_length = 128,
-    .expected_status           = PSA_ERROR_INVALID_ARGUMENT,
+    .expected_status           = PSA_ERROR_PROGRAMMER_ERROR,
 },
 #endif
 #endif
 #endif
+#endif
 
 #ifdef ARCH_TEST_SHA256
 #ifdef ARCH_TEST_DETERMINISTIC_ECDSA
 #ifdef ARCH_TEST_ECC_CURVE_SECP256R1
 {
     .test_desc                 = "Test psa_sign_message - ECDSA SECP256R1 SHA-256\n",
-    .type                      = PSA_KEY_TYPE_DH_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1),
+    .type                      = PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1),
     .data                      = ec_keypair,
     .data_length               = 32,
     .usage_flags               = PSA_KEY_USAGE_SIGN_MESSAGE,
@@ -93,7 +93,7 @@
     .input_length              = sizeof(hash_input),
     .signature                 = expected_output,
     .signature_size            = BUFFER_SIZE,
-    .expected_signature        = signature_5,
+    .expected_signature        = signature_6,
     .expected_signature_length = 64,
     .expected_status           = PSA_SUCCESS,
 },
@@ -125,8 +125,8 @@
     .data                      = rsa_128_key_pair,
     .data_length               = 610,
     .usage_flags               = PSA_KEY_USAGE_SIGN_MESSAGE,
-    .alg                       = PSA_ALG_RSA_PKCS1V15_SIGN_RAW,
-    .sign_alg                  = PSA_ALG_RSA_PKCS1V15_SIGN_RAW,
+    .alg                       = PSA_ALG_RSA_PKCS1V15_SIGN(PSA_ALG_SHA_256),
+    .sign_alg                  = PSA_ALG_RSA_PKCS1V15_SIGN(PSA_ALG_SHA_256),
     .input                     = &hash_input,
     .input_length              = sizeof(hash_input),
     .signature                 = expected_output,
@@ -184,8 +184,8 @@
     .data                      = rsa_128_key_pair,
     .data_length               = 610,
     .usage_flags               = PSA_KEY_USAGE_ENCRYPT,
-    .alg                       = PSA_ALG_RSA_PKCS1V15_SIGN_RAW,
-    .sign_alg                  = PSA_ALG_RSA_PKCS1V15_SIGN_RAW,
+    .alg                       = PSA_ALG_DETERMINISTIC_ECDSA(PSA_ALG_SHA_256),
+    .sign_alg                  = PSA_ALG_DETERMINISTIC_ECDSA(PSA_ALG_SHA_256),
     .input                     = NULL,
     .input_length              = 0,
     .signature                 = expected_output,
@@ -236,5 +236,4 @@
 #endif
 #endif
 #endif
-#endif
 };
diff --git a/api-tests/dev_apis/crypto/test_c051/test_data.h b/api-tests/dev_apis/crypto/test_c051/test_data.h
index c020bd2..87472e7 100644
--- a/api-tests/dev_apis/crypto/test_c051/test_data.h
+++ b/api-tests/dev_apis/crypto/test_c051/test_data.h
@@ -33,7 +33,6 @@
 } test_data;
 
 static const test_data check1[] = {
-#ifdef CRYPTO_1_0
 #ifdef ARCH_TEST_RSA_1024
 #ifdef ARCH_TEST_RSA_PKCS1V15_SIGN_RAW
 {
@@ -47,7 +46,7 @@
     .input_length     = sizeof(hash_input),
     .signature        = signature_4,
     .signature_length = 128,
-    .expected_status  = PSA_SUCCESS
+    .expected_status  = PSA_ERROR_INVALID_ARGUMENT
 },
 
 {
@@ -61,7 +60,7 @@
     .input_length     = sizeof(hash_input),
     .signature        = signature_4,
     .signature_length = 128,
-    .expected_status  = PSA_SUCCESS
+    .expected_status  = PSA_ERROR_INVALID_ARGUMENT
 },
 #endif
 
@@ -78,7 +77,7 @@
     .input_length     = sizeof(hash_input),
     .signature        = NULL,
     .signature_length = 0,
-    .expected_status  = PSA_ERROR_INVALID_ARGUMENT
+    .expected_status  = PSA_ERROR_INVALID_SIGNATURE
 },
 #endif
 #endif
@@ -89,28 +88,28 @@
 #ifdef ARCH_TEST_ECC_CURVE_SECP256R1
 {
     .test_desc        = "Test psa_verify_message - ECDSA KEY_PAIR SECP256R1 SHA-256\n",
-    .type             = PSA_KEY_TYPE_DH_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1),
+    .type             = PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1),
     .data             = ec_keypair,
     .data_length      = 32,
     .usage_flags      = PSA_KEY_USAGE_VERIFY_MESSAGE,
     .alg              = PSA_ALG_DETERMINISTIC_ECDSA(PSA_ALG_SHA_256),
     .input            = &hash_input,
     .input_length     = sizeof(hash_input),
-    .signature        = signature_5,
+    .signature        = signature_6,
     .signature_length = 64,
     .expected_status  = PSA_SUCCESS
 },
 
 {
     .test_desc        = "Test psa_verify_message - ECDSA Public Key SECP256R1 SHA-256\n",
-    .type             = PSA_KEY_TYPE_DH_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1),
+    .type             = PSA_KEY_TYPE_ECC_PUBLIC_KEY(PSA_ECC_FAMILY_SECP_R1),
     .data             = ec_key_data,
     .data_length      = 65,
     .usage_flags      = PSA_KEY_USAGE_VERIFY_MESSAGE,
     .alg              = PSA_ALG_DETERMINISTIC_ECDSA(PSA_ALG_SHA_256),
     .input            = &hash_input,
     .input_length     = sizeof(hash_input),
-    .signature        = signature_5,
+    .signature        = signature_6,
     .signature_length = 64,
     .expected_status  = PSA_SUCCESS
 },
@@ -126,7 +125,7 @@
     .data             = rsa_128_key_pair,
     .data_length      = 610,
     .usage_flags      = PSA_KEY_USAGE_VERIFY_MESSAGE,
-    .alg              = PSA_ALG_RSA_PKCS1V15_SIGN_RAW,
+    .alg              = PSA_ALG_RSA_PKCS1V15_SIGN(PSA_ALG_SHA_256),
     .input            = &hash_input,
     .input_length     = sizeof(hash_input),
     .signature        = signature_4,
@@ -162,7 +161,7 @@
     .input_length     = sizeof(hash_input),
     .signature        = signature_4,
     .signature_length = 128,
-    .expected_status  = PSA_ERROR_NOT_SUPPORTED
+    .expected_status  = PSA_ERROR_INVALID_ARGUMENT
 },
 #endif
 
@@ -172,7 +171,7 @@
     .data             = rsa_128_key_pair,
     .data_length      = 610,
     .usage_flags      = PSA_KEY_USAGE_ENCRYPT,
-    .alg              = PSA_ALG_RSA_PKCS1V15_SIGN_RAW,
+    .alg              = PSA_ALG_DETERMINISTIC_ECDSA(PSA_ALG_SHA_256),
     .input            = &hash_input,
     .input_length     = sizeof(hash_input),
     .signature        = signature_4,
@@ -191,7 +190,7 @@
     .input_length     = sizeof(hash_input)-1,
     .signature        = signature_4,
     .signature_length = 128,
-    .expected_status  = PSA_ERROR_INVALID_SIGNATURE
+    .expected_status  = PSA_ERROR_INVALID_ARGUMENT
 },
 
 {
@@ -200,7 +199,7 @@
     .data             = rsa_128_key_pair,
     .data_length      = 610,
     .usage_flags      = PSA_KEY_USAGE_VERIFY_MESSAGE,
-    .alg              = PSA_ALG_RSA_PKCS1V15_SIGN_RAW,
+    .alg              = PSA_ALG_RSA_PKCS1V15_SIGN(PSA_ALG_SHA_256),
     .input            = &hash_input,
     .input_length     = sizeof(hash_input),
     .signature        = signature_4_invalid,
@@ -214,7 +213,7 @@
     .data             = rsa_128_key_pair,
     .data_length      = 610,
     .usage_flags      = PSA_KEY_USAGE_VERIFY_MESSAGE,
-    .alg              = PSA_ALG_RSA_PKCS1V15_SIGN_RAW,
+    .alg              = PSA_ALG_RSA_PKCS1V15_SIGN(PSA_ALG_SHA_256),
     .input            = &hash_input,
     .input_length     = sizeof(hash_input),
     .signature        = signature_4,
@@ -223,5 +222,4 @@
 },
 #endif
 #endif
-#endif
 };
diff --git a/api-tests/dev_apis/crypto/testsuite.db b/api-tests/dev_apis/crypto/testsuite.db
index 7e4f8b4..21a20aa 100644
--- a/api-tests/dev_apis/crypto/testsuite.db
+++ b/api-tests/dev_apis/crypto/testsuite.db
@@ -21,7 +21,7 @@
 (START)
 
 test_c001
-test_c002
+test_c002, failing_test
 test_c003
 test_c004
 test_c005
@@ -45,11 +45,11 @@
 test_c023
 test_c024
 test_c025
-test_c026
-test_c027
-test_c028
-test_c029
-test_c030
+test_c026, failing_test
+test_c027, failing_test
+test_c028, failing_test
+test_c029, failing_test
+test_c030, failing_test
 test_c031
 test_c032
 test_c033
@@ -71,17 +71,17 @@
 test_c049
 test_c050
 test_c051
-test_c052
-test_c053
-test_c054
-test_c055
-test_c056
-test_c057
-test_c058
-test_c059
-test_c060
-test_c061
-test_c062
-test_c063
+test_c052, failing_test
+test_c053, failing_test
+test_c054, failing_test
+test_c055, failing_test
+test_c056, failing_test
+test_c057, failing_test
+test_c058, failing_test
+test_c059, failing_test
+test_c060, failing_test
+test_c061, failing_test
+test_c062, failing_test
+test_c063, failing_test
 
 (END)
diff --git a/api-tests/dev_apis/storage/test_s012/test_data.h b/api-tests/dev_apis/storage/test_s012/test_data.h
index 8e8c66c..9e039f9 100644
--- a/api-tests/dev_apis/storage/test_s012/test_data.h
+++ b/api-tests/dev_apis/storage/test_s012/test_data.h
@@ -1,5 +1,5 @@
 /** @file
- * Copyright (c) 2019-2020, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2019-2021, Arm Limited or its affiliates. All rights reserved.
  * SPDX-License-Identifier : Apache-2.0
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -50,35 +50,31 @@
     VAL_TEST_IDX6, {VAL_API_UNUSED, VAL_PS_SET_EXTENDED}, PSA_ERROR_INVALID_ARGUMENT
 },
 {
-    /* Set_extended with invalid length */
-    VAL_TEST_IDX7, {VAL_API_UNUSED, VAL_PS_SET_EXTENDED}, PSA_ERROR_INVALID_ARGUMENT
-},
-{
     /* Write data using set API */
-    VAL_TEST_IDX8, {VAL_API_UNUSED, VAL_PS_SET}, PSA_SUCCESS
+    VAL_TEST_IDX7, {VAL_API_UNUSED, VAL_PS_SET}, PSA_SUCCESS
 },
 {
     /* Check data validity using get API */
-    VAL_TEST_IDX9, {VAL_API_UNUSED, VAL_PS_GET}, PSA_SUCCESS
+    VAL_TEST_IDX8, {VAL_API_UNUSED, VAL_PS_GET}, PSA_SUCCESS
 },
 {
-    VAL_TEST_IDX10, {VAL_API_UNUSED, VAL_API_UNUSED}, 0
+    VAL_TEST_IDX9, {VAL_API_UNUSED, VAL_API_UNUSED}, 0
 },
 {
     /* Create call with UID 0 */
-    VAL_TEST_IDX11, {VAL_API_UNUSED, VAL_PS_CREATE}, PSA_ERROR_INVALID_ARGUMENT
+    VAL_TEST_IDX10, {VAL_API_UNUSED, VAL_PS_CREATE}, PSA_ERROR_INVALID_ARGUMENT
 },
 {
     /* Call set_extended with UID 0 */
-    VAL_TEST_IDX12, {VAL_API_UNUSED, VAL_PS_SET_EXTENDED}, PSA_ERROR_INVALID_ARGUMENT
+    VAL_TEST_IDX11, {VAL_API_UNUSED, VAL_PS_SET_EXTENDED}, PSA_ERROR_INVALID_ARGUMENT
 },
 {
     /* Call remove with UID 0 */
-    VAL_TEST_IDX13, {VAL_API_UNUSED, VAL_PS_REMOVE}, PSA_ERROR_INVALID_ARGUMENT
+    VAL_TEST_IDX12, {VAL_API_UNUSED, VAL_PS_REMOVE}, PSA_ERROR_INVALID_ARGUMENT
 },
 {
     /* Remove with UID */
-    VAL_TEST_IDX14, {VAL_API_UNUSED, VAL_PS_REMOVE}, PSA_SUCCESS
+    VAL_TEST_IDX13, {VAL_API_UNUSED, VAL_PS_REMOVE}, PSA_SUCCESS
 },
 };
 #endif /* _S012_TEST_DATA_H_ */
diff --git a/api-tests/dev_apis/storage/test_s012/test_s012.c b/api-tests/dev_apis/storage/test_s012/test_s012.c
index ed0d452..ddd90c6 100644
--- a/api-tests/dev_apis/storage/test_s012/test_s012.c
+++ b/api-tests/dev_apis/storage/test_s012/test_s012.c
@@ -1,5 +1,5 @@
 /** @file
- * Copyright (c) 2019-2020, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2019-2021, Arm Limited or its affiliates. All rights reserved.
  * SPDX-License-Identifier : Apache-2.0
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -50,7 +50,7 @@
     TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX1].status, TEST_CHECKPOINT_NUM(1));
 
     /* Set some data in the storage created */
-    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX2].api[fCode], p_uid, TEST_BUFF_SIZE/2, 5,
+    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX2].api[fCode], p_uid, 0, TEST_BUFF_SIZE/2,
                               write_buff);
     TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX2].status, TEST_CHECKPOINT_NUM(2));
 
@@ -68,7 +68,7 @@
 
     /* Try to set data at correct offset, but zero data len */
     val->print(PRINT_TEST, "[Check 3] Call set_extended API with offset equals length\n", 0);
-    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX5].api[fCode], p_uid, TEST_BUFF_SIZE, 0,
+    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX5].api[fCode], p_uid, TEST_BUFF_SIZE/2, 0,
                               write_buff);
     TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX5].status, TEST_CHECKPOINT_NUM(5));
 
@@ -78,24 +78,18 @@
                               write_buff);
     TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX6].status, TEST_CHECKPOINT_NUM(6));
 
-    /* Try to set data at invalid location with incorrect data len */
-    val->print(PRINT_TEST, "[Check 5] Call set_extended API with invalid length\n", 0);
-    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX7].api[fCode], p_uid, 0, TEST_BUFF_SIZE + 1,
-                              write_buff);
+    /* Set data using set API */
+    val->print(PRINT_TEST, "[Check 5] Overwrite the whole data with set API\n", 0);
+    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX7].api[fCode], p_uid, TEST_BUFF_SIZE,
+                              write_buff, PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX7].status, TEST_CHECKPOINT_NUM(7));
 
-    /* Set data using set API */
-    val->print(PRINT_TEST, "[Check 6] Overwrite the whole data with set API\n", 0);
-    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX8].api[fCode], p_uid, TEST_BUFF_SIZE,
-                              write_buff, PSA_STORAGE_FLAG_NONE);
-    TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX8].status, TEST_CHECKPOINT_NUM(8));
-
     /* Call the get function to check data is correctly overwritten */
-    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX9].api[fCode], p_uid, 0, TEST_BUFF_SIZE,
+    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX8].api[fCode], p_uid, 0, TEST_BUFF_SIZE,
                               read_buff, &p_data_length);
-    TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX9].status, TEST_CHECKPOINT_NUM(9));
-    TEST_ASSERT_MEMCMP(read_buff, write_buff, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(10));
-    TEST_ASSERT_EQUAL(p_data_length, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(11));
+    TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX8].status, TEST_CHECKPOINT_NUM(8));
+    TEST_ASSERT_MEMCMP(read_buff, write_buff, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(9));
+    TEST_ASSERT_EQUAL(p_data_length, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(10));
 
     return VAL_STATUS_SUCCESS;
 }
@@ -106,25 +100,25 @@
     psa_storage_uid_t  uid = 0;
 
     /* Call create API with UID value 0 */
-    val->print(PRINT_TEST, "[Check 7] Call create API with UID 0\n", 0);
-    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX11].api[fCode], uid, 0, TEST_BUFF_SIZE,
-                              write_buff);
-    TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX11].status, TEST_CHECKPOINT_NUM(12));
+    val->print(PRINT_TEST, "[Check 6] Call create API with UID 0\n", 0);
+    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX10].api[fCode], uid, TEST_BUFF_SIZE,
+                              PSA_STORAGE_FLAG_NONE);
+    TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX10].status, TEST_CHECKPOINT_NUM(11));
 
     /* Call set extended API with UID value 0 */
-    val->print(PRINT_TEST, "[Check 8] Call set_extended API with UID 0\n", 0);
-    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX12].api[fCode], uid, 0, TEST_BUFF_SIZE,
+    val->print(PRINT_TEST, "[Check 7] Call set_extended API with UID 0\n", 0);
+    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX11].api[fCode], uid, 0, TEST_BUFF_SIZE,
                               write_buff_2);
-    TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX12].status, TEST_CHECKPOINT_NUM(13));
+    TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX11].status, TEST_CHECKPOINT_NUM(12));
 
     /* Call remove API with UID value 0 */
-    val->print(PRINT_TEST, "[Check 9] Call remove API with UID 0\n", 0);
-    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX13].api[fCode], uid);
-    TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX13].status, TEST_CHECKPOINT_NUM(14));
+    val->print(PRINT_TEST, "[Check 8] Call remove API with UID 0\n", 0);
+    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX12].api[fCode], uid);
+    TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX12].status, TEST_CHECKPOINT_NUM(13));
 
     /* Remove the UID */
-    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX14].api[fCode], p_uid);
-    TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX14].status, TEST_CHECKPOINT_NUM(15));
+    status = STORAGE_FUNCTION(s012_data[VAL_TEST_IDX13].api[fCode], p_uid);
+    TEST_ASSERT_EQUAL(status, s012_data[VAL_TEST_IDX13].status, TEST_CHECKPOINT_NUM(14));
 
     return VAL_STATUS_SUCCESS;
 }
diff --git a/api-tests/dev_apis/storage/test_s017/test_data.h b/api-tests/dev_apis/storage/test_s017/test_data.h
index ab02d84..6f4dc23 100644
--- a/api-tests/dev_apis/storage/test_s017/test_data.h
+++ b/api-tests/dev_apis/storage/test_s017/test_data.h
@@ -1,5 +1,5 @@
 /** @file
- * Copyright (c) 2019-2020, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2019-2021, Arm Limited or its affiliates. All rights reserved.
  * SPDX-License-Identifier : Apache-2.0
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -34,7 +34,7 @@
 },
 {
     /* Try to set data in noncontinous manner */
-    VAL_TEST_IDX3, {VAL_API_UNUSED, VAL_PS_SET_EXTENDED}, PSA_ERROR_STORAGE_FAILURE
+    VAL_TEST_IDX3, {VAL_API_UNUSED, VAL_PS_SET_EXTENDED}, PSA_ERROR_INVALID_ARGUMENT
 },
 {
     /* Overwrite the existing data */
diff --git a/api-tests/docs/Arm_PSA-M_Functional_API_Test_Suite_Validation_Methodology.pdf b/api-tests/docs/Arm_PSA-M_Functional_API_Test_Suite_Validation_Methodology.pdf
index 90f44d9..76bdf24 100644
--- a/api-tests/docs/Arm_PSA-M_Functional_API_Test_Suite_Validation_Methodology.pdf
+++ b/api-tests/docs/Arm_PSA-M_Functional_API_Test_Suite_Validation_Methodology.pdf
Binary files differ
diff --git a/api-tests/docs/psa_storage_testlist.md b/api-tests/docs/psa_storage_testlist.md
index 1359f52..35ff431 100644
--- a/api-tests/docs/psa_storage_testlist.md
+++ b/api-tests/docs/psa_storage_testlist.md
@@ -22,7 +22,7 @@
 | test_s010 | Storage assest creation with UID value 0                                      | psa_its(ps)_set<br />                                                                                    | PSA_ERROR_INVALID_ARGUMENT                               | 1. Call the SET API with UID value 0.<br />2. Check that storage creation fails.<br /> | UID value used is 0 <br />
 | NA        | Storage Failure                                                               | NA                                                                                                       | PSA_ERROR_STORAGE_FAILURE                                | 1. The failure cause will depend on the underlying <br /> platform and vary for each implementation.<br /> It is skipped in current suite  <br /> | NA <br />                                                                                                                                                                     |
 | test_s011 | Set_extended API's call for <br /> non-existent and removed assest            | psa_ps_set_extended<br />                                                                                | PSA_ERROR_DOES_NOT_EXIST                                 | Below Steps will be run only if optional API are not supported.<br />1. Call the SET Extended API when no uid present.<br />2. Create a valid storage using set. <br /> 3. Call create api with different length for existing uid.<br /> 4. Call create api to set WRITE_ONCE flag.<br /> 5. Validate data attributes are maintained.<br />6. Remove the uid.<br /> 7. Create valid storage using create api.<br /> 8. Try to change length using create api.<br /> 9. Validate storage is empty.<br /> 10. Again call create api with original parameters.<br />11. Remove the uid.<br /> 12. Check no duplicate entry present.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | UID value used is 5 <br />                                                                                                                                                                     |
-| test_s012 | Set_extended API's call <br /> with invalid offset                            | psa_ps_set_extended<br />                                                                                | PSA_ERROR_INVALID_ARGUMENT                               | Below Steps will be run only if optional API are not supported.<br />1. Create a valid storage using set.<br /> 2. Set data on first half of buffer.<br /> 3. Try to set data at incorrect offset +length. <br /> 4. Try to set data at incorrect offset.<br />5. Try to set at correct offset but zero length buffer.<br />6. Try to set data at incorrect length and valid offset.<br /> 7. Overwrite the storage using set api.<br /> 8. Validate data is correctly written.<br \> 9. Call set_extended with NULL write buffer.<br /> 10. Overwrite storage using set_extended api.<br /> 11. Remove the uid.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | UID value used is 6 <br />
+| test_s012 | Set_extended API's call <br /> with invalid offset                            | psa_ps_set_extended<br />                                                                                | PSA_ERROR_INVALID_ARGUMENT                               | Below Steps will be run only if optional API are not supported.<br />1. Create a valid storage using create.<br /> 2. Set data on first half of buffer.<br /> 3. Try to set data at incorrect offset +length. <br /> 4. Try to set data at incorrect offset.<br />5. Try to set at correct offset but zero length buffer.<br />6. Try to set data at incorrect length and valid offset.<br /> 7. Overwrite the storage using set api.<br /> 8. Validate data is correctly written.<br /> 10. Remove the uid.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | UID value used is 6 <br />
 | test_s013 | Create and set_extended API call for valid assest                             | psa_ps_set_extended<br /> psa_ps_create                                                                  | PSA_SUCCESS                                              | Below Steps will be run only if optional API are not supported.<br />1.  Create Storage of zero length using create.<br />2. Try to set some data in the storage created.<br />3. Validate the storage attributes.<br /> 4. Remove the storage.<br /> 5. Create a valid storage with non-zero length.<br /> 6. Set data in the buffer.<br /> 7. Validate the data attributes.<br /> 8. Overwrite data using set api.<br /> 9. Validate the data.<br /> 10. Call create api for existing uid with same parameters.<br /> 11. Remove the uid.<br /> 12. Check with set_extended no duplicate uid exists.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | UID value used is 4
 | test_s014 | Create and set_extended API call<br /> when API's not supported               | psa_ps_create<br />psa_ps_set_extended<br />                                                             | PSA_ERROR_NOT_SUPPORTED                                  | Below Steps will be run only if optional API are not supported.<br />1. Create API call should fail.<br />2. Check the UID should not exist.<br /> 3. Create storage using set API.<br /> 4. Try to partially write using set_extended API.<br /> 5. Validate data is not modified.<br /> 6. Remove the uid.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | UID value used is 5
 | test_s015 | Create API call with<br /> WRITE_ONCE flag                                    | psa_ps_create<br />                                                                                      | PSA_ERROR_NOT_SUPPORTED                                  | Below Step will be run only if optional API are supported.<br />1. Create API call with WRITE_ONCE flag should fail.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | UID value used is 5 <br />
@@ -37,4 +37,4 @@
 
 --------------
 
-*Copyright (c) 2019-2020, Arm Limited and Contributors. All rights reserved.*
+*Copyright (c) 2019-2021, Arm Limited and Contributors. All rights reserved.*
diff --git a/api-tests/docs/test_failure_analysis.md b/api-tests/docs/test_failure_analysis.md
index 81c10fc..8018152 100644
--- a/api-tests/docs/test_failure_analysis.md
+++ b/api-tests/docs/test_failure_analysis.md
@@ -3,24 +3,19 @@
 
 This file contains list of failures identified when testing the release
 on tgt_dev_apis_tfm_an521 and  tgt_dev_apis_tfm_musca_b1
-targets with TFM commit Hash - d0f6ceb0559af6ef08f4624eeac079cc07a1f077.
+targets with TFM commit Hash - dd1fe44448db0f1750794cd9cf5596033f90f6f9 (tag: TF-Mv1.4.1).
 The reason for each failing test is listed here in this file.
 
 ## Known Failures
 
 | Test | Fail description                                                                | Github issue |
 |------|---------------------------------------------------------------------------------| ------------ |
-|test_c021 | psa_key_derivation_output_key returns incorrect error code | https://github.com/ARMmbed/mbed-crypto/issues/175 |
-|test_c026 | psa_sign_message not supported | https://jira.arm.com/browse/IOTPSW-4100 |
-|test_c027 | psa_mac_update not supported | https://jira.arm.com/browse/IOTPSW-4100 |
-|test_c028 | PSA_KEY_USAGE_SIGN_MESSAGE not found | https://jira.arm.com/browse/IOTPSW-4100 |
-|test_c029 | PSA_KEY_USAGE_VERIFY_MESSAGE not supported | https://jira.arm.com/browse/IOTPSW-4100 |
-|test_c030 | PSA_KEY_USAGE_VERIFY_MESSAGE not supported | https://jira.arm.com/browse/IOTPSW-4100 |
-|test_c046 | psa_mac_compute is unimplemented in TFM/mbed-crypto. So the test has not been verified.	| https://github.com/ARMmbed/mbed-crypto/issues/381 |
-|test_c047 | psa_mac_verify is unimplemented in TFM/mbed-crypto. So the test has not been verified.		| https://github.com/ARMmbed/mbed-crypto/issues/381 |
-|test_c048 | psa_cipher_encrypt is unimplemented in TFM/mbed-crypto. So the test has not been verified. | https://github.com/ARMmbed/mbed-crypto/issues/381 |
-|test_c049 | psa_cipher_decrypt is unimplemented in TFM/mbed-crypto. So the test has not been verified. | https://github.com/ARMmbed/mbed-crypto/issues/381 |
-|test_c051 | PSA_KEY_USAGE_VERIFY_MESSAGE not supported | https://jira.arm.com/browse/IOTPSW-4100 |
+|test_c002 | reference platform implementation issue | NA |
+|test_c026 | psa_sign_message not supported | https://jira.arm.com/browse/IOTPSW-4275 |
+|test_c027 | psa_mac_update not supported | https://jira.arm.com/browse/IOTPSW-4275 |
+|test_c028 | PSA_KEY_USAGE_SIGN_MESSAGE not found | https://jira.arm.com/browse/IOTPSW-4275 |
+|test_c029 | PSA_KEY_USAGE_VERIFY_MESSAGE not supported | https://jira.arm.com/browse/IOTPSW-4275 |
+|test_c030 | PSA_KEY_USAGE_VERIFY_MESSAGE not supported | https://jira.arm.com/browse/IOTPSW-4275 |
 |test_c052 | psa_aead_encrypt_setup is unimplemented in TFM/mbed-crypto. So the test has not been verified. | https://github.com/ARMmbed/mbed-crypto/issues/381 |
 |test_c053 | psa_aead_decrypt_setup is unimplemented in TFM/mbed-crypto. So the test has not been verified. | https://github.com/ARMmbed/mbed-crypto/issues/381 |
 |test_c054 | psa_aead_generate_nonce is unimplemented in TFM/mbed-crypto. So the test has not been verified. | https://github.com/ARMmbed/mbed-crypto/issues/381 |
diff --git a/api-tests/ff/README.md b/api-tests/ff/README.md
index 24a2813..c09cde6 100644
--- a/api-tests/ff/README.md
+++ b/api-tests/ff/README.md
@@ -23,14 +23,15 @@
 For more information on architecture test suite specification, refer to the [Validation Methodology](../docs/Arm_PSA_APIs_Arch_Test_Validation_Methodology.pdf) document.
 
 ## This release
- - Code Quality : REL v1.2
+ - Code Quality : REL v1.3
  - This release contains the PSA-FF tests that are written for the PSA FF 1.1 Extensions specification.
 
 ##  Release Tags
 
 | Release version | Release tag  | PSA FF specification version |
 |-----------------|---------------|----------------|
-| REL v1.2 | [v21.07_API1.2_ADAC_ALPHA](https://github.com/ARM-software/psa-arch-tests/tree//api-tests/ff) | 1.1-Alpha0 |
+| REL v1.3 | [v21.10_API1.3_ADAC_ALPHA-1](https://github.com/ARM-software/psa-arch-tests/tree/v21.10_API1.3_ADAC_ALPHA-1/api-tests/ff) | 1.1-Alpha0 |
+| REL v1.2 | [v21.07_API1.2_ADAC_ALPHA](https://github.com/ARM-software/psa-arch-tests/tree/v21.07_API1.2_ADAC_ALPHA/api-tests/ff) | 1.1-Alpha0 |
 | REL v1.1 | [v20.11_API1.1](https://github.com/ARM-software/psa-arch-tests/tree/v20.11_API1.1/api-tests/ff) | 1.0 |
 | REL v1.0 | [v20.03_API1.0](https://github.com/ARM-software/psa-arch-tests/tree/v20.03_API1.0/api-tests/ff) | 1.0 |
 | v0.9 | [v19.06_API0.9](https://github.com/ARM-software/psa-arch-tests/tree/v19.06_API0.9/api-tests/ff) | 1.0-Beta1 |
diff --git a/api-tests/platform/drivers/watchdog/nrf/nrf_wdt.c b/api-tests/platform/drivers/watchdog/nrf/nrf_wdt.c
index 6040265..8ba3127 100644
--- a/api-tests/platform/drivers/watchdog/nrf/nrf_wdt.c
+++ b/api-tests/platform/drivers/watchdog/nrf/nrf_wdt.c
@@ -25,36 +25,37 @@
 /**
   * @brief Watchdog Timer
   */
-struct NRF_WDT_Type{              /*!< (@ 0x40018000) WDT0_NS Structure                            */
-__OM  uint32_t  TASKS_START;      /*!< (@ 0x00000000) Start WDT                                    */
-__OM  uint32_t  TASKS_STOP;       /*!< (@ 0x00000004) Stop WDT                                     */
+struct NRF_WDT_Type{              /*!< (@ 0x40018000) WDT0_NS Structure                       */
+__OM  uint32_t  TASKS_START;      /*!< (@ 0x00000000) Start WDT                               */
+__OM  uint32_t  TASKS_STOP;       /*!< (@ 0x00000004) Stop WDT                                */
 __IM  uint32_t  RESERVED[30];
-__IOM uint32_t  SUBSCRIBE_START;  /*!< (@ 0x00000080) Subscribe configuration for task START       */
-__IOM uint32_t  SUBSCRIBE_STOP;   /*!< (@ 0x00000084) Subscribe configuration for task STOP        */
+__IOM uint32_t  SUBSCRIBE_START;  /*!< (@ 0x00000080) Subscribe configuration for task START  */
+__IOM uint32_t  SUBSCRIBE_STOP;   /*!< (@ 0x00000084) Subscribe configuration for task STOP   */
 __IM  uint32_t  RESERVED1[30];
-__IOM uint32_t  EVENTS_TIMEOUT;   /*!< (@ 0x00000100) Watchdog timeout                             */
-__IOM uint32_t  EVENTS_STOPPED;   /*!< (@ 0x00000104) Watchdog stopped                             */
+__IOM uint32_t  EVENTS_TIMEOUT;   /*!< (@ 0x00000100) Watchdog timeout                        */
+__IOM uint32_t  EVENTS_STOPPED;   /*!< (@ 0x00000104) Watchdog stopped                        */
 __IM  uint32_t  RESERVED2[30];
-__IOM uint32_t  PUBLISH_TIMEOUT;  /*!< (@ 0x00000180) Publish configuration for event TIMEOUT      */
-__IOM uint32_t  PUBLISH_STOPPED;  /*!< (@ 0x00000184) Publish configuration for event STOPPED      */
+__IOM uint32_t  PUBLISH_TIMEOUT;  /*!< (@ 0x00000180) Publish configuration for event TIMEOUT */
+__IOM uint32_t  PUBLISH_STOPPED;  /*!< (@ 0x00000184) Publish configuration for event STOPPED */
 __IM  uint32_t  RESERVED3[95];
-__IOM uint32_t  INTENSET;         /*!< (@ 0x00000304) Enable interrupt                             */
-__IOM uint32_t  INTENCLR;         /*!< (@ 0x00000308) Disable interrupt                            */
+__IOM uint32_t  INTENSET;         /*!< (@ 0x00000304) Enable interrupt                        */
+__IOM uint32_t  INTENCLR;         /*!< (@ 0x00000308) Disable interrupt                       */
 __IM  uint32_t  RESERVED4[6];
-__IOM uint32_t  NMIENSET;         /*!< (@ 0x00000324) Enable interrupt                             */
-__IOM uint32_t  NMIENCLR;         /*!< (@ 0x00000328) Disable interrupt                            */
+__IOM uint32_t  NMIENSET;         /*!< (@ 0x00000324) Enable interrupt                        */
+__IOM uint32_t  NMIENCLR;         /*!< (@ 0x00000328) Disable interrupt                       */
 __IM  uint32_t  RESERVED5[53];
-__IM  uint32_t  RUNSTATUS;        /*!< (@ 0x00000400) Run status                                   */
-__IM  uint32_t  REQSTATUS;        /*!< (@ 0x00000404) Request status                               */
+__IM  uint32_t  RUNSTATUS;        /*!< (@ 0x00000400) Run status                              */
+__IM  uint32_t  REQSTATUS;        /*!< (@ 0x00000404) Request status                          */
 __IM  uint32_t  RESERVED6[63];
-__IOM uint32_t  CRV;              /*!< (@ 0x00000504) Counter reload value                         */
-__IOM uint32_t  RREN;             /*!< (@ 0x00000508) Enable register for reload request registers */
-__IOM uint32_t  CONFIG;           /*!< (@ 0x0000050C) Configuration register                       */
+__IOM uint32_t  CRV;              /*!< (@ 0x00000504) Counter reload value                    */
+__IOM uint32_t  RREN;             /*!< (@ 0x00000508) Enable register for reload request
+                                        registers */
+__IOM uint32_t  CONFIG;           /*!< (@ 0x0000050C) Configuration register                  */
 __IM  uint32_t  RESERVED7[4];
-__OM  uint32_t  TSEN;             /*!< (@ 0x00000520) Task stop enable                             */
+__OM  uint32_t  TSEN;             /*!< (@ 0x00000520) Task stop enable                        */
 __IM  uint32_t  RESERVED8[55];
-__OM  uint32_t  RR[8];            /*!< (@ 0x00000600) Description collection: Reload request n     */
-};          		   			  /*!< Size = 1568 (0x620)	                                       */
+__OM  uint32_t  RR[8];            /*!< (@ 0x00000600) Description collection: Reload request n*/
+};                                /*!< Size = 1568 (0x620)                                    */
 
 /* Register: WDT_CONFIG */
 /* Description: Configuration register */
@@ -69,7 +70,8 @@
 /* Register: WDT_RUNSTATUS */
 /* Description: Run status */
 #define WDT_RUNSTATUS_RUNSTATUSWDT_Pos (0UL) /*!< Position of RUNSTATUSWDT field. */
-#define WDT_RUNSTATUS_RUNSTATUSWDT_Msk (0x1UL << WDT_RUNSTATUS_RUNSTATUSWDT_Pos) /*!< Bit mask of RUNSTATUSWDT field. */
+/*!< Bit mask of RUNSTATUSWDT field. */
+#define WDT_RUNSTATUS_RUNSTATUSWDT_Msk (0x1UL << WDT_RUNSTATUS_RUNSTATUSWDT_Pos)
 #define WDT_RUNSTATUS_RUNSTATUSWDT_NotRunning (0UL) /*!< Watchdog is not running */
 #define WDT_RUNSTATUS_RUNSTATUSWDT_Running (1UL) /*!< Watchdog is running */
 
@@ -81,7 +83,7 @@
 **/
 int nrf_wdt_init(addr_t base_addr, uint32_t time_us)
 {
-    struct NRF_WDT_Type *nrf_wdt = (struct NRF_WDT_Type*)base_addr;
+    struct NRF_WDT_Type *nrf_wdt = (struct NRF_WDT_Type *)base_addr;
 
     /* From nRF53 documentation, the timeout in seconds is
      *       timeout [s] = (CRV + 1) / 32768
@@ -110,7 +112,7 @@
 **/
 int nrf_wdt_enable(addr_t base_addr)
 {
-    struct NRF_WDT_Type *nrf_wdt = (struct NRF_WDT_Type*)base_addr;
+    struct NRF_WDT_Type *nrf_wdt = (struct NRF_WDT_Type *)base_addr;
     nrf_wdt->TASKS_START = 0x01UL; // Trigger start task
 
     return PAL_STATUS_SUCCESS;
@@ -123,7 +125,7 @@
 **/
 int nrf_wdt_disable(addr_t base_addr)
 {
-    struct NRF_WDT_Type *nrf_wdt = (struct NRF_WDT_Type*)base_addr;
+    struct NRF_WDT_Type *nrf_wdt = (struct NRF_WDT_Type *)base_addr;
     nrf_wdt->TSEN = 0x6E524635UL; // Special value to enable stop task
     nrf_wdt->TASKS_STOP = 0x01UL; // Trigger stop task
 
@@ -137,6 +139,6 @@
 **/
 int nrf_wdt_is_enabled(addr_t base_addr)
 {
-    struct NRF_WDT_Type *nrf_wdt = (struct NRF_WDT_Type*)base_addr;
+    struct NRF_WDT_Type *nrf_wdt = (struct NRF_WDT_Type *)base_addr;
     return (nrf_wdt->RUNSTATUS & WDT_RUNSTATUS_RUNSTATUSWDT_Msk);
 }
diff --git a/api-tests/platform/manifests/driver_partition_psa.json b/api-tests/platform/manifests/driver_partition_psa.json
index 2b8c70c..1cf765a 100644
--- a/api-tests/platform/manifests/driver_partition_psa.json
+++ b/api-tests/platform/manifests/driver_partition_psa.json
@@ -62,3 +62,4 @@
     }
   ]
 }
+
diff --git a/api-tests/platform/targets/common/nspe/crypto/pal_crypto_intf.c b/api-tests/platform/targets/common/nspe/crypto/pal_crypto_intf.c
index e755057..651d494 100644
--- a/api-tests/platform/targets/common/nspe/crypto/pal_crypto_intf.c
+++ b/api-tests/platform/targets/common/nspe/crypto/pal_crypto_intf.c
@@ -63,7 +63,7 @@
     const uint8_t                            *additional_data;
     size_t                                    additional_data_length;
     psa_status_t                              status;
-#if HOST_GCC_MISSING_CRYPTO_1_0 == 0
+#if MISSING_CRYPTO_1_0 == 0
     uint8_t                                  *output1;
     size_t                                   output_size1, *p_output_length1;
 #endif
@@ -119,7 +119,7 @@
 									output_size,
 									p_output_length);
 			break;
-#if HOST_GCC_MISSING_CRYPTO_1_0 == 0
+#if MISSING_CRYPTO_1_0 == 0
 		case PAL_CRYPTO_AEAD_ABORT:
 			aead_operation           = va_arg(valist, psa_aead_operation_t *);
 			return psa_aead_abort(aead_operation);
@@ -270,7 +270,7 @@
 			cipher_operation         =  va_arg(valist, psa_cipher_operation_t *);
 			return psa_cipher_abort(cipher_operation);
 			break;
-#if HOST_GCC_MISSING_CRYPTO_1_0 == 0
+#if MISSING_CRYPTO_1_0 == 0
 		case PAL_CRYPTO_CIPHER_DECRYPT:
 			key                      = va_arg(valist, psa_key_id_t);
 			alg                      = va_arg(valist, psa_algorithm_t);
@@ -296,7 +296,7 @@
 											key,
 											alg);
 			break;
-#if HOST_GCC_MISSING_CRYPTO_1_0 == 0
+#if MISSING_CRYPTO_1_0 == 0
 		case PAL_CRYPTO_CIPHER_ENCRYPT:
 			key                      = va_arg(valist, psa_key_id_t);
 			alg                      = va_arg(valist, psa_algorithm_t);
@@ -656,7 +656,6 @@
 			mac_operation            = va_arg(valist, psa_mac_operation_t *);
 			return psa_mac_abort(mac_operation);
 			break;
-#ifdef CRYPTO_1_0
 		case PAL_CRYPTO_MAC_COMPUTE:
 			key                      = va_arg(valist, psa_key_id_t);
 			alg                      = va_arg(valist, psa_algorithm_t);
@@ -673,7 +672,6 @@
 								   output_size,
 								   p_output_length);
 			break;
-#endif
 		case PAL_CRYPTO_MAC_OPERATION_INIT:
 			mac_operation            = va_arg(valist, psa_mac_operation_t *);
 			mac_operation_temp       = psa_mac_operation_init();
@@ -707,7 +705,7 @@
 								  input,
 								  input_length);
 			break;
-#if HOST_GCC_MISSING_CRYPTO_1_0 == 0
+#if MISSING_CRYPTO_1_0 == 0
 		case PAL_CRYPTO_MAC_VERIFY:
 			key                      = va_arg(valist, psa_key_id_t);
 			alg                      = va_arg(valist, psa_algorithm_t);
@@ -822,7 +820,6 @@
 								 output_size,
 								 p_output_length);
 			break;
-#ifdef CRYPTO_1_0
 		case PAL_CRYPTO_SIGN_MESSAGE:
 			key                      = va_arg(valist, psa_key_id_t);
 			alg                      = va_arg(valist, psa_algorithm_t);
@@ -853,7 +850,6 @@
 									  input1,
 									  input_length1);
 			break;
-#endif
 		case PAL_CRYPTO_VERIFY_HASH:
 			key                      = va_arg(valist, psa_key_id_t);
 			alg                      = va_arg(valist, psa_algorithm_t);
diff --git a/api-tests/platform/targets/common/nspe/initial_attestation/pal_attestation_crypto.c b/api-tests/platform/targets/common/nspe/initial_attestation/pal_attestation_crypto.c
index 4a25a20..d5f03cf 100644
--- a/api-tests/platform/targets/common/nspe/initial_attestation/pal_attestation_crypto.c
+++ b/api-tests/platform/targets/common/nspe/initial_attestation/pal_attestation_crypto.c
@@ -17,6 +17,11 @@
 
 #include "pal_attestation_crypto.h"
 
+/* this macro is missing from the psa_crypto.h file
+ * this can be removed once the TFM fix available
+ */
+#define PSA_ALG_MD4 ((psa_algorithm_t)0x02000002)
+
 static uint32_t         public_key_registered;
 static psa_key_handle_t public_key_handle;
 
diff --git a/api-tests/platform/targets/common/nspe/pal_common.h b/api-tests/platform/targets/common/nspe/pal_common.h
index 1179ee8..c9060c9 100644
--- a/api-tests/platform/targets/common/nspe/pal_common.h
+++ b/api-tests/platform/targets/common/nspe/pal_common.h
@@ -1,5 +1,5 @@
 /** @file
- * Copyright (c) 2020, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2020-2021, Arm Limited or its affiliates. All rights reserved.
  * SPDX-License-Identifier : Apache-2.0
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -29,6 +29,7 @@
 /* typedef's */
 #ifndef TARGET_SPECIFIC_TYPES
 typedef uint8_t             bool_t;
+#define addr_t              undef_addr_t   //To avoid addr_t name collision
 typedef uint32_t            addr_t;
 typedef uint32_t            test_id_t;
 typedef uint32_t            block_id_t;
diff --git a/api-tests/platform/targets/tgt_dev_apis_tfm_nrf5340/nspe/pal_attestation_config.h b/api-tests/platform/targets/tgt_dev_apis_tfm_nrf5340/nspe/pal_attestation_config.h
index dc7aa2e..bdef6c5 100644
--- a/api-tests/platform/targets/tgt_dev_apis_tfm_nrf5340/nspe/pal_attestation_config.h
+++ b/api-tests/platform/targets/tgt_dev_apis_tfm_nrf5340/nspe/pal_attestation_config.h
@@ -42,7 +42,7 @@
  * This is the size of the first part of the CBOR encoded TBS
  * bytes. It is around 20 bytes. See create_tbs_hash().
  */
-#define T_COSE_SIZE_OF_TBS { \
+#define T_COSE_SIZE_OF_TBS ( \
     1 + /* For opening the array */ \
     sizeof(COSE_SIG_CONTEXT_STRING_SIGNATURE1) + /* "Signature1" */ \
     2 + /* Overhead for encoding string */ \
@@ -50,7 +50,7 @@
     3 * (/* 3 NULL bstrs for fields not used */ \
         1 /* size of a NULL bstr */  \
     ) \
-}
+)
 
 #define NULL_USEFUL_BUF_C  NULLUsefulBufC
 
diff --git a/api-tests/platform/targets/tgt_dev_apis_tfm_nrf9160/nspe/pal_attestation_config.h b/api-tests/platform/targets/tgt_dev_apis_tfm_nrf9160/nspe/pal_attestation_config.h
index dc7aa2e..bdef6c5 100644
--- a/api-tests/platform/targets/tgt_dev_apis_tfm_nrf9160/nspe/pal_attestation_config.h
+++ b/api-tests/platform/targets/tgt_dev_apis_tfm_nrf9160/nspe/pal_attestation_config.h
@@ -42,7 +42,7 @@
  * This is the size of the first part of the CBOR encoded TBS
  * bytes. It is around 20 bytes. See create_tbs_hash().
  */
-#define T_COSE_SIZE_OF_TBS { \
+#define T_COSE_SIZE_OF_TBS ( \
     1 + /* For opening the array */ \
     sizeof(COSE_SIG_CONTEXT_STRING_SIGNATURE1) + /* "Signature1" */ \
     2 + /* Overhead for encoding string */ \
@@ -50,7 +50,7 @@
     3 * (/* 3 NULL bstrs for fields not used */ \
         1 /* size of a NULL bstr */  \
     ) \
-}
+)
 
 #define NULL_USEFUL_BUF_C  NULLUsefulBufC
 
diff --git a/api-tests/platform/targets/tgt_dev_apis_tfm_psoc64/nspe/pal_crypto_config.h b/api-tests/platform/targets/tgt_dev_apis_tfm_psoc64/nspe/pal_crypto_config.h
index 132240a..2f20590 100644
--- a/api-tests/platform/targets/tgt_dev_apis_tfm_psoc64/nspe/pal_crypto_config.h
+++ b/api-tests/platform/targets/tgt_dev_apis_tfm_psoc64/nspe/pal_crypto_config.h
@@ -1,5 +1,5 @@
 /** @file
- * Copyright (c) 2020, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2020-2021, Arm Limited or its affiliates. All rights reserved.
  * SPDX-License-Identifier : Apache-2.0
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -37,6 +37,7 @@
 #ifndef TF_M_PROFILE_SMALL
 #ifndef TF_M_PROFILE_MEDIUM
 #define ARCH_TEST_RSA
+#define ARCH_TEST_SKIP_RSA_2048_GEN_KEY
 #define ARCH_TEST_RSA_1024
 #define ARCH_TEST_RSA_2048
 #define ARCH_TEST_RSA_3072
diff --git a/api-tests/platform/targets/tgt_ff_tfm_nrf_common/nspe/pal_driver_ipc_intf.c b/api-tests/platform/targets/tgt_ff_tfm_nrf_common/nspe/pal_driver_ipc_intf.c
index be8ae93..bfcaa07 100644
--- a/api-tests/platform/targets/tgt_ff_tfm_nrf_common/nspe/pal_driver_ipc_intf.c
+++ b/api-tests/platform/targets/tgt_ff_tfm_nrf_common/nspe/pal_driver_ipc_intf.c
@@ -47,7 +47,7 @@
 
     psa_invec data[3] = {{&uart_fn, sizeof(uart_fn)},
                          {&uart_base_addr, sizeof(uart_base_addr)},
-                         {NULL, 0}};
+                         {NULL, 0} };
 
 #if STATELESS_ROT == 1
     status_of_call = psa_call(DRIVER_UART_HANDLE, 0, data, 3, NULL, 0);
@@ -103,7 +103,7 @@
     wd_param.wd_base_addr = base_addr;
     wd_param.wd_time_us = time_us;
     wd_param.wd_timer_tick_us = timer_tick_us;
-    psa_invec invec[1] = {{&wd_param, sizeof(wd_param)}};
+    psa_invec invec[1] = { {&wd_param, sizeof(wd_param)} };
 
 #if STATELESS_ROT == 1
     status_of_call = psa_call(DRIVER_WATCHDOG_HANDLE, 0, invec, 1, NULL, 0);
@@ -145,7 +145,7 @@
     wd_param.wd_base_addr = base_addr;
     wd_param.wd_time_us = 0;
     wd_param.wd_timer_tick_us = 0;
-    psa_invec invec[1] = {{&wd_param, sizeof(wd_param)}};
+    psa_invec invec[1] = { {&wd_param, sizeof(wd_param)} };
 
 #if STATELESS_ROT == 1
     status_of_call = psa_call(DRIVER_WATCHDOG_HANDLE, 0, invec, 1, NULL, 0);
@@ -186,7 +186,7 @@
     wd_param.wd_base_addr = base_addr;
     wd_param.wd_time_us = 0;
     wd_param.wd_timer_tick_us = 0;
-    psa_invec invec[1] = {{&wd_param, sizeof(wd_param)}};
+    psa_invec invec[1] = { {&wd_param, sizeof(wd_param)} };
 #if STATELESS_ROT == 1
     status_of_call = psa_call(DRIVER_WATCHDOG_HANDLE, 0, invec, 1, NULL, 0);
     if (status_of_call != PSA_SUCCESS)
diff --git a/api-tests/tools/cmake/compiler/HOST_GCC.cmake b/api-tests/tools/cmake/compiler/HOST_GCC.cmake
index 2071b12..0282643 100644
--- a/api-tests/tools/cmake/compiler/HOST_GCC.cmake
+++ b/api-tests/tools/cmake/compiler/HOST_GCC.cmake
@@ -50,4 +50,4 @@
 	set(CMAKE_C_FLAGS	"-g -Wall -Werror -Werror -std=c99")
 	message(STATUS "[PSA] : ${_LNG}  compiler used '${CMAKE_${_LNG}_COMPILER}'")
 endforeach()
-add_definitions(-DHOST_GCC_MISSING_CRYPTO_1_0=1)
+add_definitions(-DMISSING_CRYPTO_1_0=1)
diff --git a/api-tests/tools/scripts/gen_tests_list.py b/api-tests/tools/scripts/gen_tests_list.py
index 22727fb..f654100 100644
--- a/api-tests/tools/scripts/gen_tests_list.py
+++ b/api-tests/tools/scripts/gen_tests_list.py
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 #/** @file
-# * Copyright (c) 2019-2020, Arm Limited or its affiliates. All rights reserved.
+# * Copyright (c) 2019-2021, Arm Limited or its affiliates. All rights reserved.
 # * SPDX-License-Identifier : Apache-2.0
 # *
 # * Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,38 +18,42 @@
 
 import sys
 
-if (len(sys.argv) != 13):
+if (len(sys.argv) != 14):
         print("\nScript requires following inputs")
         print("\narg1  : <INPUT  SUITE identifier>")
         print("\narg2  : <INPUT  testsuite.db file>")
         print("\narg3  : <INPUT  panic test>")
-        print("\narg4  : <OUTPUT testlist file>")
-        print("\narg5  : <OUTPUT test_entry_list>")
-        print("\narg6  : <OUTPUT test_entry_fn_declare_list>")
-        print("\narg7  : <OUTPUT client_tests_list_declare>")
-        print("\narg8  : <OUTPUT client_tests_list>")
-        print("\narg9  : <OUTPUT server_tests_list_declare>")
-        print("\narg10 : <OUTPUT server_tests_list>")
-        print("\narg11 : <OUTPUT Suite test start number")
-        print("\narg12 : <OUTPUT Suite test end number")
+        print("\narg4  : <INPUT  tests coverage>")
+        print("\narg5  : <OUTPUT testlist file>")
+        print("\narg6  : <OUTPUT test_entry_list>")
+        print("\narg7  : <OUTPUT test_entry_fn_declare_list>")
+        print("\narg8  : <OUTPUT client_tests_list_declare>")
+        print("\narg9  : <OUTPUT client_tests_list>")
+        print("\narg10  : <OUTPUT server_tests_list_declare>")
+        print("\narg11 : <OUTPUT server_tests_list>")
+        print("\narg12 : <OUTPUT Suite test start number")
+        print("\narg13 : <OUTPUT Suite test end number")
         sys.exit(1)
 
 suite                      = sys.argv[1]
 testsuite_db_file          = sys.argv[2]
 panic_tests_included       = int(sys.argv[3])
-testlist_file              = sys.argv[4]
-test_entry_list            = sys.argv[5]
-test_entry_fn_declare_list = sys.argv[6]
-client_tests_list_declare  = sys.argv[7]
-client_tests_list          = sys.argv[8]
-server_tests_list_declare  = sys.argv[9]
-server_tests_list          = sys.argv[10]
-if sys.argv[11] != "None":
-	suite_test_start_number    = int(sys.argv[11])
+tests_coverage             = sys.argv[4]
+testlist_file              = sys.argv[5]
+test_entry_list            = sys.argv[6]
+test_entry_fn_declare_list = sys.argv[7]
+client_tests_list_declare  = sys.argv[8]
+client_tests_list          = sys.argv[9]
+server_tests_list_declare  = sys.argv[10]
+server_tests_list          = sys.argv[11]
+
+
+if sys.argv[12] != "None":
+	suite_test_start_number    = int(sys.argv[12])
 else:
 	suite_test_start_number    = 0
-if sys.argv[12] != "None":
-	suite_test_end_number      = int(sys.argv[12])
+if sys.argv[13] != "None":
+	suite_test_end_number      = int(sys.argv[13])
 else:
 	suite_test_end_number      = sys.maxsize
 
@@ -66,12 +70,26 @@
 				if (('test_' == line[0:5]) and
 				    (int(line[6:9]) >= suite_test_start_number) and
 				    (int(line[6:9]) <= suite_test_end_number)):
-					if ((panic_tests_included == 1) and ("panic" not in line)):
-						o_f.write(line)
-					elif ((panic_tests_included == 1) and ("panic" in line)):
-						o_f.write(line[0:line.find(',')]+'\n')
-					elif ((panic_tests_included == 0) and ("panic" not in line)):
-						o_f.write(line)
+					if (panic_tests_included == 0):
+						if (tests_coverage == "ALL"):
+							if (("panic" not in line) and ("failing" not in line)):
+								o_f.write(line)
+							if (("panic" not in line) and ("failing" in line)):
+								o_f.write(line[0:line.find(',')]+'\n')
+						if (tests_coverage == "PASS"):
+							if (("panic" not in line) and ("failing" not in line)):
+								o_f.write(line)
+					if (panic_tests_included == 1):
+						if (tests_coverage == "ALL"):
+							if (("panic" not in line) and ("failing" not in line)):
+								o_f.write(line)
+							else:
+								o_f.write(line[0:line.find(',')]+'\n')
+						if (tests_coverage == "PASS"):
+							if (("panic" not in line) and ("failing" not in line)):
+								o_f.write(line)
+							if (("panic" in line) and ("failing" not in line)):
+								o_f.write(line[0:line.find(',')]+'\n')
 
 def gen_test_entry_info():
 	"""
diff --git a/api-tests/val/common/val.h b/api-tests/val/common/val.h
index 1fb6266..88bab7b 100644
--- a/api-tests/val/common/val.h
+++ b/api-tests/val/common/val.h
@@ -1,5 +1,5 @@
 /** @file
- * Copyright (c) 2018-2020, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2018-2021, Arm Limited or its affiliates. All rights reserved.
  * SPDX-License-Identifier : Apache-2.0
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/api-tests/val/nspe/val_crypto.h b/api-tests/val/nspe/val_crypto.h
index a11369b..a3414ee 100644
--- a/api-tests/val/nspe/val_crypto.h
+++ b/api-tests/val/nspe/val_crypto.h
@@ -55,7 +55,6 @@
 
 #define PSA_ALG_NONE ((psa_algorithm_t)0)
 #define PSA_KEY_ID_NULL ((psa_key_id_t)0)
-
 #if 0
 #define PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG(aead_alg) \
         ((((aead_alg) & ~0x003f0000) == 0x05400100) ? PSA_ALG_CCM : \
@@ -67,7 +66,6 @@
 		((psa_algorithm_t) (((aead_alg) & ~0x003f0000) | (((tag_length) & 0x3f) << 16)))
 #endif
 
-
 enum crypto_function_code {
     VAL_CRYPTO_AEAD_ABORT                        = 0x1,
     VAL_CRYPTO_AEAD_DECRYPT,
diff --git a/api-tests/val/nspe/val_dispatcher.c b/api-tests/val/nspe/val_dispatcher.c
index 57de976..13a3671 100644
--- a/api-tests/val/nspe/val_dispatcher.c
+++ b/api-tests/val/nspe/val_dispatcher.c
@@ -229,6 +229,10 @@
                 val_print(PRINT_ALWAYS, "\nRunning.. ", 0);
                 val_print(PRINT_ALWAYS, val_get_comp_name(test_id), 0);
 			//	val_print_api_version();
+#ifdef TESTS_COVERAGE
+                val_print(PRINT_ALWAYS, "\nNOTE : Known failing tests are excluded from this \
+build. For PSA functional API certification, all tests must be run.\n", 0);
+#endif
                 val_print(PRINT_ALWAYS, "\n******************************************\n", 0);
             }
 
diff --git a/api-tests/val/nspe/val_entry.h b/api-tests/val/nspe/val_entry.h
index ba333ef..79646b9 100644
--- a/api-tests/val/nspe/val_entry.h
+++ b/api-tests/val/nspe/val_entry.h
@@ -21,7 +21,7 @@
 #include "val_framework.h"
 
 #define PSA_ACS_MAJOR_VER    1
-#define PSA_ACS_MINOR_VER    2
+#define PSA_ACS_MINOR_VER    3
 
 /**
     @brief    - PSA Test Suite C main function, does VAL init and calls test dispatcher
diff --git a/api-tests/val/nspe/val_peripherals.c b/api-tests/val/nspe/val_peripherals.c
index 4e2d31b..4424639 100644
--- a/api-tests/val/nspe/val_peripherals.c
+++ b/api-tests/val/nspe/val_peripherals.c
@@ -157,8 +157,6 @@
 val_status_t val_wd_reprogram_timer(wd_timeout_type_t timeout_type)
 {
     val_status_t    status = VAL_STATUS_SUCCESS;
-
-    (void)timeout_type; // Argument unused if WATCHDOG_AVAILABLE is not defined
 #ifdef WATCHDOG_AVAILABLE
     /* Disable watchdog Timer */
     val_wd_timer_disable();
@@ -176,6 +174,8 @@
     {
         return status;
     }
+#else
+	(void)timeout_type; // Argument unused if WATCHDOG_AVAILABLE is not defined
 #endif
 
     return status;