How to generate PKCS8 key with PEM encode using AES-128-ECB Alg in OpenSSL

给你一囗甜甜゛ 提交于 2020-03-06 02:15:19

问题


I want know How to generate below key [AES-128-ECB] using openssl cmd.

-----BEGIN PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-ECB,379AB79E55059F9A
gaakm48Y8qYA997fJREN4JtfVkfTdnVzaZK2
......................................
gaakm48Y834748453273tfVkfTdnVzaZK2 ....
-----END PRIVATE KEY-----

From our internal code using below we have cretaed abv key , now I have to generate same format key using openssl cmd generated RSA Key then convert to PKCS8 then done PEM_encode using AES-128-ECB Alg

Is OpenSSL cmd tool can only use DES-EDE3-CBC alg to generate the keys ?


回答1:


It is not clear how are you generating your key. Considering you are running openssl genrsa, you can try:

openssl genrsa -aes128


来源:https://stackoverflow.com/questions/8500874/how-to-generate-pkcs8-key-with-pem-encode-using-aes-128-ecb-alg-in-openssl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!