How can I use keytool to generate a public/private AES key? I can only find references to generate from code or generate a keystore.
AES is an algorithm to generate symmetric key, not a asymmetric key pair (public and private key).
Some of the other algorithms to generate a symmetric key are: DES, 3DES
.
Algorithms to generate an asymmetric key pair are: RSA, DSA, EC
.
If you are planning to generating a key pair, you can use the -genkeypair
command. Documentation here.
If you want to generate a symmetric key, you can use the -genseckey
command. Documentation here.