tf_fuzz: remove obsolete PSA Crypto API code

Remove obsolete PSA crypto macros and algorithms from the code generator
and demo tests. This fixes many of the demo crypto tests, which are
renabled by this patch.

TF-Fuzz was written before PSA Crypto 1.0 was stabilised; therefore,
some values used in the generated TF-Fuzz tests were renamed or
removed from the PSA Crypto headers when 1.0 was released.

Replacement values are derived from PSA Crypto API changelog from
1.0beta3 to 1.0; and removed values are based on the current
psa/crypto.h file in TF-M.

The adding of algorithms, key types, and usages added to PSA Crypto
since the writing of TF-Fuzz is outside the scope of this patch; not all
possible algorithms, key types, and usages are supported by TF-Fuzz at
present.

Change-Id: I3f3adc3043e4b9eb6b51feadfcc19074e6aafc60
Signed-off-by: Nik Dewally <Nik.Dewally@arm.com>
diff --git a/tf_fuzz/tfz-cpp/regression/000001_set_sst_uid_data_expect_pass/exp_test.c b/tf_fuzz/tfz-cpp/regression/000001_set_sst_uid_data_expect_pass/exp_test.c
index 5355b17..0b597f4 100644
--- a/tf_fuzz/tfz-cpp/regression/000001_set_sst_uid_data_expect_pass/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000001_set_sst_uid_data_expect_pass/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000002_set_sst_name_data_expect_nothing/exp_test.c b/tf_fuzz/tfz-cpp/regression/000002_set_sst_name_data_expect_nothing/exp_test.c
index 469f7d8..aa2e7eb 100644
--- a/tf_fuzz/tfz-cpp/regression/000002_set_sst_name_data_expect_nothing/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000002_set_sst_name_data_expect_nothing/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000003_set_sst_name_data/exp_test.c b/tf_fuzz/tfz-cpp/regression/000003_set_sst_name_data/exp_test.c
index 6a7d458..f2b90f0 100644
--- a/tf_fuzz/tfz-cpp/regression/000003_set_sst_name_data/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000003_set_sst_name_data/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000004_set_sst_name_rand_data/exp_test.c b/tf_fuzz/tfz-cpp/regression/000004_set_sst_name_rand_data/exp_test.c
index 2db4df8..057ab2b 100644
--- a/tf_fuzz/tfz-cpp/regression/000004_set_sst_name_rand_data/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000004_set_sst_name_rand_data/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000005_set_sst_rand_name_rand_data/exp_test.c b/tf_fuzz/tfz-cpp/regression/000005_set_sst_rand_name_rand_data/exp_test.c
index c53ff38..bdc3ef8 100644
--- a/tf_fuzz/tfz-cpp/regression/000005_set_sst_rand_name_rand_data/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000005_set_sst_rand_name_rand_data/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000006_set_sst_multi_name_rand_data/exp_test.c b/tf_fuzz/tfz-cpp/regression/000006_set_sst_multi_name_rand_data/exp_test.c
index 40c3935..e296957 100644
--- a/tf_fuzz/tfz-cpp/regression/000006_set_sst_multi_name_rand_data/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000006_set_sst_multi_name_rand_data/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000007_set_sst_multi_uid_rand_data/exp_test.c b/tf_fuzz/tfz-cpp/regression/000007_set_sst_multi_uid_rand_data/exp_test.c
index 54c9223..a3ec7f7 100644
--- a/tf_fuzz/tfz-cpp/regression/000007_set_sst_multi_uid_rand_data/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000007_set_sst_multi_uid_rand_data/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000008_set_sst_name_rand_data_read_check_wrong/exp_test.c b/tf_fuzz/tfz-cpp/regression/000008_set_sst_name_rand_data_read_check_wrong/exp_test.c
index ee11647..400ac89 100644
--- a/tf_fuzz/tfz-cpp/regression/000008_set_sst_name_rand_data_read_check_wrong/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000008_set_sst_name_rand_data_read_check_wrong/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000009_set_sst_name_rand_data_read_check_var_read_print/exp_test.c b/tf_fuzz/tfz-cpp/regression/000009_set_sst_name_rand_data_read_check_var_read_print/exp_test.c
index 67f5c5b..b387a1a 100644
--- a/tf_fuzz/tfz-cpp/regression/000009_set_sst_name_rand_data_read_check_var_read_print/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000009_set_sst_name_rand_data_read_check_var_read_print/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000010_read_nonexistent_sst_check_string/exp_test.c b/tf_fuzz/tfz-cpp/regression/000010_read_nonexistent_sst_check_string/exp_test.c
index cb4916f..72085dc 100644
--- a/tf_fuzz/tfz-cpp/regression/000010_read_nonexistent_sst_check_string/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000010_read_nonexistent_sst_check_string/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000011_read_nonexistent_sst_check_string_expect_pass/exp_test.c b/tf_fuzz/tfz-cpp/regression/000011_read_nonexistent_sst_check_string_expect_pass/exp_test.c
index 1279df6..2d464b0 100644
--- a/tf_fuzz/tfz-cpp/regression/000011_read_nonexistent_sst_check_string_expect_pass/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000011_read_nonexistent_sst_check_string_expect_pass/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000012_read_nonexistent_sst_check_string_expect_other/exp_test.c b/tf_fuzz/tfz-cpp/regression/000012_read_nonexistent_sst_check_string_expect_other/exp_test.c
index 07a1636..74c1545 100644
--- a/tf_fuzz/tfz-cpp/regression/000012_read_nonexistent_sst_check_string_expect_other/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000012_read_nonexistent_sst_check_string_expect_other/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000013_set_sst_name_rand_data_remove_twice/exp_test.c b/tf_fuzz/tfz-cpp/regression/000013_set_sst_name_rand_data_remove_twice/exp_test.c
index 77a4a41..57810a8 100644
--- a/tf_fuzz/tfz-cpp/regression/000013_set_sst_name_rand_data_remove_twice/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000013_set_sst_name_rand_data_remove_twice/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000014_set_sst_name_rand_data_remove_other/exp_test.c b/tf_fuzz/tfz-cpp/regression/000014_set_sst_name_rand_data_remove_other/exp_test.c
index 5f93e9a..236c3bd 100644
--- a/tf_fuzz/tfz-cpp/regression/000014_set_sst_name_rand_data_remove_other/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000014_set_sst_name_rand_data_remove_other/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000015_set_sst_name_only/exp_test.c b/tf_fuzz/tfz-cpp/regression/000015_set_sst_name_only/exp_test.c
index 8b82abf..9be60fb 100644
--- a/tf_fuzz/tfz-cpp/regression/000015_set_sst_name_only/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000015_set_sst_name_only/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000016_set_sst_single_asset_set_multiple_times/exp_test.c b/tf_fuzz/tfz-cpp/regression/000016_set_sst_single_asset_set_multiple_times/exp_test.c
index acefe35..eb3291c 100644
--- a/tf_fuzz/tfz-cpp/regression/000016_set_sst_single_asset_set_multiple_times/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000016_set_sst_single_asset_set_multiple_times/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000017_read_sst_check_single_asset_multiple_times/exp_test.c b/tf_fuzz/tfz-cpp/regression/000017_read_sst_check_single_asset_multiple_times/exp_test.c
index 81ac97e..1abe615 100644
--- a/tf_fuzz/tfz-cpp/regression/000017_read_sst_check_single_asset_multiple_times/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000017_read_sst_check_single_asset_multiple_times/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000018_000016_and_000017/exp_test.c b/tf_fuzz/tfz-cpp/regression/000018_000016_and_000017/exp_test.c
index dd6464d..353f3fb 100644
--- a/tf_fuzz/tfz-cpp/regression/000018_000016_and_000017/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000018_000016_and_000017/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000019_read_asset_to_variable_set_other_asset/exp_test.c b/tf_fuzz/tfz-cpp/regression/000019_read_asset_to_variable_set_other_asset/exp_test.c
index d3751b7..f22c575 100644
--- a/tf_fuzz/tfz-cpp/regression/000019_read_asset_to_variable_set_other_asset/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000019_read_asset_to_variable_set_other_asset/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000021_abbreviated_result_codes/exp_test.c b/tf_fuzz/tfz-cpp/regression/000021_abbreviated_result_codes/exp_test.c
index 07a1636..74c1545 100644
--- a/tf_fuzz/tfz-cpp/regression/000021_abbreviated_result_codes/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000021_abbreviated_result_codes/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000022_SST_offset/exp_test.c b/tf_fuzz/tfz-cpp/regression/000022_SST_offset/exp_test.c
index 421433f..93a169a 100644
--- a/tf_fuzz/tfz-cpp/regression/000022_SST_offset/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000022_SST_offset/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000023_SST_creation_flags/exp_test.c b/tf_fuzz/tfz-cpp/regression/000023_SST_creation_flags/exp_test.c
index f5cfcb1..45cecbc 100644
--- a/tf_fuzz/tfz-cpp/regression/000023_SST_creation_flags/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000023_SST_creation_flags/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/000024_SST_write_once/exp_test.c b/tf_fuzz/tfz-cpp/regression/000024_SST_write_once/exp_test.c
index 85c431b..2139ad9 100644
--- a/tf_fuzz/tfz-cpp/regression/000024_SST_write_once/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/000024_SST_write_once/exp_test.c
@@ -10,11 +10,9 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/tfz-cpp/regression/add_these_tests/000015_set_sst_multi_name_remove_rand_active/exp_test.c b/tf_fuzz/tfz-cpp/regression/add_these_tests/000015_set_sst_multi_name_remove_rand_active/exp_test.c
index 3bf0cd3..e3624cf 100644
--- a/tf_fuzz/tfz-cpp/regression/add_these_tests/000015_set_sst_multi_name_remove_rand_active/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/add_these_tests/000015_set_sst_multi_name_remove_rand_active/exp_test.c
@@ -10,11 +10,10 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
+
 /* For now, just a single test_result_t struct is sufficient.*/
 static struct test_result_t ret;
 
diff --git a/tf_fuzz/tfz-cpp/regression/add_these_tests/000016_set_sst_multi_name_remove_multi_rand_active_remove_rand_deleted/exp_test.c b/tf_fuzz/tfz-cpp/regression/add_these_tests/000016_set_sst_multi_name_remove_multi_rand_active_remove_rand_deleted/exp_test.c
index f06d582..6bda4b4 100644
--- a/tf_fuzz/tfz-cpp/regression/add_these_tests/000016_set_sst_multi_name_remove_multi_rand_active_remove_rand_deleted/exp_test.c
+++ b/tf_fuzz/tfz-cpp/regression/add_these_tests/000016_set_sst_multi_name_remove_multi_rand_active_remove_rand_deleted/exp_test.c
@@ -10,11 +10,10 @@
 #include <string.h>
 #include <stdint.h>
 
-#include "../sst/non_secure/ns_test_helpers.h"
+#include "extra_ns_tests.h"
 #include "psa/protected_storage.h"
-#include "test/framework/test_framework_helpers.h"
-#include "crypto_tests_common.h"
-#include "tfm_memory_utils.h"
+#include "psa/crypto.h"
+
 /* For now, just a single test_result_t struct is sufficient.*/
 static struct test_result_t ret;
 
diff --git a/tf_fuzz/tfz-cpp/template/crypto_template_line.hpp b/tf_fuzz/tfz-cpp/template/crypto_template_line.hpp
index 4626536..75be0fe 100644
--- a/tf_fuzz/tfz-cpp/template/crypto_template_line.hpp
+++ b/tf_fuzz/tfz-cpp/template/crypto_template_line.hpp
@@ -70,13 +70,13 @@
                                 add_to_end_bool, dont_set_barrier  );
             }
             if (policy_info.can_sign) {
-                policy_info.usage_string.assign ("PSA_KEY_USAGE_SIGN");
+                policy_info.usage_string.assign ("PSA_KEY_USAGE_SIGN_HASH");
                 define_call<add_policy_usage_call> (set_data, random_data,
                                 fill_in_template, create_call, temLin, rsrc,
                                 add_to_end_bool, dont_set_barrier  );
             }
             if (policy_info.can_verify) {
-                policy_info.usage_string.assign ("PSA_KEY_USAGE_VERIFY");
+                policy_info.usage_string.assign ("PSA_KEY_USAGE_VERIFY_HASH");
                 define_call<add_policy_usage_call> (set_data, random_data,
                                 fill_in_template, create_call, temLin, rsrc,
                                 add_to_end_bool, dont_set_barrier  );
@@ -175,13 +175,13 @@
                                 add_to_end, dont_set_barrier  );
                 policy_info.print_usage_true_string.assign ("key works for signing.");
                 policy_info.print_usage_false_string.assign ("key is not for signing.");
-                policy_info.usage_string.assign ("PSA_KEY_USAGE_SIGN");
+                policy_info.usage_string.assign ("PSA_KEY_USAGE_SIGN_HASH");
                 define_call<print_policy_usage_call> (set_data, random_data,
                                 fill_in_template, create_call, temLin, rsrc,
                                 add_to_end, dont_set_barrier  );
                 policy_info.print_usage_true_string.assign ("key can be used to verify.");
                 policy_info.print_usage_false_string.assign ("key not for verify.");
-                policy_info.usage_string.assign ("PSA_KEY_USAGE_VERIFY");
+                policy_info.usage_string.assign ("PSA_KEY_USAGE_VERIFY_HASH");
                 define_call<print_policy_usage_call> (set_data, random_data,
                                 fill_in_template, create_call, temLin, rsrc,
                                 add_to_end, dont_set_barrier  );
diff --git a/tf_fuzz/tfz-cpp/utility/randomization.cpp b/tf_fuzz/tfz-cpp/utility/randomization.cpp
index ad8ecbc..65f4a01 100644
--- a/tf_fuzz/tfz-cpp/utility/randomization.cpp
+++ b/tf_fuzz/tfz-cpp/utility/randomization.cpp
@@ -11,6 +11,8 @@
    and available to whomever needs them.
 **********************************************************************************/
 
+// TODO: the key usages, algorithms, and types are currently incomplete.
+
 #include "randomization.hpp"
 
 /**
@@ -27,8 +29,8 @@
         case 0:  return "PSA_KEY_USAGE_EXPORT";
         case 1:  return "PSA_KEY_USAGE_ENCRYPT";
         case 2:  return "PSA_KEY_USAGE_DECRYPT";
-        case 3:  return "PSA_KEY_USAGE_SIGN";
-        case 4:  return "PSA_KEY_USAGE_VERIFY";
+        case 3:  return "PSA_KEY_USAGE_SIGN_HASH";
+        case 4:  return "PSA_KEY_USAGE_VERIFY_HASH";
         case 5:  return "PSA_KEY_USAGE_DERIVE";
     }
     return "";  /* placate compiler */
@@ -46,54 +48,31 @@
    asymmetric, symmetric... */
 string rand_key_algorithm (void)
 {
-    switch (rand() % 47) {
-        case  0:  return "PSA_ALG_VENDOR_FLAG";
-        case  1:  return "PSA_ALG_CATEGORY_MASK";
-        case  2:  return "PSA_ALG_CATEGORY_HASH";
-        case  3:  return "PSA_ALG_CATEGORY_MAC";
-        case  4:  return "PSA_ALG_CATEGORY_CIPHER";
-        case  5:  return "PSA_ALG_CATEGORY_AEAD";
-        case  6:  return "PSA_ALG_CATEGORY_SIGN";
-        case  7:  return "PSA_ALG_CATEGORY_ASYMMETRIC_ENCRYPTION";
-        case  8:  return "PSA_ALG_CATEGORY_KEY_AGREEMENT";
-        case  9:  return "PSA_ALG_CATEGORY_KEY_DERIVATION";
-        case 10:  return "PSA_ALG_CATEGORY_KEY_SELECTION";
-        case 11:  return "PSA_ALG_KEY_SELECTION_FLAG";
-        case 12:  return "PSA_ALG_HASH_MASK";
-        case 13:  return "PSA_ALG_MD2";
-        case 14:  return "PSA_ALG_MD4";
-        case 15:  return "PSA_ALG_MD5";
-        case 16:  return "PSA_ALG_RIPEMD160";
-        case 17:  return "PSA_ALG_SHA_1";
-        case 18:  return "PSA_ALG_SHA_224";
-        case 19:  return "PSA_ALG_SHA_256";
-        case 20:  return "PSA_ALG_SHA_384";
-        case 21:  return "PSA_ALG_SHA_512";
-        case 22:  return "PSA_ALG_SHA_512_224";
-        case 23:  return "PSA_ALG_SHA_512_256";
-        case 24:  return "PSA_ALG_SHA3_224";
-        case 25:  return "PSA_ALG_SHA3_256";
-        case 26:  return "PSA_ALG_SHA3_384";
-        case 27:  return "PSA_ALG_SHA3_512";
-        case 28:  return "PSA_ALG_ANY_HASH";
-        case 29:  return "PSA_ALG_MAC_SUBCATEGORY_MASK";
-        case 30:  return "PSA_ALG_HMAC_BASE";
-        case 31:  return "PSA_ALG_MAC_TRUNCATION_MASK";
-        case 32:  return "PSA_ALG_CIPHER_MAC_BASE";
-        case 33:  return "PSA_ALG_CBC_MAC";
-        case 34:  return "PSA_ALG_CMAC";
-        case 35:  return "PSA_ALG_GMAC";
-        case 36:  return "PSA_ALG_CIPHER_STREAM_FLAG";
-        case 37:  return "PSA_ALG_CIPHER_FROM_BLOCK_FLAG";
-        case 38:  return "PSA_ALG_ARC4";
-        case 39:  return "PSA_ALG_CTR";
-        case 40:  return "PSA_ALG_CFB";
-        case 41:  return "PSA_ALG_OFB";
-        case 42:  return "PSA_ALG_XTS";
-        case 43:  return "PSA_ALG_CBC_NO_PADDING";
-        case 44:  return "PSA_ALG_CBC_PKCS7";
-        case 45:  return "PSA_ALG_CCM";
-        case 46:  return "PSA_ALG_GCM";
+    switch (rand() % 24) {
+        case 0:  return "PSA_ALG_MD5";
+        case 1:  return "PSA_ALG_RIPEMD160";
+        case 2:  return "PSA_ALG_SHA_1";
+        case 3:  return "PSA_ALG_SHA_224";
+        case 4:  return "PSA_ALG_SHA_256";
+        case 5:  return "PSA_ALG_SHA_384";
+        case 6:  return "PSA_ALG_SHA_512";
+        case 7:  return "PSA_ALG_SHA_512_224";
+        case 8:  return "PSA_ALG_SHA_512_256";
+        case 9:  return "PSA_ALG_SHA3_224";
+        case 10:  return "PSA_ALG_SHA3_256";
+        case 11:  return "PSA_ALG_SHA3_384";
+        case 12:  return "PSA_ALG_SHA3_512";
+        case 13:  return "PSA_ALG_ANY_HASH";
+        case 14:  return "PSA_ALG_CBC_MAC";
+        case 15:  return "PSA_ALG_CMAC";
+        case 16:  return "PSA_ALG_CTR";
+        case 17:  return "PSA_ALG_CFB";
+        case 18:  return "PSA_ALG_OFB";
+        case 19:  return "PSA_ALG_XTS";
+        case 20:  return "PSA_ALG_CBC_NO_PADDING";
+        case 21:  return "PSA_ALG_CBC_PKCS7";
+        case 22:  return "PSA_ALG_CCM";
+        case 23:  return "PSA_ALG_GCM";
     }
     return "";  /* placate compiler */
 }
@@ -109,30 +88,16 @@
  */
 string rand_key_type (void)
 {
-    switch (rand() % 22) {
+    switch (rand() % 9) {
         case 0:  return "PSA_KEY_TYPE_NONE";
-        case 1:  return "PSA_KEY_TYPE_VENDOR_FLAG";
-        case 2:  return "PSA_KEY_TYPE_CATEGORY_MASK";
-        case 3:  return "PSA_KEY_TYPE_CATEGORY_SYMMETRIC";
-        case 4:  return "PSA_KEY_TYPE_CATEGORY_RAW";
-        case 5:  return "PSA_KEY_TYPE_CATEGORY_PUBLIC_KEY";
-        case 6:  return "PSA_KEY_TYPE_CATEGORY_KEY_PAIR";
-        case 7:  return "PSA_KEY_TYPE_CATEGORY_FLAG_PAIR";
-        case 8:  return "PSA_KEY_TYPE_RAW_DATA";
-        case 9:  return "PSA_KEY_TYPE_HMAC";
-        case 10:  return "PSA_KEY_TYPE_DERIVE";
-        case 11:  return "PSA_KEY_TYPE_AES";
-        case 12:  return "PSA_KEY_TYPE_DES";
-        case 13:  return "PSA_KEY_TYPE_CAMELLIA";
-        case 14:  return "PSA_KEY_TYPE_ARC4";
-        case 15:  return "PSA_KEY_TYPE_RSA_PUBLIC_KEY";
-        case 16:  return "PSA_KEY_TYPE_RSA_KEYPAIR";
-        case 17:  return "PSA_KEY_TYPE_DSA_PUBLIC_KEY";
-        case 18:  return "PSA_KEY_TYPE_DSA_KEYPAIR";
-        case 19:  return "PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE";
-        case 20:  return "PSA_KEY_TYPE_ECC_KEYPAIR_BASE";
-        case 21:  return "PSA_KEY_TYPE_ECC_CURVE_MASK";
-        default:  return "";
+        case 1:  return "PSA_KEY_TYPE_RAW_DATA";
+        case 2:  return "PSA_KEY_TYPE_HMAC";
+        case 3:  return "PSA_KEY_TYPE_DERIVE";
+        case 4:  return "PSA_KEY_TYPE_AES";
+        case 5:  return "PSA_KEY_TYPE_DES";
+        case 6:  return "PSA_KEY_TYPE_CAMELLIA";
+        case 7:  return "PSA_KEY_TYPE_RSA_PUBLIC_KEY";
+        case 8:  return "PSA_KEY_TYPE_RSA_KEY_PAIR";
     }
     return "";  /* placate compiler */
 }