Closed ptoffy closed 8 months ago
Update lower bound for RSA key sizes to 2048 rather than 1024
Since 2015, NIST recommends a minimum key size of 2048 bits as stated in https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r5.pdf This is also stated in the JWA specification (RFC7518 3.3 and 3.5) and in the RSA SSH spec, that's why this PR enforces the use of key sizes >=2048 rather than >=1024 as before.
>=2048
>=1024
Update lower bound for RSA key sizes to 2048 rather than 1024, specifically in the RSA key initialisers. Also update tests which use 1024 bits-sized keys and make sure they throw
Creating RSA keys of sizes <2048 will throw
<2048
@Lukasa that seems sensible. I've updated the PR with those changes, let me know what you think!
@swift-server-bot test this please
Update lower bound for RSA key sizes to 2048 rather than 1024
Checklist
Motivation:
Since 2015, NIST recommends a minimum key size of 2048 bits as stated in https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r5.pdf This is also stated in the JWA specification (RFC7518 3.3 and 3.5) and in the RSA SSH spec, that's why this PR enforces the use of key sizes
>=2048
rather than>=1024
as before.Modifications:
Update lower bound for RSA key sizes to 2048 rather than 1024, specifically in the RSA key initialisers. Also update tests which use 1024 bits-sized keys and make sure they throw
Result:
Creating RSA keys of sizes
<2048
will throw