Merge pull request #104 from kotegowder/master

PSA Storage changes in align with 1.0.0 spec version.
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s001/test_its_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s001/test_its_data.h
index af95d04..4372bb1 100644
--- a/api-tests/dev_apis/internal_trusted_storage/test_s001/test_its_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s001/test_its_data.h
@@ -20,62 +20,61 @@
 #include "val_internal_trusted_storage.h"
 
 #define SST_FUNCTION val->its_function
-#define psa_sst_uid_t psa_its_uid_t
 
 typedef struct {
     enum its_function_code  api;
-    psa_its_status_t        status;
+    psa_status_t        status;
 } test_data;
 
-static struct psa_its_info_t info;
+static struct psa_storage_info_t info;
 static const test_data s001_data[] = {
 {
  0, 0 /* Unused Index0 */
 },
 {
- VAL_ITS_GET, PSA_ITS_ERROR_UID_NOT_FOUND /* Call the get API when no UID is set */
+ VAL_ITS_GET, PSA_ERROR_DOES_NOT_EXIST /* Call the get API when no UID is set */
 },
 {
- VAL_ITS_GET_INFO, PSA_ITS_ERROR_UID_NOT_FOUND /* Call the get_info API when no UID is set */
+ VAL_ITS_GET_INFO, PSA_ERROR_DOES_NOT_EXIST /* Call the get_info API when no UID is set */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_ERROR_UID_NOT_FOUND /* Call the remove API when no UID is set */
+ VAL_ITS_REMOVE, PSA_ERROR_DOES_NOT_EXIST /* Call the remove API when no UID is set */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* Create a valid storage entity with UID1 */
+ VAL_ITS_SET, PSA_SUCCESS /* Create a valid storage entity with UID1 */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* Create a valid storage entity with UID2 */
+ VAL_ITS_SET, PSA_SUCCESS /* Create a valid storage entity with UID2 */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_SUCCESS /* Remove UID1 */
+ VAL_ITS_REMOVE, PSA_SUCCESS /* Remove UID1 */
 },
 {
- VAL_ITS_GET, PSA_ITS_ERROR_UID_NOT_FOUND /* Call get API for UID1 */
+ VAL_ITS_GET, PSA_ERROR_DOES_NOT_EXIST /* Call get API for UID1 */
 },
 {
- VAL_ITS_GET_INFO, PSA_ITS_ERROR_UID_NOT_FOUND /* Call get_info API for UID1 */
+ VAL_ITS_GET_INFO, PSA_ERROR_DOES_NOT_EXIST /* Call get_info API for UID1 */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_ERROR_UID_NOT_FOUND /* Call remove API for UID1 */
+ VAL_ITS_REMOVE, PSA_ERROR_DOES_NOT_EXIST /* Call remove API for UID1 */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* Create a valid storage entity again with UID1 */
+ VAL_ITS_SET, PSA_SUCCESS /* Create a valid storage entity again with UID1 */
 },
 {
- VAL_ITS_GET, PSA_ITS_ERROR_UID_NOT_FOUND /* Call get API for UID not same as UID1 or UID2 */
+ VAL_ITS_GET, PSA_ERROR_DOES_NOT_EXIST /* Call get API for UID not same as UID1 or UID2 */
 },
 {
- VAL_ITS_GET_INFO, PSA_ITS_ERROR_UID_NOT_FOUND /* Call get_info for UID not same as UID1 or UID2 */
+ VAL_ITS_GET_INFO, PSA_ERROR_DOES_NOT_EXIST /* Call get_info for UID not same as UID1 or UID2 */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_ERROR_UID_NOT_FOUND /* Call remove API for UID not same as UID1 or UID2 */
+ VAL_ITS_REMOVE, PSA_ERROR_DOES_NOT_EXIST /* Call remove API for UID not same as UID1 or UID2 */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_SUCCESS /* Remove UID1 */
+ VAL_ITS_REMOVE, PSA_SUCCESS /* Remove UID1 */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_SUCCESS /* Remove UID2 */
+ VAL_ITS_REMOVE, PSA_SUCCESS /* Remove UID2 */
 },
 };
 #endif /* _TEST_S001_ITS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s001/test_ps_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s001/test_ps_data.h
index 2013058..283ff86 100644
--- a/api-tests/dev_apis/internal_trusted_storage/test_s001/test_ps_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s001/test_ps_data.h
@@ -20,62 +20,61 @@
 #include "val_protected_storage.h"
 
 #define SST_FUNCTION val->ps_function
-#define psa_sst_uid_t psa_ps_uid_t
 
 typedef struct {
     enum ps_function_code  api;
-    psa_ps_status_t        status;
+    psa_status_t        status;
 } test_data;
 
-static struct psa_ps_info_t info;
+static struct psa_storage_info_t info;
 static const test_data s001_data[] = {
 {
  0, 0 /* This is dummy for index0 */
 },
 {
- VAL_PS_GET, PSA_PS_ERROR_UID_NOT_FOUND /* Call the get API when no UID is set */
+ VAL_PS_GET, PSA_ERROR_DOES_NOT_EXIST /* Call the get API when no UID is set */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_ERROR_UID_NOT_FOUND /* Call the get_info API when no UID is set */
+ VAL_PS_GET_INFO, PSA_ERROR_DOES_NOT_EXIST /* Call the get_info API when no UID is set */
 },
 {
- VAL_PS_REMOVE, PSA_PS_ERROR_UID_NOT_FOUND /* Call the remove API when no UID is set */
+ VAL_PS_REMOVE, PSA_ERROR_DOES_NOT_EXIST /* Call the remove API when no UID is set */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Create a valid storage entity with UID1 */
+ VAL_PS_SET, PSA_SUCCESS /* Create a valid storage entity with UID1 */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Create a valid storage entity with UID2 */
+ VAL_PS_SET, PSA_SUCCESS /* Create a valid storage entity with UID2 */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove UID1 */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove UID1 */
 },
 {
- VAL_PS_GET, PSA_PS_ERROR_UID_NOT_FOUND /* Call get API for UID1 */
+ VAL_PS_GET, PSA_ERROR_DOES_NOT_EXIST /* Call get API for UID1 */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_ERROR_UID_NOT_FOUND /* Call get_info API for UID1 */
+ VAL_PS_GET_INFO, PSA_ERROR_DOES_NOT_EXIST /* Call get_info API for UID1 */
 },
 {
- VAL_PS_REMOVE, PSA_PS_ERROR_UID_NOT_FOUND /* Call remove API for UID1 */
+ VAL_PS_REMOVE, PSA_ERROR_DOES_NOT_EXIST /* Call remove API for UID1 */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Create a valid storage entity again with UID1 */
+ VAL_PS_SET, PSA_SUCCESS /* Create a valid storage entity again with UID1 */
 },
 {
- VAL_PS_GET, PSA_PS_ERROR_UID_NOT_FOUND /* Call get API for UID not same as UID1 or UID2 */
+ VAL_PS_GET, PSA_ERROR_DOES_NOT_EXIST /* Call get API for UID not same as UID1 or UID2 */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_ERROR_UID_NOT_FOUND /* Call get_info for UID not same as UID1 or UID2 */
+ VAL_PS_GET_INFO, PSA_ERROR_DOES_NOT_EXIST /* Call get_info for UID not same as UID1 or UID2 */
 },
 {
- VAL_PS_REMOVE, PSA_PS_ERROR_UID_NOT_FOUND /* Call remove API for UID not same as UID1 or UID2 */
+ VAL_PS_REMOVE, PSA_ERROR_DOES_NOT_EXIST /* Call remove API for UID not same as UID1 or UID2 */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove UID1 */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove UID1 */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove UID2 */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove UID2 */
 },
 };
 #endif /*  _TEST_S001_PS_DATA_TESTS_H_  */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s001/test_s001.c b/api-tests/dev_apis/internal_trusted_storage/test_s001/test_s001.c
index 3eabe5b..ed948b7 100644
--- a/api-tests/dev_apis/internal_trusted_storage/test_s001/test_s001.c
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s001/test_s001.c
@@ -36,13 +36,13 @@
                                              0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F};
 static uint8_t read_buff[TEST_BUFF_SIZE]  = {0};
 
-static int32_t sst_calls_without_set_call(psa_sst_uid_t p_uid)
+static int32_t sst_calls_without_set_call(psa_storage_uid_t p_uid)
 {
-    uint32_t status;
+    uint32_t status, p_data_length = 0;
 
     /* get() without using set() before */
     val->print(PRINT_TEST, "[Check 1] Call get API for UID %d which is not set\n", p_uid);
-    status = SST_FUNCTION(s001_data[1].api, p_uid, 0, TEST_BUFF_SIZE, read_buff);
+    status = SST_FUNCTION(s001_data[1].api, p_uid, 0, TEST_BUFF_SIZE, read_buff, &p_data_length);
     TEST_ASSERT_EQUAL(status,s001_data[1].status,TEST_CHECKPOINT_NUM(1));
 
     /*  get_info() without using set() before */
@@ -58,16 +58,18 @@
     return VAL_STATUS_SUCCESS;
 }
 
-static int32_t sst_set_and_remove(psa_sst_uid_t p_uid)
+static int32_t sst_set_and_remove(psa_storage_uid_t p_uid)
 {
     uint32_t status;
 
     /* set() a UID1 */
-    status = SST_FUNCTION(s001_data[4].api, p_uid, TEST_BUFF_SIZE, write_buff, 0);
+    status = SST_FUNCTION(s001_data[4].api, p_uid, TEST_BUFF_SIZE, write_buff,
+                          PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, s001_data[4].status, TEST_CHECKPOINT_NUM(4));
 
     /* Also set() with a different UID */
-    status = SST_FUNCTION(s001_data[5].api, p_uid + 1, TEST_BUFF_SIZE, write_buff, 0);
+    status = SST_FUNCTION(s001_data[5].api, p_uid + 1, TEST_BUFF_SIZE, write_buff,
+                          PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, s001_data[5].status, TEST_CHECKPOINT_NUM(5));
 
     /* remove() UID1 */
@@ -77,13 +79,13 @@
     return VAL_STATUS_SUCCESS;
 }
 
-static int32_t sst_calls_after_uid_remove(psa_sst_uid_t p_uid)
+static int32_t sst_calls_after_uid_remove(psa_storage_uid_t p_uid)
 {
-    uint32_t status;
+    uint32_t status, p_data_length = 0;
 
     /* get() for UID which is removed */
     val->print(PRINT_TEST, "[Check 4] Call get API for UID %d which is removed\n", p_uid);
-    status = SST_FUNCTION(s001_data[7].api, p_uid, 0, TEST_BUFF_SIZE, read_buff);
+    status = SST_FUNCTION(s001_data[7].api, p_uid, 0, TEST_BUFF_SIZE, read_buff, &p_data_length);
     TEST_ASSERT_EQUAL(status, s001_data[7].status, TEST_CHECKPOINT_NUM(7));
 
     /* get_info() for UID which is removed */
@@ -99,18 +101,20 @@
     return VAL_STATUS_SUCCESS;
 }
 
-static int32_t sst_calls_with_different_uid(psa_sst_uid_t p_uid)
+static int32_t sst_calls_with_different_uid(psa_storage_uid_t p_uid)
 {
-    uint32_t status;
+    uint32_t status, p_data_length = 0;
 
     /* set() a UID */
     val->print(PRINT_TEST, "Set storage for UID %d\n", p_uid);
-    status = SST_FUNCTION(s001_data[10].api, p_uid, TEST_BUFF_SIZE, write_buff, 0);
+    status = SST_FUNCTION(s001_data[10].api, p_uid, TEST_BUFF_SIZE, write_buff,
+                          PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, s001_data[10].status, TEST_CHECKPOINT_NUM(10));
 
     /* get() for different UID then set UID */
     val->print(PRINT_TEST, "[Check 7] Call get API for different UID %d\n", p_uid);
-    status = SST_FUNCTION(s001_data[11].api, p_uid-1, 0, TEST_BUFF_SIZE - 1, read_buff);
+    status = SST_FUNCTION(s001_data[11].api, p_uid-1, 0, TEST_BUFF_SIZE - 1, read_buff,
+                          &p_data_length);
     TEST_ASSERT_EQUAL(status, s001_data[11].status, TEST_CHECKPOINT_NUM(11));
 
     /* get_info() for different UID then set UID */
@@ -130,7 +134,7 @@
     return VAL_STATUS_SUCCESS;
 }
 
-static int32_t sst_remove_stray_uid(psa_sst_uid_t p_uid)
+static int32_t sst_remove_stray_uid(psa_storage_uid_t p_uid)
 {
     uint32_t status;
 
@@ -144,7 +148,7 @@
 int32_t psa_sst_uid_not_found(security_t caller)
 {
     int32_t test_status;
-    psa_sst_uid_t uid = UID_BASE_VALUE + 6;
+    psa_storage_uid_t uid = UID_BASE_VALUE + 6;
 
     test_status = sst_calls_without_set_call(uid);
     if (test_status != VAL_STATUS_SUCCESS)
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s001/test_s001.h b/api-tests/dev_apis/internal_trusted_storage/test_s001/test_s001.h
index af42fef..608f92f 100644
--- a/api-tests/dev_apis/internal_trusted_storage/test_s001/test_s001.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s001/test_s001.h
@@ -19,13 +19,13 @@
 
 #ifdef ITS_TEST
 #define VAL_STORAGE_BASE VAL_INTERNAL_TRUSTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, s001)
+#define test_entry CONCAT(test_entry_,  s001)
 #elif PS_TEST
 #define VAL_STORAGE_BASE VAL_PROTECTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, p001)
+#define test_entry CONCAT(test_entry_,  p001)
 #endif
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
 
 extern val_api_t *val;
 extern psa_api_t *psa;
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s002/test_its_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s002/test_its_data.h
index 303b25f..e3ac2cc 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s002/test_its_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s002/test_its_data.h
@@ -20,25 +20,23 @@
 #include "val_internal_trusted_storage.h"
 
 #define SST_FUNCTION val->its_function
-#define PSA_SST_FLAG_WRITE_ONCE PSA_ITS_FLAG_WRITE_ONCE
-#define psa_sst_uid_t psa_its_uid_t
 
 typedef struct {
     enum its_function_code  api;
-    psa_its_status_t        status;
+    psa_status_t        status;
 } test_data;
 
-static struct psa_its_info_t orig_info;
-static struct psa_its_info_t new_info;
+static struct psa_storage_info_t orig_info;
+static struct psa_storage_info_t new_info;
 static const test_data s002_data[] = {
 {
  0, 0 /* This is dummy for index0 */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* Create a valid storage with create flag value 0 */
+ VAL_ITS_SET, PSA_SUCCESS /* Create a valid storage with create flag value 0 */
 },
 {
- VAL_ITS_GET_INFO, PSA_ITS_SUCCESS /* Call the get_info API to validate the attributes */
+ VAL_ITS_GET_INFO, PSA_SUCCESS /* Call the get_info API to validate the attributes */
 },
 {
  0, 0 /* Index not used as check for get info size */
@@ -47,16 +45,16 @@
  0, 0 /* Index not used as check for get info flag */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS /* Validate the data using get API */
+ VAL_ITS_GET, PSA_SUCCESS /* Validate the data using get API */
 },
 {
  0, 0 /* Index not used */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* Change the flag to WRITE_ONCE using set API */
+ VAL_ITS_SET, PSA_SUCCESS /* Change the flag to WRITE_ONCE using set API */
 },
 {
- VAL_ITS_GET_INFO, PSA_ITS_SUCCESS /* Call the get_info API to validate the flag change */
+ VAL_ITS_GET_INFO, PSA_SUCCESS /* Call the get_info API to validate the flag change */
 },
 {
  0, 0 /* Index not used as check for get info size */
@@ -65,28 +63,28 @@
  0, 0 /* Index not used as check for get info flag */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS /* Validate the data using get API after flag change */
+ VAL_ITS_GET, PSA_SUCCESS /* Validate the data using get API after flag change */
 },
 {
  0, 0 /* Index not used */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_ERROR_WRITE_ONCE /* Storage should not be removed after WRITE_ONCE flag */
+ VAL_ITS_REMOVE, PSA_ERROR_NOT_PERMITTED /* Storage should not be removed after WRITE_ONCE flag */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* Create a storage with different UID and flag value WRITE_ONCE */
+ VAL_ITS_SET, PSA_SUCCESS /* Create a storage with different UID and flag value WRITE_ONCE */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_ERROR_WRITE_ONCE /* Storage should not be removed */
+ VAL_ITS_REMOVE, PSA_ERROR_NOT_PERMITTED /* Storage should not be removed */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS /* Validate the data using get API after flag change */
+ VAL_ITS_GET, PSA_SUCCESS /* Validate the data using get API after flag change */
 },
 {
  0, 0 /* Index not used */
 },
 {
- VAL_ITS_GET_INFO, PSA_ITS_SUCCESS /* Call the get_info API to validate the flag change */
+ VAL_ITS_GET_INFO, PSA_SUCCESS /* Call the get_info API to validate the flag change */
 },
 {
  0, 0 /* Index not used as check for get info size */
@@ -95,13 +93,13 @@
  0, 0 /* Index not used as check for get info flag */
 },
 {
- VAL_ITS_SET, PSA_ITS_ERROR_WRITE_ONCE /* Try to set different size for same UID and flag value */
+ VAL_ITS_SET, PSA_ERROR_NOT_PERMITTED /* Try to set different size for same UID and flag value */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_ERROR_WRITE_ONCE /* Storage should not be removed */
+ VAL_ITS_REMOVE, PSA_ERROR_NOT_PERMITTED /* Storage should not be removed */
 },
 {
- VAL_ITS_GET_INFO, PSA_ITS_SUCCESS /* Call the get_info API to validate the flag change */
+ VAL_ITS_GET_INFO, PSA_SUCCESS /* Call the get_info API to validate the flag change */
 },
 {
  0, 0 /* Index not used as check for get info size */
@@ -110,19 +108,19 @@
  0, 0 /* Index not used as check for get info flag */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS  /* Validate the data using get API after flag change */
+ VAL_ITS_GET, PSA_SUCCESS  /* Validate the data using get API after flag change */
 },
 {
  0, 0 /* Index not used */
 },
 {
- VAL_ITS_SET, PSA_ITS_ERROR_WRITE_ONCE  /* Setting flag to zero for UID should fail */
+ VAL_ITS_SET, PSA_ERROR_NOT_PERMITTED  /* Setting flag to zero for UID should fail */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_ERROR_WRITE_ONCE /* Storage should not be removed */
+ VAL_ITS_REMOVE, PSA_ERROR_NOT_PERMITTED /* Storage should not be removed */
 },
 {
- VAL_ITS_GET_INFO, PSA_ITS_SUCCESS  /* Check that the WRITE_ONCE flag is preserved */
+ VAL_ITS_GET_INFO, PSA_SUCCESS  /* Check that the WRITE_ONCE flag is preserved */
 },
 {
  0, 0 /* Index not used as check for get info size */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s002/test_ps_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s002/test_ps_data.h
index 19e88b7..4e7b1f7 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s002/test_ps_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s002/test_ps_data.h
@@ -20,25 +20,23 @@
 #include "val_protected_storage.h"
 
 #define SST_FUNCTION val->ps_function
-#define PSA_SST_FLAG_WRITE_ONCE PSA_PS_FLAG_WRITE_ONCE
-#define psa_sst_uid_t psa_ps_uid_t
 
 typedef struct {
     enum ps_function_code  api;
-    psa_ps_status_t        status;
+    psa_status_t        status;
 } test_data;
 
-static struct psa_ps_info_t orig_info;
-static struct psa_ps_info_t new_info;
+static struct psa_storage_info_t orig_info;
+static struct psa_storage_info_t new_info;
 static const test_data s002_data[] = {
 {
  0, 0 /* This is dummy for index0 */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Create a valid storage with create flag value 0 */
+ VAL_PS_SET, PSA_SUCCESS /* Create a valid storage with create flag value 0 */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_SUCCESS /* Call the get_info API to validate the attributes */
+ VAL_PS_GET_INFO, PSA_SUCCESS /* Call the get_info API to validate the attributes */
 },
 {
  0, 0 /* Index not used as check for get info size */
@@ -47,16 +45,16 @@
  0, 0 /* Index not used as check for get info flag */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Validate the data using get API */
+ VAL_PS_GET, PSA_SUCCESS /* Validate the data using get API */
 },
 {
  0, 0 /* Index not used */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Change the flag to WRITE_ONCE using set API */
+ VAL_PS_SET, PSA_SUCCESS /* Change the flag to WRITE_ONCE using set API */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_SUCCESS /* Call the get_info API to validate the flag change */
+ VAL_PS_GET_INFO, PSA_SUCCESS /* Call the get_info API to validate the flag change */
 },
 {
  0, 0 /* Index not used as check for get info size */
@@ -65,28 +63,28 @@
  0, 0 /* Index not used as check for get info flag */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Validate the data using get API after flag change */
+ VAL_PS_GET, PSA_SUCCESS /* Validate the data using get API after flag change */
 },
 {
  0, 0 /* Index not used */
 },
 {
- VAL_PS_REMOVE, PSA_PS_ERROR_WRITE_ONCE /* Storage should not be removed after WRITE_ONCE flag */
+ VAL_PS_REMOVE, PSA_ERROR_NOT_PERMITTED /* Storage should not be removed after WRITE_ONCE flag */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Create storage with different UID and flag value WRITE_ONCE */
+ VAL_PS_SET, PSA_SUCCESS /* Create storage with different UID and flag value WRITE_ONCE */
 },
 {
- VAL_PS_REMOVE, PSA_PS_ERROR_WRITE_ONCE /* Storage should not be removed */
+ VAL_PS_REMOVE, PSA_ERROR_NOT_PERMITTED /* Storage should not be removed */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Validate the data using get API after flag change */
+ VAL_PS_GET, PSA_SUCCESS /* Validate the data using get API after flag change */
 },
 {
  0, 0  /* Index not used */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_SUCCESS /* Call the get_info API to validate the flag change */
+ VAL_PS_GET_INFO, PSA_SUCCESS /* Call the get_info API to validate the flag change */
 },
 {
  0, 0 /* Index not used as check for get info size */
@@ -95,13 +93,13 @@
  0, 0 /* Index not used as check for get info flag */
 },
 {
- VAL_PS_SET, PSA_PS_ERROR_WRITE_ONCE /* Try to set different size for same UID and flag value */
+ VAL_PS_SET, PSA_ERROR_NOT_PERMITTED /* Try to set different size for same UID and flag value */
 },
 {
- VAL_PS_REMOVE, PSA_PS_ERROR_WRITE_ONCE /* Storage should not be removed */
+ VAL_PS_REMOVE, PSA_ERROR_NOT_PERMITTED /* Storage should not be removed */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_SUCCESS /* Call the get_info API to validate the flag change */
+ VAL_PS_GET_INFO, PSA_SUCCESS /* Call the get_info API to validate the flag change */
 },
 {
  0, 0 /* Index not used as check for get info size */
@@ -110,19 +108,19 @@
  0, 0 /* Index not used as check for get info flag */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Validate the data using get API after flag change */
+ VAL_PS_GET, PSA_SUCCESS /* Validate the data using get API after flag change */
 },
 {
  0, 0 /* Index not used */
 },
 {
- VAL_PS_SET, PSA_PS_ERROR_WRITE_ONCE /* Setting flag to zero for UID should fail */
+ VAL_PS_SET, PSA_ERROR_NOT_PERMITTED /* Setting flag to zero for UID should fail */
 },
 {
- VAL_PS_REMOVE, PSA_PS_ERROR_WRITE_ONCE /* Storage should not be removed */
+ VAL_PS_REMOVE, PSA_ERROR_NOT_PERMITTED /* Storage should not be removed */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_SUCCESS /* Check that the WRITE_ONCE flag is preserved */
+ VAL_PS_GET_INFO, PSA_SUCCESS /* Check that the WRITE_ONCE flag is preserved */
 },
 {
  0, 0 /* Index not used as check for get info size */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s002/test_s002.c b/api-tests/dev_apis/internal_trusted_storage/test_s002/test_s002.c
index 4fea4d6..ae731ae 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s002/test_s002.c
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s002/test_s002.c
@@ -37,48 +37,51 @@
 
 int32_t psa_sst_update_write_once_flag_after_create(security_t caller)
 {
-    uint32_t status;
-    psa_sst_uid_t uid = UID_WRITE_ONCE_1;
+    uint32_t status, p_data_length = 0;
+    psa_storage_uid_t uid = UID_WRITE_ONCE_1;
     uint8_t  write_buff[TEST_BUFF_SIZE/2]     = {0xDE, 0xAD, 0xBE, 0xEF, 0xCA, 0xFE, 0xBA, 0xBE};
     uint8_t  read_buff[TEST_BUFF_SIZE/2]      = {0};
     uint8_t  write_buff_new[TEST_BUFF_SIZE/4] = {0xFF, 0xFF, 0xFF, 0xFF};
 
     /* set() data without a WRITE_ONCE flag */
-    status = SST_FUNCTION(s002_data[1].api, uid, TEST_BUFF_SIZE/2, write_buff, 0);
+    status = SST_FUNCTION(s002_data[1].api, uid, TEST_BUFF_SIZE/2, write_buff,
+                          PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, s002_data[1].status, TEST_CHECKPOINT_NUM(1));
 
     /* Check that get_info() returns correct attributes; also store for reference for later */
     status = SST_FUNCTION(s002_data[2].api, uid, &orig_info);
     TEST_ASSERT_EQUAL(status, s002_data[2].status, TEST_CHECKPOINT_NUM(2));
     TEST_ASSERT_EQUAL(orig_info.size, TEST_BUFF_SIZE/2, TEST_CHECKPOINT_NUM(3));
-    TEST_ASSERT_EQUAL(orig_info.flags, 0, TEST_CHECKPOINT_NUM(4));
+    TEST_ASSERT_EQUAL(orig_info.flags, PSA_STORAGE_FLAG_NONE, TEST_CHECKPOINT_NUM(4));
 
     /* Check for data consistency using get() */
-    status = SST_FUNCTION(s002_data[5].api, uid, 0, TEST_BUFF_SIZE/2, read_buff);
+    status = SST_FUNCTION(s002_data[5].api, uid, 0, TEST_BUFF_SIZE/2, read_buff, &p_data_length);
     TEST_ASSERT_EQUAL(status, s002_data[5].status, TEST_CHECKPOINT_NUM(5));
-    TEST_ASSERT_MEMCMP(write_buff, read_buff, TEST_BUFF_SIZE/2, TEST_CHECKPOINT_NUM(6));
+    TEST_ASSERT_EQUAL(p_data_length, TEST_BUFF_SIZE/2, TEST_CHECKPOINT_NUM(6));
+    TEST_ASSERT_MEMCMP(write_buff, read_buff, TEST_BUFF_SIZE/2, TEST_CHECKPOINT_NUM(7));
 
     /* set() with WRITE_ONCE_FLAG */
     val->print(PRINT_TEST, "[Check 1] Update the flag of UID %d with WRITE_ONCE flag\n", uid);
     status = SST_FUNCTION(s002_data[7].api, uid, TEST_BUFF_SIZE/4, write_buff_new,
-                          PSA_SST_FLAG_WRITE_ONCE);
-    TEST_ASSERT_EQUAL(status, s002_data[7].status, TEST_CHECKPOINT_NUM(7));
+                          PSA_STORAGE_FLAG_WRITE_ONCE);
+    TEST_ASSERT_EQUAL(status, s002_data[7].status, TEST_CHECKPOINT_NUM(8));
 
     /* Check that info is updated, after new set */
     status = SST_FUNCTION(s002_data[8].api, uid, &new_info);
-    TEST_ASSERT_EQUAL(status, s002_data[8].status, TEST_CHECKPOINT_NUM(8));
-    TEST_ASSERT_EQUAL(new_info.size, new_info.size, TEST_CHECKPOINT_NUM(9));
-    TEST_ASSERT_EQUAL(new_info.flags, new_info.flags, TEST_CHECKPOINT_NUM(10));
+    TEST_ASSERT_EQUAL(status, s002_data[8].status, TEST_CHECKPOINT_NUM(9));
+    TEST_ASSERT_EQUAL(new_info.size, TEST_BUFF_SIZE/4, TEST_CHECKPOINT_NUM(10));
+    TEST_ASSERT_EQUAL(new_info.flags, PSA_STORAGE_FLAG_WRITE_ONCE, TEST_CHECKPOINT_NUM(11));
 
     /* Check that data contents are preserved which were written with WRITE_ONCE_FLAG originally */
-    status = SST_FUNCTION(s002_data[11].api, uid, 0, TEST_BUFF_SIZE/4, read_buff);
-    TEST_ASSERT_EQUAL(status, s002_data[11].status, TEST_CHECKPOINT_NUM(11));
-    TEST_ASSERT_MEMCMP(write_buff_new, read_buff, TEST_BUFF_SIZE/4, TEST_CHECKPOINT_NUM(12));
+    status = SST_FUNCTION(s002_data[11].api, uid, 0, TEST_BUFF_SIZE/4, read_buff, &p_data_length);
+    TEST_ASSERT_EQUAL(status, s002_data[11].status, TEST_CHECKPOINT_NUM(12));
+    TEST_ASSERT_EQUAL(p_data_length, TEST_BUFF_SIZE/4, TEST_CHECKPOINT_NUM(13));
+    TEST_ASSERT_MEMCMP(write_buff_new, read_buff, TEST_BUFF_SIZE/4, TEST_CHECKPOINT_NUM(14));
 
     /* remove() the UID */
     val->print(PRINT_TEST, "[Check 2] Try to remove the UID %d having WRITE_ONCE flag\n", uid);
     status = SST_FUNCTION(s002_data[13].api, uid);
-    TEST_ASSERT_EQUAL(status, s002_data[13].status, TEST_CHECKPOINT_NUM(13));
+    TEST_ASSERT_EQUAL(status, s002_data[13].status, TEST_CHECKPOINT_NUM(15));
 
     return VAL_STATUS_SUCCESS;
 }
@@ -86,8 +89,8 @@
 
 int32_t psa_sst_create_with_write_once_flag(security_t caller)
 {
-    uint32_t status;
-    psa_sst_uid_t uid = UID_WRITE_ONCE_2;
+    uint32_t status, p_data_length = 0;
+    psa_storage_uid_t uid = UID_WRITE_ONCE_2;
     uint8_t write_buff[TEST_BUFF_SIZE] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
                                           0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F};
     uint8_t read_buff[TEST_BUFF_SIZE]  = {0};
@@ -98,64 +101,67 @@
     /* Set data for a UID using WRITE_ONCE flag */
     val->print(PRINT_TEST, "[Check 3] Create a new UID %d with WRITE_ONCE flag\n", uid);
     status = SST_FUNCTION(s002_data[14].api, uid, TEST_BUFF_SIZE, write_buff,
-                          PSA_SST_FLAG_WRITE_ONCE);
-    TEST_ASSERT_EQUAL(status, s002_data[14].status, TEST_CHECKPOINT_NUM(14));
+                          PSA_STORAGE_FLAG_WRITE_ONCE);
+    TEST_ASSERT_EQUAL(status, s002_data[14].status, TEST_CHECKPOINT_NUM(16));
 
     /* Check that remove() fails with PSA_SST_ERROR_WRITE_ONCE */
     val->print(PRINT_TEST, "[Check 4] Try to remove the UID %d having WRITE_ONCE flag\n", uid);
     status = SST_FUNCTION(s002_data[15].api, uid);
-    TEST_ASSERT_EQUAL(status, s002_data[15].status, TEST_CHECKPOINT_NUM(15));
+    TEST_ASSERT_EQUAL(status, s002_data[15].status, TEST_CHECKPOINT_NUM(17));
 
     /* Check data consistency using get()*/
-    status = SST_FUNCTION(s002_data[16].api, uid, 0, TEST_BUFF_SIZE, read_buff);
-    TEST_ASSERT_EQUAL(status, s002_data[16].status, TEST_CHECKPOINT_NUM(16));
-    TEST_ASSERT_MEMCMP(write_buff, read_buff, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(17));
+    status = SST_FUNCTION(s002_data[16].api, uid, 0, TEST_BUFF_SIZE, read_buff, &p_data_length);
+    TEST_ASSERT_EQUAL(status, s002_data[16].status, TEST_CHECKPOINT_NUM(18));
+    TEST_ASSERT_EQUAL(p_data_length, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(19));
+    TEST_ASSERT_MEMCMP(write_buff, read_buff, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(20));
 
     /* Check that info values is as expected */
     status = SST_FUNCTION(s002_data[18].api, uid, &orig_info);
-    TEST_ASSERT_EQUAL(status, s002_data[18].status, TEST_CHECKPOINT_NUM(18));
-    TEST_ASSERT_EQUAL(orig_info.size, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(19));
-    TEST_ASSERT_EQUAL(orig_info.flags, PSA_SST_FLAG_WRITE_ONCE, TEST_CHECKPOINT_NUM(20));
+    TEST_ASSERT_EQUAL(status, s002_data[18].status, TEST_CHECKPOINT_NUM(21));
+    TEST_ASSERT_EQUAL(orig_info.size, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(22));
+    TEST_ASSERT_EQUAL(orig_info.flags, PSA_STORAGE_FLAG_WRITE_ONCE, TEST_CHECKPOINT_NUM(23));
 
     /* Try to overwrite using set() with same UID as used before with WRITE_ONCE_FLAG */
     val->print(PRINT_TEST, "[Check 5] Try to change the length of write_once UID %d\n", uid);
     status = SST_FUNCTION(s002_data[21].api, uid, (TEST_BUFF_SIZE + 1), write_buff_new,
-                          PSA_SST_FLAG_WRITE_ONCE);
-    TEST_ASSERT_EQUAL(status, s002_data[21].status, TEST_CHECKPOINT_NUM(21));
+                          PSA_STORAGE_FLAG_WRITE_ONCE);
+    TEST_ASSERT_EQUAL(status, s002_data[21].status, TEST_CHECKPOINT_NUM(24));
 
     /* Check that remove() still fails with PSA_SST_ERROR_WRITE_ONCE */
     val->print(PRINT_TEST, "[Check 6] Check UID removal still fails\n", 0);
     status = SST_FUNCTION(s002_data[22].api, uid);
-    TEST_ASSERT_EQUAL(status, s002_data[22].status, TEST_CHECKPOINT_NUM(22));
+    TEST_ASSERT_EQUAL(status, s002_data[22].status, TEST_CHECKPOINT_NUM(25));
 
     /* Check that info is preserved */
     status = SST_FUNCTION(s002_data[23].api, uid, &new_info);
-    TEST_ASSERT_EQUAL(status, s002_data[23].status, TEST_CHECKPOINT_NUM(23));
-    TEST_ASSERT_EQUAL(new_info.size, orig_info.size, TEST_CHECKPOINT_NUM(24));
-    TEST_ASSERT_EQUAL(new_info.flags, orig_info.flags, TEST_CHECKPOINT_NUM(25));
+    TEST_ASSERT_EQUAL(status, s002_data[23].status, TEST_CHECKPOINT_NUM(26));
+    TEST_ASSERT_EQUAL(new_info.size, orig_info.size, TEST_CHECKPOINT_NUM(27));
+    TEST_ASSERT_EQUAL(new_info.flags, orig_info.flags, TEST_CHECKPOINT_NUM(28));
 
     /* Check that data contents are preserved which were written with WRITE_ONCE_FLAG originally */
-    status = SST_FUNCTION(s002_data[26].api, uid, 0, TEST_BUFF_SIZE, read_buff);
-    TEST_ASSERT_EQUAL(status, s002_data[26].status, TEST_CHECKPOINT_NUM(26));
-    TEST_ASSERT_MEMCMP(write_buff, read_buff, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(27));
+    status = SST_FUNCTION(s002_data[26].api, uid, 0, TEST_BUFF_SIZE, read_buff, &p_data_length);
+    TEST_ASSERT_EQUAL(status, s002_data[26].status, TEST_CHECKPOINT_NUM(29));
+    TEST_ASSERT_EQUAL(p_data_length, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(30));
+    TEST_ASSERT_MEMCMP(write_buff, read_buff, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(31));
 
     /* Try to overwrite using set() with same UID as used before without WRITE_ONCE_FLAG */
     val->print(PRINT_TEST, "[Check 7] Try to change the WRITE_ONCE flag to None for UID %d\n", uid);
     new_info.size = 0;
     new_info.flags = 0;
-    status = SST_FUNCTION(s002_data[28].api, uid, (TEST_BUFF_SIZE - 1), write_buff_new, 0);
-    TEST_ASSERT_EQUAL(status, s002_data[28].status, TEST_CHECKPOINT_NUM(28));
+    status = SST_FUNCTION(s002_data[28].api, uid, (TEST_BUFF_SIZE - 1), write_buff_new,
+                          PSA_STORAGE_FLAG_NONE);
+    TEST_ASSERT_EQUAL(status, s002_data[28].status, TEST_CHECKPOINT_NUM(32));
 
     /* Check that remove() still fails with PSA_SST_ERROR_WRITE_ONCE */
     val->print(PRINT_TEST, "[Check 8] Check UID removal still fails\n", 0);
     status = SST_FUNCTION(s002_data[29].api, uid);
-    TEST_ASSERT_EQUAL(status, s002_data[29].status, TEST_CHECKPOINT_NUM(29));
+    TEST_ASSERT_EQUAL(status, s002_data[29].status, TEST_CHECKPOINT_NUM(33));
 
     /* Check that info is preserved */
     status = SST_FUNCTION(s002_data[30].api, uid, &new_info);
-    TEST_ASSERT_EQUAL(status, s002_data[30].status, TEST_CHECKPOINT_NUM(30));
-    TEST_ASSERT_EQUAL(new_info.size, orig_info.size, TEST_CHECKPOINT_NUM(31));
-    TEST_ASSERT_EQUAL(new_info.flags, orig_info.flags, TEST_CHECKPOINT_NUM(32));
+    TEST_ASSERT_EQUAL(status, s002_data[30].status, TEST_CHECKPOINT_NUM(34));
+    TEST_ASSERT_EQUAL(new_info.size, orig_info.size, TEST_CHECKPOINT_NUM(35));
+    TEST_ASSERT_EQUAL(new_info.flags, orig_info.flags, TEST_CHECKPOINT_NUM(36));
 
     return VAL_STATUS_SUCCESS;
 }
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s002/test_s002.h b/api-tests/dev_apis/internal_trusted_storage/test_s002/test_s002.h
index 91c7aef..b571141 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s002/test_s002.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s002/test_s002.h
@@ -19,13 +19,13 @@
 
 #ifdef ITS_TEST
 #define VAL_STORAGE_BASE VAL_INTERNAL_TRUSTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, s002)
+#define test_entry CONCAT(test_entry_,  s002)
 #elif PS_TEST
 #define VAL_STORAGE_BASE VAL_PROTECTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, p002)
+#define test_entry CONCAT(test_entry_,  p002)
 #endif
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
 
 extern val_api_t *val;
 extern psa_api_t *psa;
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s003/test_its_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s003/test_its_data.h
index 511e418..4bb3e65 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s003/test_its_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s003/test_its_data.h
@@ -20,12 +20,11 @@
 #include "val_internal_trusted_storage.h"
 
 #define SST_FUNCTION val->its_function
-#define PSA_SST_SUCCESS  PSA_ITS_SUCCESS
-#define psa_sst_uid_t psa_its_uid_t
+#define PSA_SST_SUCCESS  PSA_SUCCESS
 
 typedef struct {
     enum its_function_code  api;
-    psa_its_status_t        status;
+    psa_status_t        status;
 } test_data;
 
 static const test_data s003_data[] = {
@@ -33,10 +32,10 @@
  0, 0 /* This is dummy for index0 */
 },
 {
- VAL_ITS_SET, PSA_ITS_ERROR_INSUFFICIENT_SPACE /* Call set API till insufficent space */
+ VAL_ITS_SET, PSA_ERROR_INSUFFICIENT_STORAGE /* Call set API till insufficent space */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_SUCCESS /* Remove the UID created */
+ VAL_ITS_REMOVE, PSA_SUCCESS /* Remove the UID created */
 },
 };
 #endif /* _TEST_S003_ITS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s003/test_ps_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s003/test_ps_data.h
index db48c35..d3d8806 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s003/test_ps_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s003/test_ps_data.h
@@ -20,12 +20,10 @@
 #include "val_protected_storage.h"
 
 #define SST_FUNCTION val->ps_function
-#define PSA_SST_SUCCESS  PSA_PS_SUCCESS
-#define psa_sst_uid_t psa_ps_uid_t
 
 typedef struct {
     enum ps_function_code  api;
-    psa_ps_status_t        status;
+    psa_status_t        status;
 } test_data;
 
 static const test_data s003_data[] = {
@@ -33,10 +31,10 @@
  0, 0 /* This is dummy for index0 */
 },
 {
- VAL_PS_SET, PSA_PS_ERROR_INSUFFICIENT_SPACE /* Call set API till insufficent space */
+ VAL_PS_SET, PSA_ERROR_INSUFFICIENT_STORAGE /* Call set API till insufficent space */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove the UID created */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the UID created */
 },
 };
 #endif /* _TEST_S003_PS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s003/test_s003.c b/api-tests/dev_apis/internal_trusted_storage/test_s003/test_s003.c
