kaikramer / keystore-explorer

KeyStore Explorer is a free GUI replacement for the Java command-line utilities keytool and jarsigner.
https://keystore-explorer.org/
GNU General Public License v3.0
1.7k stars 275 forks source link

Export Keystore File to PEM - Different PEM Each Operation #461

Closed granterogers closed 1 year ago

granterogers commented 1 year ago

When a PEM file is generated from a Keystore file, the resultant PEM file is different each time the operation is run on the same Keystore file.

Steps to reproduce the behavior: Alias -> Export -> Export Key Pair -> PEM

Should the PEM file generated not be identical each time if using the same keystore file?

kaikramer commented 1 year ago

No, if the private key is encrypted, a PBE (password based encryption) scheme is used that creates a random value called "salt".

You can disable encryption by leaving the password fields empty. Then the PEM file has always the same content.