我对这句话在做什么感到困惑。 “ openssl genrsa -aes256 -out example.key 2048”?我相信它正在创建rsa私钥,但是我不知道其余的工作。感谢您的帮助。
答案 0 :(得分:1)
正如评论所说,您需要通过查看documentation来对其进行分解。
所以让我们细分命令行:
genrsa命令生成RSA私钥。
因此,使用genrsa,您正在创建RSA私钥。
-aes256
手段:
-aes128,-aes192,-aes256,-aria128,-aria192,-aria256,-camellia128,-camellia192,-camellia256,-des,-des3,-idea
These options encrypt the private key with specified cipher before outputting it. If none of these options is specified no encryption is
使用。如果使用加密,则提示输入密码短语 通过-passout参数提供。
因此,您要求使用aes256加密输出新的私钥。因此,openssl会提示您输入用于私钥的AES256加密的密码。
-out example.key
手段:
输出文件名
Output the key to the specified file. If this argument is not specified then standard output is used.
因此,您要求将新的私钥输出到文件example.key。
2048
手段:
位数
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
不允许。
因此,您要求私钥的大小为2048位。由于这是默认设置,因此您只需从命令行将其删除,您仍然会获得2048位长的私钥。
如果您想进一步了解键的大小,请查看主题上的wiki article。