为什么 OpenSSL 提供了两个有如此多重叠的实用程序
genpkey:
OpenSSL> genpkey -
Usage: genpkey [options]
where options may be
-out file output file
-outform X output format (DER or PEM)
-pass arg output file pass phrase source
-<cipher> use cipher <cipher> to encrypt the key
-engine e use engine e, possibly a hardware device.
-paramfile file parameters file
-algorithm alg the public key algorithm
-pkeyopt opt:value set the public key algorithm option <opt>
to value <value>
-genparam generate parameters, not key
-text print the in text
NB: options order may be important! See the manual page.
Run Code Online (Sandbox Code Playgroud)
并且genrsa:
OpenSSL> genrsa -
usage: genrsa [args] [numbits]
-des encrypt the generated key with DES in cbc mode
-des3 encrypt the generated key with DES in ede cbc mode (168 bit key)
-seed
encrypt PEM output with cbc seed
-aes128, -aes192, -aes256
encrypt PEM output with cbc aes
-camellia128, -camellia192, -camellia256
encrypt PEM output with cbc camellia
-out file output the key to 'file
-passout arg output file pass phrase source
-f4 use F4 (0x10001) for the E value
-3 use 3 for the E value
-engine e use engine e, possibly a hardware device.
-rand file:file:...
load the file (or the files in the directory) into
the random number generator
Run Code Online (Sandbox Code Playgroud)
Debian 中的文档对此也很奇怪,
genpkey Generation of Private Key or Parameters.
genrsa Generation of RSA Private Key. Superceded by genpkey.
Run Code Online (Sandbox Code Playgroud)
是genpkey替代品吗?如果有,怎么没有-des3?而且,我们如何为其添加密码并指定密钥长度?
Mic*_*elZ 11
它清楚地表明genrsa已被 取代genpkey,所以是的,genpkey是替代品。
您可以3des使用-cipher参数将密码更改为
此外,它应该告诉您要添加密码,请使用-pass参数
你可以在这里找到更多信息
| 归档时间: |
|
| 查看次数: |
13643 次 |
| 最近记录: |