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:
-----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: AES-128-CBC,225AAFE1E579A5E38EC1C7F479C5F877 ...... IBUX1w9RYjMsgRE6de79iT80A+Er3RYH7tKKcFrjMoIv4z3YxeIgvPtXjmkoXLmv -----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
What are these numbers?
Is the passphrase digested to the key in some standard way? Is it different for every algorithm used?