summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjmc <>2016-08-09 17:07:33 +0000
committerjmc <>2016-08-09 17:07:33 +0000
commit71d42f7a91cc5eb28ad1f1a7dc83ebd96f646628 (patch)
treeb6b99e991955fb0c8b9c6291e392369301aa38fe /src
parentf3fe85e3ec23409ecae083e35a8314a50fb87c5d (diff)
downloadopenbsd-71d42f7a91cc5eb28ad1f1a7dc83ebd96f646628.tar.gz
openbsd-71d42f7a91cc5eb28ad1f1a7dc83ebd96f646628.tar.bz2
openbsd-71d42f7a91cc5eb28ad1f1a7dc83ebd96f646628.zip
trim the ec text;
Diffstat (limited to 'src')
-rw-r--r--src/usr.bin/openssl/openssl.1131
1 files changed, 39 insertions, 92 deletions
diff --git a/src/usr.bin/openssl/openssl.1 b/src/usr.bin/openssl/openssl.1
index e30510ef7d..6e4c6ae951 100644
--- a/src/usr.bin/openssl/openssl.1
+++ b/src/usr.bin/openssl/openssl.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: openssl.1,v 1.46 2016/08/08 18:13:51 jmc Exp $ 1.\" $OpenBSD: openssl.1,v 1.47 2016/08/09 17:07:33 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: August 8 2016 $ 115.Dd $Mdocdate: August 9 2016 $
116.Dt OPENSSL 1 116.Dt OPENSSL 1
117.Os 117.Os
118.Sh NAME 118.Sh NAME
@@ -1427,21 +1427,17 @@ Generate a parameter set of size
1427.Ar numbits . 1427.Ar numbits .
1428If this option is included, the input file is ignored. 1428If this option is included, the input file is ignored.
1429.El 1429.El
1430.\"
1431.\" EC
1432.\"
1433.Sh EC 1430.Sh EC
1434.nr nS 1 1431.nr nS 1
1435.Nm "openssl ec" 1432.Nm "openssl ec"
1436.Bk -words
1437.Op Fl conv_form Ar arg 1433.Op Fl conv_form Ar arg
1438.Op Fl des 1434.Op Fl des
1439.Op Fl des3 1435.Op Fl des3
1440.Op Fl in Ar file 1436.Op Fl in Ar file
1441.Op Fl inform Ar DER | PEM 1437.Op Fl inform Cm der | pem
1442.Op Fl noout 1438.Op Fl noout
1443.Op Fl out Ar file 1439.Op Fl out Ar file
1444.Op Fl outform Ar DER | PEM 1440.Op Fl outform Cm der | pem
1445.Op Fl param_enc Ar arg 1441.Op Fl param_enc Ar arg
1446.Op Fl param_out 1442.Op Fl param_out
1447.Op Fl passin Ar arg 1443.Op Fl passin Ar arg
@@ -1449,7 +1445,6 @@ If this option is included, the input file is ignored.
1449.Op Fl pubin 1445.Op Fl pubin
1450.Op Fl pubout 1446.Op Fl pubout
1451.Op Fl text 1447.Op Fl text
1452.Ek
1453.nr nS 0 1448.nr nS 0
1454.Pp 1449.Pp
1455The 1450The
@@ -1457,42 +1452,51 @@ The
1457command processes EC keys. 1452command processes EC keys.
1458They can be converted between various 1453They can be converted between various
1459forms and their components printed out. 1454forms and their components printed out.
1460Note: 1455.Nm openssl
1461.Nm OpenSSL
1462uses the private key format specified in 1456uses the private key format specified in
1463.Dq SEC 1: Elliptic Curve Cryptography 1457.Dq SEC 1: Elliptic Curve Cryptography
1464.Pq Lk http://www.secg.org/ . 1458.Pq Lk http://www.secg.org/ .
1465To convert an 1459To convert an
1466.Nm OpenSSL
1467EC private key into the PKCS#8 private key format use the 1460EC private key into the PKCS#8 private key format use the
1468.Nm pkcs8 1461.Nm pkcs8
1469command. 1462command.
1470.Pp 1463.Pp
1464The PEM private key format uses the header and footer lines:
1465.Bd -literal -offset indent
1466-----BEGIN EC PRIVATE KEY-----
1467-----END EC PRIVATE KEY-----
1468.Ed
1469.Pp
1470The PEM public key format uses the header and footer lines:
1471.Bd -literal -offset indent
1472-----BEGIN PUBLIC KEY-----
1473-----END PUBLIC KEY-----
1474.Ed
1475.Pp
1471The options are as follows: 1476The options are as follows:
1472.Bl -tag -width Ds 1477.Bl -tag -width Ds
1473.It Fl conv_form Ar arg 1478.It Fl conv_form Ar arg
1474This specifies how the points on the elliptic curve are converted 1479Specify how the points on the elliptic curve are converted
1475into octet strings. 1480into octet strings.
1476Possible values are: 1481Possible values are:
1477.Cm compressed 1482.Cm compressed
1478(the default value), 1483(the default),
1479.Cm uncompressed , 1484.Cm uncompressed ,
1480and 1485and
1481.Cm hybrid . 1486.Cm hybrid .
1482For more information regarding 1487For more information regarding
1483the point conversion forms please read the X9.62 standard. 1488the point conversion forms see the X9.62 standard.
1484Note: 1489Note:
1485Due to patent issues the 1490Due to patent issues the
1486.Cm compressed 1491.Cm compressed
1487option is disabled by default for binary curves 1492option is disabled by default for binary curves
1488and can be enabled by defining the preprocessor macro 1493and can be enabled by defining the preprocessor macro
1489.Ar OPENSSL_EC_BIN_PT_COMP 1494.Dv OPENSSL_EC_BIN_PT_COMP
1490at compile time. 1495at compile time.
1491.It Fl des | des3 1496.It Fl des | des3
1492These options encrypt the private key with the DES, triple DES, or 1497Encrypt the private key with DES, triple DES, or
1493any other cipher supported by 1498any other cipher supported by
1494.Nm OpenSSL 1499.Nm openssl .
1495before outputting it.
1496A pass phrase is prompted for. 1500A pass phrase is prompted for.
1497If none of these options is specified the key is written in plain text. 1501If none of these options is specified the key is written in plain text.
1498This means that using the 1502This means that using the
@@ -1503,36 +1507,32 @@ or by setting the encryption options
1503it can be use to add or change the pass phrase. 1507it can be use to add or change the pass phrase.
1504These options can only be used with PEM format output files. 1508These options can only be used with PEM format output files.
1505.It Fl in Ar file 1509.It Fl in Ar file
1506This specifies the input filename to read a key from, 1510The input file to read a key from,
1507or standard input if this option is not specified. 1511or standard input if not specified.
1508If the key is encrypted a pass phrase will be prompted for. 1512If the key is encrypted a pass phrase will be prompted for.
1509.It Fl inform Ar DER | PEM 1513.It Fl inform Cm der | pem
1510This specifies the input format. 1514The input format.
1511DER with a private key uses 1515.Cm der
1516with a private key uses
1512an ASN.1 DER-encoded SEC1 private key. 1517an ASN.1 DER-encoded SEC1 private key.
1513When used with a public key it 1518When used with a public key it
1514uses the SubjectPublicKeyInfo structure as specified in RFC 3280. 1519uses the SubjectPublicKeyInfo structure as specified in RFC 3280.
1515PEM is the default format: 1520.Cm pem
1521is the default format:
1516it consists of the DER format base64 1522it consists of the DER format base64
1517encoded with additional header and footer lines. 1523encoded with additional header and footer lines.
1518In the case of a private key 1524In the case of a private key
1519PKCS#8 format is also accepted. 1525PKCS#8 format is also accepted.
1520.It Fl noout 1526.It Fl noout
1521Prevents output of the encoded version of the key. 1527Do not output the encoded version of the key.
1522.It Fl out Ar file 1528.It Fl out Ar file
1523Specifies the output filename to write a key to, 1529The output filename to write to,
1524or standard output if none is specified. 1530or standard output if not specified.
1525If any encryption options are set then a pass phrase will be prompted for. 1531If any encryption options are set then a pass phrase will be prompted for.
1526The output filename should 1532.It Fl outform Cm der | pem
1527.Em not 1533The output format.
1528be the same as the input filename.
1529.It Fl outform Ar DER | PEM
1530This specifies the output format.
1531The options have the same meaning as the
1532.Fl inform
1533option.
1534.It Fl param_enc Ar arg 1534.It Fl param_enc Ar arg
1535This specifies how the elliptic curve parameters are encoded. 1535Specify how the elliptic curve parameters are encoded.
1536Possible value are: 1536Possible value are:
1537.Cm named_curve , 1537.Cm named_curve ,
1538i.e. the EC parameters are specified by an OID; or 1538i.e. the EC parameters are specified by an OID; or
@@ -1545,8 +1545,7 @@ Note: the
1545.Cm implicitlyCA 1545.Cm implicitlyCA
1546alternative, 1546alternative,
1547as specified in RFC 3279, 1547as specified in RFC 3279,
1548is currently not implemented in 1548is currently not implemented.
1549.Nm OpenSSL .
1550.It Fl passin Ar arg 1549.It Fl passin Ar arg
1551The key password source. 1550The key password source.
1552.It Fl passout Ar arg 1551.It Fl passout Ar arg
@@ -1559,60 +1558,8 @@ By default a private key is output;
1559with this option a public key is output instead. 1558with this option a public key is output instead.
1560This option is automatically set if the input is a public key. 1559This option is automatically set if the input is a public key.
1561.It Fl text 1560.It Fl text
1562Prints out the public/private key components and parameters. 1561Print out the public/private key components and parameters.
1563.El 1562.El
1564.Sh EC NOTES
1565The PEM private key format uses the header and footer lines:
1566.Bd -literal -offset indent
1567-----BEGIN EC PRIVATE KEY-----
1568-----END EC PRIVATE KEY-----
1569.Ed
1570.Pp
1571The PEM public key format uses the header and footer lines:
1572.Bd -literal -offset indent
1573-----BEGIN PUBLIC KEY-----
1574-----END PUBLIC KEY-----
1575.Ed
1576.Sh EC EXAMPLES
1577To encrypt a private key using triple DES:
1578.Bd -literal -offset indent
1579$ openssl ec -in key.pem -des3 -out keyout.pem
1580.Ed
1581.Pp
1582To convert a private key from PEM to DER format:
1583.Bd -literal -offset indent
1584$ openssl ec -in key.pem -outform DER -out keyout.der
1585.Ed
1586.Pp
1587To print out the components of a private key to standard output:
1588.Bd -literal -offset indent
1589$ openssl ec -in key.pem -text -noout
1590.Ed
1591.Pp
1592To just output the public part of a private key:
1593.Bd -literal -offset indent
1594$ openssl ec -in key.pem -pubout -out pubkey.pem
1595.Ed
1596.Pp
1597To change the parameter encoding to
1598.Cm explicit :
1599.Bd -literal -offset indent
1600$ openssl ec -in key.pem -param_enc explicit -out keyout.pem
1601.Ed
1602.Pp
1603To change the point conversion form to
1604.Cm compressed :
1605.Bd -literal -offset indent
1606$ openssl ec -in key.pem -conv_form compressed -out keyout.pem
1607.Ed
1608.Sh EC HISTORY
1609The
1610.Nm ec
1611command was first introduced in
1612.Nm OpenSSL
16130.9.8.
1614.Sh EC AUTHORS
1615.An Nils Larsch .
1616.\" 1563.\"
1617.\" ECPARAM 1564.\" ECPARAM
1618.\" 1565.\"