Cryptography Tutorials - Herong's Tutorial Examples - v5.42, by Herong Yang
Summary - Migrating "keystore" Keys to "OpenSSL"
This section describes high level steps on how to migrate a private key generated in a JKS (Java KeyStore) file to an 'OpenSSL' key file. The key step is to convert a JKS file into a PKCS#12 file with 'keytool'.
Once we know that "keytool" supports PKCS#12 files, we can also use PKCS#12 files to migrate private keys from "keytool" keystore files "OpenSSL" key files. Here are my notes on how to do this:
"keytool -importkeystore" command should be used to convert a JKS (Java KeyStore) file into a PKCS#12 file.
"openssl pkcs12" command should be used to split the private key file out of the PKCS#12 file.
"openssl pkcs12" command should be used to split the certificate file out of the PKCS#12 file.
If you are tired of using PKCS#12 files, of course you can use my "DumpKey.java" program to dump the private key out of a JKS file and use it directly with OpenSSL. See the previous chapter for more information on DumpKey.java.
Table of Contents
Introduction to AES (Advanced Encryption Standard)
DES Algorithm - Illustrated with Java Programs
DES Algorithm Java Implementation
DES Algorithm - Java Implementation in JDK JCE
DES Encryption Operation Modes
PHP Implementation of DES - mcrypt
Blowfish - 8-Byte Block Cipher
Secret Key Generation and Management
Cipher - Secret Key Encryption and Decryption
RSA Implementation using java.math.BigInteger Class
Introduction of DSA (Digital Signature Algorithm)
Java Default Implementation of DSA
Private key and Public Key Pair Generation
PKCS#8/X.509 Private/Public Encoding Standards
Cipher - Public Key Encryption and Decryption
OpenSSL Introduction and Installation
OpenSSL Generating and Managing RSA Keys
OpenSSL Generating and Signing CSR
OpenSSL Validating Certificate Path
"keytool" and "keystore" from JDK
"OpenSSL" Signing CSR Generated by "keytool"
Migrating Keys from "keystore" to "OpenSSL" Key Files
Certificate X.509 Standard and DER/PEM Formats
►Migrating Keys from "OpenSSL" Key Files to "keystore"
"openssl genrsa" Generating Private Key
"openssl pkcs8" Converting Keys to PKCS#8 Format
"openssl pkcs12" Merging Key with Certificate
"keytool -list" Verifying PKCS#12 Files
"keytool -importkeystore" Importing PKCS#12 Files
Summary - Migrating "OpenSSL" Keys to "keystore"
►Summary - Migrating "keystore" Keys to "OpenSSL"