First, Introduction
Elliptic Curve key processing tool
Second, the grammar
OpenSSL EC [-inform pem| DER] [-outform pem| DER] [- in filename] [-out filename] [-passin arg] [-passout arg] [-text] [-noout] [-param_out] [-CONV_FO RM Arg] [-pubin] [-pubout] [-param_enc arg] [ID] [-des] [-DES3] [-idea]
Options
-inform arg input Format-DER or PEM-outform arg output format-DER or PEM-inchARG inputfile-passin arg inputfilePass phrase source-out arg outputfile-passout arg outputfilePass phrase source-engine e Use engine E, possibly a hardware device.-des encrypt PEM output, instead of'des'every other cipher supported by OpenSSL can be used-text print the key-noout Don'T print key out-param_out Print the elliptic curve parameters-conv_form ARG Specifies the point conversion form possible values:compressed Uncompressed (default) hybrid-Param_enc arg Specifies the "the" EC parameters is encodedinchThe asn1 der encoding possible values:named_curve (default) Explici T
Third, examples
1. Generate EC private key
OpenSSL ecparam-genkey-name prime256v1-param_enc explicit-outform pem-out Ec_prikey.pem
2. Password protection for the private key
OpenSSL ec-in ec_prikey.pem-des-out Ec_prikey.pem
3. Extracting the public key from the private key
OpenSSL EC- in Ec_prikey.pem-pubout-out Ec_pubkey.pem
4. View private key information
OpenSSL EC- in Ec_prikey.pem-passin Pass:"123456" -text
5. View Public key information
OpenSSL EC- in Ec_pubkey.pem-pubin-text
6. Pem is der
OpenSSL EC- in Ec_prikey.pem-outform der-out ec_prikey.der
Reference: http://blog.csdn.net/as3luyuan123/article/details/14138983
OPENSSL EC Command