创建 OpenPGP 密钥

OpenPGP 是基于 PGP 公钥算法的非私有协议,用于加密电子邮件。它定义了加密信息、签名、私钥的标准格式,和交换公钥的证书。

公钥密码算法是包括两个密钥:一个是 公钥,您可以把它给任何交换信息的人,另一个是 私钥,必须要安全保管好。

To create OpenPGP keys:

  1. Choose File ▸ New...
  2. Select PGP Key and click Continue
  3. Enter your full name (first - last), your e-mail address and any additional information. You can also specify advanced options for the key: see below.
  4. Click Create to create the new key pair.
  5. The Passphrase for New PGP Key dialog will open. Enter the passphrase twice for your new key.

当选择一个密码短语时,用几个简单的习惯语来生成一个强密码。密码和密码短语的主要区别在于,密码短语里可以使用空格。

3.1. 高级选项

展开 高级密钥选项,可以为密钥指定下面的选项:

Encryption Type

这一项指定生成密钥的加密算法。

DSA 算法

这是推荐的选项,可以根据需要进行加密、解密、签名和验证。

DSA

只允许签名。

RSA

只允许签名。

Key Strength (bits)

这是密钥的位数,位数越长将会越安全,使用一个强的密码短语。当然,用一个长的密钥将会使操作花费更多的时间,合适的值在 1024 - 4096 之间,推荐至少2048位。

Expiration Date

This is the date at which the key will cease to be usable for performing encryption or signing operations. 6 months is a reasonable time to set it to. You will have to either change the expiration date or generate a new key or subkey after this amount of time passes.

Sign your new key with your old one before it expires to preserve your trust status.