Am Montag, 3. November 2008 08:12:26 schrieb shivakumar Balur:
> HI All,
> when i tried to generate DH parameters using : openssl genpkey
> -genparam -algorithm DH -out dhp.pem -pkeyopt dh_paramgen_prime_len:1024
> error: openssl:Error: 'genpkey' is an invalid command.
> Can any one help me in this or any other commands to generate DH parameter
> n DH Key.


you can generate the DH prime with the command:
openssl dhparam -out -outform -rand
(-2 | -5) -text -c

: a file to seed openssl's PRNG
(-2|-5) : the dh generator (see DH algorithem). 2 is default.
-text : extra text output on stdout
-c : extra c-variable output on stdout.

For example:
openssl dhparam -out dh1024.pem 1024
This will generate a dh prime with generator 2 and a length of 1024 bit in
dh1024.pem .


__________________________________________________ ____________________
OpenSSL Project
User Support Mailing List
Automated List Manager