index fcd9a08..1f7578e 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s003/test_s003.c
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s003/test_s003.c
@@ -41,8 +41,8 @@
 
 int32_t psa_sst_insufficient_space(security_t caller)
 {
-    uint32_t status = PSA_SST_SUCCESS;
-    psa_sst_uid_t uid;
+    uint32_t status = PSA_SUCCESS;
+    psa_storage_uid_t uid;
     uint32_t count = 0, results[NUM_ITERATIONS] = {0};
     int i = 0;
 
@@ -51,12 +51,13 @@
     {
         val->print(PRINT_TEST, "[Check %d] ", i + 1);
         val->print(PRINT_TEST, &test_desc[i][0], 0);
-        for (uid = TEST_BASE_UID_VALUE; status == PSA_SST_SUCCESS; uid++)
+        for (uid = TEST_BASE_UID_VALUE; status == PSA_SUCCESS; uid++)
         {
             val->print(PRINT_INFO, "Setting 0x%x bytes for ", TEST_BUFF_SIZE);
             val->print(PRINT_INFO, "UID %d\n", uid);
-            status = SST_FUNCTION(s003_data[1].api, uid, TEST_BUFF_SIZE, write_buff, 0);
-            if (status != PSA_SST_SUCCESS)
+            status = SST_FUNCTION(s003_data[1].api, uid, TEST_BUFF_SIZE, write_buff,
+                                  PSA_STORAGE_FLAG_NONE);
+            if (status != PSA_SUCCESS)
             {
                 val->print(PRINT_INFO, "UID %d set failed due to insufficient space\n", uid);
                 break;
@@ -74,7 +75,7 @@
         {
             val->print(PRINT_INFO, "Removing UID %d\n", uid);
             status = SST_FUNCTION(s003_data[2].api, uid);
-            if (status != PSA_SST_SUCCESS)
+            if (status != PSA_SUCCESS)
                 break;
         }
         if (count)
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s003/test_s003.h b/api-tests/dev_apis/internal_trusted_storage/test_s003/test_s003.h
index ab2d6aa..dc01392 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s003/test_s003.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s003/test_s003.h
@@ -19,13 +19,13 @@
 
 #ifdef ITS_TEST
 #define VAL_STORAGE_BASE VAL_INTERNAL_TRUSTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, s003)
+#define test_entry CONCAT(test_entry_,  s003)
 #elif PS_TEST
 #define VAL_STORAGE_BASE VAL_PROTECTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, p003)
+#define test_entry CONCAT(test_entry_,  p003)
 #endif
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
 
 extern val_api_t *val;
 extern psa_api_t *psa;
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s004/test_its_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s004/test_its_data.h
index b41dc1b..e12f221 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s004/test_its_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s004/test_its_data.h
@@ -20,11 +20,10 @@
 #include "val_internal_trusted_storage.h"
 
 #define SST_FUNCTION val->its_function
-#define psa_sst_uid_t psa_its_uid_t
 
 typedef struct {
     enum its_function_code  api;
-    psa_its_status_t        status;
+    psa_status_t        status;
 } test_data;
 
 static const test_data s004_data[] = {
@@ -32,25 +31,25 @@
  0, 0 /* This is dummy for index0 */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* Create a valid storage entity */
+ VAL_ITS_SET, PSA_SUCCESS /* Create a valid storage entity */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS /* Validate the data using get API after set API failure */
+ VAL_ITS_GET, PSA_SUCCESS /* Validate the data using get API after set API failure */
 },
 {
  0, 0 /* Index not used */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* For same UID set the length as half of previous */
+ VAL_ITS_SET, PSA_SUCCESS /* For same UID set the length as half of previous */
 },
 {
- VAL_ITS_GET, PSA_ITS_ERROR_INCORRECT_SIZE /* Call get with incorrect length */
+ VAL_ITS_GET, PSA_ERROR_INVALID_ARGUMENT /* Call get with incorrect length */
 },
 {
  0, 0 /* No data should be returned */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS /* Call get API with correct length */
+ VAL_ITS_GET, PSA_SUCCESS /* Call get API with correct length */
 },
 {
  0, 0 /* No data should be returned */
@@ -59,7 +58,7 @@
  0, 0 /* Check that we should not be able to access the old data */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_SUCCESS /* Remove the valid storage entity */
+ VAL_ITS_REMOVE, PSA_SUCCESS /* Remove the valid storage entity */
 },
 };
 #endif /* _TEST_S004_ITS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s004/test_ps_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s004/test_ps_data.h
index baaf194..7773c67 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s004/test_ps_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s004/test_ps_data.h
@@ -20,11 +20,10 @@
 #include "val_protected_storage.h"
 
 #define SST_FUNCTION val->ps_function
-#define psa_sst_uid_t psa_ps_uid_t
 
 typedef struct {
     enum ps_function_code  api;
-    psa_ps_status_t        status;
+    psa_status_t        status;
 } test_data;
 
 static const test_data s004_data[] = {
@@ -32,25 +31,25 @@
  0, 0 /* This is dummy for index0 */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Create a valid storage entity */
+ VAL_PS_SET, PSA_SUCCESS /* Create a valid storage entity */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Validate the data using get API after set API failure */
+ VAL_PS_GET, PSA_SUCCESS /* Validate the data using get API after set API failure */
 },
 {
  0, 0 /* Index not used */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* For same UID set the length as half of previous */
+ VAL_PS_SET, PSA_SUCCESS /* For same UID set the length as half of previous */
 },
 {
- VAL_PS_GET, PSA_PS_ERROR_INCORRECT_SIZE /* Call get with incorrect length */
+ VAL_PS_GET, PSA_ERROR_INVALID_ARGUMENT /* Call get with incorrect length */
 },
 {
  0, 0 /* No data should be returned */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Call get API with correct length */
+ VAL_PS_GET, PSA_SUCCESS /* Call get API with correct length */
 },
 {
  0, 0 /* No data should be returned */
@@ -59,7 +58,7 @@
  0, 0 /* Check that we should not be able to access the old data */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove the valid storage entity */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the valid storage entity */
 },
 };
 #endif /* _TEST_S004_PS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s004/test_s004.c b/api-tests/dev_apis/internal_trusted_storage/test_s004/test_s004.c
index 9db24a7..60e6b9c 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s004/test_s004.c
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s004/test_s004.c
@@ -32,53 +32,58 @@
     NULL,
 };
 
-static psa_sst_uid_t uid = UID_BASE_VALUE + 5;
+static psa_storage_uid_t uid = UID_BASE_VALUE + 5;
 static uint8_t read_buff[TEST_BUFF_SIZE] = {0};
 static uint8_t write_buff[TEST_BUFF_SIZE] = {0x99, 0x01, 0x30, 0x50, 0x04, 0x23, 0xF6, 0x07, 0x08, \
                                   0x0D, 0x70, 0xA1, 0xFF, 0xFF, 0x14, 0x73, 0x46, 0x97, 0xE8, 0xDD};
 
 int32_t psa_sst_get_data_check(security_t caller)
 {
-    uint32_t status,j;
+    uint32_t status, j, p_data_length = 0;
 
     /* Set data for UID */
-    status = SST_FUNCTION(s004_data[1].api, uid, TEST_BUFF_SIZE, write_buff,0);
+    status = SST_FUNCTION(s004_data[1].api, uid, TEST_BUFF_SIZE, write_buff, PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, s004_data[1].status, TEST_CHECKPOINT_NUM(1));
 
     /* Call get function and check the data consistency */
-    status = SST_FUNCTION(s004_data[2].api, uid, 0, TEST_BUFF_SIZE, read_buff);
+    status = SST_FUNCTION(s004_data[2].api, uid, 0, TEST_BUFF_SIZE, read_buff, &p_data_length);
     TEST_ASSERT_EQUAL(status, s004_data[2].status, TEST_CHECKPOINT_NUM(2));
     TEST_ASSERT_MEMCMP(read_buff, write_buff, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(3));
+    TEST_ASSERT_EQUAL(p_data_length, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(4));
 
     /* Call the set again for same uid and set the length as half */
-    status = SST_FUNCTION(s004_data[4].api, uid, TEST_BUFF_SIZE/2, write_buff, 0);
-    TEST_ASSERT_EQUAL(status, s004_data[4].status, TEST_CHECKPOINT_NUM(4));
+    status = SST_FUNCTION(s004_data[4].api, uid, TEST_BUFF_SIZE/2, write_buff,
+                          PSA_STORAGE_FLAG_NONE);
+    TEST_ASSERT_EQUAL(status, s004_data[4].status, TEST_CHECKPOINT_NUM(5));
 
     /* Call get function with incorrect buffer length  */
     val->print(PRINT_TEST, "[Check 1] Call get API with incorrect length\n", 0);
     memset(read_buff, 0, TEST_BUFF_SIZE);
-    status = SST_FUNCTION(s004_data[5].api, uid, 0, TEST_BUFF_SIZE, read_buff);
-    TEST_ASSERT_EQUAL(status, s004_data[5].status, TEST_CHECKPOINT_NUM(5));
+    status = SST_FUNCTION(s004_data[5].api, uid, 0, TEST_BUFF_SIZE, read_buff, &p_data_length);
+    TEST_ASSERT_EQUAL(status, s004_data[5].status, TEST_CHECKPOINT_NUM(6));
     for (j = 0; j < TEST_BUFF_SIZE; j++)
     {
-        TEST_ASSERT_EQUAL(read_buff[j], 0, TEST_CHECKPOINT_NUM(6));
+        TEST_ASSERT_EQUAL(read_buff[j], 0, TEST_CHECKPOINT_NUM(7));
     }
+    /* Expect p_data_length = 0,  when psa get function is not unsuccessful as in previous case */
+    TEST_ASSERT_EQUAL(p_data_length, 0, TEST_CHECKPOINT_NUM(8));
 
     /* Call get function with CORRECT buffer length  */
-    status = SST_FUNCTION(s004_data[7].api, uid, 0, TEST_BUFF_SIZE/2, read_buff);
-    TEST_ASSERT_EQUAL(status, s004_data[7].status, TEST_CHECKPOINT_NUM(7));
-    TEST_ASSERT_MEMCMP(read_buff, write_buff, TEST_BUFF_SIZE/2, TEST_CHECKPOINT_NUM(8));
+    status = SST_FUNCTION(s004_data[7].api, uid, 0, TEST_BUFF_SIZE/2, read_buff, &p_data_length);
+    TEST_ASSERT_EQUAL(status, s004_data[7].status, TEST_CHECKPOINT_NUM(9));
+    TEST_ASSERT_MEMCMP(read_buff, write_buff, TEST_BUFF_SIZE/2, TEST_CHECKPOINT_NUM(10));
+    TEST_ASSERT_EQUAL(p_data_length, TEST_BUFF_SIZE/2, TEST_CHECKPOINT_NUM(11));
 
     /* Check we should not be able to access old set data */
     val->print(PRINT_TEST, "[Check 2] Old buffer invalid after length change\n", 0);
     for (j = TEST_BUFF_SIZE/2; j < TEST_BUFF_SIZE; j++)
     {
-        TEST_ASSERT_EQUAL(read_buff[j], 0, TEST_CHECKPOINT_NUM(9));
+        TEST_ASSERT_EQUAL(read_buff[j], 0, TEST_CHECKPOINT_NUM(12));
     }
 
     /* Remove the UID */
     status = SST_FUNCTION(s004_data[10].api, uid);
-    TEST_ASSERT_EQUAL(status, s004_data[10].status, TEST_CHECKPOINT_NUM(10));
+    TEST_ASSERT_EQUAL(status, s004_data[10].status, TEST_CHECKPOINT_NUM(13));
 
     return VAL_STATUS_SUCCESS;
 }
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s004/test_s004.h b/api-tests/dev_apis/internal_trusted_storage/test_s004/test_s004.h
index f556f85..b518ec2 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s004/test_s004.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s004/test_s004.h
@@ -19,13 +19,13 @@
 
 #ifdef ITS_TEST
 #define VAL_STORAGE_BASE VAL_INTERNAL_TRUSTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, s004)
+#define test_entry CONCAT(test_entry_,  s004)
 #elif PS_TEST
 #define VAL_STORAGE_BASE VAL_PROTECTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, p004)
+#define test_entry CONCAT(test_entry_,  p004)
 #endif
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
 
 extern val_api_t *val;
 extern psa_api_t *psa;
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s005/test_its_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s005/test_its_data.h
index 653f7cc..ed61509 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s005/test_its_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s005/test_its_data.h
@@ -20,30 +20,28 @@
 #include "val_internal_trusted_storage.h"
 
 #define SST_FUNCTION           val->its_function
-#define psa_sst_uid_t          psa_its_uid_t
-#define psa_sst_create_flags_t psa_its_create_flags_t
 
 typedef struct {
     enum its_function_code  api;
-    psa_its_status_t        status;
+    psa_status_t        status;
 } test_data;
 
-static struct psa_its_info_t info;
+static struct psa_storage_info_t info;
 static const test_data s005_data[] = {
 {
  0, 0  /* This is dummy for index0 */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS  /* Create a valid storage entity */
+ VAL_ITS_SET, PSA_SUCCESS  /* Create a valid storage entity */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS  /* Validate the data using get API */
+ VAL_ITS_GET, PSA_SUCCESS  /* Validate the data using get API */
 },
 {
  0, 0 /* Index not used */
 },
 {
- VAL_ITS_GET_INFO, PSA_ITS_SUCCESS  /* Validate the data attributes get_info API */
+ VAL_ITS_GET_INFO, PSA_SUCCESS  /* Validate the data attributes get_info API */
 },
 {
  0, 0 /* Index not used */
@@ -52,7 +50,7 @@
  0, 0 /* Index not used */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_SUCCESS /* Remove the valid storage entity */
+ VAL_ITS_REMOVE, PSA_SUCCESS /* Remove the valid storage entity */
 },
 };
 #endif /* _TEST_S005_ITS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s005/test_ps_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s005/test_ps_data.h
index a961269..52e35d0 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s005/test_ps_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s005/test_ps_data.h
@@ -20,30 +20,28 @@
 #include "val_protected_storage.h"
 
 #define SST_FUNCTION           val->ps_function
-#define psa_sst_uid_t          psa_ps_uid_t
-#define psa_sst_create_flags_t psa_ps_create_flags_t
 
 typedef struct {
     enum ps_function_code  api;
-    psa_ps_status_t        status;
+    psa_status_t        status;
 } test_data;
 
-static struct psa_ps_info_t info;
+static struct psa_storage_info_t info;
 static const test_data s005_data[] = {
 {
  0, 0 /* This is dummy for index0 */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Create a valid storage entity */
+ VAL_PS_SET, PSA_SUCCESS /* Create a valid storage entity */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Validate the data using get API */
+ VAL_PS_GET, PSA_SUCCESS /* Validate the data using get API */
 },
 {
  0, 0 /* Index not used */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_SUCCESS /* Validate the data attributes get_info API */
+ VAL_PS_GET_INFO, PSA_SUCCESS /* Validate the data attributes get_info API */
 },
 {
  0, 0 /* Index not used */
@@ -52,7 +50,7 @@
  0, 0 /* Index not used */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove the valid storage entity */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the valid storage entity */
 },
 };
 #endif /* _TEST_S005_PS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s005/test_s005.c b/api-tests/dev_apis/internal_trusted_storage/test_s005/test_s005.c
index ac7f40b..ae9ea74 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s005/test_s005.c
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s005/test_s005.c
@@ -37,41 +37,42 @@
   0x00, 0x01, 0x02, 0x03, 0x04, 0x23, 0xF6, 0x07, 0x08, 0x0D, 0x0A, 0x1B, 0x0C, 0x5D, 0x0E,\
   0x70, 0xA1, 0xFF, 0xFF, 0x14, 0x73, 0x46, 0x97, 0xE8, 0xDD, 0xCA, 0x0B, 0x3C, 0x0D, 0x2E};
 
