summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjmc <>2010-10-08 05:38:24 +0000
committerjmc <>2010-10-08 05:38:24 +0000
commit763ebc6d82225f6180259bbe4426c571a9719880 (patch)
treeb163588ab5903c31555785e5d8bdbb6de8b6d6e3 /src
parent2af1917a5ba184a0081703607908dce732bdcab1 (diff)
downloadopenbsd-763ebc6d82225f6180259bbe4426c571a9719880.tar.gz
openbsd-763ebc6d82225f6180259bbe4426c571a9719880.tar.bz2
openbsd-763ebc6d82225f6180259bbe4426c571a9719880.zip
document "openssl ec";
Diffstat (limited to 'src')
-rw-r--r--src/usr.sbin/openssl/openssl.1212
1 files changed, 209 insertions, 3 deletions
diff --git a/src/usr.sbin/openssl/openssl.1 b/src/usr.sbin/openssl/openssl.1
index e5f12dfb6b..0aae966742 100644
--- a/src/usr.sbin/openssl/openssl.1
+++ b/src/usr.sbin/openssl/openssl.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: openssl.1,v 1.68 2010/10/06 13:21:02 jmc Exp $ 1.\" $OpenBSD: openssl.1,v 1.69 2010/10/08 05:38:24 jmc Exp $
2.\" ==================================================================== 2.\" ====================================================================
3.\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3.\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4.\" 4.\"
@@ -112,7 +112,7 @@
112.\" 112.\"
113.\" OPENSSL 113.\" OPENSSL
114.\" 114.\"
115.Dd $Mdocdate: October 6 2010 $ 115.Dd $Mdocdate: October 8 2010 $
116.Dt OPENSSL 1 116.Dt OPENSSL 1
117.Os 117.Os
118.Sh NAME 118.Sh NAME
@@ -278,6 +278,8 @@ Superseded by
278.Cm genpkey 278.Cm genpkey
279and 279and
280.Cm pkeyparam . 280.Cm pkeyparam .
281.It Cm ec
282Elliptic curve (EC) key processing.
281.It Cm enc 283.It Cm enc
282Encoding with ciphers. 284Encoding with ciphers.
283.It Cm engine 285.It Cm engine
@@ -2506,6 +2508,210 @@ PEM format DSA parameters use the header and footer lines:
2506DSA parameter generation is a slow process and as a result the same set of 2508DSA parameter generation is a slow process and as a result the same set of
2507DSA parameters is often used to generate several distinct keys. 2509DSA parameters is often used to generate several distinct keys.
2508.\" 2510.\"
2511.\" EC
2512.\"
2513.Sh EC
2514.Nm openssl ec
2515.Bk -words
2516.Op Fl des
2517.Op Fl des3
2518.Op Fl noout
2519.Op Fl param_out
2520.Op Fl pubin
2521.Op Fl pubout
2522.Op Fl text
2523.Op Fl conv_form Ar arg
2524.Op Fl engine Ar id
2525.Op Fl in Ar filename
2526.Op Fl inform Ar PEM|DER
2527.Op Fl out Ar filename
2528.Op Fl outform Ar PEM|DER
2529.Op Fl param_enc Ar arg
2530.Op Fl passin Ar arg
2531.Op Fl passout Ar arg
2532.Ek
2533.Pp
2534The
2535.Nm ec
2536command processes EC keys.
2537They can be converted between various
2538forms and their components printed out.
2539Note:
2540.Nm OpenSSL
2541uses the private key format specified in
2542.Dq SEC 1: Elliptic Curve Cryptography
2543.Pq Pa http://www.secg.org/ .
2544To convert an
2545.Nm OpenSSL
2546EC private key into the PKCS#8 private key format use the
2547.Nm pkcs8
2548command.
2549.Pp
2550The options are as follows:
2551.Bl -tag -width Ds
2552.It Fl conv_form
2553This specifies how the points on the elliptic curve are converted
2554into octet strings.
2555Possible values are:
2556.Cm compressed
2557(the default value),
2558.Cm uncompressed ,
2559and
2560.Cm hybrid .
2561For more information regarding
2562the point conversion forms please read the X9.62 standard.
2563Note:
2564Due to patent issues the
2565.Cm compressed
2566option is disabled by default for binary curves
2567and can be enabled by defining the preprocessor macro
2568.Ar OPENSSL_EC_BIN_PT_COMP
2569at compile time.
2570.It Fl des | des3
2571These options encrypt the private key with the DES, triple DES, or
2572any other cipher supported by
2573.Nm OpenSSL
2574before outputting it.
2575A pass phrase is prompted for.
2576If none of these options is specified the key is written in plain text.
2577This means that using the
2578.Nm ec
2579utility to read in an encrypted key with no
2580encryption option can be used to remove the pass phrase from a key,
2581or by setting the encryption options
2582it can be use to add or change the pass phrase.
2583These options can only be used with PEM format output files.
2584.It Fl engine Ar id
2585Specifying an engine (by its unique
2586.Ar id
2587string) will cause
2588.Nm ec
2589to attempt to obtain a functional reference to the specified engine,
2590thus initialising it if needed.
2591The engine will then be set as the default
2592for all available algorithms.
2593.It Fl in Ar filename
2594This specifies the input filename to read a key from,
2595or standard input if this option is not specified.
2596If the key is encrypted a pass phrase will be prompted for.
2597.It Fl inform Ar DER | PEM
2598This specifies the input format.
2599DER with a private key uses
2600an ASN.1 DER-encoded SEC1 private key.
2601When used with a public key it
2602uses the SubjectPublicKeyInfo structure as specified in RFC 3280.
2603PEM is the default format:
2604it consists of the DER format base64
2605encoded with additional header and footer lines.
2606In the case of a private key
2607PKCS#8 format is also accepted.
2608.It Fl noout
2609Prevents output of the encoded version of the key.
2610.It Fl out Ar filename
2611Specifies the output filename to write a key to,
2612or standard output if none is specified.
2613If any encryption options are set then a pass phrase will be prompted for.
2614The output filename should
2615.Em not
2616be the same as the input filename.
2617.It Fl outform Ar DER | PEM
2618This specifies the output format.
2619The options have the same meaning as the
2620.Fl inform
2621option.
2622.It Fl param_enc Ar arg
2623This specifies how the elliptic curve parameters are encoded.
2624Possible value are:
2625.Cm named_curve ,
2626i.e. the EC parameters are specified by an OID; or
2627.Cm explicit ,
2628where the EC parameters are explicitly given
2629(see RFC 3279 for the definition of the EC parameter structures).
2630The default value is
2631.Cm named_curve .
2632Note: the
2633.Cm implicitlyCA
2634alternative,
2635as specified in RFC 3279,
2636is currently not implemented in
2637.Nm OpenSSL .
2638.It Fl passin Ar arg
2639The input file password source.
2640For more information about the format of
2641.Ar arg ,
2642see the
2643.Sx PASS PHRASE ARGUMENTS
2644section above.
2645.It Fl passout Ar arg
2646The output file password source.
2647For more information about the format of
2648.Ar arg ,
2649see the
2650.Sx PASS PHRASE ARGUMENTS
2651section above.
2652.It Fl pubin
2653By default a private key is read from the input file;
2654with this option a public key is read instead.
2655.It Fl pubout
2656By default a private key is output;
2657with this option a public key is output instead.
2658This option is automatically set if the input is a public key.
2659.It Fl text
2660Prints out the public/private key components and parameters.
2661.El
2662.Sh EC NOTES
2663The PEM private key format uses the header and footer lines:
2664.Bd -literal -offset indent
2665-----BEGIN EC PRIVATE KEY-----
2666-----END EC PRIVATE KEY-----
2667.Ed
2668.Pp
2669The PEM public key format uses the header and footer lines:
2670.Bd -literal -offset indent
2671-----BEGIN PUBLIC KEY-----
2672-----END PUBLIC KEY-----
2673.Ed
2674.Sh EC EXAMPLES
2675To encrypt a private key using triple DES:
2676.Bd -literal -offset indent
2677$ openssl ec -in key.pem -des3 -out keyout.pem
2678.Ed
2679.Pp
2680To convert a private key from PEM to DER format:
2681.Bd -literal -offset indent
2682$ openssl ec -in key.pem -outform DER -out keyout.der
2683.Ed
2684.Pp
2685To print out the components of a private key to standard output:
2686.Bd -literal -offset indent
2687$ openssl ec -in key.pem -text -noout
2688.Ed
2689.Pp
2690To just output the public part of a private key:
2691.Bd -literal -offset indent
2692$ openssl ec -in key.pem -pubout -out pubkey.pem
2693.Ed
2694.Pp
2695To change the parameter encoding to
2696.Cm explicit :
2697.Bd -literal -offset indent
2698$ openssl ec -in key.pem -param_enc explicit -out keyout.pem
2699.Ed
2700.Pp
2701To change the point conversion form to
2702.Cm compressed :
2703.Bd -literal -offset indent
2704$ openssl ec -in key.pem -conv_form compressed -out keyout.pem
2705.Ed
2706.Sh EC HISTORY
2707The
2708.Nm ec
2709command was first introduced in
2710.Nm OpenSSL
27110.9.8.
2712.Sh EC AUTHORS
2713.An Nils Larsch .
2714.\"
2509.\" ENC 2715.\" ENC
2510.\" 2716.\"
2511.Sh ENC 2717.Sh ENC
@@ -2632,7 +2838,7 @@ option.
2632.It Fl md Ar digest 2838.It Fl md Ar digest
2633Use 2839Use
2634.Ar digest 2840.Ar digest
2635to create a key from a passphrase. 2841to create a key from a pass phrase.
2636.Ar digest 2842.Ar digest
2637may be one of 2843may be one of
2638.Dq md2 , 2844.Dq md2 ,