wiki:tech:java-hints:java-and-certificates
This is an old revision of the document!
converting openssl keys for usage in java
convert PKCS1 private key is PKCS8 (used in java.security.*)
openssl pkcs8 -topk8 -inform PEM -in private.key -outform pem -nocrypt -out pkcs8.pem
public/private keys formats and headers
Public formats
- PKCS#1 (PEM header: BEGIN RSA PUBLIC KEY)
- X.509 (PEM header: BEGIN PUBLIC KEY)
- XML tag <RSAKeyValue>
Private key formats
- PKCS#8 (PEM header: BEGIN ENCRYPTED PRIVATE KEY)
- PKCS#1 (PEM header: BEGIN RSA PRIVATE KEY) - unencrypted
- PKCS#8 (PEM header: BEGIN PRIVATE KEY) - unencrypted
- XML <RSAKeyPair> and <RSAKeyValue>
wiki/tech/java-hints/java-and-certificates.1606137031.txt.gz · Last modified: 2020/11/23 16:10 by kpc