-static int32_t psa_sst_apis_check(psa_sst_uid_t uid, uint32_t data_len,
-                                  uint8_t *data_buff, psa_sst_create_flags_t create_flag)
+static int32_t psa_sst_apis_check(psa_storage_uid_t uid, uint32_t data_len,
+                                  uint8_t *data_buff, psa_storage_create_flags_t create_flag)
 {
-    uint32_t status;
+    uint32_t status, p_data_length = 0;
 
     /* Set the UID with the data_len and data_buff */
     status = SST_FUNCTION(s005_data[1].api, uid, data_len, data_buff, create_flag);
     TEST_ASSERT_EQUAL(status, s005_data[1].status, TEST_CHECKPOINT_NUM(1));
 
     /* Call the get function to get the data buffer and match the buffer */
-    status = SST_FUNCTION(s005_data[2].api, uid, 0, data_len, read_buff);
+    status = SST_FUNCTION(s005_data[2].api, uid, 0, data_len, read_buff, &p_data_length);
     TEST_ASSERT_EQUAL(status, s005_data[2].status, TEST_CHECKPOINT_NUM(2));
     TEST_ASSERT_MEMCMP(read_buff, data_buff, data_len, TEST_CHECKPOINT_NUM(3));
+    TEST_ASSERT_EQUAL(p_data_length, data_len, TEST_CHECKPOINT_NUM(4));
 
     /* Call the get_info function and match the attributes */
     status = SST_FUNCTION(s005_data[4].api, uid, &info);
-    TEST_ASSERT_EQUAL(status, s005_data[4].status, TEST_CHECKPOINT_NUM(4));
-    TEST_ASSERT_EQUAL(info.size, data_len, TEST_CHECKPOINT_NUM(5));
-    TEST_ASSERT_EQUAL(info.flags, create_flag, TEST_CHECKPOINT_NUM(6));
+    TEST_ASSERT_EQUAL(status, s005_data[4].status, TEST_CHECKPOINT_NUM(5));
+    TEST_ASSERT_EQUAL(info.size, data_len, TEST_CHECKPOINT_NUM(6));
+    TEST_ASSERT_EQUAL(info.flags, create_flag, TEST_CHECKPOINT_NUM(7));
 
     /* Remove the UID  */
     status = SST_FUNCTION(s005_data[7].api, uid);
-    TEST_ASSERT_EQUAL(status, s005_data[7].status, TEST_CHECKPOINT_NUM(7));
+    TEST_ASSERT_EQUAL(status, s005_data[7].status, TEST_CHECKPOINT_NUM(8));
 
     return VAL_STATUS_SUCCESS;
 }
 
 int32_t psa_sst_apis_check_success_case(security_t caller)
 {
-   psa_sst_uid_t uid = UID_BASE_VALUE + 4;
+   psa_storage_uid_t uid = UID_BASE_VALUE + 4;
    uint32_t data_len = 0, status = VAL_STATUS_SUCCESS;
 
     /* Calling set function with data_len 1 and valid data pointer */
     val->print(PRINT_TEST, "[Check 1] Set UID with data length zero and call storage APIs\n", 0);
-    if (psa_sst_apis_check(uid, data_len, write_buff, 0))
+    if (psa_sst_apis_check(uid, data_len, write_buff, PSA_STORAGE_FLAG_NONE))
     {
         val->print(PRINT_ERROR, "Data Len = %d\n", data_len);
         return VAL_STATUS_ERROR;
@@ -79,7 +80,7 @@
 
     data_len = TEST_BUFF_SIZE/2;
     val->print(PRINT_TEST, "[Check 2] Resetting the length check\n", 0);
-    if (psa_sst_apis_check(uid, data_len, write_buff, 0))
+    if (psa_sst_apis_check(uid, data_len, write_buff, PSA_STORAGE_FLAG_NONE))
     {
        val->print(PRINT_ERROR, "Data Len = %d\n", data_len);
        return VAL_STATUS_ERROR;
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s005/test_s005.h b/api-tests/dev_apis/internal_trusted_storage/test_s005/test_s005.h
index 84cbf43..9b472bf 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s005/test_s005.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s005/test_s005.h
@@ -19,13 +19,13 @@
 
 #ifdef ITS_TEST
 #define VAL_STORAGE_BASE VAL_INTERNAL_TRUSTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, s005)
+#define test_entry CONCAT(test_entry_,  s005)
 #elif PS_TEST
 #define VAL_STORAGE_BASE VAL_PROTECTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, p005)
+#define test_entry CONCAT(test_entry_,  p005)
 #endif
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
 
 extern val_api_t *val;
 extern psa_api_t *psa;
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s006/test_its_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s006/test_its_data.h
index 4426f2c..e52525f 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s006/test_its_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s006/test_its_data.h
@@ -20,34 +20,31 @@
 #include "val_internal_trusted_storage.h"
 
 #define SST_FUNCTION            val->its_function
-#define PSA_SST_FLAG_WRITE_ONCE PSA_ITS_FLAG_WRITE_ONCE
-#define psa_sst_uid_t           psa_its_uid_t
-#define psa_sst_create_flags_t  psa_its_create_flags_t
 
 typedef struct {
     enum its_function_code  api;
-    psa_its_status_t        status;
+    psa_status_t        status;
 } test_data;
 
-static struct psa_its_info_t info;
+static struct psa_storage_info_t info;
 static const test_data s006_data[] = {
 {
- 0, PSA_ITS_ERROR_FLAGS_NOT_SUPPORTED /* This is dummy for index0 */
+ 0, PSA_ERROR_NOT_SUPPORTED /* This is dummy for index0 */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* Create a valid storage entity with different flag values */
+ VAL_ITS_SET, PSA_SUCCESS /* Create a valid storage entity with different flag values */
 },
 {
- VAL_ITS_GET_INFO, PSA_ITS_SUCCESS /* Validate the flag value get_info API */
+ VAL_ITS_GET_INFO, PSA_SUCCESS /* Validate the flag value get_info API */
 },
 {
  0, 0 /* Index not used */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_SUCCESS /* Remove the storage entity */
+ VAL_ITS_REMOVE, PSA_SUCCESS /* Remove the storage entity */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_ERROR_UID_NOT_FOUND /* Storage entity remove fails */
+ VAL_ITS_REMOVE, PSA_ERROR_DOES_NOT_EXIST /* Storage entity remove fails */
 },
 };
 #endif /* _TEST_S006_ITS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s006/test_ps_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s006/test_ps_data.h
index 86e1e30..f40f34b 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s006/test_ps_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s006/test_ps_data.h
@@ -20,34 +20,31 @@
 #include "val_protected_storage.h"
 
 #define SST_FUNCTION            val->ps_function
-#define PSA_SST_FLAG_WRITE_ONCE PSA_PS_FLAG_WRITE_ONCE
-#define psa_sst_uid_t           psa_ps_uid_t
-#define psa_sst_create_flags_t  psa_ps_create_flags_t
 
 typedef struct {
     enum ps_function_code  api;
-    psa_ps_status_t        status;
+    psa_status_t        status;
 } test_data;
 
-static struct psa_ps_info_t info;
+static struct psa_storage_info_t info;
 static const test_data s006_data[] = {
 {
- 0, PSA_PS_ERROR_FLAGS_NOT_SUPPORTED /* This is dummy for index0 */
+ 0, PSA_ERROR_NOT_SUPPORTED /* This is dummy for index0 */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Create a valid storage entity with different flag values */
+ VAL_PS_SET, PSA_SUCCESS /* Create a valid storage entity with different flag values */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_SUCCESS /* Validate the flag value get_info API */
+ VAL_PS_GET_INFO, PSA_SUCCESS /* Validate the flag value get_info API */
 },
 {
  0, 0 /* Index not used */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove the storage entity */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the storage entity */
 },
 {
- VAL_PS_REMOVE, PSA_PS_ERROR_UID_NOT_FOUND /* Remove the storage entity */
+ VAL_PS_REMOVE, PSA_ERROR_DOES_NOT_EXIST /* Remove the storage entity */
 }
 };
 #endif /* _TEST_S006_PS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s006/test_s006.c b/api-tests/dev_apis/internal_trusted_storage/test_s006/test_s006.c
index d1d81bc..03850f7 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s006/test_s006.c
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s006/test_s006.c
@@ -36,8 +36,8 @@
   0x00, 0x01, 0x02, 0x03, 0x04, 0x23, 0xF6, 0x07, 0x08, 0x0D, 0x0A, 0x1B, 0x0C, 0x5D, 0x0E,\
   0x70, 0xA1, 0xFF, 0xFF, 0x14, 0x73, 0x46, 0x97, 0xE8, 0xDD, 0xCA, 0x0B, 0x3C, 0x0D, 0x2E};
 
-static int32_t psa_sst_remove_api(psa_sst_uid_t uid, uint32_t data_len,
-                                   uint8_t *data_buff, psa_sst_create_flags_t create_flag)
+static int32_t psa_sst_remove_api(psa_storage_uid_t uid, uint32_t data_len,
+                                   uint8_t *data_buff, psa_storage_create_flags_t create_flag)
 {
     uint32_t status;
 
@@ -55,9 +55,9 @@
 
 int32_t psa_sst_flags_not_supported(security_t caller)
 {
-   psa_sst_create_flags_t flag = 0x80000000;
+   psa_storage_create_flags_t flag = 0x80000000;
    uint32_t status = VAL_STATUS_SUCCESS;
-   psa_sst_uid_t uid = UID_BASE_VALUE + 5;
+   psa_storage_uid_t uid = UID_BASE_VALUE + 5;
    int32_t test_status;
 
    /* Calling set function with different create flag value */
@@ -67,12 +67,12 @@
    {
        /* Create storage with flag value */
        status = SST_FUNCTION(s006_data[1].api, uid, TEST_BUFF_SIZE, write_buff,
-                                                         (flag & (~PSA_SST_FLAG_WRITE_ONCE)));
+                                                         (flag & (~PSA_STORAGE_FLAG_WRITE_ONCE)));
 
        if (status == s006_data[1].status)
        {
           test_status = psa_sst_remove_api(uid, TEST_BUFF_SIZE, write_buff,
-                                          (flag & (~PSA_SST_FLAG_WRITE_ONCE)));
+                                          (flag & (~PSA_STORAGE_FLAG_WRITE_ONCE)));
           if (test_status != VAL_STATUS_SUCCESS)
              return test_status;
        }
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s006/test_s006.h b/api-tests/dev_apis/internal_trusted_storage/test_s006/test_s006.h
index 43adf74..8f55aff 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s006/test_s006.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s006/test_s006.h
@@ -19,13 +19,13 @@
 
 #ifdef ITS_TEST
 #define VAL_STORAGE_BASE VAL_INTERNAL_TRUSTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, s006)
+#define test_entry CONCAT(test_entry_,  s006)
 #elif PS_TEST
 #define VAL_STORAGE_BASE VAL_PROTECTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, p006)
+#define test_entry CONCAT(test_entry_,  p006)
 #endif
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
 
 extern val_api_t *val;
 extern psa_api_t *psa;
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s007/test_its_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s007/test_its_data.h
index 550dffb..82f4cd0 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s007/test_its_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s007/test_its_data.h
@@ -20,11 +20,10 @@
 #include "val_internal_trusted_storage.h"
 
 #define SST_FUNCTION val->its_function
-#define psa_sst_uid_t psa_its_uid_t
 
 typedef struct {
     enum its_function_code  api;
-    psa_its_status_t        status;
+    psa_status_t        status;
 } test_data;
 
 static const test_data s007_data[] = {
@@ -32,34 +31,34 @@
  0, 0 /* This is dummy for index0 */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* Create a valid storage entity */
+ VAL_ITS_SET, PSA_SUCCESS /* Create a valid storage entity */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* Increase the length of storage */
+ VAL_ITS_SET, PSA_SUCCESS /* Increase the length of storage */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS /* Try to access old length */
+ VAL_ITS_GET, PSA_SUCCESS /* Try to access old length */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS /* Try to access valid length less than set length */
+ VAL_ITS_GET, PSA_SUCCESS /* Try to access valid length less than set length */
 },
 {
  0, 0 /* This is dummy for index5 */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* Decrease the length of storage */
+ VAL_ITS_SET, PSA_SUCCESS /* Decrease the length of storage */
 },
 {
- VAL_ITS_GET, PSA_ITS_ERROR_INCORRECT_SIZE /* Try to access old length */
+ VAL_ITS_GET, PSA_ERROR_INVALID_ARGUMENT /* Try to access old length */
 },
 {
- VAL_ITS_GET, PSA_ITS_ERROR_INCORRECT_SIZE /* Try to access old length */
+ VAL_ITS_GET, PSA_ERROR_INVALID_ARGUMENT /* Try to access old length */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS /* Try to access data with correct length */
+ VAL_ITS_GET, PSA_SUCCESS /* Try to access data with correct length */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_SUCCESS /* Remove the storage entity */
+ VAL_ITS_REMOVE, PSA_SUCCESS /* Remove the storage entity */
 },
 };
 #endif /* _TEST_S007_ITS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s007/test_ps_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s007/test_ps_data.h
index fa032c1..2b99665 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s007/test_ps_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s007/test_ps_data.h
@@ -20,11 +20,10 @@
 #include "val_protected_storage.h"
 
 #define SST_FUNCTION val->ps_function
-#define psa_sst_uid_t psa_ps_uid_t
 
 typedef struct {
     enum ps_function_code  api;
-    psa_ps_status_t        status;
+    psa_status_t        status;
 } test_data;
 
 static const test_data s007_data[] = {
@@ -32,34 +31,34 @@
  0, 0 /* This is dummy for index0 */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Create a valid storage entity */
+ VAL_PS_SET, PSA_SUCCESS /* Create a valid storage entity */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Increase the length of storage */
+ VAL_PS_SET, PSA_SUCCESS /* Increase the length of storage */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Try to access old length */
+ VAL_PS_GET, PSA_SUCCESS /* Try to access old length */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Try to access valid length less than set length */
+ VAL_PS_GET, PSA_SUCCESS /* Try to access valid length less than set length */
 },
 {
  0, 0 /* This is dummy for index5 */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Decrease the length of storage */
+ VAL_PS_SET, PSA_SUCCESS /* Decrease the length of storage */
 },
 {
- VAL_PS_GET, PSA_PS_ERROR_INCORRECT_SIZE /* Try to access old length */
+ VAL_PS_GET, PSA_ERROR_INVALID_ARGUMENT /* Try to access old length */
 },
 {
- VAL_PS_GET, PSA_PS_ERROR_INCORRECT_SIZE /* Try to access old length */
+ VAL_PS_GET, PSA_ERROR_INVALID_ARGUMENT /* Try to access old length */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Try to access data with correct length */
+ VAL_PS_GET, PSA_SUCCESS /* Try to access data with correct length */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove the storage entity */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the storage entity */
 },
 };
 #endif /* _TEST_S007_PS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s007/test_s007.c b/api-tests/dev_apis/internal_trusted_storage/test_s007/test_s007.c
index 3e1a880..6bcc2a3 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s007/test_s007.c
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s007/test_s007.c
@@ -39,51 +39,59 @@
 
 int32_t psa_sst_get_incorrect_size(security_t caller)
 {
-    psa_sst_uid_t uid = UID_BASE_VALUE + 5;
-    uint32_t status = VAL_STATUS_SUCCESS;
+    psa_storage_uid_t uid = UID_BASE_VALUE + 5;
+    uint32_t status = VAL_STATUS_SUCCESS, p_data_length = 0;
 
     /* Set the UID with the data_len and data_buff */
     val->print(PRINT_TEST, "Create a valid Storage\n", 0);
-    status = SST_FUNCTION(s007_data[1].api, uid, TEST_BUFF_SIZE/2, write_buff, 0);
+    status = SST_FUNCTION(s007_data[1].api, uid, TEST_BUFF_SIZE/2, write_buff,
+                          PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, s007_data[1].status, TEST_CHECKPOINT_NUM(1));
 
     /* Call set for same UID and increase the length */
     val->print(PRINT_TEST, "Increase the length of storage\n", 0);
-    status = SST_FUNCTION(s007_data[2].api, uid, TEST_BUFF_SIZE, write_buff, 0);
+    status = SST_FUNCTION(s007_data[2].api, uid, TEST_BUFF_SIZE, write_buff,
+                          PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, s007_data[2].status, TEST_CHECKPOINT_NUM(2));
 
     /* Access data using get API and old length */
     val->print(PRINT_TEST, "[Check 1] Call get API with old length\n", 0);
-    status = SST_FUNCTION(s007_data[3].api, uid, 0, TEST_BUFF_SIZE/2, read_buff);
+    status = SST_FUNCTION(s007_data[3].api, uid, 0, TEST_BUFF_SIZE/2, read_buff, &p_data_length);
     TEST_ASSERT_EQUAL(status, s007_data[3].status, TEST_CHECKPOINT_NUM(3));
+    TEST_ASSERT_EQUAL(p_data_length, TEST_BUFF_SIZE/2, TEST_CHECKPOINT_NUM(4));
 
     /* Access data using get API and valid length */
-    status = SST_FUNCTION(s007_data[4].api, uid, 0, TEST_BUFF_SIZE/4, read_buff);
-    TEST_ASSERT_EQUAL(status, s007_data[4].status, TEST_CHECKPOINT_NUM(4));
-    TEST_ASSERT_MEMCMP(read_buff, write_buff, TEST_BUFF_SIZE/4, TEST_CHECKPOINT_NUM(5));
+    status = SST_FUNCTION(s007_data[4].api, uid, 0, TEST_BUFF_SIZE/4, read_buff, &p_data_length);
+    TEST_ASSERT_EQUAL(status, s007_data[4].status, TEST_CHECKPOINT_NUM(5));
+    TEST_ASSERT_MEMCMP(read_buff, write_buff, TEST_BUFF_SIZE/4, TEST_CHECKPOINT_NUM(6));
+    TEST_ASSERT_EQUAL(p_data_length, TEST_BUFF_SIZE/4, TEST_CHECKPOINT_NUM(7));
 
     /* Decrease the length again */
     val->print(PRINT_TEST, "Decrease the length of storage\n", 0);
-    status = SST_FUNCTION(s007_data[6].api, uid, TEST_BUFF_SIZE/4, write_buff, 0);
-    TEST_ASSERT_EQUAL(status, s007_data[6].status, TEST_CHECKPOINT_NUM(6));
+    status = SST_FUNCTION(s007_data[6].api, uid, TEST_BUFF_SIZE/4, write_buff,
+                          PSA_STORAGE_FLAG_NONE);
+    TEST_ASSERT_EQUAL(status, s007_data[6].status, TEST_CHECKPOINT_NUM(8));
 
     /* Access data using get API and old length */
-    status = SST_FUNCTION(s007_data[7].api, uid, 0, TEST_BUFF_SIZE/2, read_buff);
-    TEST_ASSERT_EQUAL(status, s007_data[7].status, TEST_CHECKPOINT_NUM(7));
+    status = SST_FUNCTION(s007_data[7].api, uid, 0, TEST_BUFF_SIZE/2, read_buff, &p_data_length);
+    TEST_ASSERT_EQUAL(status, s007_data[7].status, TEST_CHECKPOINT_NUM(9));
+    TEST_ASSERT_EQUAL(p_data_length, 0, TEST_CHECKPOINT_NUM(10));
 
     /* Access data using get API and old length */
     val->print(PRINT_TEST, "[Check 2] Call get API with old length\n", 0);
-    status = SST_FUNCTION(s007_data[8].api, uid, 0, TEST_BUFF_SIZE, read_buff);
-    TEST_ASSERT_EQUAL(status, s007_data[8].status, TEST_CHECKPOINT_NUM(8));
+    status = SST_FUNCTION(s007_data[8].api, uid, 0, TEST_BUFF_SIZE, read_buff, &p_data_length);
+    TEST_ASSERT_EQUAL(status, s007_data[8].status, TEST_CHECKPOINT_NUM(11));
+    TEST_ASSERT_EQUAL(p_data_length, 0, TEST_CHECKPOINT_NUM(12));
 
     /* Access data using correct length */
     val->print(PRINT_TEST, "[Check 3] Call get API with valid length\n", 0);
-    status = SST_FUNCTION(s007_data[9].api, uid, 0, TEST_BUFF_SIZE/4, read_buff);
-    TEST_ASSERT_EQUAL(status, s007_data[9].status, TEST_CHECKPOINT_NUM(9));
+    status = SST_FUNCTION(s007_data[9].api, uid, 0, TEST_BUFF_SIZE/4, read_buff, &p_data_length);
+    TEST_ASSERT_EQUAL(status, s007_data[9].status, TEST_CHECKPOINT_NUM(13));
+    TEST_ASSERT_EQUAL(p_data_length, TEST_BUFF_SIZE/4, TEST_CHECKPOINT_NUM(14));
 
     /* Remove the UID  */
     status = SST_FUNCTION(s007_data[10].api, uid);
-    TEST_ASSERT_EQUAL(status, s007_data[10].status, TEST_CHECKPOINT_NUM(10));
+    TEST_ASSERT_EQUAL(status, s007_data[10].status, TEST_CHECKPOINT_NUM(15));
 
     return status;
 }
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s007/test_s007.h b/api-tests/dev_apis/internal_trusted_storage/test_s007/test_s007.h
index 5a71e4b..3ecc429 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s007/test_s007.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s007/test_s007.h
@@ -19,13 +19,13 @@
 
 #ifdef ITS_TEST
 #define VAL_STORAGE_BASE VAL_INTERNAL_TRUSTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, s007)
+#define test_entry CONCAT(test_entry_,  s007)
 #elif PS_TEST
 #define VAL_STORAGE_BASE VAL_PROTECTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, p007)
+#define test_entry CONCAT(test_entry_,  p007)
 #endif
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
 
 extern val_api_t *val;
 extern psa_api_t *psa;
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s008/test_its_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s008/test_its_data.h
index 89093d4..cff9e24 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s008/test_its_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s008/test_its_data.h
@@ -20,11 +20,10 @@
 #include "val_internal_trusted_storage.h"
 
 #define SST_FUNCTION val->its_function
-#define psa_sst_uid_t psa_its_uid_t
 
 typedef struct {
     enum its_function_code  api;
-    psa_its_status_t        status;
+    psa_status_t        status;
 } test_data;
 
 static const test_data s008_data[] = {
@@ -32,43 +31,43 @@
  0, 0 /* This is dummy for index0 */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* Create a valid storage entity with zero flag value */
+ VAL_ITS_SET, PSA_SUCCESS /* Create a valid storage entity with zero flag value */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS /* Call get API with offset + data_len = total_size */
+ VAL_ITS_GET, PSA_SUCCESS /* Call get API with offset + data_len = total_size */
 },
 {
  0, 0 /* This is dummy for index3 */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS /* Call get API with offset + data_len < total_size */
+ VAL_ITS_GET, PSA_SUCCESS /* Call get API with offset + data_len < total_size */
 },
 {
  0, 0 /* This is dummy for index5 */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS /* Call get API with offset = total data_size + 1 */
+ VAL_ITS_GET, PSA_SUCCESS /* Call get API with offset = total data_size + 1 */
 },
 {
  0, 0 /* This is dummy for index7 */
 },
 {
- VAL_ITS_GET, PSA_ITS_ERROR_INCORRECT_SIZE /* get API with offset + data_len > total data_size */
+ VAL_ITS_GET, PSA_ERROR_INVALID_ARGUMENT /* get API with offset + data_len > total data_size */
 },
 {
  0, 0 /* This is dummy for index9 */
 },
 {
- VAL_ITS_GET, PSA_ITS_ERROR_INCORRECT_SIZE /* Call get API with invalid data len and offset zero */
+ VAL_ITS_GET, PSA_ERROR_INVALID_ARGUMENT /* Call get API with invalid data len and offset zero */
 },
 {
  0, 0 /* This is dummy for index11 */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS /* Call get API with offset = MAX_UINT32 */
+ VAL_ITS_GET, PSA_ERROR_INVALID_ARGUMENT /* Call get API with offset = MAX_UINT32 */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_SUCCESS /* Remove the storage entity */
+ VAL_ITS_REMOVE, PSA_SUCCESS /* Remove the storage entity */
 },
 };
 #endif /* _TEST_S008_ITS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s008/test_ps_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s008/test_ps_data.h
index 2b15d35..d66e2a2 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s008/test_ps_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s008/test_ps_data.h
@@ -20,11 +20,10 @@
 #include "val_protected_storage.h"
 
 #define SST_FUNCTION val->ps_function
-#define psa_sst_uid_t psa_ps_uid_t
 
 typedef struct {
     enum ps_function_code  api;
-    psa_ps_status_t        status;
+    psa_status_t        status;
 } test_data;
 
 static const test_data s008_data[] = {
@@ -32,43 +31,43 @@
  0, 0 /* This is dummy for index0 */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Create a valid storage entity with zero flag value */
+ VAL_PS_SET, PSA_SUCCESS /* Create a valid storage entity with zero flag value */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Call get API with offset + data_len = total_size */
+ VAL_PS_GET, PSA_SUCCESS /* Call get API with offset + data_len = total_size */
 },
 {
  0, 0 /* This is dummy for index3 */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Call get API with offset + data_len < total_size */
+ VAL_PS_GET, PSA_SUCCESS /* Call get API with offset + data_len < total_size */
 },
 {
  0, 0 /* This is dummy for index5 */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS/* Call get API with offset = total data_size + 1 */
+ VAL_PS_GET, PSA_SUCCESS/* Call get API with offset = total data_size + 1 */
 },
 {
  0, 0 /* This is dummy for index7 */
 },
 {
- VAL_PS_GET, PSA_PS_ERROR_INCORRECT_SIZE /* Call get API with offset + data_len > total data_size */
+ VAL_PS_GET, PSA_ERROR_INVALID_ARGUMENT /* Call get API with offset + data_len > total data_size */
 },
 {
  0, 0 /* This is dummy for index9 */
 },
 {
- VAL_PS_GET, PSA_PS_ERROR_INCORRECT_SIZE /* Call get API with invalid data len and offset zero */
+ VAL_PS_GET, PSA_ERROR_INVALID_ARGUMENT /* Call get API with invalid data len and offset zero */
 },
 {
  0, 0 /* This is dummy for index11 */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Call get API with offset = MAX_UINT32 */
+ VAL_PS_GET, PSA_SUCCESS /* Call get API with offset = MAX_UINT32 */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove the storage entity */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the storage entity */
 },
 };
 #endif /* _TEST_S008_PS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s008/test_s008.c b/api-tests/dev_apis/internal_trusted_storage/test_s008/test_s008.c
index 8374f36..df44705 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s008/test_s008.c
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s008/test_s008.c
@@ -34,48 +34,52 @@
     NULL,
 };
 
-static psa_sst_uid_t uid = UID_BASE_VALUE + 5;
+static psa_storage_uid_t uid = UID_BASE_VALUE + 5;
 static uint8_t read_buff[TEST_BUFF_SIZE];
 static uint8_t write_buff[TEST_BUFF_SIZE] = {0x99, 0x01, 0x02, 0x03, 0x04, 0x23, 0xF6, 0x07, 0x08, \
                                   0x0D, 0x70, 0xA1, 0xFF, 0xFF, 0x14, 0x73, 0x46, 0x97, 0xE8, 0xDD};
 
 int32_t psa_sst_invalid_offset_failure(security_t caller)
 {
-    uint32_t status, j;
+    uint32_t status, j, p_data_length = 0;
 
-    /* Case where offset = data_size +1 , data_len 0. Also check nothing is returned in read buff*/
+    /* Case where offset = data_size +1 , data_len 0. Also check nothing is returned in read buff */
     val->print(PRINT_TEST, "[Check 2] Try to access data with varying invalid offset\n", 0);
     memset(read_buff, 0, TEST_BUFF_SIZE);
-    status = SST_FUNCTION(s008_data[6].api, uid, TEST_BUFF_SIZE+1, 0, read_buff);
-    TEST_ASSERT_NOT_EQUAL(status, s008_data[6].status, TEST_CHECKPOINT_NUM(6));
+    status = SST_FUNCTION(s008_data[6].api, uid, TEST_BUFF_SIZE+1, 0, read_buff, &p_data_length);
+    TEST_ASSERT_NOT_EQUAL(status, s008_data[6].status, TEST_CHECKPOINT_NUM(8));
+    TEST_ASSERT_EQUAL(p_data_length, 0, TEST_CHECKPOINT_NUM(9));
     for (j = 0; j < TEST_BUFF_SIZE; j++)
     {
-        TEST_ASSERT_EQUAL(read_buff[j], 0x00, TEST_CHECKPOINT_NUM(7));
+        TEST_ASSERT_EQUAL(read_buff[j], 0x00, TEST_CHECKPOINT_NUM(10));
     }
 
     /* Case where offset = data_size  , data_len= 1  Also check nothing is returned in read buff*/
-    status = SST_FUNCTION(s008_data[8].api, uid, TEST_BUFF_SIZE, 1, read_buff);
-    TEST_ASSERT_EQUAL(status, s008_data[8].status, TEST_CHECKPOINT_NUM(8));
+    status = SST_FUNCTION(s008_data[8].api, uid, TEST_BUFF_SIZE, 1, read_buff, &p_data_length);
+    TEST_ASSERT_EQUAL(status, s008_data[8].status, TEST_CHECKPOINT_NUM(11));
+    TEST_ASSERT_EQUAL(p_data_length, 0, TEST_CHECKPOINT_NUM(12));
     for (j = 0; j < TEST_BUFF_SIZE; j++)
     {
-        TEST_ASSERT_EQUAL(read_buff[j], 0x00, TEST_CHECKPOINT_NUM(9));
+        TEST_ASSERT_EQUAL(read_buff[j], 0x00, TEST_CHECKPOINT_NUM(13));
     }
 
     /* Case where offset = 0  , data_len > data_size  Also check nothing is returned in read buff*/
-    status = SST_FUNCTION(s008_data[10].api, uid, 0, TEST_BUFF_SIZE+1, read_buff);
-    TEST_ASSERT_EQUAL(status, s008_data[10].status, TEST_CHECKPOINT_NUM(10));
+    status = SST_FUNCTION(s008_data[10].api, uid, 0, TEST_BUFF_SIZE+1, read_buff, &p_data_length);
+    TEST_ASSERT_EQUAL(status, s008_data[10].status, TEST_CHECKPOINT_NUM(14));
+    TEST_ASSERT_EQUAL(p_data_length, 0, TEST_CHECKPOINT_NUM(15));
     for (j = 0; j < TEST_BUFF_SIZE; j++)
     {
-        TEST_ASSERT_EQUAL(read_buff[j], 0x00, TEST_CHECKPOINT_NUM(11));
+        TEST_ASSERT_EQUAL(read_buff[j], 0x00, TEST_CHECKPOINT_NUM(16));
     }
 
     /* Try to access data with offset as MAX_UINT32 and length less than buffer size */
-    status = SST_FUNCTION(s008_data[12].api, uid, TEST_MAX_UINT32, TEST_BUFF_SIZE/2, read_buff);
-    TEST_ASSERT_NOT_EQUAL(status, s008_data[12].status, TEST_CHECKPOINT_NUM(12));
+    status = SST_FUNCTION(s008_data[12].api, uid, TEST_MAX_UINT32, TEST_BUFF_SIZE/2, read_buff,
+                          &p_data_length);
+    TEST_ASSERT_NOT_EQUAL(status, s008_data[12].status, TEST_CHECKPOINT_NUM(17));
 
     /* Remove the UID */
     status = SST_FUNCTION(s008_data[13].api, uid);
-    TEST_ASSERT_EQUAL(status, s008_data[13].status, TEST_CHECKPOINT_NUM(13));
+    TEST_ASSERT_EQUAL(status, s008_data[13].status, TEST_CHECKPOINT_NUM(18));
 
     return VAL_STATUS_SUCCESS;
 }
