Differences between “BEGIN RSA PRIVATE KEY” and “BEGIN PRIVATE KEY”

Hi I was writing a program that imports private keys from a .pem file and create a private key object to use it later..
the problem I have faced is that some pem files header begin with

-----BEGIN PRIVATE KEY-----

while others begin with

-----BEGIN RSA PRIVATE KEY-----

through my search I knew that the first ones are PKCS#8 formatted but I couldn’t know what format does the other one belongs to.

2 Answers
2

Leave a Comment