I have an encrypted private key file lib below.
String privateKey = "-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,XXXX
..................
.............."
I want to decrypt this private key using a decryption password, i have the password. In openssl something like this helps me decrypt
openssl rsa -aes256 -in encrypted_private.key -out /tmp/mydecrptyedkey.key -passin pass:decryption_passphrase
How do i do this in Java, found some posts which had used BountyCastle but am i do see there are known CVE with the library. Any help would be great. Thanks.