Openssl ec命令
2015-07-22 21:58
543 查看
一、简介
椭圆曲线密钥处理工具
二、语法
选项
三、实例
1、生成EC私钥
2、对私钥进行口令保护
3、从私钥提取公钥
4、查看私钥信息
5、查看公钥信息
6、pem为der
椭圆曲线密钥处理工具
二、语法
openssl ec [-inform PEM|DER] [-outform PEM|DER] [-in filename] [-out filename] [-passin arg] [-passout arg] [-text] [-noout] [-param_out] [-conv_form arg] [-pubin] [-pubout] [-param_enc arg] [-engine id] [-des] [-des3] [-idea]
选项
-inform arg input format - DER or PEM -outform arg output format - DER or PEM -in arg input file -passin arg input file pass phrase source -out arg output file -passout arg output file pass 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 way the ec parameters are encoded in the asn1 der encoding possible values: named_curve (default) explicit
三、实例
1、生成EC私钥
openssl ecparam -genkey -name prime256v1 -param_enc explicit -outform pem -out ec_prikey.pem
2、对私钥进行口令保护
openssl ec -in ec_prikey.pem -des -out ec_prikey.pem
openssl ec -in ec_prikey.pem -des -passout pass:"123456" -out ec_prikey.pem
3、从私钥提取公钥
openssl ec -in ec_prikey.pem -pubout -out ec_pubkey.pem
4、查看私钥信息
openssl ec -in ec_prikey.pem -passin pass:"123456" -text
5、查看公钥信息
openssl ec -in ec_pubkey.pem -pubin -text
6、pem为der
openssl ec -in ec_prikey.pem -outform der -out ec_prikey.der
参考:http://blog.csdn.net/as3luyuan123/article/details/14138983
相关文章推荐
- linux 命令之 dmidecode
- 架构蓝图--软件架构 "4+1" 视图模型
- 亿级用户下的新浪微博平台架构
- Shell练习-统计出每个IP的访问量有多少?
- Linux中的ulimit命令简介(某公司社招笔试试题)
- 关于多层架构一些思考
- linux系统配置sftp服务器详解
- Ubuntu在下面LAMP(Linux+Apache+MySQL+PHP) 开发环境的搭建
- Linux kernel 分析之十:内核线程
- Openssl ecparam命令
- Linux kernel 分析之九:fork()系统调用
- XMPP的基础知识
- tomcat安装及优化
- linux中的lsof命令简介(某公司社招笔试试题)
- OpenID和OAuth的区别及第三方登录的安全隐患分析
- nfs、samba、squid代理部署及优化
- (转)手机网站判断及跳转
- Openssl rsa命令
- 直接插入排序、折半插入排序、Shell排序、冒泡排序,选择排序
- RHEL一(管理文件、通配符、特殊符号)