@@ -83,9 +87,10 @@
 int32_t psa_sst_valid_offset_success(security_t caller)
 {
     uint32_t status, data_len, offset = TEST_BUFF_SIZE;
+    uint32_t p_data_length = 0;
 
     /* Set data for UID */
-    status = SST_FUNCTION(s008_data[1].api, uid, TEST_BUFF_SIZE, write_buff, 0);
+    status = SST_FUNCTION(s008_data[1].api, uid, TEST_BUFF_SIZE, write_buff, PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, s008_data[1].status, TEST_CHECKPOINT_NUM(1));
 
     /* Case where offset + datalen =  data_size */
@@ -94,9 +99,10 @@
     {
          data_len = TEST_BUFF_SIZE - offset;
          memset(read_buff, 0, TEST_BUFF_SIZE);
-         status = SST_FUNCTION(s008_data[2].api, uid, offset, data_len, read_buff);
+         status = SST_FUNCTION(s008_data[2].api, uid, offset, data_len, read_buff, &p_data_length);
          TEST_ASSERT_EQUAL(status, s008_data[2].status, TEST_CHECKPOINT_NUM(2));
          TEST_ASSERT_MEMCMP(read_buff, write_buff + offset, data_len, TEST_CHECKPOINT_NUM(3));
+         TEST_ASSERT_EQUAL(p_data_length, data_len, TEST_CHECKPOINT_NUM(4));
          offset >>= 1;
      }
 
@@ -105,9 +111,10 @@
     /* Case where offset + datalen <  data_size */
     while (offset > 0)
     {
-         status = SST_FUNCTION(s008_data[4].api, uid, offset, data_len, read_buff);
-         TEST_ASSERT_EQUAL(status, s008_data[4].status, TEST_CHECKPOINT_NUM(4));
-         TEST_ASSERT_MEMCMP(read_buff, write_buff + offset, data_len, TEST_CHECKPOINT_NUM(5));
+         status = SST_FUNCTION(s008_data[4].api, uid, offset, data_len, read_buff, &p_data_length);
+         TEST_ASSERT_EQUAL(status, s008_data[4].status, TEST_CHECKPOINT_NUM(5));
+         TEST_ASSERT_MEMCMP(read_buff, write_buff + offset, data_len, TEST_CHECKPOINT_NUM(6));
+         TEST_ASSERT_EQUAL(p_data_length, data_len, TEST_CHECKPOINT_NUM(7));
          offset >>= 1;
          data_len <<= 1;
      }
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s008/test_s008.h b/api-tests/dev_apis/internal_trusted_storage/test_s008/test_s008.h
index de4cd0d..e9dee2c 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s008/test_s008.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s008/test_s008.h
@@ -19,13 +19,13 @@
 
 #ifdef ITS_TEST
 #define VAL_STORAGE_BASE VAL_INTERNAL_TRUSTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, s008)
+#define test_entry CONCAT(test_entry_,  s008)
 #elif PS_TEST
 #define VAL_STORAGE_BASE VAL_PROTECTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, p008)
+#define test_entry CONCAT(test_entry_,  p008)
 #endif
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
 
 extern val_api_t *val;
 extern psa_api_t *psa;
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s009/test_its_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s009/test_its_data.h
index 80e7fb1..8bd31aa 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s009/test_its_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s009/test_its_data.h
@@ -20,50 +20,49 @@
 #include "val_internal_trusted_storage.h"
 
 #define SST_FUNCTION val->its_function
-#define psa_sst_uid_t psa_its_uid_t
 
 typedef struct {
     enum its_function_code  api;
-    psa_its_status_t        status;
+    psa_status_t        status;
 } test_data;
 
-static struct psa_its_info_t info;
+static struct psa_storage_info_t info;
 static const test_data s009_data[] = {
 {
  0, 0 /* This is dummy for index0 */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* Call set API with NULL write buffer and 0 length */
+ VAL_ITS_SET, PSA_SUCCESS /* Call set API with NULL write buffer and 0 length */
 },
 {
- VAL_ITS_GET_INFO, PSA_ITS_SUCCESS /* Verify UID is created */
+ VAL_ITS_GET_INFO, PSA_SUCCESS /* Verify UID is created */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS /* Call get API with NULL write buffer and 0 length */
+ VAL_ITS_GET, PSA_SUCCESS /* Call get API with NULL write buffer and 0 length */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_SUCCESS /* Remove the storage entity */
+ VAL_ITS_REMOVE, PSA_SUCCESS /* Remove the storage entity */
 },
 {
- VAL_ITS_GET_INFO, PSA_ITS_ERROR_UID_NOT_FOUND /* Verify UID is removed */
+ VAL_ITS_GET_INFO, PSA_ERROR_DOES_NOT_EXIST /* Verify UID is removed */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* Create storage of zero size and valid write buffer */
+ VAL_ITS_SET, PSA_SUCCESS /* Create storage of zero size and valid write buffer */
 },
 {
- VAL_ITS_GET_INFO, PSA_ITS_SUCCESS /* Call get_info API to check data size */
+ VAL_ITS_GET_INFO, PSA_SUCCESS /* Call get_info API to check data size */
 },
 {
  0, 0 /* This is dummy for index8 */
 },
 {
- VAL_ITS_GET, PSA_ITS_SUCCESS /* Call get API with 0 length and NULL read buffer */
+ VAL_ITS_GET, PSA_SUCCESS /* Call get API with 0 length and NULL read buffer */
 },
 {
- VAL_ITS_SET, PSA_ITS_SUCCESS /* Increase the asset size */
+ VAL_ITS_SET, PSA_SUCCESS /* Increase the asset size */
 },
 {
- VAL_ITS_REMOVE, PSA_ITS_SUCCESS /* Remove the storage entity */
+ VAL_ITS_REMOVE, PSA_SUCCESS /* Remove the storage entity */
 },
 };
 #endif /* _TEST_S009_ITS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s009/test_ps_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s009/test_ps_data.h
index 129bca0..45680dc 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s009/test_ps_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s009/test_ps_data.h
@@ -20,50 +20,49 @@
 #include "val_protected_storage.h"
 
 #define SST_FUNCTION val->ps_function
-#define psa_sst_uid_t psa_ps_uid_t
 
 typedef struct {
     enum ps_function_code  api;
-    psa_ps_status_t        status;
+    psa_status_t        status;
 } test_data;
 
-static struct psa_ps_info_t info;
+static struct psa_storage_info_t info;
 static const test_data s009_data[] = {
 {
  0, 0 /* This is dummy for index0 */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Call set API with NULL write buffer and 0 length */
+ VAL_PS_SET, PSA_SUCCESS /* Call set API with NULL write buffer and 0 length */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_SUCCESS /* Verify UID is created */
+ VAL_PS_GET_INFO, PSA_SUCCESS /* Verify UID is created */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Call get API with NULL write buffer and 0 length */
+ VAL_PS_GET, PSA_SUCCESS /* Call get API with NULL write buffer and 0 length */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove the storage entity */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the storage entity */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_ERROR_UID_NOT_FOUND /* Verify UID is removed */
+ VAL_PS_GET_INFO, PSA_ERROR_DOES_NOT_EXIST /* Verify UID is removed */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Create storage of zero size and valid write buffer */
+ VAL_PS_SET, PSA_SUCCESS /* Create storage of zero size and valid write buffer */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_SUCCESS /* Call get_info API to check data size */
+ VAL_PS_GET_INFO, PSA_SUCCESS /* Call get_info API to check data size */
 },
 {
  0, 0 /* This is dummy for index8 */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Call get API with 0 length and NULL read buffer */
+ VAL_PS_GET, PSA_SUCCESS /* Call get API with 0 length and NULL read buffer */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Increase the asset size */
+ VAL_PS_SET, PSA_SUCCESS /* Increase the asset size */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove the storage entity */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the storage entity */
 },
 };
 #endif /* _TEST_S009_PS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s009/test_s009.c b/api-tests/dev_apis/internal_trusted_storage/test_s009/test_s009.c
index 4567c66..8b089d5 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s009/test_s009.c
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s009/test_s009.c
@@ -32,17 +32,17 @@
     NULL,
 };
 
-static psa_sst_uid_t uid = UID_BASE_VALUE + 5;
+static psa_storage_uid_t uid = UID_BASE_VALUE + 5;
 static uint8_t write_buff[TEST_BUFF_SIZE] = {0x99, 0x01, 0x02, 0x03, 0x04, 0x23, 0xF6, 0x07, 0x08, \
                                   0x0D, 0x70, 0xA1, 0xFF, 0xFF, 0x14, 0x73, 0x46, 0x97, 0xE8, 0xDD};
 
 int32_t psa_sst_zero_length_check(security_t caller)
 {
-    uint32_t status;
+    uint32_t status, p_data_length = 0;
 
     /* Set data for UID with length 0 and NULL pointer */
     val->print(PRINT_TEST, "[Check 1] Call set API with NULL pointer and data length 0\n", 0);
-    status = SST_FUNCTION(s009_data[1].api, uid, 0, NULL, 0);
+    status = SST_FUNCTION(s009_data[1].api, uid, 0, NULL, PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, s009_data[1].status, TEST_CHECKPOINT_NUM(1));
 
     /* Call the get_info function to verify UID created */
@@ -51,42 +51,45 @@
 
     /* Call get API with NULL read buffer */
     val->print(PRINT_TEST, "[Check 2] Call get API with NULL read buffer and data length 0\n", 0);
-    status = SST_FUNCTION(s009_data[3].api, uid, 0, 0, NULL);
+    status = SST_FUNCTION(s009_data[3].api, uid, 0, 0, NULL, &p_data_length);
     TEST_ASSERT_EQUAL(status, s009_data[3].status, TEST_CHECKPOINT_NUM(3));
+    TEST_ASSERT_EQUAL(p_data_length, 0, TEST_CHECKPOINT_NUM(4));
 
     /* Remove the UID */
     val->print(PRINT_TEST, "[Check 3] Remove the UID\n", 0);
     status = SST_FUNCTION(s009_data[4].api, uid);
-    TEST_ASSERT_EQUAL(status, s009_data[4].status, TEST_CHECKPOINT_NUM(4));
+    TEST_ASSERT_EQUAL(status, s009_data[4].status, TEST_CHECKPOINT_NUM(5));
 
     /* Call the get_info function to verify UID is removed */
     val->print(PRINT_TEST, "[Check 4] Call get_info API to verify UID removed\n", 0);
     status = SST_FUNCTION(s009_data[5].api, uid, &info);
-    TEST_ASSERT_EQUAL(status, s009_data[5].status, TEST_CHECKPOINT_NUM(5));
+    TEST_ASSERT_EQUAL(status, s009_data[5].status, TEST_CHECKPOINT_NUM(6));
 
     /* Create UID with length 0 and valid write buffer */
     val->print(PRINT_TEST, "[Check 5] Create UID with zero data_len and valid write buffer\n", 0);
-    status = SST_FUNCTION(s009_data[6].api, uid, 0, write_buff, 0);
-    TEST_ASSERT_EQUAL(status, s009_data[6].status, TEST_CHECKPOINT_NUM(6));
+    status = SST_FUNCTION(s009_data[6].api, uid, 0, write_buff, PSA_STORAGE_FLAG_NONE);
+    TEST_ASSERT_EQUAL(status, s009_data[6].status, TEST_CHECKPOINT_NUM(7));
 
     /* Call the get_info function and match the attributes */
     status = SST_FUNCTION(s009_data[7].api, uid, &info);
-    TEST_ASSERT_EQUAL(status, s009_data[7].status, TEST_CHECKPOINT_NUM(7));
-    TEST_ASSERT_EQUAL(info.size, 0, TEST_CHECKPOINT_NUM(8));
+    TEST_ASSERT_EQUAL(status, s009_data[7].status, TEST_CHECKPOINT_NUM(8));
+    TEST_ASSERT_EQUAL(info.size, 0, TEST_CHECKPOINT_NUM(9));
 
     /* Call get API with NULL read buffer and valid UID */
     val->print(PRINT_TEST, "[Check 8] Call get API with NULL read buffer and data length 0\n", 0);
-    status = SST_FUNCTION(s009_data[9].api, uid, 0, 0, NULL);
-    TEST_ASSERT_EQUAL(status, s009_data[9].status, TEST_CHECKPOINT_NUM(9));
+    status = SST_FUNCTION(s009_data[9].api, uid, 0, 0, NULL, &p_data_length);
+    TEST_ASSERT_EQUAL(status, s009_data[9].status, TEST_CHECKPOINT_NUM(10));
+    TEST_ASSERT_EQUAL(p_data_length, 0, TEST_CHECKPOINT_NUM(11));
 
     /* Change the length to test_buff_size */
     val->print(PRINT_TEST, "[Check 9] Increase the length\n", 0);
-    status = SST_FUNCTION(s009_data[10].api, uid, TEST_BUFF_SIZE, write_buff, 0);
-    TEST_ASSERT_EQUAL(status, s009_data[10].status, TEST_CHECKPOINT_NUM(10));
+    status = SST_FUNCTION(s009_data[10].api, uid, TEST_BUFF_SIZE, write_buff,
+                          PSA_STORAGE_FLAG_NONE);
+    TEST_ASSERT_EQUAL(status, s009_data[10].status, TEST_CHECKPOINT_NUM(12));
 
     /* Remove the UID */
     status = SST_FUNCTION(s009_data[11].api, uid);
-    TEST_ASSERT_EQUAL(status, s009_data[11].status, TEST_CHECKPOINT_NUM(11));
+    TEST_ASSERT_EQUAL(status, s009_data[11].status, TEST_CHECKPOINT_NUM(13));
 
     return VAL_STATUS_SUCCESS;
 }
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s009/test_s009.h b/api-tests/dev_apis/internal_trusted_storage/test_s009/test_s009.h
index 11b32d1..82f4ded 100755
--- a/api-tests/dev_apis/internal_trusted_storage/test_s009/test_s009.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s009/test_s009.h
@@ -19,13 +19,13 @@
 
 #ifdef ITS_TEST
 #define VAL_STORAGE_BASE VAL_INTERNAL_TRUSTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, s009)
+#define test_entry CONCAT(test_entry_,  s009)
 #elif PS_TEST
 #define VAL_STORAGE_BASE VAL_PROTECTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, p009)
+#define test_entry CONCAT(test_entry_,  p009)
 #endif
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
 
 extern val_api_t *val;
 extern psa_api_t *psa;
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s010/test_its_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s010/test_its_data.h
index 1a811b1..fde1c76 100644
--- a/api-tests/dev_apis/internal_trusted_storage/test_s010/test_its_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s010/test_its_data.h
@@ -20,16 +20,21 @@
 #include "val_internal_trusted_storage.h"
 
 #define SST_FUNCTION val->its_function
-#define psa_sst_uid_t psa_its_uid_t
 
 typedef struct {
     enum its_function_code  api;
-    psa_its_status_t        status;
+    psa_status_t        status;
 } test_data;
 
 static const test_data s010_data[] = {
 {
-  VAL_ITS_SET, PSA_ITS_ERROR_INVALID_ARGUMENTS /* Create with UID value zero should fail */
+  VAL_ITS_SET, PSA_ERROR_INVALID_ARGUMENT /* Create with UID value zero should fail */
+},
+{
+  VAL_ITS_GET_INFO, PSA_ERROR_INVALID_ARGUMENT /* Call to get_info API for UID 0 should fail */
+},
+{
+  VAL_ITS_REMOVE, PSA_ERROR_INVALID_ARGUMENT /* Call to remove API UID value zero should fail */
 },
 };
 #endif /* _TEST_S010_ITS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s010/test_ps_data.h b/api-tests/dev_apis/internal_trusted_storage/test_s010/test_ps_data.h
index fb06deb..5d8f2d0 100644
--- a/api-tests/dev_apis/internal_trusted_storage/test_s010/test_ps_data.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s010/test_ps_data.h
@@ -20,16 +20,21 @@
 #include "val_protected_storage.h"
 
 #define SST_FUNCTION val->ps_function
-#define psa_sst_uid_t psa_ps_uid_t
 
 typedef struct {
     enum ps_function_code  api;
-    psa_ps_status_t        status;
+    psa_status_t        status;
 } test_data;
 
 static const test_data s010_data[] = {
 {
- VAL_PS_SET, PSA_PS_ERROR_INVALID_ARGUMENT /* Create with UID value zero should fail */
+ VAL_PS_SET, PSA_ERROR_INVALID_ARGUMENT /* Create with UID value zero should fail */
+},
+{
+  VAL_PS_GET_INFO, PSA_ERROR_INVALID_ARGUMENT /* Call to get_info API for UID 0 should fail */
+},
+{
+  VAL_PS_REMOVE, PSA_ERROR_INVALID_ARGUMENT /* Call to remove API UID value zero should fail */
 },
 };
 #endif /* _TEST_S010_PS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s010/test_s010.c b/api-tests/dev_apis/internal_trusted_storage/test_s010/test_s010.c
index 8e556ce..7c0ca60 100644
--- a/api-tests/dev_apis/internal_trusted_storage/test_s010/test_s010.c
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s010/test_s010.c
@@ -37,13 +37,24 @@
 int32_t psa_sst_uid_value_zero_check(security_t caller)
 {
     int32_t status;
-    psa_sst_uid_t uid = 0;
+    psa_storage_uid_t uid = 0;
+    struct psa_storage_info_t info;
 
     /* Set with UID value zero should fail */
-    val->print(PRINT_TEST, "[Check 1] Creating storage with UID 0 should fail\n", 0 );
-    status = SST_FUNCTION(s010_data[0].api, uid, TEST_BUFF_SIZE, write_buff, 0);
+    val->print(PRINT_TEST, "[Check 1] Creating storage with UID 0 should fail\n", 0);
+    status = SST_FUNCTION(s010_data[0].api, uid, TEST_BUFF_SIZE, write_buff, PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, s010_data[0].status, TEST_CHECKPOINT_NUM(1));
 
+    /* Call to get_info call with UID zero should fail */
+    val->print(PRINT_TEST, "[Check 2] Get_info for UID 0 should fail\n", 0);
+    status = SST_FUNCTION(s010_data[1].api, uid, &info);
+    TEST_ASSERT_EQUAL(status, s010_data[1].status, TEST_CHECKPOINT_NUM(2));
+
+    /* UID removal should fail  */
+    val->print(PRINT_TEST, "[Check 3] Removing storage with UID 0 should fail\n", 0);
+    status = SST_FUNCTION(s010_data[2].api, uid);
+    TEST_ASSERT_EQUAL(status, s010_data[2].status, TEST_CHECKPOINT_NUM(3));
+
     return VAL_STATUS_SUCCESS;
 }
 
diff --git a/api-tests/dev_apis/internal_trusted_storage/test_s010/test_s010.h b/api-tests/dev_apis/internal_trusted_storage/test_s010/test_s010.h
index 96ac55d..5bda12e 100644
--- a/api-tests/dev_apis/internal_trusted_storage/test_s010/test_s010.h
+++ b/api-tests/dev_apis/internal_trusted_storage/test_s010/test_s010.h
@@ -19,13 +19,13 @@
 
 #ifdef ITS_TEST
 #define VAL_STORAGE_BASE VAL_INTERNAL_TRUSTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, s010)
+#define test_entry CONCAT(test_entry_,  s010)
 #elif PS_TEST
 #define VAL_STORAGE_BASE VAL_PROTECTED_STORAGE_BASE
-#define test_entry CONCAT(test_entry_, p010)
+#define test_entry CONCAT(test_entry_,  p010)
 #endif
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
 
 extern val_api_t *val;
 extern psa_api_t *psa;
diff --git a/api-tests/dev_apis/protected_storage/test_p011/test_p011.c b/api-tests/dev_apis/protected_storage/test_p011/test_p011.c
index f709015..fb1b844 100644
--- a/api-tests/dev_apis/protected_storage/test_p011/test_p011.c
+++ b/api-tests/dev_apis/protected_storage/test_p011/test_p011.c
@@ -34,9 +34,9 @@
 
 static int32_t psa_sst_uid_not_found()
 {
-    uint32_t status,j;
-    psa_ps_uid_t p_uid = UID_BASE_VALUE + 5;
-    struct psa_ps_info_t orig_info;
+    uint32_t status, j, p_data_length = 0;
+    psa_storage_uid_t p_uid = UID_BASE_VALUE + 5;
+    struct psa_storage_info_t orig_info;
 
     /* Call the set_extended API with UID which is not created */
     val->print(PRINT_TEST, "[Check 1] Call set_extended API for UID %d which is not set\n", p_uid);
@@ -44,54 +44,56 @@
     TEST_ASSERT_EQUAL(status, p011_data[1].status, TEST_CHECKPOINT_NUM(1));
 
     /* Create a valid storage with set API */
-    status = SST_FUNCTION(p011_data[2].api, p_uid, TEST_BUFF_SIZE, write_buff, 0);
+    status = SST_FUNCTION(p011_data[2].api, p_uid, TEST_BUFF_SIZE, write_buff,
+                          PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, p011_data[2].status, TEST_CHECKPOINT_NUM(2));
 
     /* Try to change data length for same UID using create API */
     val->print(PRINT_TEST, "[Check 2] Call create API with length different than original\n", 0);
-    status = SST_FUNCTION(p011_data[3].api, p_uid, TEST_BUFF_SIZE/2, 0);
+    status = SST_FUNCTION(p011_data[3].api, p_uid, TEST_BUFF_SIZE/2, PSA_STORAGE_FLAG_WRITE_ONCE);
     TEST_ASSERT_EQUAL(status, p011_data[3].status, TEST_CHECKPOINT_NUM(3));
 
     /* Try to change flag value associated with the UID */
     val->print(PRINT_TEST, "[Check 3] Call create API with flag value different than original\n", 0);
-    status = SST_FUNCTION(p011_data[4].api, p_uid, TEST_BUFF_SIZE, PSA_PS_FLAG_WRITE_ONCE);
+    status = SST_FUNCTION(p011_data[4].api, p_uid, TEST_BUFF_SIZE, PSA_STORAGE_FLAG_WRITE_ONCE);
     TEST_ASSERT_EQUAL(status, p011_data[4].status, TEST_CHECKPOINT_NUM(4));
 
     /* Check the flag value should be same as original*/
     status = SST_FUNCTION(p011_data[5].api, p_uid, &orig_info);
     TEST_ASSERT_EQUAL(status, p011_data[5].status, TEST_CHECKPOINT_NUM(5));
     TEST_ASSERT_EQUAL(orig_info.size, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(6));
-    TEST_ASSERT_EQUAL(orig_info.flags, 0, TEST_CHECKPOINT_NUM(7));
+    TEST_ASSERT_EQUAL(orig_info.flags, PSA_STORAGE_FLAG_NONE, TEST_CHECKPOINT_NUM(7));
 
     /* Remove the UID */
     status = SST_FUNCTION(p011_data[8].api, p_uid);
     TEST_ASSERT_EQUAL(status, p011_data[8].status, TEST_CHECKPOINT_NUM(8));
 
     /* Create a valid storage */
-    status = SST_FUNCTION(p011_data[9].api, p_uid, TEST_BUFF_SIZE/2, 0);
+    status = SST_FUNCTION(p011_data[9].api, p_uid, TEST_BUFF_SIZE/2, PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, p011_data[9].status, TEST_CHECKPOINT_NUM(9));
 
     /* Try to change length using create API */
     val->print(PRINT_TEST, "[Check 4] Call create API with parameters different than original\n", 0);
-    status = SST_FUNCTION(p011_data[10].api, p_uid, TEST_BUFF_SIZE, 0);
+    status = SST_FUNCTION(p011_data[10].api, p_uid, TEST_BUFF_SIZE, PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, p011_data[10].status, TEST_CHECKPOINT_NUM(10));
 
     /* Check the storage should be empty */
-    status = SST_FUNCTION(p011_data[11].api, p_uid, 0, TEST_BUFF_SIZE, read_buff);
+    status = SST_FUNCTION(p011_data[11].api, p_uid, 0, TEST_BUFF_SIZE, read_buff, &p_data_length);
     TEST_ASSERT_EQUAL(status, p011_data[11].status, TEST_CHECKPOINT_NUM(11));
     for (j = 0; j < TEST_BUFF_SIZE; j++)
     {
         TEST_ASSERT_EQUAL(read_buff[j], 0, TEST_CHECKPOINT_NUM(12));
     }
+    TEST_ASSERT_EQUAL(p_data_length, 0, TEST_CHECKPOINT_NUM(13));
 
     /* Remove the UID */
     status = SST_FUNCTION(p011_data[13].api, p_uid);
-    TEST_ASSERT_EQUAL(status, p011_data[13].api, TEST_CHECKPOINT_NUM(13));
+    TEST_ASSERT_EQUAL(status, p011_data[13].status, TEST_CHECKPOINT_NUM(14));
 
     /* Call the set_extended API with UID which is removed */
     val->print(PRINT_TEST, "[Check 5] Call set_extended API for UID %d which is removed\n", p_uid);
     status = SST_FUNCTION(p011_data[14].api, p_uid, 0, TEST_BUFF_SIZE, write_buff);
-    TEST_ASSERT_EQUAL(status, p011_data[14].status, TEST_CHECKPOINT_NUM(14));
+    TEST_ASSERT_EQUAL(status, p011_data[14].status, TEST_CHECKPOINT_NUM(15));
 
     return VAL_STATUS_SUCCESS;
 }
@@ -119,4 +121,3 @@
 
     return VAL_STATUS_SUCCESS;
 }
-
diff --git a/api-tests/dev_apis/protected_storage/test_p011/test_p011.h b/api-tests/dev_apis/protected_storage/test_p011/test_p011.h
index b87c36f..2eec800 100644
--- a/api-tests/dev_apis/protected_storage/test_p011/test_p011.h
+++ b/api-tests/dev_apis/protected_storage/test_p011/test_p011.h
@@ -17,9 +17,9 @@
 #ifndef _TEST_P011_CLIENT_TESTS_H_
 #define _TEST_P011_CLIENT_TESTS_H_
 
-#define test_entry CONCAT(test_entry_, p011)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_,  p011)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
 
 extern val_api_t *val;
 extern psa_api_t *psa;
diff --git a/api-tests/dev_apis/protected_storage/test_p011/test_ps_data.h b/api-tests/dev_apis/protected_storage/test_p011/test_ps_data.h
index faa35cb..b93309d 100644
--- a/api-tests/dev_apis/protected_storage/test_p011/test_ps_data.h
+++ b/api-tests/dev_apis/protected_storage/test_p011/test_ps_data.h
@@ -23,27 +23,27 @@
 
 typedef struct {
     enum ps_function_code  api;
-    psa_ps_status_t        status;
+    psa_status_t        status;
 } test_data;
 
 static const test_data p011_data[] = {
 {
- VAL_PS_GET_SUPPORT, PSA_PS_SUPPORT_SET_EXTENDED /* Check if optional PS API supported */
+ VAL_PS_GET_SUPPORT, PSA_STORAGE_SUPPORT_SET_EXTENDED /* Check if optional PS API supported */
 },
 {
- VAL_PS_SET_EXTENDED, PSA_PS_ERROR_UID_NOT_FOUND /* Call set_extended call for non-existing UID */
+ VAL_PS_SET_EXTENDED, PSA_ERROR_DOES_NOT_EXIST /* Call set_extended call for non-existing UID */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Create valid storage using set API */
+ VAL_PS_SET, PSA_SUCCESS /* Create valid storage using set API */
 },
 {
- VAL_PS_CREATE, PSA_PS_ERROR_INVALID_ARGUMENT /* Create API for present UID with different length */
+ VAL_PS_CREATE, PSA_ERROR_INVALID_ARGUMENT /* Create API for present UID with different length */
 },
 {
- VAL_PS_CREATE, PSA_PS_ERROR_INVALID_ARGUMENT /* Call create API for to set WRITE_ONCE flag */
+ VAL_PS_CREATE, PSA_ERROR_INVALID_ARGUMENT /* Call create API for to set WRITE_ONCE flag */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_SUCCESS /* Validate existing UID attributes maintained */
+ VAL_PS_GET_INFO, PSA_SUCCESS /* Validate existing UID attributes maintained */
 },
 {
  0, 0 /* This is dummy for index6 */
@@ -52,25 +52,25 @@
  0, 0 /* This is dummy for index7 */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove the UID */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the UID */
 },
 {
- VAL_PS_CREATE, PSA_PS_SUCCESS /* Create valid storage using create API */
+ VAL_PS_CREATE, PSA_SUCCESS /* Create valid storage using create API */
 },
 {
- VAL_PS_CREATE, PSA_PS_ERROR_INVALID_ARGUMENT /* Again call create API with different length */
+ VAL_PS_CREATE, PSA_ERROR_INVALID_ARGUMENT /* Again call create API with different length */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Validate the storage is empty */
+ VAL_PS_GET, PSA_SUCCESS /* Validate the storage is empty */
 },
 {
  0, 0 /* This is dummy for index12 */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove the UID */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the UID */
 },
 {
- VAL_PS_SET_EXTENDED, PSA_PS_ERROR_UID_NOT_FOUND /* Set_extended call for removed UID */
+ VAL_PS_SET_EXTENDED, PSA_ERROR_DOES_NOT_EXIST /* Set_extended call for removed UID */
 }
 };
 #endif /* _TEST_P011_PS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/protected_storage/test_p012/test_p012.c b/api-tests/dev_apis/protected_storage/test_p012/test_p012.c
index 999fff2..195f6b2 100644
--- a/api-tests/dev_apis/protected_storage/test_p012/test_p012.c
+++ b/api-tests/dev_apis/protected_storage/test_p012/test_p012.c
@@ -28,7 +28,7 @@
     NULL,
 };
 
-static psa_ps_uid_t p_uid = UID_BASE_VALUE + 6;
+static psa_storage_uid_t p_uid = UID_BASE_VALUE + 6;
 static uint8_t write_buff[TEST_BUFF_SIZE] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
                                              0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F};
 static uint8_t read_buff[TEST_BUFF_SIZE]  = {0};
@@ -37,10 +37,10 @@
 
 int32_t psa_sst_offset_invalid()
 {
-    uint32_t status;
+    uint32_t status, p_data_length = 0;
 
     /* Create valid storage using create API */
-    status = SST_FUNCTION(p012_data[1].api, p_uid, TEST_BUFF_SIZE, 0);
+    status = SST_FUNCTION(p012_data[1].api, p_uid, TEST_BUFF_SIZE, PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, p012_data[1].status, TEST_CHECKPOINT_NUM(1));
 
     /* Set some data in the storage created */
@@ -74,13 +74,15 @@
 
     /* Set data using set API */
     val->print(PRINT_TEST, "[Check 6] Overwrite the whole data with set API\n", 0);
-    status = SST_FUNCTION(p012_data[8].api, p_uid, TEST_BUFF_SIZE, write_buff, 0);
+    status = SST_FUNCTION(p012_data[8].api, p_uid, TEST_BUFF_SIZE, write_buff,
+                          PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, p012_data[8].status, TEST_CHECKPOINT_NUM(8));
 
     /* Call the get function to check data is correctly overwritten */
-    status = SST_FUNCTION(p012_data[9].api, p_uid, 0, TEST_BUFF_SIZE, read_buff);
+    status = SST_FUNCTION(p012_data[9].api, p_uid, 0, TEST_BUFF_SIZE, read_buff, &p_data_length);
     TEST_ASSERT_EQUAL(status, p012_data[9].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));
 
     return VAL_STATUS_SUCCESS;
 }
