LibCrypto: Remove default key size for RSA::generate_key_pair

The current default is unsafe, but determining a safe value is not easy.
Leave it up to the caller to decide.
This commit is contained in:
devgianlu 2024-12-23 17:49:20 +01:00 committed by Ali Mohammad Pur
parent 9e08f71fd9
commit 6ba627b047
Notes: github-actions[bot] 2025-01-12 00:14:51 +00:00

View file

@ -160,7 +160,7 @@ public:
using KeyPairType = RSAKeyPair<PublicKeyType, PrivateKeyType>;
static ErrorOr<KeyPairType> parse_rsa_key(ReadonlyBytes der, bool is_private, Vector<StringView> current_scope);
static ErrorOr<KeyPairType> generate_key_pair(size_t bits = 256, IntegerType e = 65537);
static ErrorOr<KeyPairType> generate_key_pair(size_t bits, IntegerType e = 65537);
RSA(KeyPairType const& pair)
: PKSystem<RSAPrivateKey<IntegerType>, RSAPublicKey<IntegerType>>(pair.public_key, pair.private_key)