* 2.6.1.Making a GPG Encryption Key
* 2.6.1.创建GPG密钥
Before you can get or send encrypted mail, you need to generate your public and private keys with GPG. This procedure covers version 1.2.4 of GPG. If your version is different, these steps might vary slightly. You can find out your version number by entering gpg --version.
在你可以接收和发送加密邮件之前,你需要用GPG生成你的公钥和私钥。下列步骤是基于GPG 1.2.4的版本的。如果你是不同版本,这些步骤可能稍有不同,你可以通过键入gpg --version来得你的版本号的。
1.Open a terminal and enter gpg --gen-key.
1.打开终端并键入gpg --gen-key
2.Select an algorithm, then press Enter.
or
To accept the default algorithm of DSA and ElGamal, press Enter (recommended).
2.选择一种算法,然后回车。
或
接受缺省的DSA和ElGamal算法,接回车(推荐)
3.Select a key length, then press Enter. To accept the default, 1024 bits, press Enter.
3.选择密钥长度,然后回车。接受缺省的是1024比特,按回车。
4.Enter how long your key should be valid for.
or
To accept the default of no expiration, press Enter, then press Y when you are prompted to verify the selection.
4.输入密钥有效期
或
接收缺省值不过期,按回车,然后在提示确认选择时按Y。
5.Type your real name, then press Enter.
5.输入你的真实姓名,然后回车。
6.Type your e-mail address, then press Enter.
6.输入你的E-Mail地址,然后回车。
7.(Optional) Type a comment, then press Enter.
7.(可选)输入注释,然后回车。
8.Review your selected user ID. If it is correct, press O.
8.查看你的用户ID,如果正确的话,按0.
9.Type a passphrase, then press Enter.
9.输入你的密码,然后回车
10.Move your mouse randomly to generate the keys.
10.移动你的鼠标以便随机生成密钥。
After the keys are generated, you can view your key information by entering gpg --list-keys. You should see something similar to this: /home/you/.gnupg/pubring.gpg ---------------------------- pub 1024D/32j38dk2 2001-06-20 you sub 1024g/289sklj3 2001-06-20 [expires: 2002-11-14]
在密钥生成之后,你可以通过键入gpg --list-keys来查看你的密钥信息。你将看到类似这样的信息:/home/you/.gnupg/pubring.gpg ---------------------------- pub 1024D/32j38dk2 2001-06-20 you sub 1024g/289sklj3 2001-06-20 [expires: 2002-11-14]
GPG creates one list, or keyring, for your public keys and one for your private keys. All the public keys you know are stored in the file ~/.gnupg/pubring.gpg. If you want to give other people your key, send them that file.
GPG为你的公钥创建一个列表或密钥串,为你的私钥也创建一个。你所知的全部公钥都被存放在文件~/.gnupg/pubring.gpg中,如果你想给其他人你的密钥,请将该文件发送给他。
If you want, you can upload your keys to a key server.
如果你想,你也可以上传你的密钥到一个密钥服务器中。
1. Check your public key ID with gpg--list-keys. It will be the string after 1024D on the line beginning with pub. In the example above, it is 32j38dk2.
1. 通过gpg --list-keys来检查你的公钥ID。它是一行中的1024D之后的字符串。在上面的例子中,它是32j28dk2。
2. Enter the command gpg --send-keys --keyserver wwwkeys.pgp.net 32j38dk2. Substitute your key ID for 32j38dk2. You need your password to do this.
2. 输入命令gpg --send-keys --keyserver wwwkeys.gpg.net 32j38dk2。以便用32j38dk2来代替你的密钥ID。在这过程中需要你的密码
Key servers store your public keys for you so that your friends can decrypt your messages. If you choose not to use a key server, you can manually send your public key, include it in your signature file, or put it on your own Web page. However, it's easier to publish a key once, and then let people download it from a central place when they want.
密钥服务器为你保存你的公钥,以便你的朋友可以解开你的信息。如果你不选择使用密钥服务器,你也可以手动发送你的公钥,将它包括在你的签名文件中,或将它放入你的个人主页。然而,马上发布一个密钥并让人们当他需要时从中心下载它会更加容易。
If you don't have a key to unlock or encrypt a message, you can set your encryption tool to look it up automatically. If it can't find the key, an error message appears.
如果你没有密钥加密或解密信息,你可以设置你的加密工具以便自动搜索它。如果它不能找到的话,将会出现出错信息。
firehare的补充:
如果想得到其他人的公钥的话可以:
一般用这个:
gpg --search-keys --keyserver wwwkeys.pgp.net 你的别名
终端输出为列表选项,自己选择。
也可以上keyserver网站去查keyid,如pgp.mit.edu,用“收件人的姓名”、“email 地址“中的部分字符串作关键词。
(因为几乎所有keyserver的数据库都是同步的,所以上哪个查都一样。)
如何在Evolution中加密(二)
最新推荐文章于 2024-08-26 17:07:51 发布