@@ -89,23 +91,24 @@
 {
     uint32_t status;
 
-    /* Call set extended with NULL write_buff */
-    val->print(PRINT_TEST, "[Check 7] Call set_extended with NULL write buffer\n", 0);
-    status = SST_FUNCTION(p012_data[11].api, p_uid, 0, TEST_BUFF_SIZE, NULL);
-    TEST_ASSERT_EQUAL(status, p012_data[11].status, TEST_CHECKPOINT_NUM(11));
+    /* Call create API with UID value 0 */
+    val->print(PRINT_TEST, "[Check 7] Call create API with UID 0\n", 0);
+    status = SST_FUNCTION(p012_data[11].api, 0, 0, TEST_BUFF_SIZE, write_buff);
+    TEST_ASSERT_EQUAL(status, p012_data[11].status, TEST_CHECKPOINT_NUM(12));
 
-    /* Call set extended to overwrite data with new values */
-    status = SST_FUNCTION(p012_data[12].api, p_uid, 0, TEST_BUFF_SIZE, write_buff_2);
-    TEST_ASSERT_EQUAL(status, p012_data[12].status, TEST_CHECKPOINT_NUM(12));
+    /* Call set extended API with UID value 0 */
+    val->print(PRINT_TEST, "[Check 8] Call set_extended API with UID 0\n", 0);
+    status = SST_FUNCTION(p012_data[12].api, 0, 0, TEST_BUFF_SIZE, write_buff_2);
+    TEST_ASSERT_EQUAL(status, p012_data[12].status, TEST_CHECKPOINT_NUM(13));
 
-    /* Call the get function to get the data buffer and match the buffer */
-    status = SST_FUNCTION(p012_data[13].api, p_uid, 0, TEST_BUFF_SIZE, read_buff);
-    TEST_ASSERT_EQUAL(status, p012_data[13].status, TEST_CHECKPOINT_NUM(13));
-    TEST_ASSERT_MEMCMP(read_buff, write_buff_2, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(14));
+    /* Call remove API with UID value 0 */
+    val->print(PRINT_TEST, "[Check 9] Call remove API with UID 0\n", 0);
+    status = SST_FUNCTION(p012_data[13].api, 0);
+    TEST_ASSERT_EQUAL(status, p012_data[13].status, TEST_CHECKPOINT_NUM(14));
 
-    /* Remove the storage */
-    status = SST_FUNCTION(p012_data[15].api, p_uid);
-    TEST_ASSERT_EQUAL(status, p012_data[15].status, TEST_CHECKPOINT_NUM(15));
+    /* Remove the UID */
+    status = SST_FUNCTION(p012_data[14].api, p_uid);
+    TEST_ASSERT_EQUAL(status, p012_data[14].status, TEST_CHECKPOINT_NUM(15));
 
     return VAL_STATUS_SUCCESS;
 }
diff --git a/api-tests/dev_apis/protected_storage/test_p012/test_p012.h b/api-tests/dev_apis/protected_storage/test_p012/test_p012.h
index 835fe21..548202d 100644
--- a/api-tests/dev_apis/protected_storage/test_p012/test_p012.h
+++ b/api-tests/dev_apis/protected_storage/test_p012/test_p012.h
@@ -17,9 +17,9 @@
 #ifndef _TEST_P012_CLIENT_TESTS_H_
 #define _TEST_P012_CLIENT_TESTS_H_
 
-#define test_entry CONCAT(test_entry_, p012)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_,  p012)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
 
 extern val_api_t *val;
 extern psa_api_t *psa;
diff --git a/api-tests/dev_apis/protected_storage/test_p012/test_ps_data.h b/api-tests/dev_apis/protected_storage/test_p012/test_ps_data.h
index 0ca495b..c73dbac 100644
--- a/api-tests/dev_apis/protected_storage/test_p012/test_ps_data.h
+++ b/api-tests/dev_apis/protected_storage/test_p012/test_ps_data.h
@@ -23,57 +23,54 @@
 
 typedef struct {
     enum ps_function_code  api;
-    psa_ps_status_t        status;
+    psa_status_t        status;
 } test_data;
 
 static const test_data p012_data[] = {
 {
- VAL_PS_GET_SUPPORT, PSA_PS_SUPPORT_SET_EXTENDED /* Check if optional PS API supported */
+ VAL_PS_GET_SUPPORT, PSA_STORAGE_SUPPORT_SET_EXTENDED /* Check if optional PS API supported */
 },
 {
- VAL_PS_CREATE, PSA_PS_SUCCESS /* Create valid storage */
+ VAL_PS_CREATE, PSA_SUCCESS /* Create valid storage */
 },
 {
- VAL_PS_SET_EXTENDED, PSA_PS_SUCCESS /* Set data using set_extended API */
+ VAL_PS_SET_EXTENDED, PSA_SUCCESS /* Set data using set_extended API */
 },
 {
- VAL_PS_SET_EXTENDED, PSA_PS_ERROR_OFFSET_INVALID /* Set_extended with invalid offset + length */
+ VAL_PS_SET_EXTENDED, PSA_ERROR_INVALID_ARGUMENT /* Set_extended with invalid offset + length */
 },
 {
- VAL_PS_SET_EXTENDED, PSA_PS_ERROR_OFFSET_INVALID /* Set_extended call with invalid offset */
+ VAL_PS_SET_EXTENDED, PSA_ERROR_INVALID_ARGUMENT /* Set_extended call with invalid offset */
 },
 {
- VAL_PS_SET_EXTENDED, PSA_PS_SUCCESS /* Set_extended call with valid offset and zero length */
+ VAL_PS_SET_EXTENDED, PSA_SUCCESS /* Set_extended call with valid offset and zero length */
 },
 {
- VAL_PS_SET_EXTENDED, PSA_PS_ERROR_OFFSET_INVALID /* Set_extended with invalid offset + length */
+ VAL_PS_SET_EXTENDED, PSA_ERROR_INVALID_ARGUMENT /* Set_extended with invalid offset + length */
 },
 {
- VAL_PS_SET_EXTENDED, PSA_PS_ERROR_OFFSET_INVALID /* Set_extended with invalid length */
+ VAL_PS_SET_EXTENDED, PSA_ERROR_INVALID_ARGUMENT /* Set_extended with invalid length */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Write data using set API */
+ VAL_PS_SET, PSA_SUCCESS /* Write data using set API */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Check data validity using get API */
+ VAL_PS_GET, PSA_SUCCESS /* Check data validity using get API */
 },
 {
  0, 0 /* This is dummy for index10 */
 },
 {
- VAL_PS_SET_EXTENDED, PSA_PS_ERROR_INVALID_ARGUMENT /* Set_extended call with NULL write buffer */
+ VAL_PS_CREATE, PSA_ERROR_INVALID_ARGUMENT /* Create call with UID 0 */
 },
 {
- VAL_PS_SET_EXTENDED, PSA_PS_SUCCESS /* Overwrite data using set_extended */
+ VAL_PS_SET_EXTENDED, PSA_ERROR_INVALID_ARGUMENT /* Call set_extended with UID 0 */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Check data validity using get API */
+ VAL_PS_REMOVE, PSA_ERROR_INVALID_ARGUMENT /* Call remove with UID 0 */
 },
 {
- 0, 0 /* This is dummy for index14 */
-},
-{
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove the UID */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove with UID */
 },
 };
 #endif /* _TEST_P012_PS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/protected_storage/test_p013/test_p013.c b/api-tests/dev_apis/protected_storage/test_p013/test_p013.c
index 6eb4746..628ed72 100644
--- a/api-tests/dev_apis/protected_storage/test_p013/test_p013.c
+++ b/api-tests/dev_apis/protected_storage/test_p013/test_p013.c
@@ -28,7 +28,7 @@
     NULL,
 };
 
-static psa_ps_uid_t p_uid = UID_BASE_VALUE + 4;
+static psa_storage_uid_t p_uid = UID_BASE_VALUE + 4;
 static uint8_t write_buff[TEST_BUFF_SIZE/2] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
 static uint8_t write_buff_2[TEST_BUFF_SIZE/2] = {0xFF, 0x11, 0xA2, 0xE3, 0x04, 0xA5, 0xD6, 0x97};
 static uint8_t read_buff[TEST_BUFF_SIZE]  = {0};
@@ -37,12 +37,12 @@
 
 static int32_t psa_sst_set_extended_create_success()
 {
-    uint32_t status;
-    struct psa_ps_info_t info;
+    uint32_t status, p_data_length = 0;
+    struct psa_storage_info_t info;
 
     /* Create storage of zero length using create API */
     val->print(PRINT_TEST, "[Check 1] Create storage using create API for 0 length\n", 0);
-    status = SST_FUNCTION(p013_data[1].api, p_uid, 0, 0);
+    status = SST_FUNCTION(p013_data[1].api, p_uid, 0, PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, p013_data[1].status, TEST_CHECKPOINT_NUM(1));
 
     /* Set some data in the storage created */
@@ -62,7 +62,7 @@
     TEST_ASSERT_EQUAL(status, p013_data[6].status, TEST_CHECKPOINT_NUM(6));
 
     /* Create a valid storage */
-    status = SST_FUNCTION(p013_data[7].api, p_uid, TEST_BUFF_SIZE, 0);
+    status = SST_FUNCTION(p013_data[7].api, p_uid, TEST_BUFF_SIZE, PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, p013_data[7].status, TEST_CHECKPOINT_NUM(7));
 
     /* Try to set data in first half of buffer */
@@ -76,43 +76,47 @@
 
     /* Call the get function to match the data */
     val->print(PRINT_TEST, "[Check 4] Valid data written by multiple set_extended\n", 0);
-    status = SST_FUNCTION(p013_data[10].api, p_uid, 0, TEST_BUFF_SIZE, read_buff);
+    status = SST_FUNCTION(p013_data[10].api, p_uid, 0, TEST_BUFF_SIZE, read_buff, &p_data_length);
     TEST_ASSERT_EQUAL(status, p013_data[10].status, TEST_CHECKPOINT_NUM(10));
     TEST_ASSERT_MEMCMP(read_buff, write_buff, TEST_BUFF_SIZE/2, TEST_CHECKPOINT_NUM(11));
     TEST_ASSERT_MEMCMP(read_buff + TEST_BUFF_SIZE/2, write_buff_2, TEST_BUFF_SIZE/2,\
                        TEST_CHECKPOINT_NUM(12));
+    TEST_ASSERT_EQUAL(p_data_length, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(13));
 
     /* Overwrite data using set API */
     val->print(PRINT_TEST, "[Check 5] Overwrite whole data using SET API\n", 0);
-    status = SST_FUNCTION(p013_data[13].api, p_uid, TEST_BUFF_SIZE, write_buff_3, 0);
-    TEST_ASSERT_EQUAL(status, p013_data[13].status, TEST_CHECKPOINT_NUM(13));
+    status = SST_FUNCTION(p013_data[13].api, p_uid, TEST_BUFF_SIZE, write_buff_3,
+                          PSA_STORAGE_FLAG_NONE);
+    TEST_ASSERT_EQUAL(status, p013_data[13].status, TEST_CHECKPOINT_NUM(14));
 
     /* Call the get function to match the data */
     val->print(PRINT_TEST, "[Check 6] Validate the data using get API\n", 0);
-    status = SST_FUNCTION(p013_data[14].api, p_uid, 0, TEST_BUFF_SIZE, read_buff);
-    TEST_ASSERT_EQUAL(status, p013_data[14].status, TEST_CHECKPOINT_NUM(14));
-    TEST_ASSERT_MEMCMP(read_buff, write_buff_3, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(15));
+    status = SST_FUNCTION(p013_data[14].api, p_uid, 0, TEST_BUFF_SIZE, read_buff, &p_data_length);
+    TEST_ASSERT_EQUAL(status, p013_data[14].status, TEST_CHECKPOINT_NUM(15));
+    TEST_ASSERT_MEMCMP(read_buff, write_buff_3, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(16));
+    TEST_ASSERT_EQUAL(p_data_length, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(17));
 
     /* Call create API for existing UID with same parameters */
     val->print(PRINT_TEST, "[Check 7] Call create API for existing UID with same parameters\n", 0);
-    status = SST_FUNCTION(p013_data[16].api, p_uid, TEST_BUFF_SIZE, 0);
-    TEST_ASSERT_EQUAL(status, p013_data[16].status, TEST_CHECKPOINT_NUM(16));
+    status = SST_FUNCTION(p013_data[16].api, p_uid, TEST_BUFF_SIZE, PSA_STORAGE_FLAG_NONE);
+    TEST_ASSERT_EQUAL(status, p013_data[16].status, TEST_CHECKPOINT_NUM(18));
 
     /* Call the get function to match the data */
     val->print(PRINT_TEST, "[Check 8] Validity of data after create API call\n", 0);
-    status = SST_FUNCTION(p013_data[17].api, p_uid, 0, TEST_BUFF_SIZE, read_buff);
-    TEST_ASSERT_EQUAL(status, p013_data[17].status, TEST_CHECKPOINT_NUM(17));
-    TEST_ASSERT_MEMCMP(read_buff, write_buff_3, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(18));
+    status = SST_FUNCTION(p013_data[17].api, p_uid, 0, TEST_BUFF_SIZE, read_buff, &p_data_length);
+    TEST_ASSERT_EQUAL(status, p013_data[17].status, TEST_CHECKPOINT_NUM(19));
+    TEST_ASSERT_MEMCMP(read_buff, write_buff_3, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(20));
+    TEST_ASSERT_EQUAL(p_data_length, TEST_BUFF_SIZE, TEST_CHECKPOINT_NUM(21));
 
     /* Remove the storage */
     val->print(PRINT_TEST, "[Check 9] Remove the UID\n", 0);
     status = SST_FUNCTION(p013_data[19].api, p_uid);
-    TEST_ASSERT_EQUAL(status, p013_data[19].status, TEST_CHECKPOINT_NUM(19));
+    TEST_ASSERT_EQUAL(status, p013_data[19].status, TEST_CHECKPOINT_NUM(22));
 
     /* Validate there should not be duplicate UID present */
     val->print(PRINT_TEST, "[Check 10] No duplicate entry of UID present\n", 0);
     status = SST_FUNCTION(p013_data[20].api, p_uid, 0, TEST_BUFF_SIZE, read_buff);
-    TEST_ASSERT_EQUAL(status, p013_data[20].status, TEST_CHECKPOINT_NUM(20));
+    TEST_ASSERT_EQUAL(status, p013_data[20].status, TEST_CHECKPOINT_NUM(23));
 
     return VAL_STATUS_SUCCESS;
 }
diff --git a/api-tests/dev_apis/protected_storage/test_p013/test_p013.h b/api-tests/dev_apis/protected_storage/test_p013/test_p013.h
index 20d7f92..839f2c2 100644
--- a/api-tests/dev_apis/protected_storage/test_p013/test_p013.h
+++ b/api-tests/dev_apis/protected_storage/test_p013/test_p013.h
@@ -17,9 +17,9 @@
 #ifndef _TEST_P013_CLIENT_TESTS_H_
 #define _TEST_P013_CLIENT_TESTS_H_
 
-#define test_entry CONCAT(test_entry_, p013)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_,  p013)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
 
 extern val_api_t *val;
 extern psa_api_t *psa;
diff --git a/api-tests/dev_apis/protected_storage/test_p013/test_ps_data.h b/api-tests/dev_apis/protected_storage/test_p013/test_ps_data.h
index 917ac08..68954e0 100644
--- a/api-tests/dev_apis/protected_storage/test_p013/test_ps_data.h
+++ b/api-tests/dev_apis/protected_storage/test_p013/test_ps_data.h
@@ -23,21 +23,21 @@
 
 typedef struct {
     enum ps_function_code  api;
-    psa_ps_status_t        status;
+    psa_status_t        status;
 } test_data;
 
 static const test_data p013_data[] = {
 {
- VAL_PS_GET_SUPPORT, PSA_PS_SUPPORT_SET_EXTENDED /* Check if optional PS API supported */
+ VAL_PS_GET_SUPPORT, PSA_STORAGE_SUPPORT_SET_EXTENDED /* Check if optional PS API supported */
 },
 {
- VAL_PS_CREATE, PSA_PS_SUCCESS /* Create storage of zero length */
+ VAL_PS_CREATE, PSA_SUCCESS /* Create storage of zero length */
 },
 {
- VAL_PS_SET_EXTENDED, PSA_PS_SUCCESS /* Call set_extened with zero length */
+ VAL_PS_SET_EXTENDED, PSA_SUCCESS /* Call set_extended with zero length */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_SUCCESS /* Validate the storage attributes */
+ VAL_PS_GET_INFO, PSA_SUCCESS /* Validate the storage attributes */
 },
 {
  0, 0 /* This is dummy for index4 */
@@ -46,19 +46,19 @@
  0, 0 /* This is dummy for index5 */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove the UID */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the UID */
 },
 {
- VAL_PS_CREATE, PSA_PS_SUCCESS /* Create storage of non-zero length */
+ VAL_PS_CREATE, PSA_SUCCESS /* Create storage of non-zero length */
 },
 {
- VAL_PS_SET_EXTENDED, PSA_PS_SUCCESS /* Call set_extened to write data in first half of buffer */
+ VAL_PS_SET_EXTENDED, PSA_SUCCESS /* Call set_extended to write data in first half of buffer */
 },
 {
- VAL_PS_SET_EXTENDED, PSA_PS_SUCCESS /* Call set_extened to write data in second half of buffer */
+ VAL_PS_SET_EXTENDED, PSA_SUCCESS /* Call set_extended to write data in second half of buffer */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Validate the data stored */
+ VAL_PS_GET, PSA_SUCCESS /* Validate the data stored */
 },
 {
  0, 0 /* This is dummy for index11 */
@@ -67,28 +67,28 @@
  0, 0 /* This is dummy for index12 */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Overwrite data with set API */
+ VAL_PS_SET, PSA_SUCCESS /* Overwrite data with set API */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Validate the data written */
+ VAL_PS_GET, PSA_SUCCESS /* Validate the data written */
 },
 {
  0, 0 /* This is dummy for index15 */
 },
 {
- VAL_PS_CREATE, PSA_PS_SUCCESS /* Call Create API for existing UID with same parameters */
+ VAL_PS_CREATE, PSA_SUCCESS /* Call Create API for existing UID with same parameters */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Validate the data */
+ VAL_PS_GET, PSA_SUCCESS /* Validate the data */
 },
 {
  0, 0 /* This is dummy for index18 */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove the UID */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the UID */
 },
 {
- VAL_PS_GET, PSA_PS_ERROR_UID_NOT_FOUND /* Check no duplicate entry of UID present */
+ VAL_PS_GET, PSA_ERROR_DOES_NOT_EXIST /* Check no duplicate entry of UID present */
 }
 };
 #endif /* _TEST_P013_PS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/protected_storage/test_p014/test_p014.c b/api-tests/dev_apis/protected_storage/test_p014/test_p014.c
index a6e74f1..970e038 100644
--- a/api-tests/dev_apis/protected_storage/test_p014/test_p014.c
+++ b/api-tests/dev_apis/protected_storage/test_p014/test_p014.c
@@ -28,18 +28,18 @@
     NULL,
 };
 
-static psa_ps_uid_t p_uid = UID_BASE_VALUE + 5;
+static psa_storage_uid_t p_uid = UID_BASE_VALUE + 5;
 static uint8_t write_buff[TEST_BUFF_SIZE/4] = { 0x03, 0x04, 0x05, 0x07};
 static uint8_t read_buff[TEST_BUFF_SIZE/4]  = {0};
 
 static int32_t psa_sst_optional_api_not_supported()
 {
-    uint32_t status;
-    struct psa_ps_info_t info;
+    uint32_t status, p_data_length = 0;
+    struct psa_storage_info_t info;
 
     /* Try to create storage using create API */
     val->print(PRINT_TEST, "[Check 1] Call to create API should fail as API not supported\n", 0);
-    status = SST_FUNCTION(p014_data[1].api, p_uid, TEST_BUFF_SIZE, 0);
+    status = SST_FUNCTION(p014_data[1].api, p_uid, TEST_BUFF_SIZE, PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, p014_data[1].status, TEST_CHECKPOINT_NUM(1));
 
     /* Verify that UID doesn't exist */
@@ -48,7 +48,8 @@
 
     /* Create a valid storage using set API */
     val->print(PRINT_TEST, "[Check 2] Create valid storage with set API\n", 0);
-    status = SST_FUNCTION(p014_data[3].api, p_uid, TEST_BUFF_SIZE/4, write_buff, 0);
+    status = SST_FUNCTION(p014_data[3].api, p_uid, TEST_BUFF_SIZE/4, write_buff,
+                          PSA_STORAGE_FLAG_NONE);
     TEST_ASSERT_EQUAL(status, p014_data[3].status, TEST_CHECKPOINT_NUM(3));
 
     /* Partial data write with set_extended API should fail */
@@ -58,13 +59,14 @@
 
     /* Call the get function to match the data */
     val->print(PRINT_TEST, "[Check 4] Verify data is unchanged\n", 0);
-    status = SST_FUNCTION(p014_data[5].api, p_uid, 0, TEST_BUFF_SIZE/4, read_buff);
+    status = SST_FUNCTION(p014_data[5].api, p_uid, 0, TEST_BUFF_SIZE/4, read_buff, &p_data_length);
     TEST_ASSERT_EQUAL(status, p014_data[5].status, TEST_CHECKPOINT_NUM(5));
     TEST_ASSERT_MEMCMP(read_buff, write_buff, TEST_BUFF_SIZE/4, TEST_CHECKPOINT_NUM(6));
+    TEST_ASSERT_EQUAL(p_data_length, TEST_BUFF_SIZE/4, TEST_CHECKPOINT_NUM(7));
 
     /* Remove the storage */
     status = SST_FUNCTION(p014_data[7].api, p_uid);
-    TEST_ASSERT_EQUAL(status, p014_data[7].status, TEST_CHECKPOINT_NUM(7));
+    TEST_ASSERT_EQUAL(status, p014_data[7].status, TEST_CHECKPOINT_NUM(8));
 
     return VAL_STATUS_SUCCESS;
 }
diff --git a/api-tests/dev_apis/protected_storage/test_p014/test_p014.h b/api-tests/dev_apis/protected_storage/test_p014/test_p014.h
index 1f4faa3..d97d8ad 100644
--- a/api-tests/dev_apis/protected_storage/test_p014/test_p014.h
+++ b/api-tests/dev_apis/protected_storage/test_p014/test_p014.h
@@ -17,9 +17,9 @@
 #ifndef _TEST_P014_CLIENT_TESTS_H_
 #define _TEST_P014_CLIENT_TESTS_H_
 
-#define test_entry CONCAT(test_entry_, p014)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_,  p014)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
 
 extern val_api_t *val;
 extern psa_api_t *psa;
diff --git a/api-tests/dev_apis/protected_storage/test_p014/test_ps_data.h b/api-tests/dev_apis/protected_storage/test_p014/test_ps_data.h
index f939f4c..421e0cd 100644
--- a/api-tests/dev_apis/protected_storage/test_p014/test_ps_data.h
+++ b/api-tests/dev_apis/protected_storage/test_p014/test_ps_data.h
@@ -23,33 +23,33 @@
 
 typedef struct {
     enum ps_function_code  api;
-    psa_ps_status_t        status;
+    psa_status_t        status;
 } test_data;
 
 static const test_data p014_data[] = {
 {
- VAL_PS_GET_SUPPORT, PSA_PS_SUPPORT_SET_EXTENDED /* Check if Optional API supported */
+ VAL_PS_GET_SUPPORT, PSA_STORAGE_SUPPORT_SET_EXTENDED /* Check if Optional API supported */
 },
 {
- VAL_PS_CREATE, PSA_PS_ERROR_NOT_SUPPORTED /* Create API call should fail */
+ VAL_PS_CREATE, PSA_ERROR_NOT_SUPPORTED /* Create API call should fail */
 },
 {
- VAL_PS_GET_INFO, PSA_PS_ERROR_UID_NOT_FOUND /* UID should not exist */
+ VAL_PS_GET_INFO, PSA_ERROR_DOES_NOT_EXIST /* UID should not exist */
 },
 {
- VAL_PS_SET, PSA_PS_SUCCESS /* Create storage of non-zero length */
+ VAL_PS_SET, PSA_SUCCESS /* Create storage of non-zero length */
 },
 {
- VAL_PS_SET_EXTENDED, PSA_PS_ERROR_NOT_SUPPORTED /* Set_extened API call should fail */
+ VAL_PS_SET_EXTENDED, PSA_ERROR_NOT_SUPPORTED /* Set_extended API call should fail */
 },
 {
- VAL_PS_GET, PSA_PS_SUCCESS /* Validate the data should not changed */
+ VAL_PS_GET, PSA_SUCCESS /* Validate the data should not changed */
 },
 {
  0, 0 /* Unused Index */
 },
 {
- VAL_PS_REMOVE, PSA_PS_SUCCESS /* Remove the UID */
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the UID */
 },
 };
 #endif /* _TEST_P014_PS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/protected_storage/test_p015/test_p015.c b/api-tests/dev_apis/protected_storage/test_p015/test_p015.c
index d9974e4..4c14fbc 100644
--- a/api-tests/dev_apis/protected_storage/test_p015/test_p015.c
+++ b/api-tests/dev_apis/protected_storage/test_p015/test_p015.c
@@ -28,7 +28,7 @@
     NULL,
 };
 
