title: What causes keytool error "Failed to decrypt safe contents entry"?
body: <p>I am trying to convert a standard PKCS #12 (.p12) key store into a Java JKS key store with this command:</p>
  
  <p><code>keytool -importkeystore -srckeystore keystore.p12 -srcstoretype PKCS12 -deststoretype JKS -destkeystore keystore.jks</code></p>
  
  <p>It is failing with:</p>
  
  <pre><code>keytool error: java.io.IOException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded
  </code></pre>
  
  <p>Do you have any idea how to solve this problem?</p>