From 20a77aeac728f0d0529cae4261093f149e1593ce Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 16 May 2019 14:05:56 +0200 Subject: [PATCH] RSA key generation: require e=65537 --- include/psa/crypto.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/psa/crypto.h b/include/psa/crypto.h index 2b95f238f..c6a13acb8 100644 --- a/include/psa/crypto.h +++ b/include/psa/crypto.h @@ -3423,6 +3423,13 @@ psa_status_t psa_generate_random(uint8_t *output, * The key is generated randomly. * Its location, policy, type and size are taken from \p attributes. * + * The following type-specific considerations apply: + * - For RSA keys (#PSA_KEY_TYPE_RSA_KEYPAIR), + * the public exponent is 65537. + * The modulus is a product of two probabilistic primes + * between 2^{n-1} and 2^n where n is the bit size specified in the + * attributes. + * * \param[in] attributes The attributes for the new key. * \param[out] handle On success, a handle to the newly created key. * \c 0 on failure.