Encrypted Private Key to RSA Private Key

限于喜欢 提交于 2019-12-05 12:35:11

You just need to add an encryption mechanism, e.g., -des3

openssl pkey -in servenc.key -out serv.key -des3
Lakshmi
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,E4A3D50AE7D7FF1E

YlFCH5nM36dmGE6cwOMOIQkFz8KXOF4601RgxVz5Jj8D2a2vmb8cin9zvb0oYLhQ
2aJ5cFu29/5MPr6xuVxcD+AA7nbVBHF7mSwc/e4mrQOfwRI3mD7OMRmE8aBp70n9
4jWGfaXgnOio1+sViH0c7fx1greIAyAoyiBvOYiBCZX9BFP5327FN08wmmS/PeuP
IY3AsYyh86PHXCRl6O1/ZKJUhXoG/2gw0JWK02nUNGHQBOQXYbHyVjWvb/s3GbzY
tk6gwY0P6t+dcd/aUo56nbDvm9NT+M9a34/E8chXF5tuYhQoQUyPqGJDvBCp2jOJ
d229Oxy0B9k3RijMA+I/jaEhjrZvTml4WCxf/+C49HEJds3vmRUd9T/j+/YIfO9f
Y7llEawgWByOIafEzupXHuvpm9fva4pz95wo9rogS9GzADfqfnGdoDjCdWFOUcBM
b3glshuBiIOIfS62LuuKgtbTtP44EcwnUq5biC2EhpX9wcYLhSe30KCI2ZqAMeU5
XSncV7SkkKGGgB1CIcOxlPgTr2sXXSMT2nHrGLO9q2BPY8VVvo4Jwp8nqciC8V/n
MFj7ZTzwllqldaN20hYPgSVljRvIPDDNIGvxA9k2woO55+FLxRg2gnsR/gfI0m4I
0c0JWZqm+WNLnzmLGv3lVK4RGLQEsFPL5bI/qwtXwoO55+FLxRg2gnsR/gfI0m4I
lhxMLD4kODP2dF3ZADNXNWbgNlmh9HXmuk6lycxTR69+hwWJfMbtbUeUHR1oQgxQ
EbdCFkccBi4nlqZHIYi5cChDzTtiW+9EFQsQiUDL+zWyWlqkprJcPHrFL58aHhmH
gypdiqw1BpZwjLN7th/QjTWcS8Z712AOKGmcIh4vmvYaLDZouonv3ZqcwXhEE94q
x/GhvRvFnxEbbj/2gzDTEP1oW6jrSQcoFRL/bFBNBAc9oDEyZejndKX8Equht8SV
ariMiZZWT+xDAo+9XfJ7ncGkBsjJmnJgkkl05kIsNw8lcs/3kR3HYxe3pIfFEMm4
-----END RSA PRIVATE KEY-----

I converted above kind of encrypted RSA key to RSA key with below format using

openssl rsa -in consumerencrypted.key -out consumer.key
-----BEGIN RSA PRIVATE KEY-----
MIIJKgIBAAKCAgEA4m6uk9d+D3ceLGY74hcJoSuZgaixhu0j2jn2Y6f5FDaPVxLM
9sdSVXU1xxm24VsMZh078hV/ao02MTguNEvkJ94BaAhfQhyZbUzWhZkzEdFzfE93
WNveNCbzva/wzK9HGvdRpSGrK1vX24C/mCERDfKR/yr0N3lMO0i+EkQHlxprend/
0Kquepeir7B8wd+YA2NNyrGCwF2pMRod9vZXC/h7uugTMjqvfG0C9U9nTxxTXSmz
yqXAI4jq1HrQy9HvO0yA1nyVIpH1JtrUnkQcKUoMHUzz625uNwz+AVb5RqBY+6zi
D8O2t1wfUunCSy4QKHH+zpDf3cZ7AhmKFJHx5+QT6QM24+UdvjlAd5TnYIXXPe/X
u2FUG4bDcaSmnlFiVdcDQsw7IndQnIGxzz3ACJsMtyAhM9LX4H6AjsY2SpOdOfad
/IXufigUQnqVwmeK+JJHu0AOQuTrbNEbIQKCAQEAsuF9scSKlMDHCNUSQCsS++ZW
gWXaJmuOsp5iz+8JJrxPUtGtFAN7ZjwAr9W67DH9LQFT4hNKkkyBkJSLADrcDEzQ
fH4xEHW3K3KMXYfx89iSoHoJ0X1qkRhZHQ2AfwxVFkzBnHcRrYSYGkWqgd4LKcEy
WvMUaWnh+XJASxPXZKW3gPjVENVxiM9T8TPXXRbKAYusy6SUPKMgWWJqxuwxJcYP
lX9lV42t22KIFYLrG/WVgy+IkdyPIez2l2YFkopCywKm/sPA0VYtcu6SlpQJH3HC
1Kgodc4szs60N09q+7wfc5rMq2Sy5sak8osNnqF48d5MIBmUGxIIFigX/V35aA==
-----END RSA PRIVATE KEY-----
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!