NAME

openssl-ec, ec - EC key processing

SYNOPSIS

openssl ec [-help] [-inform PEM|DER] [-outform PEM|DER] [-in filename] [-passin arg] [-out filename] [-passout arg] [-des] [-des3] [-idea] [-text] [-noout] [-param_out] [-pubin] [-pubout] [-conv_form arg] [-param_enc arg] [-no_public] [-check] [-engine id]

DESCRIPTION

The ec command processes EC keys. They can be converted between various forms and their components printed out. Note OpenSSL uses the private key format specified in 'SEC 1: Elliptic Curve Cryptography' (http://www.secg.org/). To convert an OpenSSL EC private key into the PKCS#8 private key format use the pkcs8 command.

OPTIONS

NOTES

The PEM private key format uses the header and footer lines:

-----BEGIN EC PRIVATE KEY----- -----END EC PRIVATE KEY-----

The PEM public key format uses the header and footer lines:

-----BEGIN PUBLIC KEY----- -----END PUBLIC KEY-----

EXAMPLES

To encrypt a private key using triple DES:

openssl ec -in key.pem -des3 -out keyout.pem

To convert a private key from PEM to DER format:

openssl ec -in key.pem -outform DER -out keyout.der

To print out the components of a private key to standard output:

openssl ec -in key.pem -text -noout

To just output the public part of a private key:

openssl ec -in key.pem -pubout -out pubkey.pem

To change the parameters encoding to explicit:

openssl ec -in key.pem -param_enc explicit -out keyout.pem

To change the point conversion form to compressed:

openssl ec -in key.pem -conv_form compressed -out keyout.pem

SEE ALSO

ecparam (1), dsa (1), rsa (1)

COPYRIGHT

Copyright 2003-2021 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the OpenSSL license (the License). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.