From 7311600fd579a90e08a169fa6184bca03d49a283 Mon Sep 17 00:00:00 2001 From: Janos Follath Date: Tue, 6 Aug 2024 08:23:38 +0100 Subject: [PATCH] Constrain interruptible key generation to key-pairs Erroring on a symmetric-key type would actually be an extra line of code. In theory we could try to save that one line of code, but it is premature optimisation at this point. Also, this is a predominantly asymmetric crypto feature, it is less confusing/more user friendly if we don't allow symmetric keys here. Signed-off-by: Janos Follath --- tf-psa-crypto/include/psa/crypto.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tf-psa-crypto/include/psa/crypto.h b/tf-psa-crypto/include/psa/crypto.h index aabf0f7553..7fd4872d6b 100644 --- a/tf-psa-crypto/include/psa/crypto.h +++ b/tf-psa-crypto/include/psa/crypto.h @@ -5280,8 +5280,7 @@ uint32_t psa_generate_key_iop_get_num_ops(psa_generate_key_iop_t *operation); * \param[in] attributes The attributes for the new key. * The following attributes are required for all * keys: - * * The key type. It must not be an asymmetric - * public key. + * * The key type. It must be an asymmetric key-pair. * * The key size. It must be a valid size for the * key type. * The following attributes must be set for keys