4.3. GPG移植到PGP

  1. 去掉密钥口令加密

    $ gpg --edit-key <user_id>
    gnupg> passwd
    Enter passphrase: *****
    new passphrase:
    reenter passphrase:
    Are you sure you want to remove your passphrase? Y
    gnupg> save
    
  2. 导出密钥

    $ gpg --export-secret-keys --armor --no-comment --output bad.asc
    
  3. 重新为密钥加上口令

    $ gpg --edit <user_id>
       gnupg> passwd
       You have no passphrase!
       new passphrase: *****
       reenter passphrase: *****
       gnupg> save
    
  4. 密钥导入到PGP

    import bad.asc into PGP.

    $ pgp -ka bad.asc
    
  5. 删除临时文件

    $ pgp -w bad.asc
    
    [注意]

    '-w' means safely wipe file. It is better than using rm.

  6. 为导入到PGP的KEY设置为绝对信任(implicit trust/ an ultimately-trusted introducer)。

    $ pgp -ke <userid>
    
  7. 为PGP的密钥加入口令保护。

    $ pgp -ke <userid>