-static psa_ps_uid_t p_uid = UID_BASE_VALUE + 5;
+static psa_storage_uid_t p_uid = UID_BASE_VALUE + 5;
 
 int32_t psa_sst_create_api_write_once_flag_check(security_t caller)
 {
@@ -41,7 +41,7 @@
     {
         /* Call create API with write_once flag */
         val->print(PRINT_TEST, "[Check 1] Call create API with write_once flag\n", 0);
-        status = SST_FUNCTION(p015_data[1].api, p_uid, TEST_BUFF_SIZE, PSA_SST_FLAG_WRITE_ONCE);
+        status = SST_FUNCTION(p015_data[1].api, p_uid, TEST_BUFF_SIZE, PSA_STORAGE_FLAG_WRITE_ONCE);
         TEST_ASSERT_EQUAL(status, p015_data[1].status, TEST_CHECKPOINT_NUM(1));
     }
     else
diff --git a/api-tests/dev_apis/protected_storage/test_p015/test_p015.h b/api-tests/dev_apis/protected_storage/test_p015/test_p015.h
index 4fddada..16c59b3 100644
--- a/api-tests/dev_apis/protected_storage/test_p015/test_p015.h
+++ b/api-tests/dev_apis/protected_storage/test_p015/test_p015.h
@@ -17,9 +17,9 @@
 #ifndef _TEST_P015_CLIENT_TESTS_H_
 #define _TEST_P015_CLIENT_TESTS_H_
 
-#define test_entry CONCAT(test_entry_, p015)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_,  p015)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
 
 extern val_api_t *val;
 extern psa_api_t *psa;
diff --git a/api-tests/dev_apis/protected_storage/test_p015/test_ps_data.h b/api-tests/dev_apis/protected_storage/test_p015/test_ps_data.h
index f5062ae..3a04488 100644
--- a/api-tests/dev_apis/protected_storage/test_p015/test_ps_data.h
+++ b/api-tests/dev_apis/protected_storage/test_p015/test_ps_data.h
@@ -20,19 +20,18 @@
 #include "val_protected_storage.h"
 
 #define SST_FUNCTION val->ps_function
-#define PSA_SST_FLAG_WRITE_ONCE PSA_PS_FLAG_WRITE_ONCE
 
 typedef struct {
     enum ps_function_code  api;
-    psa_ps_status_t        status;
+    psa_status_t        status;
 } test_data;
 
 static const test_data p015_data[] = {
 {
- VAL_PS_GET_SUPPORT, PSA_PS_SUPPORT_SET_EXTENDED /* Check if optional PS API supported */
+ VAL_PS_GET_SUPPORT, PSA_STORAGE_SUPPORT_SET_EXTENDED /* Check if optional PS API supported */
 },
 {
- VAL_PS_CREATE, PSA_PS_ERROR_FLAGS_NOT_SUPPORTED /* Call create API with write_once flag */
+ VAL_PS_CREATE, PSA_ERROR_NOT_SUPPORTED /* Call create API with write_once flag */
 },
 };
 #endif /* _TEST_P015_PS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/protected_storage/test_p016/test.cmake b/api-tests/dev_apis/protected_storage/test_p016/test.cmake
new file mode 100644
index 0000000..b2c7a02
--- /dev/null
+++ b/api-tests/dev_apis/protected_storage/test_p016/test.cmake
@@ -0,0 +1,24 @@
+#/** @file
+# * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *  http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+#**/
+
+list(APPEND CC_SOURCE
+	test_entry_p016.c
+	test_p016.c
+)
+list(APPEND CC_OPTIONS -DPS_TEST)
+list(APPEND AS_SOURCE  )
+list(APPEND AS_OPTIONS )
diff --git a/api-tests/dev_apis/protected_storage/test_p016/test_entry_p016.c b/api-tests/dev_apis/protected_storage/test_p016/test_entry_p016.c
new file mode 100644
index 0000000..8bf29b0
--- /dev/null
+++ b/api-tests/dev_apis/protected_storage/test_p016/test_entry_p016.c
@@ -0,0 +1,53 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include "val_interfaces.h"
+#include "val_target.h"
+#include "test_p016.h"
+
+#define TEST_NUM  VAL_CREATE_TEST_ID(VAL_PROTECTED_STORAGE_BASE, 16)
+#define TEST_DESC "Storage assest capacity modification check\n"
+
+TEST_PUBLISH(TEST_NUM, test_entry);
+val_api_t *val = NULL;
+psa_api_t *psa = NULL;
+
+void test_entry(val_api_t *val_api, psa_api_t *psa_api)
+{
+    int32_t   status = VAL_STATUS_SUCCESS;
+
+    val = val_api;
+    psa = psa_api;
+
+    /* test init */
+    val->test_init(TEST_NUM, TEST_DESC, TEST_FIELD(TEST_ISOLATION_L1, WD_HIGH_TIMEOUT));
+    if (!IS_TEST_START(val->get_status()))
+    {
+        goto test_exit;
+    }
+
+    /* Execute list of tests available in test[num]_protected_storage_list from Non-secure side*/
+    status = val->execute_non_secure_tests(TEST_NUM, test_p016_sst_list, FALSE);
+
+    if (VAL_ERROR(status))
+    {
+        goto test_exit;
+    }
+
+test_exit:
+    val->test_exit();
+}
diff --git a/api-tests/dev_apis/protected_storage/test_p016/test_p016.c b/api-tests/dev_apis/protected_storage/test_p016/test_p016.c
new file mode 100644
index 0000000..eeaf651
--- /dev/null
+++ b/api-tests/dev_apis/protected_storage/test_p016/test_p016.c
@@ -0,0 +1,118 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include "val_interfaces.h"
+#include "val_target.h"
+#include "test_p016.h"
+#include "test_ps_data.h"
+
+#define TEST_BUFF_SIZE_1 10
+#define TEST_BUFF_SIZE_2 14
+#define TEST_BUFF_SIZE_3 8
+
+client_test_t test_p016_sst_list[] = {
+    NULL,
+    psa_sst_optional_api_sst_capacity_check,
+    NULL,
+};
+
+static psa_storage_uid_t p_uid = UID_BASE_VALUE + 5;
+static uint8_t write_buff[TEST_BUFF_SIZE_2] = {0x03, 0x04, 0x05, 0x07, 0xFF, 0x00, 0x32, 0x67,
+                                               0x99, 0x78, 0x43, 0x20, 0xFF, 0x91};
+
+static int32_t psa_sst_optional_api_sst_capacity(void)
+{
+    uint32_t status;
+    struct psa_storage_info_t info;
+
+    /* Try to create storage using create API */
+    status = SST_FUNCTION(p016_data[1].api, p_uid, TEST_BUFF_SIZE_1, PSA_STORAGE_FLAG_NONE);
+    TEST_ASSERT_EQUAL(status, p016_data[1].status, TEST_CHECKPOINT_NUM(1));
+
+    /* Call to create API for existing UID should fail */
+    val->print(PRINT_TEST, "[Check 1] Create API call for existing UID\n", 0);
+    status = SST_FUNCTION(p016_data[2].api, p_uid, TEST_BUFF_SIZE_2, PSA_STORAGE_FLAG_NONE);
+    TEST_ASSERT_EQUAL(status, p016_data[2].status, TEST_CHECKPOINT_NUM(2));
+
+    /* Check the attributes of storage are unchanged */
+    status = SST_FUNCTION(p016_data[3].api, p_uid, &info);
+    TEST_ASSERT_EQUAL(status, p016_data[3].status, TEST_CHECKPOINT_NUM(3));
+    TEST_ASSERT_EQUAL(info.capacity, TEST_BUFF_SIZE_1, TEST_CHECKPOINT_NUM(4));
+    TEST_ASSERT_EQUAL(info.size, 0, TEST_CHECKPOINT_NUM(5));
+
+    /* Override storage using set API */
+    val->print(PRINT_TEST, "[Check 2] Call to set API call for existing UID\n", 0);
+    status = SST_FUNCTION(p016_data[6].api, p_uid, TEST_BUFF_SIZE_3, write_buff,
+                          PSA_STORAGE_FLAG_NONE);
+    TEST_ASSERT_EQUAL(status, p016_data[6].status, TEST_CHECKPOINT_NUM(6));
+
+    /* Check the attributes of storage are changed */
+    status = SST_FUNCTION(p016_data[7].api, p_uid, &info);
+    TEST_ASSERT_EQUAL(status, p016_data[7].status, TEST_CHECKPOINT_NUM(7));
+    TEST_ASSERT_EQUAL(info.capacity, TEST_BUFF_SIZE_3, TEST_CHECKPOINT_NUM(8));
+    TEST_ASSERT_EQUAL(info.size, TEST_BUFF_SIZE_3, TEST_CHECKPOINT_NUM(9));
+
+    /* Accessing old capacity with set_extended API should fail */
+    val->print(PRINT_TEST, "[Check 3] Access old capacity using set_extended API\n", 0);
+    status = SST_FUNCTION(p016_data[10].api, p_uid, 0, TEST_BUFF_SIZE_1, write_buff);
+    TEST_ASSERT_EQUAL(status, p016_data[10].status, TEST_CHECKPOINT_NUM(10));
+
+    /* Remove the storage */
+    status = SST_FUNCTION(p016_data[11].api, p_uid);
+    TEST_ASSERT_EQUAL(status, p016_data[11].status, TEST_CHECKPOINT_NUM(11));
+
+    /* Create new storage assest using set  API */
+    val->print(PRINT_TEST, "[Check 4] Creation of new storage assest\n", 0);
+    status = SST_FUNCTION(p016_data[12].api, p_uid, TEST_BUFF_SIZE_2, write_buff,
+                          PSA_STORAGE_FLAG_NONE);
+    TEST_ASSERT_EQUAL(status, p016_data[12].status, TEST_CHECKPOINT_NUM(12));
+
+    /* Call to create API for existing UID should fail */
+    val->print(PRINT_TEST, "[Check 5] Create API call for existing UID\n", 0);
+    status = SST_FUNCTION(p016_data[13].api, p_uid, TEST_BUFF_SIZE_2, PSA_STORAGE_FLAG_NONE);
+    TEST_ASSERT_EQUAL(status, p016_data[13].status, TEST_CHECKPOINT_NUM(13));
+
+    /* Remove the storage */
+    status = SST_FUNCTION(p016_data[14].api, p_uid);
+    TEST_ASSERT_EQUAL(status, p016_data[14].status, TEST_CHECKPOINT_NUM(14));
+
+    return VAL_STATUS_SUCCESS;
+}
+
+int32_t psa_sst_optional_api_sst_capacity_check(security_t caller)
+{
+    uint32_t status;
+    int32_t test_status;
+
+    /* Call the get_support API and check if create and set_extended API are supported */
+    status = SST_FUNCTION(p016_data[0].api);
+
+    if (status != p016_data[0].status)
+    {
+       val->print(PRINT_INFO, "Test Case skipped as Optional PS APIs not are supported.\n", 0);
+       return RESULT_SKIP(VAL_STATUS_UNSUPPORTED);
+    } else {
+        val->print(PRINT_TEST, "Optional PS APIs are supported.\n", 0);
+        test_status = psa_sst_optional_api_sst_capacity();
+        if (test_status != VAL_STATUS_SUCCESS)
+        {
+            return test_status;
+        }
+    }
+
+    return VAL_STATUS_SUCCESS;
+}
diff --git a/api-tests/dev_apis/protected_storage/test_p016/test_p016.h b/api-tests/dev_apis/protected_storage/test_p016/test_p016.h
new file mode 100644
index 0000000..06626d0
--- /dev/null
+++ b/api-tests/dev_apis/protected_storage/test_p016/test_p016.h
@@ -0,0 +1,30 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+#ifndef _TEST_P016_CLIENT_TESTS_H_
+#define _TEST_P016_CLIENT_TESTS_H_
+
+#define test_entry CONCAT(test_entry_, p016)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
+
+extern val_api_t *val;
+extern psa_api_t *psa;
+extern client_test_t test_p016_sst_list[];
+
+int32_t psa_sst_optional_api_sst_capacity_check(security_t caller);
+
+#endif /* _TEST_P016_CLIENT_TESTS_H_ */
diff --git a/api-tests/dev_apis/protected_storage/test_p016/test_ps_data.h b/api-tests/dev_apis/protected_storage/test_p016/test_ps_data.h
new file mode 100644
index 0000000..45bc101
--- /dev/null
+++ b/api-tests/dev_apis/protected_storage/test_p016/test_ps_data.h
@@ -0,0 +1,76 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or ps affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+#ifndef _TEST_P016_PS_DATA_TESTS_H_
+#define _TEST_P016_PS_DATA_TESTS_H_
+
+#include "val_protected_storage.h"
+
+#define SST_FUNCTION val->ps_function
+
+typedef struct {
+    enum ps_function_code  api;
+    psa_status_t        status;
+} test_data;
+
+static const test_data p016_data[] = {
+{
+ VAL_PS_GET_SUPPORT, PSA_STORAGE_SUPPORT_SET_EXTENDED /* Check if Optional API supported */
+},
+{
+ VAL_PS_CREATE, PSA_SUCCESS /* Storage creation */
+},
+{
+ VAL_PS_CREATE, PSA_ERROR_ALREADY_EXISTS /* Calling create API for existing UID should fail */
+},
+{
+ VAL_PS_GET_INFO, PSA_SUCCESS /* Check the storage attributes are unchanged */
+},
+{
+ 0, 0 /* Unused Index4 */
+},
+{
+ 0, 0 /* Unused Index5 */
+},
+{
+ VAL_PS_SET, PSA_SUCCESS /* Set API can change capacity of storage */
+},
+{
+ VAL_PS_GET_INFO, PSA_SUCCESS /* Check the storage attributes are changed */
+},
+{
+ 0, 0 /* Unused Index8 */
+},
+{
+ 0, 0 /* Unused Index9 */
+},
+{
+ VAL_PS_SET_EXTENDED, PSA_ERROR_STORAGE_FAILURE /* Set_extended on old capacity should not work */
+},
+{
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the UID */
+},
+{
+ VAL_PS_SET, PSA_SUCCESS /* Storage creation */
+},
+{
+ VAL_PS_CREATE, PSA_ERROR_ALREADY_EXISTS /* Calling create API for existing UID should fail */
+},
+{
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the UID */
+},
+};
+#endif /* _TEST_P016_PS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/protected_storage/test_p017/test.cmake b/api-tests/dev_apis/protected_storage/test_p017/test.cmake
new file mode 100644
index 0000000..cb1bda9
--- /dev/null
+++ b/api-tests/dev_apis/protected_storage/test_p017/test.cmake
@@ -0,0 +1,24 @@
+#/** @file
+# * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# *  http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+#**/
+
+list(APPEND CC_SOURCE
+	test_entry_p017.c
+	test_p017.c
+)
+list(APPEND CC_OPTIONS -DPS_TEST)
+list(APPEND AS_SOURCE  )
+list(APPEND AS_OPTIONS )
diff --git a/api-tests/dev_apis/protected_storage/test_p017/test_entry_p017.c b/api-tests/dev_apis/protected_storage/test_p017/test_entry_p017.c
new file mode 100644
index 0000000..134fd49
--- /dev/null
+++ b/api-tests/dev_apis/protected_storage/test_p017/test_entry_p017.c
@@ -0,0 +1,53 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include "val_interfaces.h"
+#include "val_target.h"
+#include "test_p017.h"
+
+#define TEST_NUM  VAL_CREATE_TEST_ID(VAL_PROTECTED_STORAGE_BASE, 17)
+#define TEST_DESC "Storage assest capacity modification check\n"
+
+TEST_PUBLISH(TEST_NUM, test_entry);
+val_api_t *val = NULL;
+psa_api_t *psa = NULL;
+
+void test_entry(val_api_t *val_api, psa_api_t *psa_api)
+{
+    int32_t   status = VAL_STATUS_SUCCESS;
+
+    val = val_api;
+    psa = psa_api;
+
+    /* test init */
+    val->test_init(TEST_NUM, TEST_DESC, TEST_FIELD(TEST_ISOLATION_L1, WD_HIGH_TIMEOUT));
+    if (!IS_TEST_START(val->get_status()))
+    {
+        goto test_exit;
+    }
+
+    /* Execute list of tests available in test[num]_protected_storage_list from Non-secure side*/
+    status = val->execute_non_secure_tests(TEST_NUM, test_p017_sst_list, FALSE);
+
+    if (VAL_ERROR(status))
+    {
+        goto test_exit;
+    }
+
+test_exit:
+    val->test_exit();
+}
diff --git a/api-tests/dev_apis/protected_storage/test_p017/test_p017.c b/api-tests/dev_apis/protected_storage/test_p017/test_p017.c
new file mode 100644
index 0000000..5327f58
--- /dev/null
+++ b/api-tests/dev_apis/protected_storage/test_p017/test_p017.c
@@ -0,0 +1,96 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include "val_interfaces.h"
+#include "val_target.h"
+#include "test_p017.h"
+#include "test_ps_data.h"
+
+#define TEST_BUFF_SIZE_1 14
+#define TEST_BUFF_SIZE_2 10
+
+client_test_t test_p017_sst_list[] = {
+    NULL,
+    psa_sst_optional_api_partial_write_check,
+    NULL,
+};
+
+static psa_storage_uid_t p_uid = UID_BASE_VALUE + 5;
+static uint8_t write_buff[TEST_BUFF_SIZE_1] = {0x03, 0x04, 0x05, 0x07, 0xFF, 0x00, 0x32, 0x67,
+                                               0x99, 0x78, 0x43, 0x20, 0xFF, 0x91};
+
+static int32_t psa_sst_optional_api_partial_write(void)
+{
+    uint32_t status;
+    struct psa_storage_info_t info;
+
+    /* Try to create storage using create API */
+    status = SST_FUNCTION(p017_data[1].api, p_uid, TEST_BUFF_SIZE_1, PSA_STORAGE_FLAG_NONE);
+    TEST_ASSERT_EQUAL(status, p017_data[1].status, TEST_CHECKPOINT_NUM(1));
+
+    /* Call set extended API to set data in first half */
+    val->print(PRINT_TEST, "[Check 1] Set data in first half of storage\n", 0);
+    status = SST_FUNCTION(p017_data[2].api, p_uid, 0, TEST_BUFF_SIZE_1/2, write_buff);
+    TEST_ASSERT_EQUAL(status, p017_data[2].status, TEST_CHECKPOINT_NUM(2));
+
+    /* Call set extended API to set data with gaps */
+    val->print(PRINT_TEST, "[Check 2] Set data having gap with existing data \n", 0);
+    status = SST_FUNCTION(p017_data[3].api, p_uid, (TEST_BUFF_SIZE_1/2) + 2, 2,  write_buff);
+    TEST_ASSERT_EQUAL(status, p017_data[3].status, TEST_CHECKPOINT_NUM(3));
+
+    /* Call set extended API to overwrite and extend the existing data */
+    val->print(PRINT_TEST, "[Check 3] Overwrite and extend existing data\n", 0);
+    status = SST_FUNCTION(p017_data[4].api, p_uid, 0, TEST_BUFF_SIZE_2, write_buff);
+    TEST_ASSERT_EQUAL(status, p017_data[4].status, TEST_CHECKPOINT_NUM(4));
+
+    /* Check the attributes of existing storage */
+    val->print(PRINT_TEST, "[Check 4] Check the storage attributes\n", 0);
+    status = SST_FUNCTION(p017_data[5].api, p_uid, &info);
+    TEST_ASSERT_EQUAL(status, p017_data[5].status, TEST_CHECKPOINT_NUM(5));
+    TEST_ASSERT_EQUAL(info.size, TEST_BUFF_SIZE_2, TEST_CHECKPOINT_NUM(6));
+    TEST_ASSERT_EQUAL(info.capacity, TEST_BUFF_SIZE_1, TEST_CHECKPOINT_NUM(7));
+
+    /* Remove the storage */
+    status = SST_FUNCTION(p017_data[8].api, p_uid);
+    TEST_ASSERT_EQUAL(status, p017_data[8].status, TEST_CHECKPOINT_NUM(8));
+
+    return VAL_STATUS_SUCCESS;
+}
+
+int32_t psa_sst_optional_api_partial_write_check(security_t caller)
+{
+    uint32_t status;
+    int32_t test_status;
+
+    /* Call the get_support API and check if create and set_extended API are supported */
+    status = SST_FUNCTION(p017_data[0].api);
+
+    if (status != p017_data[0].status)
+    {
+       val->print(PRINT_INFO, "Test Case skipped as Optional PS APIs not are supported.\n", 0);
+       return RESULT_SKIP(VAL_STATUS_UNSUPPORTED);
+    } else {
+        val->print(PRINT_TEST, "Optional PS APIs are supported.\n", 0);
+        test_status = psa_sst_optional_api_partial_write();
+        if (test_status != VAL_STATUS_SUCCESS)
+        {
+            return test_status;
+        }
+    }
+
+    return VAL_STATUS_SUCCESS;
+}
diff --git a/api-tests/dev_apis/protected_storage/test_p017/test_p017.h b/api-tests/dev_apis/protected_storage/test_p017/test_p017.h
new file mode 100644
index 0000000..caa5cb0
--- /dev/null
+++ b/api-tests/dev_apis/protected_storage/test_p017/test_p017.h
@@ -0,0 +1,30 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+#ifndef _TEST_P017_CLIENT_TESTS_H_
+#define _TEST_P017_CLIENT_TESTS_H_
+
+#define test_entry CONCAT(test_entry_, p017)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
+
+extern val_api_t *val;
+extern psa_api_t *psa;
+extern client_test_t test_p017_sst_list[];
+
+int32_t psa_sst_optional_api_partial_write_check(security_t caller);
+
+#endif /* _TEST_P017_CLIENT_TESTS_H_ */
diff --git a/api-tests/dev_apis/protected_storage/test_p017/test_ps_data.h b/api-tests/dev_apis/protected_storage/test_p017/test_ps_data.h
new file mode 100644
index 0000000..ae35fd7
--- /dev/null
+++ b/api-tests/dev_apis/protected_storage/test_p017/test_ps_data.h
@@ -0,0 +1,58 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or ps affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+#ifndef _TEST_P017_PS_DATA_TESTS_H_
+#define _TEST_P017_PS_DATA_TESTS_H_
+
+#include "val_protected_storage.h"
+
+#define SST_FUNCTION val->ps_function
+
+typedef struct {
+    enum ps_function_code  api;
+    psa_status_t        status;
+} test_data;
+
+static const test_data p017_data[] = {
+{
+ VAL_PS_GET_SUPPORT, PSA_STORAGE_SUPPORT_SET_EXTENDED /* Check if Optional API supported */
+},
+{
+ VAL_PS_CREATE, PSA_SUCCESS /* Storage creation */
+},
+{
+ VAL_PS_SET_EXTENDED, PSA_SUCCESS /* Write data in created storage  */
+},
+{
+ VAL_PS_SET_EXTENDED, PSA_ERROR_STORAGE_FAILURE /* Try to set data in noncontinous manner */
+},
+{
+ VAL_PS_SET_EXTENDED, PSA_SUCCESS /* Overwrite the existing data */
+},
+{
+ VAL_PS_GET_INFO, PSA_SUCCESS /* Check for valid storage attributes */
+},
+{
+ 0, 0 /* Unused index */
+},
+{
+ 0, 0 /* Unused index */
+},
+{
+ VAL_PS_REMOVE, PSA_SUCCESS /* Remove the UID */
+},
+};
+#endif /* _TEST_P017_PS_DATA_TESTS_H_ */
diff --git a/api-tests/dev_apis/protected_storage/testsuite.db b/api-tests/dev_apis/protected_storage/testsuite.db
index bfe6734..2e95c62 100644
--- a/api-tests/dev_apis/protected_storage/testsuite.db
+++ b/api-tests/dev_apis/protected_storage/testsuite.db
@@ -35,5 +35,7 @@
 test_p013
 test_p014
 test_p015
+test_p016
+test_p017
 
 (END)
diff --git a/api-tests/docs/psa_its_testlist.md b/api-tests/docs/psa_its_testlist.md
index f169577..3443249 100644
--- a/api-tests/docs/psa_its_testlist.md
+++ b/api-tests/docs/psa_its_testlist.md
@@ -6,21 +6,21 @@
 
 1. Unless described in this document, any behaviour that is defined as IMPLEMENTATION_DEFINED in PSA Storage API document is not verified in this document. <br />
 2. Storage Test Cases use UID value starting from 1 onwards. These UID needs to be free for successfull test execution.<br />
-3. UID values 1 and 2 are reserved as WRITE_ONCE UID.These UID can't be free from testcase. Make sure these are free.<br />
+3. UID values 1 and 2 are reserved as WRITE_ONCE UID. These UID can't be free from testcase. Make sure these are free.<br />
 
-| Test      | Test Scenario                         | API Verified   | Return Value                                                              | Test Algorithm                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | UID Usage                                                                                                                                                                                        |
-|-----------|--------------------------------------|-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------|
-| test_s001 | Get,get_info and remove API's call for <br /> non-existent and removed assest       | psa_its_get<br />psa_its_get_info <br />psa_its_remove<br />  | PSA_ITS_ERROR_UID_NOT_FOUND              | 1. Call get API with UID for which no UID/Data pair is created<br />2. Call get_info API for which no UID/Data pair is created<br />3. Call remove API for which no UID/Data pair is created<br />4. Set valid  UID/Data pair with uid1<br />5. Set one more set of UID/Data pair, with different uid, than previous<br />6. Remove the uid of step 4.<br />7. Call get API for  removed UID/data pair<br />8. Call get_info API for  removed UID/Data pair<br />9. Call remove API for  removed UID/Data pair<br />10. Set valid UID/Data pair<br />11. Call get API for different uid , then created<br />12. Call get_info API for different uid, then created<br />13. Call remove API for different uid, then created<br />14. Remove the created UID/Data pair.<br />15. Remove the stray uid.<br />                                                                                                         | UID value used are 5,6,7                                                                                                                     |
-| test_s002 | Overwriting data for asset created with<br /> WRITE_ONCE flag            | psa_its_set<br />psa_its_remove<br />      |    PSA_ITS_ERROR_WRITE_ONCE                              | 1.  Set valid UID/data value pair , with create flag value none.<br />2. Call get and get_info API to validate the data, attributes associated with data<br />3. Call set API again with same uid and create flag  PSA_PS_WRITE_ONCE_FLAG<br />4. Call get and get_info API to validate the data, attributes associated with data<br /> is not changed after second set operation<br />5. try to remove the UID/data pair.<br />6. Create new UID/data value pair, with create flag PSA_PS_WRITE_ONCE_FLAG<br />7. Try to remove the created UID.<br />8. Call get and get_info API to validate the data, attributes associated with data<br />9. Again call SET with same UID , create flag PSA_PS_WRITE_ONCE_FLAG but <br />different data length<br />10. Try to remove the UID, PSA_ITS_ERROR_WRITE_ONCE error should be returned<br />11. Call get and get_info API to validate the data, attributes associated with data<br /> | UID value used are 1 and 2                                                                                                                                                                     |
-| test_s003 | Exhaust storage space     | psa_its_set<br />          |PSA_ITS_ERROR_INSUFFICIENT_SPACE                                                  | 1. Create UID/data pairs, with data_len 256 bytes. Do this with incrementing<br /> uid values till we have INSUFFICENT_SPACE.<br />2. Remove all the UID/data pairs created.<br />3. Repeat the steps once more, to check all previous uid are removed successfully<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | UID value starts from 5 and keep on incrementing till all space is exhausted                                                                                                                    |
-| test_s004 | Overwriting data for asset created without WRITE_ONCE flag                      | psa_its_set<br />psa_its_get<br />psa_its_get_info<br />psa_its_remove<br /> | PSA_ITS_SUCCESS | 1. Set a valid uid/data pair<br />2. Validate the data using get api<br />3. Change the data length to half of previous.<br />4. Call GET api with original data length , error should be returned and also<br /> the return buffer should be empty<br />5. Call GET api with correct data_len and validate the data received.<br />6. Check old data cannot be accessed.<br />7. Call REMOVE api to delete the UID/data pair<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | UID value used is 5                                                                                                                                                                            |
-| test_s005 | Get, get_info and remove API call for valid assest                     | psa_its_set<br />psa_its_get<br />psa_its_get_info<br />psa_its_remove<br /> | PSA_ITS_SUCCESS |1. Set valid UID/data pair with varying uid and data_len <br />2. Call GET api and validate the set data<br />3. Call GET info api and validate the data attributes<br />4. Call REMOVE api to delete the UID/data pair<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | UID value used are 4                                                                                                                           |
-| test_s006 | Storage asset creation with unsupported <br /> create_flag value   | psa_its_set<br />     | PSA_ITS_ERROR_FLAGS_NOT_SUPPORTED                                                       | 1.  Call the SET_INFO with minimum flag value to max flag value <br />2. Call GET_INFO api and validate the flag value<br />3. Remove the uid/data pair<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | UID value used is 5                                                                                                                          |
-| test_s007 | Get API call with length different than asset <br /> data length | psa_its_set<br />     | PSA_ITS_ERROR_INCORRECT_SIZE                                                       | 1. Create valid uid/data pair. <br />2. Increase the length of storage.<br />3. Try to access the old length using get api.<br />4. Try to access with valid length less than stored size.<br />5. Decrease the length of storage.<br />6. Try to access the old length.<br />7. Remove the uid<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | UID value used is 5                                                                                                                       |
-| test_s008 | Get API call with invalid offset         | psa_its_get<br />        |PSA_ITS_ERROR_OFFSET_INVALID                                                    | 1. Set valid UID/data pair<br />2. Call GET api with valid offset and offset + data_len equal to stored data size.<br />3. Call GET api with valid offset and offset + data_len less than stored data size.<br />4. Call get api with invalid offset.<br />5. Call get api with zero offset , but data len greater than data size.<br />6. Remove the uid.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | UID value used is  5 |
-| test_s009 | API call with NULL pointer and zero length            | psa_its_get<br />psa_its_set<br />psa_its_get_info<br />    | PSA_ITS_SUCCESS                 | 1. Call the SET API with NULL pointer and data_len zero <br />2. Validate using get_info api storage should be present.<br />3. Call get API with NULL pointer.<br />4. Remove the UID.<br />5. Call get_info API to validate storage is removed.<br />6. Set storage entity with valid write_buffer , but length zero.<br />7. Call get_info API to validate storage attributes.<br />8. Call get_info api with NULL pointer and valid uid.<br />9. Remove the uid<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | UID value used is 5 <br />                                                                                                                                                                     |
-| test_s010 | Storage assest creation with UID value 0 <br />            | psa_its_set<br />   | PSA_ITS_ERROR_INVALID_ARGUMENTS                 | 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  <br />            | NA<br />    | PSA_ITS_ERROR_STORAGE_FAILURE <br />|    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      | Test Scenario                         | API Verified   | Return Value            | Test Algorithm      | UID Usage              |
+|-----------|---------------------------------------|----------------|-------------------------|---------------------|------------------------|
+| test_s001 | Get,get_info and remove API's call for <br /> non-existent and removed assest | psa_its_get<br />psa_its_get_info <br />psa_its_remove<br />                 | PSA_ERROR_DOES_NOT_EXIST       | 1. Call get API with UID for which no UID/Data pair is created<br />2. Call get_info API for which no UID/Data pair is created<br />3. Call remove API for which no UID/Data pair is created<br />4. Set valid  UID/Data pair with uid1<br />5. Set one more set of UID/Data pair, with different uid, than previous<br />6. Remove the uid of step 4.<br />7. Call get API for  removed UID/data pair<br />8. Call get_info API for  removed UID/Data pair<br />9. Call remove API for  removed UID/Data pair<br />10. Set valid UID/Data pair<br />11. Call get API for different uid , then created<br />12. Call get_info API for different uid, then created<br />13. Call remove API for different uid, then created<br />14. Remove the created UID/Data pair.<br />15. Remove the stray uid.<br />                                                                                                         | UID value used are 5,6,7                                                                                                                     |
+| test_s002 | Overwriting data for asset created with<br /> WRITE_ONCE flag                 | psa_its_set<br />psa_its_remove<br />                                        | PSA_ERROR_NOT_PERMITTED        | 1. Set valid UID/data value pair , with create flag value none.<br />2. Call get and get_info API to validate the data, attributes associated with data<br />3. Call set API again with same uid and create flag  PSA_PS_WRITE_ONCE_FLAG<br />4. Call get and get_info API to validate the data, attributes associated with data<br /> is not changed after second set operation<br />5. try to remove the UID/data pair.<br />6. Create new UID/data value pair, with create flag PSA_PS_WRITE_ONCE_FLAG<br />7. Try to remove the created UID.<br />8. Call get and get_info API to validate the data, attributes associated with data<br />9. Again call SET with same UID , create flag PSA_PS_WRITE_ONCE_FLAG but <br />different data length<br />10. Try to remove the UID, PSA_ITS_ERROR_WRITE_ONCE error should be returned<br />11. Call get and get_info API to validate the data, attributes associated with data<br /> | UID value used are 1 and 2                                                                                                                                                                     |
+| test_s003 | Exhaust storage space                                                         | psa_its_set<br />                                                            | PSA_ERROR_INSUFFICIENT_STORAGE | 1. Create UID/data pairs, with data_len 1024 bytes. Do this with incrementing<br /> uid values till we have INSUFFICENT_SPACE.<br />2. Remove all the UID/data pairs created.<br />3. Repeat the steps once more, to check all previous uid are removed successfully<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | UID value starts from 5 and keep on incrementing till all space is exhausted                                                                                                                    |
+| test_s004 | Overwriting data for asset created without WRITE_ONCE flag                    | psa_its_set<br />psa_its_get<br />psa_its_get_info<br />psa_its_remove<br /> | PSA_SUCCESS                    | 1. Set a valid uid/data pair<br />2. Validate the data using get api<br />3. Change the data length to half of previous.<br />4. Call GET api with original data length , error should be returned and also<br /> the return buffer should be empty<br />5. Call GET api with correct data_len and validate the data received.<br />6. Check old data cannot be accessed.<br />7. Call REMOVE api to delete the UID/data pair<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | UID value used is 5                                                                                                                                                                            |
+| test_s005 | Get, get_info and remove API call for valid assest                            | psa_its_set<br />psa_its_get<br />psa_its_get_info<br />psa_its_remove<br /> | PSA_SUCCESS                    | 1. Set valid UID/data pair with varying uid and data_len <br />2. Call GET api and validate the set data<br />3. Call GET info api and validate the data attributes<br />4. Call REMOVE api to delete the UID/data pair<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | UID value used are 4                                                                                                                           |
+| test_s006 | Storage asset creation with unsupported <br /> create_flag value              | psa_its_set<br />                                                            | PSA_ERROR_NOT_SUPPORTED        | 1. Call the SET_INFO with minimum flag value to max flag value <br />2. Call GET_INFO api and validate the flag value<br />3. Remove the uid/data pair<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | UID value used is 5                                                                                                                          |
+| test_s007 | Get API call with length different than asset <br /> data length              | psa_its_set<br />                                                            | PSA_ERROR_INVALID_ARGUMENT     | 1. Create valid uid/data pair. <br />2. Increase the length of storage.<br />3. Try to access the old length using get api.<br />4. Try to access with valid length less than stored size.<br />5. Decrease the length of storage.<br />6. Try to access the old length.<br />7. Remove the uid<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | UID value used is 5                                                                                                                       |
+| test_s008 | Get API call with invalid offset                                              | psa_its_get<br />                                                            | PSA_ERROR_INVALID_ARGUMENT     | 1. Set valid UID/data pair<br />2. Call GET api with valid offset and offset + data_len equal to stored data size.<br />3. Call GET api with valid offset and offset + data_len less than stored data size.<br />4. Call get api with invalid offset.<br />5. Call get api with zero offset , but data len greater than data size.<br />6. Remove the uid.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | UID value used is  5 |
+| test_s009 | API call with NULL pointer and zero length                                    | psa_its_get<br />psa_its_set<br />psa_its_get_info<br />                     | PSA_ERROR_DOES_NOT_EXIST       | 1. Call the SET API with NULL pointer and data_len zero <br />2. Validate using get_info api storage should be present.<br />3. Call get API with NULL pointer.<br />4. Remove the UID.<br />5. Call get_info API to validate storage is removed.<br />6. Set storage entity with valid write_buffer , but length zero.<br />7. Call get_info API to validate storage attributes.<br />8. Call get_info api with NULL pointer and valid uid.<br />9. Remove the uid<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | UID value used is 5 <br />                                                                                                                                                                     |
+| test_s010 | Storage assest creation with UID value 0                                      | psa_its_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 />                                                                                                                                                                     |
 
 ## License
 Arm PSA test suite is distributed under Apache v2.0 License.
diff --git a/api-tests/docs/psa_ps_testlist.md b/api-tests/docs/psa_ps_testlist.md
index 2675c7f..f93cfbd 100644
--- a/api-tests/docs/psa_ps_testlist.md
+++ b/api-tests/docs/psa_ps_testlist.md
@@ -4,32 +4,32 @@
 
 Following are the requirements of the Storage Test Suite. <br />
 
-1. Unless described in this document, any behaviour that is defined as IMPLEMENTATION_DEFINED in PSA Storage API document is not verified in this document.<br />
+1. Unless described in this document, any behaviour that is defined as IMPLEMENTATION_DEFINED in PSA Storage API document is not verified in this document. <br />
 2. Storage Test Cases use UID value starting from 1 onwards. These UID needs to be free for successfull test execution.<br />
-3. UID values 1 and 2 are reserved as WRITE_ONCE UID.These UID can't be free from testcase. Make sure these are free.<br />
+3. UID values 1 and 2 are reserved as WRITE_ONCE UID. These UID can't be free from testcase. Make sure these are free.<br />
 
-
-| Test      | Test Scenario                                 | API Verified    | Return Value                                                                 | Test Algorithm                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | UID Usage                                                                                                                                                                                        |
-|-----------|--------------------------------------|------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|
-| test_s001 |  Get,get_info and remove API's call for <br /> non-existent and removed assest             | psa_ps_get<br />psa_ps_get_info <br />psa_ps_remove<br /> |PSA_PS_ERROR_UID_NOT_FOUND                | 1. Call get API with UID for which no UID/Data pair is created.<br />2. Call get_info API for which no UID/Data pair is created.<br />3. Call remove API for which no UID/Data pair is created.<br />4. Set valid  UID/Data pair with uid1.<br />5. Set one more set of UID/Data pair, with different uid, than previous.<br />6. Remove the uid of step 4.<br />7. Call get API for  removed UID/data pair.<br />8. Call get_info API for  removed UID/Data pair.<br />9. Call remove API for  removed UID/Data pair.<br />10. Set valid UID/Data pair.<br />11. Call get API for different uid , then created.<br />12. Call get_info API for different uid, then created.<br />13. Call remove API for different uid, then created.<br />14. Remove the created UID/Data pair.<br />15. Remove the stray uid.<br />                                                                                                         | UID value used are 5, 6, 7                                                                                                                     |
-| test_s002 | Overwriting data for asset created with<br /> WRITE_ONCE flag              | psa_ps_set<br />psa_ps_remove<br /> | PSA_PS_ERROR_WRITE_ONCE                                         | 1.  Set valid UID/data value pair , with create flag value none.<br />2. Call get and get_info API to validate the data, attributes associated with data.<br />3. Call set API again with same uid and create flag  PSA_PS_WRITE_ONCE_FLAG.<br />4. Call get and get_info API to validate the data, attributes associated with data is not changed after second set operation<br />5. Try to remove the UID/data pair.<br />6. Create new UID/data value pair, with create flag PSA_PS_WRITE_ONCE_FLAG.<br />7. Try to remove the created UID.<br />8. Call get and get_info API to validate the data, attributes associated with data.<br />9. Again call SET with same UID , create flag PSA_PS_WRITE_ONCE_FLAG but different data length.<br />10. Try to remove the UID, PSA_PS_ERROR_WRITE_ONCE error should be returned.<br />11. Call get and get_info API to validate the data, attributes associated with data.<br /> | UID value used are 1 and 2                                                                                                                                                                     |
-| test_s003 | Exhaust storage space |  psa_ps_set<br />      |  PSA_PS_ERROR_INSUFFICIENT_SPACE                                                         | 1. Create UID/data pairs, with data_len 256 bytes. Do this with incrementing uid values till we have INSUFFICENT_SPACE.<br />2. Remove all the UID/data pairs created.<br />3. Repeat the steps once more, to check all previous uid are removed successfully.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | UID value starts from 5 and keep on incrementing till all space is exhausted                                                                                                                    |
-| test_s004 | Overwriting data for asset created without<br /> WRITE_ONCE flag                   | psa_ps_set<br />psa_ps_get<br />psa_ps_get_info<br />psa_ps_remove<br />  | PSA_PS_SUCCESS   | 1. Set a valid uid/data pair.<br />2. Validate the data using get api.<br />3. Change the data length to half of previous.<br />4. Call GET api with original data length , error should be returned and also the return buffer should be empty.<br />5. Call GET api with correct data_len and validate the data received.<br />6. Check old data cannot be accessed.<br />7. Call REMOVE api to delete the UID/data pair.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | UID value used is 5                                                                                                                                                                            |
-| test_s005 | Get, get_info and remove API call for valid assest                     | psa_ps_set<br />psa_ps_get<br />psa_ps_get_info<br />psa_ps_remove<br /> | PSA_PS_SUCCESS  | 1. Set valid UID/data pair with varying uid and data_len.<br />2. Call GET api and validate the set data.<br />3. Call GET info api and validate the data attributes.<br />4. Call REMOVE api to delete the UID/data pair.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | UID value used are 4                                                                                                                           |
-| test_s006 | Storage asset creation with unsupported    | psa_ps_set<br />     | PSA_PS_ERROR_FLAGS_NOT_SUPPORTED                                                        | 1.  Call the SET_INFO with minimum flag value to max flag value.<br />2. Call GET_INFO api and validae the flag value.<br />3. Remove the uid/data pair.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | UID value used is 5                                                                                                                          |
-| test_s007 | Get API call with invalid length | psa_ps_get<br /> | PSA_PS_ERROR_INCORRECT_SIZE                                                            | 1. Create valid uid/data pair.<br />2. Increase the length of storage.<br />3. Try to access the old length using get api.<br />4. Try to access with valid length less than stored size.<br />5. Decrease the length of storage.<br />6. Try to access the old length.<br />7. Remove the uid.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | UID value used is 5                                                                                                                       |
-| test_s008 | Get API call with invalid offset          | psa_ps_get<br />      | PSA_PS_ERROR_INCORRECT_SIZE                                                      | 1. Set valid UID/data pair.<br />2. Call GET api with valid offset and offset + data_len equal to stored data size.<br />3. Call GET api with valid offset and offset + data_len less than stored data size.<br />4. Call get api with invalid offset.<br />5. Call get api with zero offset , but data len greater than data size.<br />6. Remove the uid.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | UID value used is  5 |
-| test_s009 | API call with NULL pointer and zero length              | psa_ps_get<br />psa_ps_set<br />psa_ps_get_info<br /> | PSA_PS_SUCCESS                    | 1. Call the SET API with NULL pointer and data_len zero <br />2. Validate using get_info api storage should be present.<br />3. Call get API with NULL pointer.<br />4. Remove the UID.<br />5. Call get_info API to validate storage is removed.<br />6. Set storage entity with valid write_buffer , but length zero.<br />7. Call get_info API to validate storage attributes.<br />8. Call get_info api with NULL pointer and valid uid.<br />9. Remove the uid.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | UID value used is 5 <br />                                                                                                                                                                     |
-| test_s010 | Storage assest creation with UID value 0 <br />            | psa_ps_set<br />  |    PSA_PS_ERROR_INVALID_ARGUMENTS<br />                | 1. Call the SET API with UID value 0.<br />2. Check that storage creation fails.<br /> | UID value used is 0 <br />                                                                                                                                                                     |
-| test_p011 | Set_extended API's call for <br /> non-existent and removed assest             | psa_ps_set_extended<br />   | PSA_PS_ERROR_UID_NOT_FOUND<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_p012 |  Set_extended API's call <br /> with invalid offset           | psa_ps_set_extended<br />   | PSA_PS_ERROR_OFFSET_INVALID <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_p013 |  Create and set_extended API call for valid assest    | psa_ps_set_extended<br /> psa_ps_create      | PSA_PS_SUCCESS                                                      | 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_p014 | Create and set_extended API call<br /> when API's not supported    | psa_ps_create<br />psa_ps_set_extended<br />       | PSA_PS_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_p015 | Create API call with<br /> WRITE_ONCE flag    | psa_ps_create<br />              |PSA_PS_ERROR_FLAGS_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
-| NA | Storage Failure  <br />            | NA<br />    | PSA_PS_ERROR_STORAGE_FAILURE <br />|    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 />                                                                                                                                                                     |
-| NA | Operation Failure  <br />            | NA<br />    | PSA_PS_ERROR_OPERATION_FAILED <br />|    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 />                                                                                                                                                                     |
-| NA | Authentication Failure <br />            | NA<br />    | PSA_PS_ERROR_AUTH_FAILED <br />|    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 />                                                                                                                                                                     |
-| NA | Data Corruption  <br />            | NA<br />    | PSA_PS_ERROR_DATA_CORRUPT <br />|    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      | Test Scenario                         | API Verified   | Return Value            | Test Algorithm      | UID Usage              |
+|-----------|---------------------------------------|----------------|-------------------------|---------------------|------------------------|
+| test_s001 | Get,get_info and remove API's call for <br /> non-existent and removed assest | psa_its_get<br />psa_its_get_info <br />psa_its_remove<br />                 | PSA_ERROR_DOES_NOT_EXIST       | 1. Call get API with UID for which no UID/Data pair is created<br />2. Call get_info API for which no UID/Data pair is created<br />3. Call remove API for which no UID/Data pair is created<br />4. Set valid  UID/Data pair with uid1<br />5. Set one more set of UID/Data pair, with different uid, than previous<br />6. Remove the uid of step 4.<br />7. Call get API for  removed UID/data pair<br />8. Call get_info API for  removed UID/Data pair<br />9. Call remove API for  removed UID/Data pair<br />10. Set valid UID/Data pair<br />11. Call get API for different uid , then created<br />12. Call get_info API for different uid, then created<br />13. Call remove API for different uid, then created<br />14. Remove the created UID/Data pair.<br />15. Remove the stray uid.<br />                                                                                                         | UID value used are 5,6,7                                                                                                                     |
+| test_s002 | Overwriting data for asset created with<br /> WRITE_ONCE flag                 | psa_its_set<br />psa_its_remove<br />                                        | PSA_ERROR_NOT_PERMITTED        | 1. Set valid UID/data value pair , with create flag value none.<br />2. Call get and get_info API to validate the data, attributes associated with data<br />3. Call set API again with same uid and create flag  PSA_PS_WRITE_ONCE_FLAG<br />4. Call get and get_info API to validate the data, attributes associated with data<br /> is not changed after second set operation<br />5. try to remove the UID/data pair.<br />6. Create new UID/data value pair, with create flag PSA_PS_WRITE_ONCE_FLAG<br />7. Try to remove the created UID.<br />8. Call get and get_info API to validate the data, attributes associated with data<br />9. Again call SET with same UID , create flag PSA_PS_WRITE_ONCE_FLAG but <br />different data length<br />10. Try to remove the UID, PSA_ITS_ERROR_WRITE_ONCE error should be returned<br />11. Call get and get_info API to validate the data, attributes associated with data<br /> | UID value used are 1 and 2                                                                                                                                                                     |
+| test_s003 | Exhaust storage space                                                         | psa_its_set<br />                                                            | PSA_ERROR_INSUFFICIENT_STORAGE | 1. Create UID/data pairs, with data_len 1024 bytes. Do this with incrementing<br /> uid values till we have INSUFFICENT_SPACE.<br />2. Remove all the UID/data pairs created.<br />3. Repeat the steps once more, to check all previous uid are removed successfully<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | UID value starts from 5 and keep on incrementing till all space is exhausted                                                                                                                    |
+| test_s004 | Overwriting data for asset created without WRITE_ONCE flag                    | psa_its_set<br />psa_its_get<br />psa_its_get_info<br />psa_its_remove<br /> | PSA_SUCCESS                    | 1. Set a valid uid/data pair<br />2. Validate the data using get api<br />3. Change the data length to half of previous.<br />4. Call GET api with original data length , error should be returned and also<br /> the return buffer should be empty<br />5. Call GET api with correct data_len and validate the data received.<br />6. Check old data cannot be accessed.<br />7. Call REMOVE api to delete the UID/data pair<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | UID value used is 5                                                                                                                                                                            |
+| test_s005 | Get, get_info and remove API call for valid assest                            | psa_its_set<br />psa_its_get<br />psa_its_get_info<br />psa_its_remove<br /> | PSA_SUCCESS                    | 1. Set valid UID/data pair with varying uid and data_len <br />2. Call GET api and validate the set data<br />3. Call GET info api and validate the data attributes<br />4. Call REMOVE api to delete the UID/data pair<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | UID value used are 4                                                                                                                           |
+| test_s006 | Storage asset creation with unsupported <br /> create_flag value              | psa_its_set<br />                                                            | PSA_ERROR_NOT_SUPPORTED        | 1. Call the SET_INFO with minimum flag value to max flag value <br />2. Call GET_INFO api and validate the flag value<br />3. Remove the uid/data pair<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | UID value used is 5                                                                                                                          |
+| test_s007 | Get API call with length different than asset <br /> data length              | psa_its_set<br />                                                            | PSA_ERROR_INVALID_ARGUMENT     | 1. Create valid uid/data pair. <br />2. Increase the length of storage.<br />3. Try to access the old length using get api.<br />4. Try to access with valid length less than stored size.<br />5. Decrease the length of storage.<br />6. Try to access the old length.<br />7. Remove the uid<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | UID value used is 5                                                                                                                       |
+| test_s008 | Get API call with invalid offset                                              | psa_its_get<br />                                                            | PSA_ERROR_INVALID_ARGUMENT     | 1. Set valid UID/data pair<br />2. Call GET api with valid offset and offset + data_len equal to stored data size.<br />3. Call GET api with valid offset and offset + data_len less than stored data size.<br />4. Call get api with invalid offset.<br />5. Call get api with zero offset , but data len greater than data size.<br />6. Remove the uid.<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | UID value used is  5 |
+| test_s009 | API call with NULL pointer and zero length                                    | psa_its_get<br />psa_its_set<br />psa_its_get_info<br />                     | PSA_ERROR_DOES_NOT_EXIST       | 1. Call the SET API with NULL pointer and data_len zero <br />2. Validate using get_info api storage should be present.<br />3. Call get API with NULL pointer.<br />4. Remove the UID.<br />5. Call get_info API to validate storage is removed.<br />6. Set storage entity with valid write_buffer , but length zero.<br />7. Call get_info API to validate storage attributes.<br />8. Call get_info api with NULL pointer and valid uid.<br />9. Remove the uid<br />                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | UID value used is 5 <br />                                                                                                                                                                     |
+| test_s010 | Storage assest creation with UID value 0                                      | psa_its_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 />
+| test_p011 | Set_extended API's call for <br /> non-existent and removed assest            | psa_ps_set_extended<br />                                                    | PSA_ERROR_DOES_NOT_EXIST         | 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_p012 | Set_extended API's call <br /> with invalid offset                            | psa_ps_set_extended<br />                                                    | PSA_ERROR_INVALID_ARGUMENT       | 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_p013 | Create and set_extended API call for valid assest                             | psa_ps_set_extended<br /> psa_ps_create                                      | PSA_SUCCESS                      | 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_p014 | 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_p015 | 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 />
+| test_p016 | Create API call for capacity check                                            | psa_ps_create<br /> psa_ps_set<br /> psa_ps_get_info<br /> psa_ps_set_extended<br /> psa_ps_remove<br /> | PSA_ERROR_ALREADY_EXISTS<br /> PSA_ERROR_STORAGE_FAILURE | Below Steps will be run only if optional API are supported.<br /> 1. Create storage with valid UID and capacity using create<br /> 2. Check create for existing UID fails<br /> 3. Check the attributes of storage are unchanged<br /> 4. Override the storage using SET API<br /> 5. Check the attributes of storage are changed<br /> 6. Accessing old capacity with set_extended APU fails<br /> 7. Remove the storage<br /> 8. Create new storage with valid UID/data pair using set API<br /> 9. Check create API for existing UID fails<br /> 10. Remove the storage | UID value used is 5                                                                                                                                                           <br />
+| test_p017 | Partial write check with set extended API                                     | psa_ps_create<br /> psa_ps_set_extended<br /> psa_ps_get_info<br /> psa_ps_remove<br />                  | PSA_ERROR_STORAGE_FAILURE                                | Below Steps will be run only if optional API are supported.<br /> 1. Create storage with valid UID and capacity using create<br /> 2. Set partial data using set extended API<br /> 3. Check set extended API fails for data with gaps<br /> 4. Set full length data using set extended API<br /> 5. Check the valid attributes of storage<br /> 6. Remove the storage<br /> | UID value used is 5 <br />
+| NA        | Fatal error <br />                                                            | 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 /> |
+| NA        | Data Corruption  <br />                                                       | NA                                                                                                       | PSA_ERROR_DATA_CORRUPT                                   | 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 /> |
+| NA        | Invalid Signature <br />                                                      | NA                                                                                                       | PSA_ERROR_INVALID_SIGNATURE                              | 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 /> |
 
 ## License
 Arm PSA test suite is distributed under Apache v2.0 License.
diff --git a/api-tests/docs/sw_requirements.md b/api-tests/docs/sw_requirements.md
index 68fef75..0a22145 100644
--- a/api-tests/docs/sw_requirements.md
+++ b/api-tests/docs/sw_requirements.md
@@ -33,26 +33,11 @@
 ## Cloning the external repository
 
 To build Initial Attestation tests, the PSA APIs test suite clones the following
-git repository. The cloning is automated as part of the test suite
-build script **./setup.sh**:
+git repository. The cloning is automated as part of the test suite cmake build:
 
-~~~
-git clone https://github.com/laurencelundblade/QCBOR.git ./platform/targets/<platform_name>/nspe/initial_attestation/ext
-cd ./platform/targets/<platform_name>/nspe/initial_attestation/ext; git checkout da53227db1488dde0952bdff66c3d904dce270b3
-~~~
-
-## To build on Cygwin(32-bit)
-
-To build test suite on Cygwin ensure all the above prerequisite in place.
-
-**Note**: Downloading the test suite in Window platform can have extra
-newline chars than Unix. Therefore, it is recommended to execute the
-following command to change the newline char format before running
-any test suite command.<br />
-
-~~~
-dos2unix ./tools/scripts/setup.sh
-~~~
+**Repo** <br />
+Name      : https://github.com/laurencelundblade/QCBOR.git <br />
+Commit id : da53227db1488dde0952bdff66c3d904dce270b3
 
 ## License
 Arm PSA test suite is distributed under Apache v2.0 License.
diff --git a/api-tests/platform/targets/tgt_dev_apis_mbedos_fvp_mps2_m4/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c b/api-tests/platform/targets/tgt_dev_apis_mbedos_fvp_mps2_m4/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
index 4f04ab0..abfdc5d 100644
--- a/api-tests/platform/targets/tgt_dev_apis_mbedos_fvp_mps2_m4/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
+++ b/api-tests/platform/targets/tgt_dev_apis_mbedos_fvp_mps2_m4/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
@@ -26,33 +26,35 @@
 **/
 uint32_t pal_its_function(int type, va_list valist)
 {
-    psa_its_uid_t           uid;
-    uint32_t                data_length, offset;
-    const void              *p_write_data;
-    void                    *p_read_data;
-    psa_its_create_flags_t  its_create_flags;
-    struct psa_its_info_t   *its_p_info;
+    psa_storage_uid_t           uid;
+    uint32_t                    data_size, offset;
+    const void                  *p_write_data;
+    void                        *p_read_data;
+    size_t                      *p_data_length;
+    psa_storage_create_flags_t  its_create_flags;
+    struct psa_storage_info_t   *its_p_info;
 
     switch (type)
     {
     case PAL_ITS_SET:
-        uid = va_arg(valist, psa_its_uid_t);
-        data_length = va_arg(valist, uint32_t);
+        uid = va_arg(valist, psa_storage_uid_t);
+        data_size = va_arg(valist, uint32_t);
         p_write_data = va_arg(valist, const void*);
-        its_create_flags = va_arg(valist, psa_its_create_flags_t);
-        return psa_its_set(uid, data_length, p_write_data, its_create_flags);
+        its_create_flags = va_arg(valist, psa_storage_create_flags_t);
+        return psa_its_set(uid, data_size, p_write_data, its_create_flags);
     case PAL_ITS_GET:
-        uid = va_arg(valist, psa_its_uid_t);
+        uid = va_arg(valist, psa_storage_uid_t);
         offset = va_arg(valist, uint32_t);
-        data_length = va_arg(valist, uint32_t);
+        data_size = va_arg(valist, uint32_t);
         p_read_data = va_arg(valist, void*);
-        return psa_its_get(uid, offset, data_length, p_read_data);
+        p_data_length = va_arg(valist, size_t*);
+        return psa_its_get(uid, offset, data_size, p_read_data, p_data_length);
     case PAL_ITS_GET_INFO:
-        uid = va_arg(valist, psa_its_uid_t);
-        its_p_info = va_arg(valist, struct psa_its_info_t*);
+        uid = va_arg(valist, psa_storage_uid_t);
+        its_p_info = va_arg(valist, struct psa_storage_info_t*);
         return psa_its_get_info(uid, its_p_info);
     case PAL_ITS_REMOVE:
-        uid = va_arg(valist, psa_its_uid_t);
+        uid = va_arg(valist, psa_storage_uid_t);
         return psa_its_remove(uid);
     default:
         return PAL_STATUS_UNSUPPORTED_FUNC;
diff --git a/api-tests/platform/targets/tgt_dev_apis_mbedos_fvp_mps2_m4/nspe/protected_storage/pal_protected_storage_intf.c b/api-tests/platform/targets/tgt_dev_apis_mbedos_fvp_mps2_m4/nspe/protected_storage/pal_protected_storage_intf.c
index a424153..0dd07c5 100644
--- a/api-tests/platform/targets/tgt_dev_apis_mbedos_fvp_mps2_m4/nspe/protected_storage/pal_protected_storage_intf.c
+++ b/api-tests/platform/targets/tgt_dev_apis_mbedos_fvp_mps2_m4/nspe/protected_storage/pal_protected_storage_intf.c
@@ -26,45 +26,47 @@
 **/
 uint32_t pal_ps_function(int type, va_list valist)
 {
-    psa_ps_uid_t            uid;
-    uint32_t                data_length, size, offset;
-    const void              *p_write_data;
-    void                    *p_read_data;
-    psa_ps_create_flags_t   ps_create_flags;
-    struct psa_ps_info_t    *ps_p_info;
+    psa_storage_uid_t          uid;
+    uint32_t                   data_size, size, offset;
+    const void                 *p_write_data;
+    void                       *p_read_data;
+    size_t                     *p_data_length;
+    psa_storage_create_flags_t ps_create_flags;
+    struct psa_storage_info_t  *ps_p_info;
 
     switch (type)
     {
      case PAL_PS_SET:
-         uid = va_arg(valist, psa_ps_uid_t);
-         data_length = va_arg(valist, uint32_t);
+         uid = va_arg(valist, psa_storage_uid_t);
+         data_size = va_arg(valist, uint32_t);
          p_write_data = va_arg(valist, const void*);
-         ps_create_flags = va_arg(valist, psa_ps_create_flags_t);
-         return psa_ps_set(uid, data_length, p_write_data, ps_create_flags);
+         ps_create_flags = va_arg(valist, psa_storage_create_flags_t);
+         return psa_ps_set(uid, data_size, p_write_data, ps_create_flags);
      case PAL_PS_GET:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          offset = va_arg(valist, uint32_t);
-         data_length = va_arg(valist, uint32_t);
+         data_size = va_arg(valist, uint32_t);
          p_read_data = va_arg(valist, void*);
-         return psa_ps_get(uid, offset, data_length, p_read_data);
+         p_data_length = va_arg(valist, size_t*);
+         return psa_ps_get(uid, offset, data_size, p_read_data, p_data_length);
      case PAL_PS_GET_INFO:
-         uid = va_arg(valist, psa_ps_uid_t);
-         ps_p_info = va_arg(valist, struct psa_ps_info_t*);
+         uid = va_arg(valist, psa_storage_uid_t);
+         ps_p_info = va_arg(valist, struct psa_storage_info_t*);
          return psa_ps_get_info(uid, ps_p_info);
      case PAL_PS_REMOVE:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          return psa_ps_remove(uid);
      case PAL_PS_CREATE:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          size = va_arg(valist, uint32_t);
-         ps_create_flags = va_arg(valist, psa_ps_create_flags_t);
+         ps_create_flags = va_arg(valist, psa_storage_create_flags_t);
          return psa_ps_create(uid, size, ps_create_flags);
      case PAL_PS_SET_EXTENDED:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          offset = va_arg(valist, uint32_t);
-         data_length = va_arg(valist, uint32_t);
+         data_size = va_arg(valist, uint32_t);
          p_write_data = va_arg(valist, const void*);
-         return psa_ps_set_extended(uid, offset, data_length, p_write_data);
+         return psa_ps_set_extended(uid, offset, data_size, p_write_data);
      case PAL_PS_GET_SUPPORT:
          return psa_ps_get_support();
     default:
diff --git a/api-tests/platform/targets/tgt_dev_apis_tfm_an521/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c b/api-tests/platform/targets/tgt_dev_apis_tfm_an521/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
index 4f04ab0..abfdc5d 100644
--- a/api-tests/platform/targets/tgt_dev_apis_tfm_an521/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
+++ b/api-tests/platform/targets/tgt_dev_apis_tfm_an521/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
@@ -26,33 +26,35 @@
 **/
 uint32_t pal_its_function(int type, va_list valist)
 {
-    psa_its_uid_t           uid;
-    uint32_t                data_length, offset;
-    const void              *p_write_data;
-    void                    *p_read_data;
-    psa_its_create_flags_t  its_create_flags;
-    struct psa_its_info_t   *its_p_info;
+    psa_storage_uid_t           uid;
+    uint32_t                    data_size, offset;
+    const void                  *p_write_data;
+    void                        *p_read_data;
+    size_t                      *p_data_length;
+    psa_storage_create_flags_t  its_create_flags;
+    struct psa_storage_info_t   *its_p_info;
 
     switch (type)
     {
     case PAL_ITS_SET:
-        uid = va_arg(valist, psa_its_uid_t);
-        data_length = va_arg(valist, uint32_t);
+        uid = va_arg(valist, psa_storage_uid_t);
+        data_size = va_arg(valist, uint32_t);
         p_write_data = va_arg(valist, const void*);
-        its_create_flags = va_arg(valist, psa_its_create_flags_t);
-        return psa_its_set(uid, data_length, p_write_data, its_create_flags);
+        its_create_flags = va_arg(valist, psa_storage_create_flags_t);
+        return psa_its_set(uid, data_size, p_write_data, its_create_flags);
     case PAL_ITS_GET:
-        uid = va_arg(valist, psa_its_uid_t);
+        uid = va_arg(valist, psa_storage_uid_t);
         offset = va_arg(valist, uint32_t);
-        data_length = va_arg(valist, uint32_t);
+        data_size = va_arg(valist, uint32_t);
         p_read_data = va_arg(valist, void*);
-        return psa_its_get(uid, offset, data_length, p_read_data);
+        p_data_length = va_arg(valist, size_t*);
+        return psa_its_get(uid, offset, data_size, p_read_data, p_data_length);
     case PAL_ITS_GET_INFO:
-        uid = va_arg(valist, psa_its_uid_t);
-        its_p_info = va_arg(valist, struct psa_its_info_t*);
+        uid = va_arg(valist, psa_storage_uid_t);
+        its_p_info = va_arg(valist, struct psa_storage_info_t*);
         return psa_its_get_info(uid, its_p_info);
     case PAL_ITS_REMOVE:
-        uid = va_arg(valist, psa_its_uid_t);
+        uid = va_arg(valist, psa_storage_uid_t);
         return psa_its_remove(uid);
     default:
         return PAL_STATUS_UNSUPPORTED_FUNC;
diff --git a/api-tests/platform/targets/tgt_dev_apis_tfm_an521/nspe/protected_storage/pal_protected_storage_intf.c b/api-tests/platform/targets/tgt_dev_apis_tfm_an521/nspe/protected_storage/pal_protected_storage_intf.c
index a424153..0dd07c5 100644
--- a/api-tests/platform/targets/tgt_dev_apis_tfm_an521/nspe/protected_storage/pal_protected_storage_intf.c
+++ b/api-tests/platform/targets/tgt_dev_apis_tfm_an521/nspe/protected_storage/pal_protected_storage_intf.c
@@ -26,45 +26,47 @@
 **/
 uint32_t pal_ps_function(int type, va_list valist)
 {
-    psa_ps_uid_t            uid;
-    uint32_t                data_length, size, offset;
-    const void              *p_write_data;
-    void                    *p_read_data;
-    psa_ps_create_flags_t   ps_create_flags;
-    struct psa_ps_info_t    *ps_p_info;
+    psa_storage_uid_t          uid;
+    uint32_t                   data_size, size, offset;
+    const void                 *p_write_data;
+    void                       *p_read_data;
+    size_t                     *p_data_length;
+    psa_storage_create_flags_t ps_create_flags;
+    struct psa_storage_info_t  *ps_p_info;
 
     switch (type)
     {
      case PAL_PS_SET:
-         uid = va_arg(valist, psa_ps_uid_t);
-         data_length = va_arg(valist, uint32_t);
+         uid = va_arg(valist, psa_storage_uid_t);
+         data_size = va_arg(valist, uint32_t);
          p_write_data = va_arg(valist, const void*);
-         ps_create_flags = va_arg(valist, psa_ps_create_flags_t);
-         return psa_ps_set(uid, data_length, p_write_data, ps_create_flags);
+         ps_create_flags = va_arg(valist, psa_storage_create_flags_t);
+         return psa_ps_set(uid, data_size, p_write_data, ps_create_flags);
      case PAL_PS_GET:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          offset = va_arg(valist, uint32_t);
-         data_length = va_arg(valist, uint32_t);
+         data_size = va_arg(valist, uint32_t);
          p_read_data = va_arg(valist, void*);
-         return psa_ps_get(uid, offset, data_length, p_read_data);
+         p_data_length = va_arg(valist, size_t*);
+         return psa_ps_get(uid, offset, data_size, p_read_data, p_data_length);
      case PAL_PS_GET_INFO:
-         uid = va_arg(valist, psa_ps_uid_t);
-         ps_p_info = va_arg(valist, struct psa_ps_info_t*);
+         uid = va_arg(valist, psa_storage_uid_t);
+         ps_p_info = va_arg(valist, struct psa_storage_info_t*);
          return psa_ps_get_info(uid, ps_p_info);
      case PAL_PS_REMOVE:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          return psa_ps_remove(uid);
      case PAL_PS_CREATE:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          size = va_arg(valist, uint32_t);
-         ps_create_flags = va_arg(valist, psa_ps_create_flags_t);
+         ps_create_flags = va_arg(valist, psa_storage_create_flags_t);
          return psa_ps_create(uid, size, ps_create_flags);
      case PAL_PS_SET_EXTENDED:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          offset = va_arg(valist, uint32_t);
-         data_length = va_arg(valist, uint32_t);
+         data_size = va_arg(valist, uint32_t);
          p_write_data = va_arg(valist, const void*);
-         return psa_ps_set_extended(uid, offset, data_length, p_write_data);
+         return psa_ps_set_extended(uid, offset, data_size, p_write_data);
      case PAL_PS_GET_SUPPORT:
          return psa_ps_get_support();
     default:
diff --git a/api-tests/platform/targets/tgt_dev_apis_tfm_an524/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c b/api-tests/platform/targets/tgt_dev_apis_tfm_an524/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
index 4f04ab0..abfdc5d 100644
--- a/api-tests/platform/targets/tgt_dev_apis_tfm_an524/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
+++ b/api-tests/platform/targets/tgt_dev_apis_tfm_an524/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
@@ -26,33 +26,35 @@
 **/
 uint32_t pal_its_function(int type, va_list valist)
 {
-    psa_its_uid_t           uid;
-    uint32_t                data_length, offset;
-    const void              *p_write_data;
-    void                    *p_read_data;
-    psa_its_create_flags_t  its_create_flags;
-    struct psa_its_info_t   *its_p_info;
+    psa_storage_uid_t           uid;
+    uint32_t                    data_size, offset;
+    const void                  *p_write_data;
+    void                        *p_read_data;
+    size_t                      *p_data_length;
+    psa_storage_create_flags_t  its_create_flags;
+    struct psa_storage_info_t   *its_p_info;
 
     switch (type)
     {
     case PAL_ITS_SET:
-        uid = va_arg(valist, psa_its_uid_t);
-        data_length = va_arg(valist, uint32_t);
+        uid = va_arg(valist, psa_storage_uid_t);
+        data_size = va_arg(valist, uint32_t);
         p_write_data = va_arg(valist, const void*);
-        its_create_flags = va_arg(valist, psa_its_create_flags_t);
-        return psa_its_set(uid, data_length, p_write_data, its_create_flags);
+        its_create_flags = va_arg(valist, psa_storage_create_flags_t);
+        return psa_its_set(uid, data_size, p_write_data, its_create_flags);
     case PAL_ITS_GET:
-        uid = va_arg(valist, psa_its_uid_t);
+        uid = va_arg(valist, psa_storage_uid_t);
         offset = va_arg(valist, uint32_t);
-        data_length = va_arg(valist, uint32_t);
+        data_size = va_arg(valist, uint32_t);
         p_read_data = va_arg(valist, void*);
-        return psa_its_get(uid, offset, data_length, p_read_data);
+        p_data_length = va_arg(valist, size_t*);
+        return psa_its_get(uid, offset, data_size, p_read_data, p_data_length);
     case PAL_ITS_GET_INFO:
-        uid = va_arg(valist, psa_its_uid_t);
-        its_p_info = va_arg(valist, struct psa_its_info_t*);
+        uid = va_arg(valist, psa_storage_uid_t);
+        its_p_info = va_arg(valist, struct psa_storage_info_t*);
         return psa_its_get_info(uid, its_p_info);
     case PAL_ITS_REMOVE:
-        uid = va_arg(valist, psa_its_uid_t);
+        uid = va_arg(valist, psa_storage_uid_t);
         return psa_its_remove(uid);
     default:
         return PAL_STATUS_UNSUPPORTED_FUNC;
diff --git a/api-tests/platform/targets/tgt_dev_apis_tfm_an524/nspe/protected_storage/pal_protected_storage_intf.c b/api-tests/platform/targets/tgt_dev_apis_tfm_an524/nspe/protected_storage/pal_protected_storage_intf.c
index a424153..0dd07c5 100644
--- a/api-tests/platform/targets/tgt_dev_apis_tfm_an524/nspe/protected_storage/pal_protected_storage_intf.c
+++ b/api-tests/platform/targets/tgt_dev_apis_tfm_an524/nspe/protected_storage/pal_protected_storage_intf.c
@@ -26,45 +26,47 @@
 **/
 uint32_t pal_ps_function(int type, va_list valist)
 {
-    psa_ps_uid_t            uid;
-    uint32_t                data_length, size, offset;
-    const void              *p_write_data;
-    void                    *p_read_data;
-    psa_ps_create_flags_t   ps_create_flags;
-    struct psa_ps_info_t    *ps_p_info;
+    psa_storage_uid_t          uid;
+    uint32_t                   data_size, size, offset;
+    const void                 *p_write_data;
+    void                       *p_read_data;
+    size_t                     *p_data_length;
+    psa_storage_create_flags_t ps_create_flags;
+    struct psa_storage_info_t  *ps_p_info;
 
     switch (type)
     {
      case PAL_PS_SET:
-         uid = va_arg(valist, psa_ps_uid_t);
-         data_length = va_arg(valist, uint32_t);
+         uid = va_arg(valist, psa_storage_uid_t);
+         data_size = va_arg(valist, uint32_t);
          p_write_data = va_arg(valist, const void*);
-         ps_create_flags = va_arg(valist, psa_ps_create_flags_t);
-         return psa_ps_set(uid, data_length, p_write_data, ps_create_flags);
+         ps_create_flags = va_arg(valist, psa_storage_create_flags_t);
+         return psa_ps_set(uid, data_size, p_write_data, ps_create_flags);
      case PAL_PS_GET:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          offset = va_arg(valist, uint32_t);
-         data_length = va_arg(valist, uint32_t);
+         data_size = va_arg(valist, uint32_t);
          p_read_data = va_arg(valist, void*);
-         return psa_ps_get(uid, offset, data_length, p_read_data);
+         p_data_length = va_arg(valist, size_t*);
+         return psa_ps_get(uid, offset, data_size, p_read_data, p_data_length);
      case PAL_PS_GET_INFO:
-         uid = va_arg(valist, psa_ps_uid_t);
-         ps_p_info = va_arg(valist, struct psa_ps_info_t*);
+         uid = va_arg(valist, psa_storage_uid_t);
+         ps_p_info = va_arg(valist, struct psa_storage_info_t*);
          return psa_ps_get_info(uid, ps_p_info);
      case PAL_PS_REMOVE:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          return psa_ps_remove(uid);
      case PAL_PS_CREATE:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          size = va_arg(valist, uint32_t);
-         ps_create_flags = va_arg(valist, psa_ps_create_flags_t);
+         ps_create_flags = va_arg(valist, psa_storage_create_flags_t);
          return psa_ps_create(uid, size, ps_create_flags);
      case PAL_PS_SET_EXTENDED:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          offset = va_arg(valist, uint32_t);
-         data_length = va_arg(valist, uint32_t);
+         data_size = va_arg(valist, uint32_t);
          p_write_data = va_arg(valist, const void*);
-         return psa_ps_set_extended(uid, offset, data_length, p_write_data);
+         return psa_ps_set_extended(uid, offset, data_size, p_write_data);
      case PAL_PS_GET_SUPPORT:
          return psa_ps_get_support();
     default:
diff --git a/api-tests/platform/targets/tgt_dev_apis_tfm_musca_a/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c b/api-tests/platform/targets/tgt_dev_apis_tfm_musca_a/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
index 4f04ab0..abfdc5d 100644
--- a/api-tests/platform/targets/tgt_dev_apis_tfm_musca_a/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
+++ b/api-tests/platform/targets/tgt_dev_apis_tfm_musca_a/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
@@ -26,33 +26,35 @@
 **/
 uint32_t pal_its_function(int type, va_list valist)
 {
-    psa_its_uid_t           uid;
-    uint32_t                data_length, offset;
-    const void              *p_write_data;
-    void                    *p_read_data;
-    psa_its_create_flags_t  its_create_flags;
-    struct psa_its_info_t   *its_p_info;
+    psa_storage_uid_t           uid;
+    uint32_t                    data_size, offset;
+    const void                  *p_write_data;
+    void                        *p_read_data;
+    size_t                      *p_data_length;
+    psa_storage_create_flags_t  its_create_flags;
+    struct psa_storage_info_t   *its_p_info;
 
     switch (type)
     {
     case PAL_ITS_SET:
-        uid = va_arg(valist, psa_its_uid_t);
-        data_length = va_arg(valist, uint32_t);
+        uid = va_arg(valist, psa_storage_uid_t);
+        data_size = va_arg(valist, uint32_t);
         p_write_data = va_arg(valist, const void*);
-        its_create_flags = va_arg(valist, psa_its_create_flags_t);
-        return psa_its_set(uid, data_length, p_write_data, its_create_flags);
+        its_create_flags = va_arg(valist, psa_storage_create_flags_t);
+        return psa_its_set(uid, data_size, p_write_data, its_create_flags);
     case PAL_ITS_GET:
-        uid = va_arg(valist, psa_its_uid_t);
+        uid = va_arg(valist, psa_storage_uid_t);
         offset = va_arg(valist, uint32_t);
-        data_length = va_arg(valist, uint32_t);
+        data_size = va_arg(valist, uint32_t);
         p_read_data = va_arg(valist, void*);
-        return psa_its_get(uid, offset, data_length, p_read_data);
+        p_data_length = va_arg(valist, size_t*);
+        return psa_its_get(uid, offset, data_size, p_read_data, p_data_length);
     case PAL_ITS_GET_INFO:
-        uid = va_arg(valist, psa_its_uid_t);
-        its_p_info = va_arg(valist, struct psa_its_info_t*);
+        uid = va_arg(valist, psa_storage_uid_t);
+        its_p_info = va_arg(valist, struct psa_storage_info_t*);
         return psa_its_get_info(uid, its_p_info);
     case PAL_ITS_REMOVE:
-        uid = va_arg(valist, psa_its_uid_t);
+        uid = va_arg(valist, psa_storage_uid_t);
         return psa_its_remove(uid);
     default:
         return PAL_STATUS_UNSUPPORTED_FUNC;
diff --git a/api-tests/platform/targets/tgt_dev_apis_tfm_musca_a/nspe/protected_storage/pal_protected_storage_intf.c b/api-tests/platform/targets/tgt_dev_apis_tfm_musca_a/nspe/protected_storage/pal_protected_storage_intf.c
index a424153..0dd07c5 100644
--- a/api-tests/platform/targets/tgt_dev_apis_tfm_musca_a/nspe/protected_storage/pal_protected_storage_intf.c
+++ b/api-tests/platform/targets/tgt_dev_apis_tfm_musca_a/nspe/protected_storage/pal_protected_storage_intf.c
@@ -26,45 +26,47 @@
 **/
 uint32_t pal_ps_function(int type, va_list valist)
 {
-    psa_ps_uid_t            uid;
-    uint32_t                data_length, size, offset;
-    const void              *p_write_data;
-    void                    *p_read_data;
-    psa_ps_create_flags_t   ps_create_flags;
-    struct psa_ps_info_t    *ps_p_info;
+    psa_storage_uid_t          uid;
+    uint32_t                   data_size, size, offset;
+    const void                 *p_write_data;
+    void                       *p_read_data;
+    size_t                     *p_data_length;
+    psa_storage_create_flags_t ps_create_flags;
+    struct psa_storage_info_t  *ps_p_info;
 
     switch (type)
     {
      case PAL_PS_SET:
-         uid = va_arg(valist, psa_ps_uid_t);
-         data_length = va_arg(valist, uint32_t);
+         uid = va_arg(valist, psa_storage_uid_t);
+         data_size = va_arg(valist, uint32_t);
          p_write_data = va_arg(valist, const void*);
-         ps_create_flags = va_arg(valist, psa_ps_create_flags_t);
-         return psa_ps_set(uid, data_length, p_write_data, ps_create_flags);
+         ps_create_flags = va_arg(valist, psa_storage_create_flags_t);
+         return psa_ps_set(uid, data_size, p_write_data, ps_create_flags);
      case PAL_PS_GET:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          offset = va_arg(valist, uint32_t);
-         data_length = va_arg(valist, uint32_t);
+         data_size = va_arg(valist, uint32_t);
          p_read_data = va_arg(valist, void*);
-         return psa_ps_get(uid, offset, data_length, p_read_data);
+         p_data_length = va_arg(valist, size_t*);
+         return psa_ps_get(uid, offset, data_size, p_read_data, p_data_length);
      case PAL_PS_GET_INFO:
-         uid = va_arg(valist, psa_ps_uid_t);
-         ps_p_info = va_arg(valist, struct psa_ps_info_t*);
+         uid = va_arg(valist, psa_storage_uid_t);
+         ps_p_info = va_arg(valist, struct psa_storage_info_t*);
          return psa_ps_get_info(uid, ps_p_info);
      case PAL_PS_REMOVE:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          return psa_ps_remove(uid);
      case PAL_PS_CREATE:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          size = va_arg(valist, uint32_t);
-         ps_create_flags = va_arg(valist, psa_ps_create_flags_t);
+         ps_create_flags = va_arg(valist, psa_storage_create_flags_t);
          return psa_ps_create(uid, size, ps_create_flags);
      case PAL_PS_SET_EXTENDED:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          offset = va_arg(valist, uint32_t);
-         data_length = va_arg(valist, uint32_t);
+         data_size = va_arg(valist, uint32_t);
          p_write_data = va_arg(valist, const void*);
-         return psa_ps_set_extended(uid, offset, data_length, p_write_data);
+         return psa_ps_set_extended(uid, offset, data_size, p_write_data);
      case PAL_PS_GET_SUPPORT:
          return psa_ps_get_support();
     default:
diff --git a/api-tests/platform/targets/tgt_dev_apis_tfm_musca_b1/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c b/api-tests/platform/targets/tgt_dev_apis_tfm_musca_b1/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
index 4f04ab0..abfdc5d 100644
--- a/api-tests/platform/targets/tgt_dev_apis_tfm_musca_b1/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
+++ b/api-tests/platform/targets/tgt_dev_apis_tfm_musca_b1/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
@@ -26,33 +26,35 @@
 **/
 uint32_t pal_its_function(int type, va_list valist)
 {
-    psa_its_uid_t           uid;
-    uint32_t                data_length, offset;
-    const void              *p_write_data;
-    void                    *p_read_data;
-    psa_its_create_flags_t  its_create_flags;
-    struct psa_its_info_t   *its_p_info;
+    psa_storage_uid_t           uid;
+    uint32_t                    data_size, offset;
+    const void                  *p_write_data;
+    void                        *p_read_data;
+    size_t                      *p_data_length;
+    psa_storage_create_flags_t  its_create_flags;
+    struct psa_storage_info_t   *its_p_info;
 
     switch (type)
     {
     case PAL_ITS_SET:
-        uid = va_arg(valist, psa_its_uid_t);
-        data_length = va_arg(valist, uint32_t);
+        uid = va_arg(valist, psa_storage_uid_t);
+        data_size = va_arg(valist, uint32_t);
         p_write_data = va_arg(valist, const void*);
-        its_create_flags = va_arg(valist, psa_its_create_flags_t);
-        return psa_its_set(uid, data_length, p_write_data, its_create_flags);
+        its_create_flags = va_arg(valist, psa_storage_create_flags_t);
+        return psa_its_set(uid, data_size, p_write_data, its_create_flags);
     case PAL_ITS_GET:
-        uid = va_arg(valist, psa_its_uid_t);
+        uid = va_arg(valist, psa_storage_uid_t);
         offset = va_arg(valist, uint32_t);
-        data_length = va_arg(valist, uint32_t);
+        data_size = va_arg(valist, uint32_t);
         p_read_data = va_arg(valist, void*);
-        return psa_its_get(uid, offset, data_length, p_read_data);
+        p_data_length = va_arg(valist, size_t*);
+        return psa_its_get(uid, offset, data_size, p_read_data, p_data_length);
     case PAL_ITS_GET_INFO:
-        uid = va_arg(valist, psa_its_uid_t);
-        its_p_info = va_arg(valist, struct psa_its_info_t*);
+        uid = va_arg(valist, psa_storage_uid_t);
+        its_p_info = va_arg(valist, struct psa_storage_info_t*);
         return psa_its_get_info(uid, its_p_info);
     case PAL_ITS_REMOVE:
-        uid = va_arg(valist, psa_its_uid_t);
+        uid = va_arg(valist, psa_storage_uid_t);
         return psa_its_remove(uid);
     default:
         return PAL_STATUS_UNSUPPORTED_FUNC;
diff --git a/api-tests/platform/targets/tgt_dev_apis_tfm_musca_b1/nspe/protected_storage/pal_protected_storage_intf.c b/api-tests/platform/targets/tgt_dev_apis_tfm_musca_b1/nspe/protected_storage/pal_protected_storage_intf.c
index a424153..0dd07c5 100644
--- a/api-tests/platform/targets/tgt_dev_apis_tfm_musca_b1/nspe/protected_storage/pal_protected_storage_intf.c
+++ b/api-tests/platform/targets/tgt_dev_apis_tfm_musca_b1/nspe/protected_storage/pal_protected_storage_intf.c
@@ -26,45 +26,47 @@
 **/
 uint32_t pal_ps_function(int type, va_list valist)
 {
-    psa_ps_uid_t            uid;
-    uint32_t                data_length, size, offset;
-    const void              *p_write_data;
-    void                    *p_read_data;
-    psa_ps_create_flags_t   ps_create_flags;
-    struct psa_ps_info_t    *ps_p_info;
+    psa_storage_uid_t          uid;
+    uint32_t                   data_size, size, offset;
+    const void                 *p_write_data;
+    void                       *p_read_data;
+    size_t                     *p_data_length;
+    psa_storage_create_flags_t ps_create_flags;
+    struct psa_storage_info_t  *ps_p_info;
 
     switch (type)
     {
      case PAL_PS_SET:
-         uid = va_arg(valist, psa_ps_uid_t);
-         data_length = va_arg(valist, uint32_t);
+         uid = va_arg(valist, psa_storage_uid_t);
+         data_size = va_arg(valist, uint32_t);
          p_write_data = va_arg(valist, const void*);
-         ps_create_flags = va_arg(valist, psa_ps_create_flags_t);
-         return psa_ps_set(uid, data_length, p_write_data, ps_create_flags);
+         ps_create_flags = va_arg(valist, psa_storage_create_flags_t);
+         return psa_ps_set(uid, data_size, p_write_data, ps_create_flags);
      case PAL_PS_GET:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          offset = va_arg(valist, uint32_t);
-         data_length = va_arg(valist, uint32_t);
+         data_size = va_arg(valist, uint32_t);
          p_read_data = va_arg(valist, void*);
-         return psa_ps_get(uid, offset, data_length, p_read_data);
+         p_data_length = va_arg(valist, size_t*);
+         return psa_ps_get(uid, offset, data_size, p_read_data, p_data_length);
      case PAL_PS_GET_INFO:
-         uid = va_arg(valist, psa_ps_uid_t);
-         ps_p_info = va_arg(valist, struct psa_ps_info_t*);
+         uid = va_arg(valist, psa_storage_uid_t);
+         ps_p_info = va_arg(valist, struct psa_storage_info_t*);
          return psa_ps_get_info(uid, ps_p_info);
      case PAL_PS_REMOVE:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          return psa_ps_remove(uid);
      case PAL_PS_CREATE:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          size = va_arg(valist, uint32_t);
-         ps_create_flags = va_arg(valist, psa_ps_create_flags_t);
+         ps_create_flags = va_arg(valist, psa_storage_create_flags_t);
          return psa_ps_create(uid, size, ps_create_flags);
      case PAL_PS_SET_EXTENDED:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          offset = va_arg(valist, uint32_t);
-         data_length = va_arg(valist, uint32_t);
+         data_size = va_arg(valist, uint32_t);
          p_write_data = va_arg(valist, const void*);
-         return psa_ps_set_extended(uid, offset, data_length, p_write_data);
+         return psa_ps_set_extended(uid, offset, data_size, p_write_data);
      case PAL_PS_GET_SUPPORT:
          return psa_ps_get_support();
     default:
diff --git a/api-tests/platform/targets/tgt_ff_mbedos_fvp_mps2_m4/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c b/api-tests/platform/targets/tgt_ff_mbedos_fvp_mps2_m4/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
index 4f04ab0..abfdc5d 100644
--- a/api-tests/platform/targets/tgt_ff_mbedos_fvp_mps2_m4/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
+++ b/api-tests/platform/targets/tgt_ff_mbedos_fvp_mps2_m4/nspe/internal_trusted_storage/pal_internal_trusted_storage_intf.c
@@ -26,33 +26,35 @@
 **/
 uint32_t pal_its_function(int type, va_list valist)
 {
-    psa_its_uid_t           uid;
-    uint32_t                data_length, offset;
-    const void              *p_write_data;
-    void                    *p_read_data;
-    psa_its_create_flags_t  its_create_flags;
-    struct psa_its_info_t   *its_p_info;
+    psa_storage_uid_t           uid;
+    uint32_t                    data_size, offset;
+    const void                  *p_write_data;
+    void                        *p_read_data;
+    size_t                      *p_data_length;
+    psa_storage_create_flags_t  its_create_flags;
+    struct psa_storage_info_t   *its_p_info;
 
     switch (type)
     {
     case PAL_ITS_SET:
-        uid = va_arg(valist, psa_its_uid_t);
-        data_length = va_arg(valist, uint32_t);
+        uid = va_arg(valist, psa_storage_uid_t);
+        data_size = va_arg(valist, uint32_t);
         p_write_data = va_arg(valist, const void*);
-        its_create_flags = va_arg(valist, psa_its_create_flags_t);
-        return psa_its_set(uid, data_length, p_write_data, its_create_flags);
+        its_create_flags = va_arg(valist, psa_storage_create_flags_t);
+        return psa_its_set(uid, data_size, p_write_data, its_create_flags);
     case PAL_ITS_GET:
-        uid = va_arg(valist, psa_its_uid_t);
+        uid = va_arg(valist, psa_storage_uid_t);
         offset = va_arg(valist, uint32_t);
-        data_length = va_arg(valist, uint32_t);
+        data_size = va_arg(valist, uint32_t);
         p_read_data = va_arg(valist, void*);
-        return psa_its_get(uid, offset, data_length, p_read_data);
+        p_data_length = va_arg(valist, size_t*);
+        return psa_its_get(uid, offset, data_size, p_read_data, p_data_length);
     case PAL_ITS_GET_INFO:
-        uid = va_arg(valist, psa_its_uid_t);
-        its_p_info = va_arg(valist, struct psa_its_info_t*);
+        uid = va_arg(valist, psa_storage_uid_t);
+        its_p_info = va_arg(valist, struct psa_storage_info_t*);
         return psa_its_get_info(uid, its_p_info);
     case PAL_ITS_REMOVE:
-        uid = va_arg(valist, psa_its_uid_t);
+        uid = va_arg(valist, psa_storage_uid_t);
         return psa_its_remove(uid);
     default:
         return PAL_STATUS_UNSUPPORTED_FUNC;
diff --git a/api-tests/platform/targets/tgt_ff_mbedos_fvp_mps2_m4/nspe/protected_storage/pal_protected_storage_intf.c b/api-tests/platform/targets/tgt_ff_mbedos_fvp_mps2_m4/nspe/protected_storage/pal_protected_storage_intf.c
index a424153..0dd07c5 100644
--- a/api-tests/platform/targets/tgt_ff_mbedos_fvp_mps2_m4/nspe/protected_storage/pal_protected_storage_intf.c
+++ b/api-tests/platform/targets/tgt_ff_mbedos_fvp_mps2_m4/nspe/protected_storage/pal_protected_storage_intf.c
@@ -26,45 +26,47 @@
 **/
 uint32_t pal_ps_function(int type, va_list valist)
 {
-    psa_ps_uid_t            uid;
-    uint32_t                data_length, size, offset;
-    const void              *p_write_data;
-    void                    *p_read_data;
-    psa_ps_create_flags_t   ps_create_flags;
-    struct psa_ps_info_t    *ps_p_info;
+    psa_storage_uid_t          uid;
+    uint32_t                   data_size, size, offset;
+    const void                 *p_write_data;
+    void                       *p_read_data;
+    size_t                     *p_data_length;
+    psa_storage_create_flags_t ps_create_flags;
+    struct psa_storage_info_t  *ps_p_info;
 
     switch (type)
     {
      case PAL_PS_SET:
-         uid = va_arg(valist, psa_ps_uid_t);
-         data_length = va_arg(valist, uint32_t);
+         uid = va_arg(valist, psa_storage_uid_t);
+         data_size = va_arg(valist, uint32_t);
          p_write_data = va_arg(valist, const void*);
-         ps_create_flags = va_arg(valist, psa_ps_create_flags_t);
-         return psa_ps_set(uid, data_length, p_write_data, ps_create_flags);
+         ps_create_flags = va_arg(valist, psa_storage_create_flags_t);
+         return psa_ps_set(uid, data_size, p_write_data, ps_create_flags);
      case PAL_PS_GET:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          offset = va_arg(valist, uint32_t);
-         data_length = va_arg(valist, uint32_t);
+         data_size = va_arg(valist, uint32_t);
          p_read_data = va_arg(valist, void*);
-         return psa_ps_get(uid, offset, data_length, p_read_data);
+         p_data_length = va_arg(valist, size_t*);
+         return psa_ps_get(uid, offset, data_size, p_read_data, p_data_length);
      case PAL_PS_GET_INFO:
-         uid = va_arg(valist, psa_ps_uid_t);
-         ps_p_info = va_arg(valist, struct psa_ps_info_t*);
+         uid = va_arg(valist, psa_storage_uid_t);
+         ps_p_info = va_arg(valist, struct psa_storage_info_t*);
          return psa_ps_get_info(uid, ps_p_info);
      case PAL_PS_REMOVE:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          return psa_ps_remove(uid);
      case PAL_PS_CREATE:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          size = va_arg(valist, uint32_t);
-         ps_create_flags = va_arg(valist, psa_ps_create_flags_t);
+         ps_create_flags = va_arg(valist, psa_storage_create_flags_t);
          return psa_ps_create(uid, size, ps_create_flags);
      case PAL_PS_SET_EXTENDED:
-         uid = va_arg(valist, psa_ps_uid_t);
+         uid = va_arg(valist, psa_storage_uid_t);
          offset = va_arg(valist, uint32_t);
-         data_length = va_arg(valist, uint32_t);
+         data_size = va_arg(valist, uint32_t);
          p_write_data = va_arg(valist, const void*);
-         return psa_ps_set_extended(uid, offset, data_length, p_write_data);
+         return psa_ps_set_extended(uid, offset, data_size, p_write_data);
      case PAL_PS_GET_SUPPORT:
          return psa_ps_get_support();
     default: