Rename "key generation method" to "key production parameters"

"Key generation method" was misleading since it also applies to key
derivation. Change "key generation" to "key production", which we aren't
using yet and has roughly the right intuition. Change "method" to
"parameters" which there seems to be a slight preference for. Discussion
thread: https://github.com/Mbed-TLS/mbedtls/pull/8815#discussion_r1486524295

Identifiers renamed:
psa_key_generation_method_t → psa_key_production_parameters_t
psa_key_generation_method_s → psa_key_production_parameters_s
PSA_KEY_GENERATION_METHOD_INIT → PSA_KEY_PRODUCTION_PARAMETERS_INIT
method → params
method_data_length → params_data_length
default_method → default_production_parameters
psa_key_generation_method_is_default → psa_key_production_parameters_are_default
setup_key_generation_method → setup_key_production_parameters
key_generation_method_init → key_production_parameters_init

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function
index 6cd1e93..b40b5f8 100644
--- a/tests/suites/test_suite_psa_crypto.function
+++ b/tests/suites/test_suite_psa_crypto.function
@@ -1309,26 +1309,25 @@
 }
 #endif /* PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_GENERATE */
 
-static int setup_key_generation_method(psa_key_generation_method_t **method,
-                                       size_t *method_data_length,
-                                       int flags_arg,
-                                       const data_t *method_data)
+static int setup_key_production_parameters(
+    psa_key_production_parameters_t **params, size_t *params_data_length,
+    int flags_arg, const data_t *params_data)
 {
-    *method_data_length = method_data->len;
+    *params_data_length = params_data->len;
     /* If there are N bytes of padding at the end of
-     * psa_key_generation_method_t, then it's enough to allocate
-     * MIN(sizeof(psa_key_generation_method_t),
-     *     offsetof(psa_key_generation_method_t, data) + method_data_length).
+     * psa_key_production_parameters_t, then it's enough to allocate
+     * MIN(sizeof(psa_key_production_parameters_t),
+     *     offsetof(psa_key_production_parameters_t, data) + params_data_length).
      *
      * For simplicity, here, we allocate up to N more bytes than necessary.
-     * In practice, the current layout of psa_key_generation_method_t
+     * In practice, the current layout of psa_key_production_parameters_t
      * makes padding extremely unlikely, so we don't worry about testing
      * that the library code doesn't try to access these extra N bytes.
      */
-    *method = mbedtls_calloc(1, sizeof(**method) + *method_data_length);
-    TEST_ASSERT(*method != NULL);
-    (*method)->flags = (uint32_t) flags_arg;
-    memcpy((*method)->data, method_data->x, method_data->len);
+    *params = mbedtls_calloc(1, sizeof(**params) + *params_data_length);
+    TEST_ASSERT(*params != NULL);
+    (*params)->flags = (uint32_t) flags_arg;
+    memcpy((*params)->data, params_data->x, params_data->len);
     return 1;
 exit:
     return 0;
@@ -9340,7 +9339,7 @@
                     data_t *input2,
                     int key_type_arg, int bits_arg,
                     int flags_arg,
-                    data_t *method_data,
+                    data_t *params_data,
                     psa_status_t expected_status,
                     data_t *expected_export)
 {
@@ -9349,8 +9348,8 @@
     const psa_algorithm_t alg = alg_arg;
     const psa_key_type_t key_type = key_type_arg;
     const size_t bits = bits_arg;
-    psa_key_generation_method_t *method = NULL;
-    size_t method_data_length = 0;
+    psa_key_production_parameters_t *params = NULL;
+    size_t params_data_length = 0;
     psa_key_derivation_operation_t operation = PSA_KEY_DERIVATION_OPERATION_INIT;
     const size_t export_buffer_size =
         PSA_EXPORT_KEY_OUTPUT_SIZE(key_type, bits);
@@ -9380,13 +9379,13 @@
     psa_set_key_algorithm(&derived_attributes, 0);
     psa_set_key_type(&derived_attributes, key_type);
     psa_set_key_bits(&derived_attributes, bits);
-    if (!setup_key_generation_method(&method, &method_data_length,
-                                     flags_arg, method_data)) {
+    if (!setup_key_production_parameters(&params, &params_data_length,
+                                         flags_arg, params_data)) {
         goto exit;
     }
 
     TEST_EQUAL(psa_key_derivation_output_key_ext(&derived_attributes, &operation,
-                                                 method, method_data_length,
+                                                 params, params_data_length,
                                                  &derived_key),
                expected_status);
 
@@ -9400,7 +9399,7 @@
 
 exit:
     mbedtls_free(export_buffer);
-    mbedtls_free(method);
+    mbedtls_free(params);
     psa_key_derivation_abort(&operation);
     psa_destroy_key(base_key);
     psa_destroy_key(derived_key);
@@ -9929,7 +9928,7 @@
                       int usage_arg,
                       int alg_arg,
                       int flags_arg,
-                      data_t *method_data,
+                      data_t *params_data,
                       int expected_status_arg)
 {
     mbedtls_svc_key_id_t key = MBEDTLS_SVC_KEY_ID_INIT;
@@ -9939,8 +9938,8 @@
     psa_algorithm_t alg = alg_arg;
     psa_status_t expected_status = expected_status_arg;
     psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
-    psa_key_generation_method_t *method = NULL;
-    size_t method_data_length = 0;
+    psa_key_production_parameters_t *params = NULL;
+    size_t params_data_length = 0;
     psa_key_attributes_t got_attributes = PSA_KEY_ATTRIBUTES_INIT;
 
     PSA_ASSERT(psa_crypto_init());
@@ -9950,14 +9949,14 @@
     psa_set_key_type(&attributes, type);
     psa_set_key_bits(&attributes, bits);
 
-    if (!setup_key_generation_method(&method, &method_data_length,
-                                     flags_arg, method_data)) {
+    if (!setup_key_production_parameters(&params, &params_data_length,
+                                         flags_arg, params_data)) {
         goto exit;
     }
 
     /* Generate a key */
     psa_status_t status = psa_generate_key_ext(&attributes,
-                                               method, method_data_length,
+                                               params, params_data_length,
                                                &key);
 
     TEST_EQUAL(status, expected_status);
@@ -9972,7 +9971,7 @@
 
 #if defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_GENERATE)
     if (type == PSA_KEY_TYPE_RSA_KEY_PAIR) {
-        TEST_ASSERT(rsa_test_e(key, bits, method_data));
+        TEST_ASSERT(rsa_test_e(key, bits, params_data));
     }
 #endif
 
@@ -9987,17 +9986,17 @@
      * thus reset them as required.
      */
     psa_reset_key_attributes(&got_attributes);
-    mbedtls_free(method);
+    mbedtls_free(params);
     psa_destroy_key(key);
     PSA_DONE();
 }
 /* END_CASE */
 
 /* BEGIN_CASE */
-void key_generation_method_init()
+void key_production_parameters_init()
 {
-    psa_key_generation_method_t init = PSA_KEY_GENERATION_METHOD_INIT;
-    psa_key_generation_method_t zero;
+    psa_key_production_parameters_t init = PSA_KEY_PRODUCTION_PARAMETERS_INIT;
+    psa_key_production_parameters_t zero;
     memset(&zero, 0, sizeof(zero));
 
     TEST_EQUAL(init.flags, 0);