OpenSSL "genpkey -genparam" - Generate DSA Parameters

Q

How to generate a new DSA parameter file using OpenSSL "genpkey -genparam" command?

✍: FYIcenter.com

A

If you need a new DSA parameter file in order to create new DSA keys, you can use the OpenSSL "genpkey -genparam" command as shown below:

C:\Users\fyicenter>\local\openssl\openssl.exe

OpenSSL> genpkey -genparam -algorithm dsa -out my_dsa.prm
.......+++++++++++++++++++++++++++++++++++++++++++++++++++*
................+..+..+...................+...............+..........+......+...
+................+.....................+...........+....+...+.....+.+.......+...
+.................+.......+.+.....................+....+....++++++++++++++++++++
+++++++++++++++++++++++++++++++*

OpenSSL> exit

C:\Users\fyicenter>type my_dsa.prm
-----BEGIN DSA PARAMETERS-----
MIIBHwKBgQCeL2aSfR+oiUf1FNYCWx00eop/KGuL19VXb4/1ed0NVNpUtFXZAGcm
UIlnzvUEzuaDNGOEuw7U191CIrkrilVjA+eaYlrk4A3pn+GbFQHcXEOkSgmEsIjt
KNzvu0cF9mhM2/ymjKqYaB7cET1ocaeTG8/ZMww/U/sUAM7H7LoRlQIVANZAPM6E
ffzbiA7NOznT++lF91J5AoGBAJgdpFQgaqKLnZ/81NHRXl2PEQ9jqKGym73ZxXsp
fKhtwbJC6ftasxxFU/cyPPug5iZ0sXMco7k/v2TtSZ1El/RjT31sAOJIZ7Xq2unC
3vKpt3yYlkXbHp+V2RRWKr4/AOnuceqnVQnoSxnNWS59HsE7Sw2GKUzP0KhWCO18
Sg2h
-----END DSA PARAMETERS-----

Options used in this command are:

  • "-genparam" - Generate key generation required parameters
  • "-algorighm dsa" - Use DSA algorithm
  • "-out my_dsa.prm" - Save output (the new DSA key generation parameters) in a file.

Note that by default, OpenSSL generates DSA key generation parameters for 1024-bit keys.

 

OpenSSL "genpkey" Command for DSA Keys

⇒⇒OpenSSL Tutorials

2017-09-12, 327👍, 0💬