OpenSSL "genpkey -genparam" - Generate EC Parameters

Q

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

✍: FYIcenter.com

A

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

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

OpenSSL> genpkey -genparam -algorithm ec -out my_ec.prm 
   -pkeyopt ec_paramgen_curve:secp112r1

OpenSSL> exit

C:\Users\fyicenter>type my_ec.prm
-----BEGIN EC PARAMETERS-----
MIGLAgEBMBoGByqGSM49AQECDwDbfCq/YuNeZoB2vq0gizA3BA7bfCq/YuNeZoB2
vq0giAQOZZ74ugQ5Fu7eiRFwKyIDFQAA9QsCjk1pbmdodWFRdSkEcng/sQQdBAlI
cjmZWl7na1X5wvCYqJzlr4ckwKI+Dg/3dQACDwDbfCq/YuNedijfrGVhxQIBAQ==
-----END EC PARAMETERS-----

Options used in this command are:

  • "-genparam" - Generate key generation required parameters
  • "-algorighm ec" - Use EC algorithm
  • "-pkeyopt ec_paramgen_curve:secp112r1" - Use the "secp112r1" curve
  • "-out my_ec.prm" - Save output (the new EC key generation parameters) in a file.

 

OpenSSL "pkeyparam -text" - Print EC Parameters in Text

OpenSSL "genpkey" Command for EC Keys

OpenSSL "genpkey" Command for EC Keys

⇑⇑ OpenSSL Tutorials

2017-07-15, 4232👍, 0💬