On Linux (and in general for the Java keytool utility), the allowed key algorithms for the -genkey (or -genkeypair) command depend on the Java version and the installed security providers. However, the most commonly supported and recommended key algorithms are:
secp256r1, secp384r1, secp521r1)To see the list of available key algorithms on your system, run:
bashkeytool -genkeypair -help
or
bashkeytool -genkey -help
Look for the -keyalg option in the output.
To generate a key pair with a specific algorithm (e.g., RSA):
bashkeytool -genkeypair -alias mykey -keyalg RSA -keysize 2048 -keystore keystore.jks
For EC:
bashkeytool -genkeypair -alias mykey -keyalg EC -keysize 256 -keystore keystore.jks
Vibe can make mistakes. Check answers. Learn more