Chinaunix首页 | 论坛 | 博客
  • 博客访问: 566459
  • 博文数量: 375
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 15
  • 用 户 组: 普通用户
  • 注册时间: 2013-09-20 10:21
文章分类

全部博文(375)

文章存档

2015年(1)

2014年(374)

分类: LINUX

2014-08-18 13:37:25

原文地址:[实例] genrsa (加密私钥) 作者:ailms

[root@dhcp ~]# openssl genrsa -out my.key -idea 1024         
usage: genrsa [args] [numbits]
 -des            encrypt the generated key with DES in cbc mode
 -des3           encrypt the generated key with DES in ede cbc mode (168 bit key)
 -aes128, -aes192, -aes256
                 encrypt PEM output with cbc aes
 -out file       output the key to 'file
 -passout arg    output file pass phrase source
 -f4             use F4 (0x10001) for the E value
 -3              use 3 for the E value
 -engine e       use engine e, possibly a hardware device.
 -rand file:file:...
                 load the file (or the files in the directory) into
                 the random number generator
[root@dhcp ~]#
 
可以看到不支持 IDEA 加密,只支持 des 和  des3、aes 加密
 
[root@dhcp ~]# openssl list-cipher-commands |grep -i idea
[root@dhcp ~]#
 
可以看到没有输出任何 IDEA 相关
 
[root@dhcp ~]# openssl genrsa -out my.key -des3 1024
Generating RSA private key, 1024 bit long modulus
.............++++++
........................................++++++
e is 65537 (0x10001)
Enter pass phrase for my.key:
Verifying - Enter pass phrase for my.key:    
[root@dhcp ~]#
 
[root@dhcp ~]# cat my.key
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,25C73BB141921808
 
Z52D7cyZyh2F8jL99inJgBCY4FNjbd2gpf/WMc+QqsuKJl5iVSKxG/kw3Bd60qpP
urwHzGOeWy5ObabWNvd2FjSv3+OgF0KSZeC75ZRtI7umESexGWxWnP4wFrIyIglk
ickz7rq0EnD18ikQlTDoCr34a4npwd1F/jHUCvYD5Opq9deHwZWRtxdCJW69/KHC
bQSTHqdN/V4UacTwCIEOHB01r2GEfaJvJOCqO/QjFOoU9cntset6Tc8hU0qV2R2W
6eEMOeweL+hfFL6goBWxr5WYB0WRB2yXkVcGRuR65atv7pENh3Yt1JJ5m7AbiP/i
fg1c9L56K1GisjNoabL2louz/V9UiNP4HfTlPs7OW8wkkikMpwdExv5+7BDJCtYJ
3tzAWFVlgLyw66yfzCgYLSv2BSLWdc3AQZ6bJIfK2c0e6GdfnHoOYcbK3l0QL/PW
M/y98+8qw9OMOm+Mg4eZ0SJNqN8vQZKbBd5GgnmiMhFOSZfdU4BsFgQ9z9wvOqhq
4btyMxJxiKrRP2JNmckCM8YZgw3gQs/mAiEhGP2n1NOyY8FGXIi45uDpBDwmeBCt
lvshxhnA+dQYZegV8LLddG7B7JbQdn+mKg+ccPnek5OSjsw0yivzpgs/ttlZZZXV
TUWXlDW2G1vogEkjVAA1f/ooIhcYQ/RcgWS9QL005DjqODFglk8ZvGJhQSwt6f4W
gsXlRrXojHydnL9SZjvxU3Tg4o2J1lwq7uDLz1Z5bVmk4ooDp1E25MYsItQ2esNd
6b0Mrx+QirbvFCEjo7Fa4ruw6tG3z/gwgtFPQJKpzbIEaI6ORLeNlw==
-----END RSA PRIVATE KEY-----
[root@dhcp ~]#
 
阅读(1003) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~