Creating a Key Pair


# ./usr/local/ssl/bin/openssl genrsa -rand file1:file2:file3 \    -out www.example.com.key 1024 625152 semi-random bytes loaded Generating RSA private key, 1024 bit long modulus .....++++++ .........................++++++ e is 65537 (0x10001)


The example shows how to create a key pair using the openssl command line tool.

genrsa indicates to OpenSSL that you want to generate a key pair using the RSA algorithm.

The rand switch is used to provide OpenSSL with random data to ensure that the generated keys are unique and unpredictable. Substitute file1, file2, and so on, for the path to several large, relatively random files for this purpose (such as a kernel image, compressed log files, and so on). This switch is not necessary on Windows because the random data is automatically generated by other means.

The out switch indicates where to store the results.

1024 indicates the number of bits of the generated key.




Apache(c) Phrase Book(c) Essential Code and Commands
Apache Phrasebook
ISBN: 0672328364
EAN: 2147483647
Year: 2006
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net