ivaneeo's blog

自由的力量,自由的生活。

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  669 Posts :: 0 Stories :: 64 Comments :: 0 Trackbacks
4.用私钥对加密文件解密


#gpg --decrypt report.txt.gpg >report.txt
You need a passphrase to unlock the secret key for
user: "test1 (unclassfication) "
2048-bit ELG-E key, ID 33735683, created 2004-09-29
(main key ID 79EB3D97)
gpg: encrypted with 2048-bit ELG-E key, ID 33735683,
created 2004-09-29
"test1 (unclassfication) "


以上命令要求输入对应私钥的保护口令才能成功解密,解密后的文件内容被输出到report.txt文件中。

5.用公钥同时进行文件签名和加密

#gpg -se -r test@yahoo.com.cn  report.txt
You need a passphrase to unlock the secret key for
user: "test (test) "
1024-bit DSA key, ID ADD93830, created 2004-07-01


以上命令要求输入对应私钥的保护口令,输入正确的口令后,签名和加密成功完成。

这些都是应用GPG签名和加密文件的一些常用命令,更详细的用法可以参考GPG的帮助文件。

对电子邮件进行加密和数字签名

实际上,GPG应用最多的地方是在电子邮件的加密和数字签名上。许多电子邮件客户端软件都支持PGP/GPG方式的加密及数字签名。
posted on 2005-09-22 14:46 ivaneeo 阅读(283) 评论(0)  编辑  收藏 所属分类: GNU牛力

只有注册用户登录后才能发表评论。


网站导航: