tf_fuzz: Minor improvements/fixes in TF-Fuzz

Problems corrected related to failing to deallocate resources
created over the course of a test, and to incorrect accounting for
variables when using statement-level randomization (i.e., the <n>
to <m> of {} and shuffle options).  Also removed several inter-
mediate files that should not have commited in the first place.

Change-Id: I0582cbfddb70563a071fee0cb9aaf2547876d051
diff --git a/tf_fuzz/regression/000001_set_sst_uid_data_expect_pass/check.py b/tf_fuzz/regression/000001_set_sst_uid_data_expect_pass/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000001_set_sst_uid_data_expect_pass/check.py
+++ b/tf_fuzz/regression/000001_set_sst_uid_data_expect_pass/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000001_set_sst_uid_data_expect_pass/exp_test.c b/tf_fuzz/regression/000001_set_sst_uid_data_expect_pass/exp_test.c
index 04b84e9..5355b17 100644
--- a/tf_fuzz/regression/000001_set_sst_uid_data_expect_pass/exp_test.c
+++ b/tf_fuzz/regression/000001_set_sst_uid_data_expect_pass/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/regression/000002_set_sst_name_data_expect_nothing/check.py b/tf_fuzz/regression/000002_set_sst_name_data_expect_nothing/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000002_set_sst_name_data_expect_nothing/check.py
+++ b/tf_fuzz/regression/000002_set_sst_name_data_expect_nothing/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000002_set_sst_name_data_expect_nothing/exp_test.c b/tf_fuzz/regression/000002_set_sst_name_data_expect_nothing/exp_test.c
index e792c9b..469f7d8 100644
--- a/tf_fuzz/regression/000002_set_sst_name_data_expect_nothing/exp_test.c
+++ b/tf_fuzz/regression/000002_set_sst_name_data_expect_nothing/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/regression/000003_set_sst_name_data/check.py b/tf_fuzz/regression/000003_set_sst_name_data/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000003_set_sst_name_data/check.py
+++ b/tf_fuzz/regression/000003_set_sst_name_data/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000003_set_sst_name_data/exp_test.c b/tf_fuzz/regression/000003_set_sst_name_data/exp_test.c
index 9dc4d24..6a7d458 100644
--- a/tf_fuzz/regression/000003_set_sst_name_data/exp_test.c
+++ b/tf_fuzz/regression/000003_set_sst_name_data/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/regression/000004_set_sst_name_rand_data/check.py b/tf_fuzz/regression/000004_set_sst_name_rand_data/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000004_set_sst_name_rand_data/check.py
+++ b/tf_fuzz/regression/000004_set_sst_name_rand_data/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000004_set_sst_name_rand_data/exp_test.c b/tf_fuzz/regression/000004_set_sst_name_rand_data/exp_test.c
index 2f56e4e..2db4df8 100644
--- a/tf_fuzz/regression/000004_set_sst_name_rand_data/exp_test.c
+++ b/tf_fuzz/regression/000004_set_sst_name_rand_data/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/regression/000005_set_sst_rand_name_rand_data/check.py b/tf_fuzz/regression/000005_set_sst_rand_name_rand_data/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000005_set_sst_rand_name_rand_data/check.py
+++ b/tf_fuzz/regression/000005_set_sst_rand_name_rand_data/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000005_set_sst_rand_name_rand_data/exp_test.c b/tf_fuzz/regression/000005_set_sst_rand_name_rand_data/exp_test.c
index 288cb19..c53ff38 100644
--- a/tf_fuzz/regression/000005_set_sst_rand_name_rand_data/exp_test.c
+++ b/tf_fuzz/regression/000005_set_sst_rand_name_rand_data/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/regression/000006_set_sst_multi_name_rand_data/check.py b/tf_fuzz/regression/000006_set_sst_multi_name_rand_data/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000006_set_sst_multi_name_rand_data/check.py
+++ b/tf_fuzz/regression/000006_set_sst_multi_name_rand_data/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000006_set_sst_multi_name_rand_data/exp_test.c b/tf_fuzz/regression/000006_set_sst_multi_name_rand_data/exp_test.c
index 84026ac..40c3935 100644
--- a/tf_fuzz/regression/000006_set_sst_multi_name_rand_data/exp_test.c
+++ b/tf_fuzz/regression/000006_set_sst_multi_name_rand_data/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/regression/000007_set_sst_multi_uid_rand_data/check.py b/tf_fuzz/regression/000007_set_sst_multi_uid_rand_data/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000007_set_sst_multi_uid_rand_data/check.py
+++ b/tf_fuzz/regression/000007_set_sst_multi_uid_rand_data/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000007_set_sst_multi_uid_rand_data/exp_test.c b/tf_fuzz/regression/000007_set_sst_multi_uid_rand_data/exp_test.c
index 02055e8..54c9223 100644
--- a/tf_fuzz/regression/000007_set_sst_multi_uid_rand_data/exp_test.c
+++ b/tf_fuzz/regression/000007_set_sst_multi_uid_rand_data/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/regression/000008_set_sst_name_rand_data_read_check_wrong/check.py b/tf_fuzz/regression/000008_set_sst_name_rand_data_read_check_wrong/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000008_set_sst_name_rand_data_read_check_wrong/check.py
+++ b/tf_fuzz/regression/000008_set_sst_name_rand_data_read_check_wrong/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000008_set_sst_name_rand_data_read_check_wrong/exp_test.c b/tf_fuzz/regression/000008_set_sst_name_rand_data_read_check_wrong/exp_test.c
index 5f8486c..ee11647 100644
--- a/tf_fuzz/regression/000008_set_sst_name_rand_data_read_check_wrong/exp_test.c
+++ b/tf_fuzz/regression/000008_set_sst_name_rand_data_read_check_wrong/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
@@ -57,7 +56,7 @@
         return;
     }
     /* Check that the data is correct */
-    if \(tfm_memcmp\(snortwaggle_act_data, snortwaggle_exp_data, 
+    if \(memcmp\(snortwaggle_act_data, snortwaggle_exp_data,
                    snortwaggle_act_length\) != 0\) {
         TEST_FAIL("Read data should be equal to result data");
         return;
diff --git a/tf_fuzz/regression/000009_set_sst_name_rand_data_read_check_var_read_print/check.py b/tf_fuzz/regression/000009_set_sst_name_rand_data_read_check_var_read_print/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000009_set_sst_name_rand_data_read_check_var_read_print/check.py
+++ b/tf_fuzz/regression/000009_set_sst_name_rand_data_read_check_var_read_print/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000009_set_sst_name_rand_data_read_check_var_read_print/exp_test.c b/tf_fuzz/regression/000009_set_sst_name_rand_data_read_check_var_read_print/exp_test.c
index f745c1f..67f5c5b 100644
--- a/tf_fuzz/regression/000009_set_sst_name_rand_data_read_check_var_read_print/exp_test.c
+++ b/tf_fuzz/regression/000009_set_sst_name_rand_data_read_check_var_read_print/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
@@ -26,6 +25,7 @@
     static uint8_t greebledorf_set_data\[\] = "@@002@10@@[a-z\ ]*[\.\?\!]";
     static uint32_t greebledorf_set_length = \d+;
     static uint8_t a_variable_data\[\] = "[A-Z][a-z ]*[\.\?\!]";
+    static size_t a_variable_length = \d+;
     static uint8_t greebledorf_act_data\[2048\] = "[A-Z][a-z ]*[\.\?\!]";
     static size_t greebledorf_act_length = \d+;
     (void)sst_status;
@@ -57,7 +57,7 @@
         return;
     }
     /* Check that the data is correct */
-    if (tfm_memcmp(greebledorf_act_data, a_variable_data,
+    if (memcmp(greebledorf_act_data, a_variable,
                    greebledorf_act_length) != 0) {
         TEST_FAIL("Read data should be equal to result data");
         return;
@@ -68,7 +68,7 @@
         TEST_FAIL("psa_ps_get() expected PSA_SUCCESS.");
         return;
     }
-    TEST_LOG\(\"greebledorf_act_data\"\);
+    TEST_LOG(greebledorf_act_data);
 
 
     /* Removing assets left over from testing: */
diff --git a/tf_fuzz/regression/000010_read_nonexistent_sst_check_string/check.py b/tf_fuzz/regression/000010_read_nonexistent_sst_check_string/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000010_read_nonexistent_sst_check_string/check.py
+++ b/tf_fuzz/regression/000010_read_nonexistent_sst_check_string/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000010_read_nonexistent_sst_check_string/exp_test.c b/tf_fuzz/regression/000010_read_nonexistent_sst_check_string/exp_test.c
index 2048a69..cb4916f 100644
--- a/tf_fuzz/regression/000010_read_nonexistent_sst_check_string/exp_test.c
+++ b/tf_fuzz/regression/000010_read_nonexistent_sst_check_string/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
@@ -48,7 +47,7 @@
         return;
     }
     /* Check that the data is correct */
-    if \(tfm_memcmp\(napoleon_act_data, napoleon_exp_data, 
+    if \(memcmp\(napoleon_act_data, napoleon_exp_data,
                    napoleon_act_length\) != 0\) {
         TEST_FAIL("Read data should be equal to result data");
         return;
diff --git a/tf_fuzz/regression/000011_read_nonexistent_sst_check_string_expect_pass/check.py b/tf_fuzz/regression/000011_read_nonexistent_sst_check_string_expect_pass/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000011_read_nonexistent_sst_check_string_expect_pass/check.py
+++ b/tf_fuzz/regression/000011_read_nonexistent_sst_check_string_expect_pass/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000011_read_nonexistent_sst_check_string_expect_pass/exp_test.c b/tf_fuzz/regression/000011_read_nonexistent_sst_check_string_expect_pass/exp_test.c
index d5d3e40..1279df6 100644
--- a/tf_fuzz/regression/000011_read_nonexistent_sst_check_string_expect_pass/exp_test.c
+++ b/tf_fuzz/regression/000011_read_nonexistent_sst_check_string_expect_pass/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
@@ -48,7 +47,7 @@
         return;
     }
     /* Check that the data is correct */
-    if \(tfm_memcmp\(napoleon_act_data, napoleon_exp_data, 
+    if \(memcmp\(napoleon_act_data, napoleon_exp_data,
                    napoleon_act_length\) != 0\) \{
         TEST_FAIL("Read data should be equal to result data");
         return;
diff --git a/tf_fuzz/regression/000012_read_nonexistent_sst_check_string_expect_other/check.py b/tf_fuzz/regression/000012_read_nonexistent_sst_check_string_expect_other/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000012_read_nonexistent_sst_check_string_expect_other/check.py
+++ b/tf_fuzz/regression/000012_read_nonexistent_sst_check_string_expect_other/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000012_read_nonexistent_sst_check_string_expect_other/exp_test.c b/tf_fuzz/regression/000012_read_nonexistent_sst_check_string_expect_other/exp_test.c
index 359dd8a..07a1636 100644
--- a/tf_fuzz/regression/000012_read_nonexistent_sst_check_string_expect_other/exp_test.c
+++ b/tf_fuzz/regression/000012_read_nonexistent_sst_check_string_expect_other/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
@@ -48,7 +47,7 @@
         return;
     }
     /* Check that the data is correct */
-    if \(tfm_memcmp\(napoleon_act_data, napoleon_exp_data, 
+    if \(memcmp\(napoleon_act_data, napoleon_exp_data,
                    napoleon_act_length\) != 0\) \{
         TEST_FAIL("Read data should be equal to result data");
         return;
diff --git a/tf_fuzz/regression/000013_set_sst_name_rand_data_remove_twice/check.py b/tf_fuzz/regression/000013_set_sst_name_rand_data_remove_twice/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000013_set_sst_name_rand_data_remove_twice/check.py
+++ b/tf_fuzz/regression/000013_set_sst_name_rand_data_remove_twice/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000013_set_sst_name_rand_data_remove_twice/exp_test.c b/tf_fuzz/regression/000013_set_sst_name_rand_data_remove_twice/exp_test.c
index efc6bf1..77a4a41 100644
--- a/tf_fuzz/regression/000013_set_sst_name_rand_data_remove_twice/exp_test.c
+++ b/tf_fuzz/regression/000013_set_sst_name_rand_data_remove_twice/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/regression/000014_set_sst_name_rand_data_remove_other/check.py b/tf_fuzz/regression/000014_set_sst_name_rand_data_remove_other/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000014_set_sst_name_rand_data_remove_other/check.py
+++ b/tf_fuzz/regression/000014_set_sst_name_rand_data_remove_other/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000014_set_sst_name_rand_data_remove_other/exp_test.c b/tf_fuzz/regression/000014_set_sst_name_rand_data_remove_other/exp_test.c
index 85d51bb..5f93e9a 100644
--- a/tf_fuzz/regression/000014_set_sst_name_rand_data_remove_other/exp_test.c
+++ b/tf_fuzz/regression/000014_set_sst_name_rand_data_remove_other/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/regression/000015_set_sst_name_only/check.py b/tf_fuzz/regression/000015_set_sst_name_only/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000015_set_sst_name_only/check.py
+++ b/tf_fuzz/regression/000015_set_sst_name_only/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000015_set_sst_name_only/exp_test.c b/tf_fuzz/regression/000015_set_sst_name_only/exp_test.c
index 900d9e2..8b82abf 100644
--- a/tf_fuzz/regression/000015_set_sst_name_only/exp_test.c
+++ b/tf_fuzz/regression/000015_set_sst_name_only/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/regression/000016_set_sst_single_asset_set_multiple_times/check.py b/tf_fuzz/regression/000016_set_sst_single_asset_set_multiple_times/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000016_set_sst_single_asset_set_multiple_times/check.py
+++ b/tf_fuzz/regression/000016_set_sst_single_asset_set_multiple_times/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000016_set_sst_single_asset_set_multiple_times/exp_test.c b/tf_fuzz/regression/000016_set_sst_single_asset_set_multiple_times/exp_test.c
index 224c85c..acefe35 100644
--- a/tf_fuzz/regression/000016_set_sst_single_asset_set_multiple_times/exp_test.c
+++ b/tf_fuzz/regression/000016_set_sst_single_asset_set_multiple_times/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/regression/000017_read_sst_check_single_asset_multiple_times/check.py b/tf_fuzz/regression/000017_read_sst_check_single_asset_multiple_times/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000017_read_sst_check_single_asset_multiple_times/check.py
+++ b/tf_fuzz/regression/000017_read_sst_check_single_asset_multiple_times/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000017_read_sst_check_single_asset_multiple_times/exp_test.c b/tf_fuzz/regression/000017_read_sst_check_single_asset_multiple_times/exp_test.c
index aa333ab..81ac97e 100644
--- a/tf_fuzz/regression/000017_read_sst_check_single_asset_multiple_times/exp_test.c
+++ b/tf_fuzz/regression/000017_read_sst_check_single_asset_multiple_times/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
@@ -59,7 +58,7 @@
         return;
     }
     /* Check that the data is correct */
-    if \(tfm_memcmp\(just_checking_act_data, just_checking_exp_data, 
+    if \(memcmp\(just_checking_act_data, just_checking_exp_data,
                    just_checking_act_length\) != 0\) {
         TEST_FAIL("Read data should be equal to result data");
         return;
@@ -71,7 +70,7 @@
         return;
     }
     /* Check that the data is correct */
-    if \(tfm_memcmp\(just_checking_act_data, just_checking_exp_data_1, 
+    if \(memcmp\(just_checking_act_data, just_checking_exp_data_1,
                    just_checking_act_length\) != 0\) {
         TEST_FAIL("Read data should be equal to result data");
         return;
@@ -83,7 +82,7 @@
         return;
     }
     /* Check that the data is correct */
-    if \(tfm_memcmp\(just_checking_act_data, just_checking_exp_data_2, 
+    if \(memcmp\(just_checking_act_data, just_checking_exp_data_2,
                    just_checking_act_length\) != 0\) {
         TEST_FAIL("Read data should be equal to result data");
         return;
@@ -94,7 +93,7 @@
         TEST_FAIL("psa_ps_get() expected PSA_SUCCESS.");
         return;
     }
-    TEST_LOG\(\"just_checking_act_data\"\);
+    TEST_LOG(just_checking_act_data);
 
 
     /* Removing assets left over from testing: */
diff --git a/tf_fuzz/regression/000018_000016_and_000017/check.py b/tf_fuzz/regression/000018_000016_and_000017/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000018_000016_and_000017/check.py
+++ b/tf_fuzz/regression/000018_000016_and_000017/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000018_000016_and_000017/exp_test.c b/tf_fuzz/regression/000018_000016_and_000017/exp_test.c
index ca1ba06..dd6464d 100644
--- a/tf_fuzz/regression/000018_000016_and_000017/exp_test.c
+++ b/tf_fuzz/regression/000018_000016_and_000017/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
@@ -69,7 +68,7 @@
         return;
     }
     /* Check that the data is correct */
-    if (tfm_memcmp(indecisive_act_data, indecisive_exp_data, 
+    if (memcmp(indecisive_act_data, indecisive_exp_data,
                    indecisive_act_length\) != 0\) {
         TEST_FAIL("Read data should be equal to result data");
         return;
@@ -88,7 +87,7 @@
         return;
     }
     /* Check that the data is correct */
-    if (tfm_memcmp(indecisive_act_data, indecisive_exp_data_1,
+    if (memcmp(indecisive_act_data, indecisive_exp_data_1,
                    indecisive_act_length) != 0) {
         TEST_FAIL("Read data should be equal to result data");
         return;
@@ -114,7 +113,7 @@
         return;
     }
     /* Check that the data is correct */
-    if (tfm_memcmp(indecisive_act_data, indecisive_exp_data_2,
+    if (memcmp(indecisive_act_data, indecisive_exp_data_2,
                    indecisive_act_length) != 0) {
         TEST_FAIL("Read data should be equal to result data");
         return;
@@ -139,7 +138,7 @@
         TEST_FAIL("psa_ps_get() expected PSA_SUCCESS.");
         return;
     }
-    TEST_LOG\(\"indecisive_act_data\"\);
+    TEST_LOG(indecisive_act_data);
 
 
     /* Removing assets left over from testing: */
diff --git a/tf_fuzz/regression/000019_read_asset_to_variable_set_other_asset/check.py b/tf_fuzz/regression/000019_read_asset_to_variable_set_other_asset/check.py
index 1bc5cbe..8f7ec3a 100644
--- a/tf_fuzz/regression/000019_read_asset_to_variable_set_other_asset/check.py
+++ b/tf_fuzz/regression/000019_read_asset_to_variable_set_other_asset/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000019_read_asset_to_variable_set_other_asset/exp_test.c b/tf_fuzz/regression/000019_read_asset_to_variable_set_other_asset/exp_test.c
index 6131299..d3751b7 100644
--- a/tf_fuzz/regression/000019_read_asset_to_variable_set_other_asset/exp_test.c
+++ b/tf_fuzz/regression/000019_read_asset_to_variable_set_other_asset/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
@@ -60,7 +59,7 @@
         return;
     }
     /* Check that the data is correct */
-    if (tfm_memcmp(transfer_data, source_exp_data, 
+    if (memcmp(transfer_data, source_exp_data,
                    transfer_length) != 0) {
         TEST_FAIL("Read data should be equal to result data");
         return;
@@ -79,7 +78,7 @@
         return;
     }
     /* Check that the data is correct */
-    if (tfm_memcmp(transfer_data, intermediate_exp_data, 
+    if (memcmp(transfer_data, intermediate_exp_data,
                    transfer_length) != 0) {
         TEST_FAIL("Read data should be equal to result data");
         return;
@@ -98,7 +97,7 @@
         return;
     }
     /* Check that the data is correct */
-    if (tfm_memcmp(destination_act_data, transfer_data, 
+    if (memcmp(destination_act_data, transfer,
                    destination_act_length) != 0) {
         TEST_FAIL("Read data should be equal to result data");
         return;
diff --git a/tf_fuzz/regression/000020_no_purpose/check.py b/tf_fuzz/regression/000020_no_purpose/check.py
index 2027be8..8f7ec3a 100644
--- a/tf_fuzz/regression/000020_no_purpose/check.py
+++ b/tf_fuzz/regression/000020_no_purpose/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000021_abbreviated_result_codes/check.py b/tf_fuzz/regression/000021_abbreviated_result_codes/check.py
index 2027be8..8f7ec3a 100644
--- a/tf_fuzz/regression/000021_abbreviated_result_codes/check.py
+++ b/tf_fuzz/regression/000021_abbreviated_result_codes/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000021_abbreviated_result_codes/exp_test.c b/tf_fuzz/regression/000021_abbreviated_result_codes/exp_test.c
index 359dd8a..07a1636 100644
--- a/tf_fuzz/regression/000021_abbreviated_result_codes/exp_test.c
+++ b/tf_fuzz/regression/000021_abbreviated_result_codes/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
@@ -48,7 +47,7 @@
         return;
     }
     /* Check that the data is correct */
-    if \(tfm_memcmp\(napoleon_act_data, napoleon_exp_data, 
+    if \(memcmp\(napoleon_act_data, napoleon_exp_data,
                    napoleon_act_length\) != 0\) \{
         TEST_FAIL("Read data should be equal to result data");
         return;
diff --git a/tf_fuzz/regression/000022_SST_offset/check.py b/tf_fuzz/regression/000022_SST_offset/check.py
index 2027be8..8f7ec3a 100644
--- a/tf_fuzz/regression/000022_SST_offset/check.py
+++ b/tf_fuzz/regression/000022_SST_offset/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000022_SST_offset/exp_test.c b/tf_fuzz/regression/000022_SST_offset/exp_test.c
index 03523dc..421433f 100644
--- a/tf_fuzz/regression/000022_SST_offset/exp_test.c
+++ b/tf_fuzz/regression/000022_SST_offset/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
@@ -55,7 +54,7 @@
         TEST_FAIL("psa_ps_get() expected PSA_SUCCESS.");
         return;
     }
-    TEST_LOG\(\"whoNose_act_data\"\);
+    TEST_LOG(whoNose_act_data);
 
 
     /* Removing assets left over from testing: */
diff --git a/tf_fuzz/regression/000023_SST_creation_flags/check.py b/tf_fuzz/regression/000023_SST_creation_flags/check.py
index 2027be8..8f7ec3a 100644
--- a/tf_fuzz/regression/000023_SST_creation_flags/check.py
+++ b/tf_fuzz/regression/000023_SST_creation_flags/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000023_SST_creation_flags/exp_test.c b/tf_fuzz/regression/000023_SST_creation_flags/exp_test.c
index 9dbe4cf..f5cfcb1 100644
--- a/tf_fuzz/regression/000023_SST_creation_flags/exp_test.c
+++ b/tf_fuzz/regression/000023_SST_creation_flags/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/regression/000024_SST_write_once/check.py b/tf_fuzz/regression/000024_SST_write_once/check.py
index 2027be8..8f7ec3a 100644
--- a/tf_fuzz/regression/000024_SST_write_once/check.py
+++ b/tf_fuzz/regression/000024_SST_write_once/check.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-# Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 
 '''
     Please read .../tf_fuzz/regression/README to understand this code.
-    
+
     Please also read the comments in .../tf_fuzz/regression/regress_lib/line_by_line.py.
 '''
 
@@ -14,7 +14,7 @@
 sys.path.append ("../regress_lib")
 import line_by_line
 
-        
+
 # Describe script usage:
 def usage():
     print ('''
@@ -24,7 +24,7 @@
     3.  The actual/generated combined stdout/stderr output, nominally named "stdout_stderr",
     4.  The expected .c test file, nominally named "exp_test.c", and
     5.  The actual, generated .c test file, nominally named "test.c".
-    
+
     Optionally, *before* these five arguments, you may add switches thus:
     "--v" for verbose mode, to view line-by-line comparisons actual vs. expected,
     "--q" to only print error messages and a successful-completion message,
@@ -55,7 +55,7 @@
                 print ('The --s seed argument was not a number.')
                 usage()
                 sys.exit(1)
-        
+
     # Run TF-Fuzz:
     if not quiet: print ("Running TF-Fuzz...  ")
     os.system ('rm -f stdout_stderr test.c')
@@ -68,7 +68,7 @@
     else:
         print ('Could not run TF-Fuzz;  please see stdout_stderr file.')
         sys.exit(2)
-    
+
     # Attempt to open files indicated on command line:
     if len(sys.argv) != 6:
         message = '{} requires 5 command-line arguments. Exiting.'
@@ -99,19 +99,19 @@
         message =  '\nInput files:\n    {},\n    {},\n    {},\n'
         message += '    {}, and\n    {}\nopened successfully.\n'
         if not quiet:
-            print (message.format (template_file_name, exp_stdout_file_name, 
+            print (message.format (template_file_name, exp_stdout_file_name,
                    act_stdout_file_name, exp_test_file_name, act_test_file_name))
-    
+
     # Check it all:
     if not quiet: print ("\nChecking test C file:  ", end="")
-    line_by_line.check_file (   exp_test_file, exp_test_file_name, 
+    line_by_line.check_file (   exp_test_file, exp_test_file_name,
                                 act_test_file, act_test_file_name,
                                 loud, quiet, ultra_quiet                      )
     if not quiet: print ("Checking stdout and stderr:  ", end="")
-    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name, 
+    line_by_line.check_file (   exp_stdout_file, exp_stdout_file_name,
                                 act_stdout_file, act_stdout_file_name,
                                 loud, quiet, ultra_quiet                      )
-    
+
     # Ran to completion normally, so pass:
     if not ultra_quiet: print ("Regression test passed.")
     sys.exit(0)
diff --git a/tf_fuzz/regression/000024_SST_write_once/exp_test.c b/tf_fuzz/regression/000024_SST_write_once/exp_test.c
index 02d0530..85c431b 100644
--- a/tf_fuzz/regression/000024_SST_write_once/exp_test.c
+++ b/tf_fuzz/regression/000024_SST_write_once/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 
 /* This is not yet right for how to run a test;  need to register tests, etc. */
 
diff --git a/tf_fuzz/regression/add_these_tests/000015_set_sst_multi_name_remove_rand_active/exp_test.c b/tf_fuzz/regression/add_these_tests/000015_set_sst_multi_name_remove_rand_active/exp_test.c
index c0eddcd..3bf0cd3 100644
--- a/tf_fuzz/regression/add_these_tests/000015_set_sst_multi_name_remove_rand_active/exp_test.c
+++ b/tf_fuzz/regression/add_these_tests/000015_set_sst_multi_name_remove_rand_active/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 /* For now, just a single test_result_t struct is sufficient.*/
 static struct test_result_t ret;
 
diff --git a/tf_fuzz/regression/add_these_tests/000016_set_sst_multi_name_remove_multi_rand_active_remove_rand_deleted/exp_test.c b/tf_fuzz/regression/add_these_tests/000016_set_sst_multi_name_remove_multi_rand_active_remove_rand_deleted/exp_test.c
index c2752fb..f06d582 100644
--- a/tf_fuzz/regression/add_these_tests/000016_set_sst_multi_name_remove_multi_rand_active_remove_rand_deleted/exp_test.c
+++ b/tf_fuzz/regression/add_these_tests/000016_set_sst_multi_name_remove_multi_rand_active_remove_rand_deleted/exp_test.c
@@ -13,9 +13,8 @@
 #include "../sst/non_secure/ns_test_helpers.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"
-#include "psa/crypto_sizes.h"
 /* For now, just a single test_result_t struct is sufficient.*/
 static struct test_result_t ret;
 
diff --git a/tf_fuzz/regression/regress b/tf_fuzz/regression/regress
old mode 100644
new mode 100755
diff --git a/tf_fuzz/regression/regress_lib/line_by_line.py b/tf_fuzz/regression/regress_lib/line_by_line.py
index f09a038..8443a91 100644
--- a/tf_fuzz/regression/regress_lib/line_by_line.py
+++ b/tf_fuzz/regression/regress_lib/line_by_line.py
@@ -1,10 +1,10 @@
 #!/usr/bin/env python3
-# Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
 '''
-The functions here perform straight-forward line-by-line comparisons of regression 
+The functions here perform straight-forward line-by-line comparisons of regression
 TF-Fuzz regression tests.  These are not sufficient to address cases where the PSA
 calls are randomized.
 
@@ -13,29 +13,29 @@
 file.  Actually, the expected-file lines may need a little bit of tweaking first.
 There are three scenarios:
 *  The line in exp_* file contains no regex content at all.  In this case, the two
-   lines must be exactly identical, character for character. The actual/generated 
-   output files do not contain regexes, but can contain parentheses or other 
-   characters that "look like" regex content, and thus confuse re.match().  So, 
-   it's first checked for an exact string == match. 
+   lines must be exactly identical, character for character. The actual/generated
+   output files do not contain regexes, but can contain parentheses or other
+   characters that "look like" regex content, and thus confuse re.match().  So,
+   it's first checked for an exact string == match.
 *  The line in the exp_* file contains one or more standard-Python regex patterns
    to match.  In this case, a Python re.match() will still report a match.
 *  The line in the exp_* file contains one or more non-standard regex pattern, in
    which case that non-standard regex pattern needs to be replaced with the actual,
    expected character string.
 
-As described in the above-cited README, these non-standard regex wildcards in the 
+As described in the above-cited README, these non-standard regex wildcards in the
 exp_* files take either of two formats:
 *  "@@@" a 3-digit pattern number "@@@" (e.g., "@@@005@@@"):  This denotes a
    pattern of no particular length that must match the same text every occurrence
    in the actual/generated file.
 *  "@@" a 3-digit pattern number "@" a 2-digit length in chars "@@":  Same idea as
    the previous pattern, except that it also has a specific length.
-   
+
 To address these special regex wildcards, check_gen_test() below has to:
 1.  Isolate the wildcard from the rest of the string,
-2.  Check that wildcard against a Python dictionary relating the wildcard name to 
+2.  Check that wildcard against a Python dictionary relating the wildcard name to
     its expected-text substitution value,
-3.  If not present in the dictionary, create a new dictionary entry relating the 
+3.  If not present in the dictionary, create a new dictionary entry relating the
     wildcard text to the text found in that spot in the actual/generated file,
 4.  Replace that wildcard text with the expected value from the hash, then
 5.  As with all lines, perform the re.match() between the two lines.
@@ -72,14 +72,14 @@
 '''
 resolve_wildcards() resolves wildcards of the sort described above, in an expected
 file line (exp) from a wildcard dictionary (wildcard_dict).  In particular, it
-replaces them with what the wildcards are found to stand for in the actual test 
-output (act).  If it encounters a wildcard it has not seen before, it adds it to 
+replaces them with what the wildcards are found to stand for in the actual test
+output (act).  If it encounters a wildcard it has not seen before, it adds it to
 the dictionary, based upon what's in the test.c output.  Further occurrences of that
-wildcard, it pulls from the wildcard dictionary, meaning that the subsequent 
+wildcard, it pulls from the wildcard dictionary, meaning that the subsequent
 occurrences must resolve to the same text string.
 '''
 def resolve_wildcards (exp, act, wildcard_dict):
-    # Loop through each wildcard on the line, filling them in with values from the 
+    # Loop through each wildcard on the line, filling them in with values from the
     # wildcard dictionary, or filling them into the wildcard dictionary.
 
     #pdb.set_trace()
@@ -112,11 +112,11 @@
     return exp
 
 '''
-check_file() checks that an actual-output test file (act_test_file) matches an 
-expected-output file (exp_test_file), line by line, including resolving the 
+check_file() checks that an actual-output test file (act_test_file) matches an
+expected-output file (exp_test_file), line by line, including resolving the
 wildcards of the nature described above.
 '''
-def check_file (   exp_test_file, exp_test_file_name, 
+def check_file (   exp_test_file, exp_test_file_name,
                    act_test_file, act_test_file_name,
                    loud, quiet, ultra_quiet                   ):
     # This is the dictionary of wildcards, of the nature described above.