I would like to know how exactly the encryption of private key by passphrase works. I am a software developer with no background in cryptography and I know only some basics. When I open the private key file I see:

    Proc-Type: 4,ENCRYPTED
    DEK-Info: AES-128-CBC,225AAFE1E579A5E38EC1C7F479C5F877
    -----END RSA PRIVATE KEY-----

As I understand this is private key encrypted using symmetric encryption where passphrase is the key.

The algorithm used is in this case is AES-128-CBCbut I also have seen DES-EDE3-CBC in a different key. What I don't understand is that number/string behind the algorithm type info- 225AAFE1E579A5E38EC1C7F479C5F877. The similar one but shorter was present also in DEK-Info header of the key which had DES.

What are these numbers?

Is the passphrase digested to the key in some standard way? Is it different for every algorithm used?

1 Answer 1


According to this: https://stackoverflow.com/questions/1774469/how-does-the-rsa-private-key-passphrase-work-under-the-hood the hex string is the initialization vector used by the encryption algorithm.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .