First, Introduction
Generate RSA private key
Second, the grammar
OpenSSL Genrsa [-out filename] [-passout arg] [-F4] [-3fileID[numbits] [-des] [-des3] [-idea]
Options
Usage:genrsa [args] [numbits]-des encrypt the generated key with DesinchCBC Mode-des3 encrypt the generated key with DESinchEde CBC Mode (168bit key)-idea encrypt the generated key with ideainchCBC Mode-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-outfileOutput the key to'file-passout arg outputfilePass phrase source-f4 Use F4 (0x10001) forThe E value-3Use3 forThe E value-engine e Use engine E, possibly a hardware device.-randfile:file:. .. load thefile(or the FilesinchThe directory) into the random number generator
Third, examples
1, generate 1024-bit RSA private key, using DES algorithm encryption
OpenSSL genrsa-des-passout Pass:"1234546"1024x768
2. Generate public key based on private key
OpenSSL RSA- in Prikey.pem-out pubkey.pem-pubout
Reference: http://blog.csdn.net/fym0121/article/details/7987512
Openssl genrsa Command