title: Importing private key to keystore
body: <p>I have to import a .key file into a Java keystore to decrypt a message. There are many instructions out there on how to do this (with openssl + keytool), but they all require a certificate file to be imported along with the key. If I create a self-signed certificate and add this, will I be able to decrypt the message?</p>
  
  <p>Why do I need a certificate for this in the first place? Is a key alone not sufficient for decryption?</p>