Add support for minimum-tag-length AEAD and MAC policies
Includes tests.
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
# Conflicts:
# include/psa/crypto_values.h
# tests/suites/test_suite_psa_crypto.function
diff --git a/include/psa/crypto.h b/include/psa/crypto.h
index 271fb99..a8fe59a 100644
--- a/include/psa/crypto.h
+++ b/include/psa/crypto.h
@@ -264,6 +264,12 @@
* - An algorithm value permits this particular algorithm.
* - An algorithm wildcard built from #PSA_ALG_ANY_HASH allows the specified
* signature scheme with any hash algorithm.
+ * - An algorithm value for which PSA_ALG_IS_WILDCARD() evaluates to true
+ * allows any algorithm specified by that usage algorithm definition.
+ * E.g. a usage algorithm built from PSA_ALG_MAC_WITH_MINIMUM_LENGTH_TAG()
+ * allows using the key for any algorithm with the same base MAC algorithm as
+ * long as the used algorithm isn't truncated to less than the minimum tag
+ * length declared in the usage algorithm.
*
* This function overwrites any algorithm policy
* previously set in \p attributes.