To create a 1024-bit RSA key:
keytool -genkey -keyalg RSA -keysize 1024 -alias alias -keystore .keystore