这里的密钥长度有768、1024和2048位三种。显然,密钥越长越安全,但太长又会影响使用的速度。所以,可以根据不同的需要选择适合的长度。笔者的应用更重视安全性,所以选择了最长的2048位密钥。
另外,还需要设定密钥过期的时间:
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0) 1y
Key expires at Sat 10 Sep 2005 01:48:07 PM CST
Is this correct (y/n)? y
|
原则上,密钥使用的频率越高,密钥有效的时间越长,被攻击的可能性就越大。所以,要根据应用的实际情况综合考虑,确定一个适当的时间长度。需要注意的是,密钥要定期更换,建议绝对不要永远使用同一对密钥。
最后,需要输入一些个人信息,包括真实姓名、电子邮件地址等,用来识别密钥,最好是如实填写。比如:
Real name: Terry Yu
Email address: terry@mykms.org
Comment: for test
You selected this USER-ID:
"Terry Yu (for test) <terry@mykms.org>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
|
然后,必须输入一个密码。密码用来保护密钥,没有这个密码,任何人都不能看到密钥本身的内容。密码是在密钥文件泄露后惟一的保密措施,它的最大敌人是暴力破解和字典攻击。所以,一定要选择一个强壮的密码,来有效地对抗这些攻击。
密码确定以后,系统开始运算:
We need to generate a lot of random bytes.
It is a good idea to perform some other action
(type on the keyboard, move the mouse, utilize the disks)
during the prime generation;
this gives the random number generator a better
chance to gain enough entropy.
..+++++.+++++.+++++.+++++..++++++++++.++++++++++++++
|
如果您对本文有任何疑问或者建议,请到讨论区发表您的意见:
>>
论坛入口 <<
上一篇:
Linux提升以太网适配器 怎一个安全了得 下一篇:
用SRP建立安全的Linux Telnet服务器
【文章评论】
【收藏本文】
【推荐好友】
【打印本文】
【我要投稿】 【论坛讨论】