我对这个声明在做什么感到困惑。“openssl genrsa -aes256 -out example.key 2048”?我相信它正在创建一个 rsa 私钥,但是我不知道它的其余部分在做什么。感谢任何帮助家伙。
正如评论所说,您需要通过查看文档来分解它。
所以让我们分解命令行:
genrsa 命令生成一个 RSA 私钥。
因此,使用 genrsa 您正在创建一个 RSA 私钥。
-aes256
方法:
-aes128, -aes192, -aes256, -aria128, -aria192, -aria256, -camellia128, -camellia192, -camellia256, -des, -des3, -idea
Run Code Online (Sandbox Code Playgroud)These options encrypt the private key with specified cipher before outputting it. If none of these options is specified no encryption is used. If encryption is used a pass phrase is prompted for if it is not supplied via the -passout argument.
因此,您要求使用 aes256 加密输出新的私钥。因此 openssl 会提示您输入用于 AES256 私钥加密的密码。
-out example.key
方法:
-out 文件名
Run Code Online (Sandbox Code Playgroud)Output the key to the specified file. If this argument is not specified then standard output is used.
因此,您要求将新的私钥输出到文件 example.key。
2048
方法:
数位
Run Code Online (Sandbox Code Playgroud)The size of the private key to generate in bits. This must be the last option specified. The default is 2048 and values less than 512 are not allowed.
因此,您要求私钥长度为 2048 位。由于这是默认设置,您只需从命令行中删除它,您仍将获得 2048 位长度的私钥。
如果您想了解有关密钥大小的更多信息,请查看有关该主题的wiki 文章。
| 归档时间: |
|
| 查看次数: |
2165 次 |
| 最近记录: |