We have a jck keystore (jceks) format containing a secret key. It was generated using keytool command
keytool -genseckey -alias mykey -keyalg AES -keysize 256 -storetype jceks -keystore mykeystore.jks
We need to share this with another application and they seem to have limitations in working with jck store. They are asking for the key to be exported and supplied to them.
We tried a few tools, but are not able to export the secret key. Is there a command or workaround to achieve this ?
keytool doesn't support exporting of Secret Keys. You could use the
KeyStore
api to do this.KeyStore Explorer shows the key as a hex string if you double-click on it: