ec - EC key processing
gmssl ec [-help] [-inform PEM|DER] [-outform PEM|DER] [-in filename] [-passin arg] [-out filename] [-passout arg] [-des] [-des3] [-sms4] [-text] [-noout] [-param_out] [-pubin] [-pubout] [-conv_form arg] [-param_enc arg] [-no_public] [-check] [-engine id]
The ec command processes EC keys. They can be converted between various forms and their components printed out. Note GmSSL uses the private key format specified in 'SEC 1: Elliptic Curve Cryptography' (http://www.secg.org/). To convert an GmSSL EC private key into the PKCS#8 private key format use the pkcs8 command.
ec命令处理EC密钥。 它们可以在各种形式之间进行转换,并将其组件打印出来。 注意GmSSL使用“SEC 1:椭圆曲线加密”(http://www.secg.org/)中指定的私钥格式。 要将GmSSL EC私钥转换为PKCS#8私钥格式,请使用pkcs8命令。
Print out a usage message.
输出使用信息。
This specifies the input format. The DER option with a private key uses an ASN.1 DER encoded SEC1 private key. When used with a public key it uses the SubjectPublicKeyInfo structure as specified in RFC 3280. The PEM form is the default format: it consists of the DER format base64 encoded with additional header and footer lines. In the case of a private key PKCS#8 format is also accepted.
该指令指出了输入文件格式。DER选项是一个私钥,它用ASN.1 DER编码的SEC1私钥文件。当为公钥时,用RFC3280指定的SubjectPublicKeyInfo结构。默认的是PEM格式,它也接受PKCS#8格式的私钥。
This specifies the output format, the options have the same meaning as the -inform option.
该指令指出了输出格式。与-inform指令意义相同。
This specifies the input filename to read a key from or standard input if this option is not specified. If the key is encrypted a pass phrase will be prompted for.
如果未指定此选项,则指定从或从标准输入读取密钥的输入文件名。 如果密钥加密,将提示输入密码。
the input file password source. For more information about the format of arg see the PASS PHRASE ARGUMENTS section in -out filename
This specifies the output filename to write a key to or standard output by is not specified. If any encryption options are set then a pass phrase will be prompted for. The output filename should not be the same as the input filename. 这指定了未指定要写入或输出的标准输出的输出文件名。 如果设置了任何加密选项,则会提示输入密码。 输出文件名不能与输入文件名相同。
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-----
To encrypt a private key using triple DES:
gmssl ec -in key.pem -des3 -out keyout.pem
To convert a private key from PEM to DER format:
gmssl ec -in key.pem -outform DER -out keyout.der
To print out the components of a private key to standard output:
gmssl ec -in key.pem -text -noout
To just output the public part of a private key:
gmssl ec -in key.pem -pubout -out pubkey.pem
To change the parameters encoding to explicit:
gmssl ec -in key.pem -param_enc explicit -out keyout.pem
To change the point conversion form to compressed:
gmssl ec -in key.pem -conv_form compressed -out keyout.pem
dsa(1), COPYRIGHT
Copyright 2003-2016 The OpenSSL Project Authors. All Rights Reserved. Licensed under the GmSSL 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.