Upgrade inadequate cryptographic key sizes
ProprietaryRewrites cryptographic key-size literals that fall below current minimums. RSA/DSA/DH < 2048 bits are upgraded to 2048; EC < 224 bits are upgraded to 256; when the algorithm is not resolvable from KeyPairGenerator.getInstance(...), EC curve sizes are treated as EC and other sizes as RSA. Symmetric keys < 128 bits are upgraded to 128, except for DES/DESede (and DES-sized keys of an unresolved algorithm), which do not accept a 128-bit key. Weak named EC curves (e.g. secp112r1, prime192v1) are upgraded to secp256r1. Companion fix recipe to FindInadequateKeySize. Note: changing key sizes can break interop with existing artifacts; review before applying.
org. openrewrite. java. security. UpgradeInadequateKeySizemod run . --recipe= org. openrewrite. java. security. UpgradeInadequateKeySizeInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.