Document new functions psa_generate_key_ext, psa_key_derivation_output_key_ext

Document proposed additions to the PSA API: psa_generate_key_ext(),
psa_key_derivation_output_key_ext(). For psa_generate_key_ext(), document
the one use case we intend to implement immediately, which is generating an
RSA key with a custom public exponent.

Subsequent commits will implement the documented functionality.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/include/psa/crypto_struct.h b/include/psa/crypto_struct.h
index 34d072b..b5e942e 100644
--- a/include/psa/crypto_struct.h
+++ b/include/psa/crypto_struct.h
@@ -223,6 +223,29 @@
     return v;
 }
 
+struct psa_key_generation_method_s {
+    /* Future versions may add other fields in this structure. */
+    uint32_t flags;
+    uint8_t data[];
+};
+
+/** The default method for key generation or key derivation.
+ *
+ * Calling psa_generate_key_ext() or psa_key_derivation_output_key_ext()
+ * with `method=PSA_KEY_GENERATION_METHOD_INIT` and
+ * `method_length=sizeof(psa_key_generation_method_t)` is equivalent to
+ * calling psa_generate_key() or psa_key_derivation_output_key()
+ * respectively.
+ */
+#define PSA_KEY_GENERATION_METHOD_INIT { 0 }
+
+static inline struct psa_key_generation_method_s psa_key_generation_method_init(
+    void)
+{
+    const struct psa_key_generation_method_s v = PSA_KEY_GENERATION_METHOD_INIT;
+    return v;
+}
+
 struct psa_key_policy_s {
     psa_key_usage_t MBEDTLS_PRIVATE(usage);
     psa_algorithm_t MBEDTLS_PRIVATE(alg);