最終更新:2023-10-12 (木) 14:23:45 (189d)
openssl genrsa
Top / openssl genrsa
秘密鍵の作成
Generation of RSA Private Key.
http://www.openssl.org/docs/apps/genrsa.html
openssl genrsa [-out filename] [-passout arg] [-des] [-des3] [-idea] [-f4] [-3] [-rand file(s)] [-engine id] [numbits]
引数
- -des、-des3、-ideaは秘密鍵を暗号化する際のアルゴリズムを指定します。
- -out はファイルを出力します。
- -rand は乱数データの元となるファイルをロードします。
- numbits は暗号鍵を何ビットで生成するかを指定することができます。
- 「-out ファイル名 」は、「> ファイル名 」で代用できます。
例
openssl genrsa -rand (擬似乱数ファイル名) -des3 (キー長) > (秘密鍵ファイル名) openssl genrsa -des3 -out domainname.key 1024 openssl genrsa -out domainname.key 1024 #パスフレーズ不要
メモ
openssl genrsa -out test.key 2048 暗号化なし openssl genrsa -des3 -out test.key 2048 暗号化あり (DES3)、パスフレーズが必要 openssl genrsa -aes128 -out? test.key 2048 暗号化あり (AES)、パスフレーズが必要
CSRの作成
help
Usage: genrsa [options] numbits General options: -help Display this summary -engine val Use engine, possibly a hardware device Input options: -3 (deprecated) Use 3 for the E value -F4 Use the Fermat number F4 (0x10001) for the E value -f4 Use the Fermat number F4 (0x10001) for the E value Output options: -out outfile Output the key to specified file -passout val Output file pass phrase source -primes +int Specify number of primes -verbose Verbose output -traditional Use traditional format for private keys -* Encrypt the output with any supported cipher Random state options: -rand val Load the given file(s) into the random number generator -writerand outfile Write random data to the specified file Provider options: -provider-path val Provider load path (must be before 'provider' argument if required) -provider val Provider to load (can be specified multiple times) -propquery val Property query used when fetching algorithms Parameters: numbits Size of key in bits