{"id":8316,"date":"2020-07-18T20:35:39","date_gmt":"2020-07-18T12:35:39","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=8316"},"modified":"2020-07-18T20:35:41","modified_gmt":"2020-07-18T12:35:41","slug":"gpg","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/gpg","title":{"rendered":"gpg\u547d\u4ee4 – \u52a0\u5bc6\u5de5\u5177"},"content":{"rendered":"\n

gpg\u662f\u52a0\u5bc6\u548c\u6570\u5b57\u7b7e\u540d\u7684\u514d\u8d39\u5de5\u5177\uff0c\u5927\u591a\u7528\u4e8e\u52a0\u5bc6\u4fe1\u606f\u7684\u4f20\u9012\u3002\u9664\u4e86\u4ec5\u7528\u5bc6\u7801\u52a0\u5bc6\u5916\uff0cgpg\u6700\u5927\u7684\u4e0d\u540c\u662f\u63d0\u4f9b\u4e86\u201c\u516c\u94a5\/\u79c1\u94a5\u201d\u5bf9\u3002\u5229\u7528\u4f60\u7684\u201c\u516c\u94a5\u201d\u522b\u4eba\u52a0\u5bc6\u4fe1\u606f\u4e0d\u518d\u9700\u8981\u544a\u8bc9\u4f60\u5bc6\u7801\uff0c\u968f\u65f6\u968f\u5730\u90fd\u80fd\u53d1\u9001\u52a0\u5bc6\u4fe1\u606f\u3002\u800c\u8fd9\u79cd\u52a0\u5bc6\u662f\u5355\u5411\u7684\uff0c\u53ea\u6709\u4f60\u7684\u201c\u79c1\u94a5\u201d\u80fd\u89e3\u5f00\u52a0\u5bc6\u3002\u6570\u5b57\u7b7e\u540d\u53c8\u662f\u53e6\u4e00\u5927\u4f7f\u7528\u65b9\u5411\u3002\u901a\u8fc7\u7b7e\u540d\u8ba4\u8bc1\uff0c\u522b\u4eba\u80fd\u786e\u4fdd\u53d1\u5e03\u7684\u6d88\u606f\u6765\u81ea\u4f60\uff0c\u800c\u4e14\u6ca1\u6709\u7ecf\u8fc7\u4fee\u6539\u3002\u00a0<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>gpg [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-c<\/td>\u6307\u5b9a\u52a0\u5bc6\u6587\u4ef6<\/td><\/tr>
-o<\/td>\u6307\u5b9a\u89e3\u5bc6\u6587\u4ef6<\/td><\/tr>
--gen-key<\/td>\u751f\u6210\u5bc6\u94a5\u5bf9<\/td><\/tr>
--list-keys<\/td>\u67e5\u770b\u5df2\u6709\u7684\u5bc6\u94a5<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u5bf9\u79f0\u52a0\u5bc6myfile\u6587\u4ef6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# gpg -c myfile<\/pre>\n\n\n\n

\u89e3\u5bc6\u5bf9\u79f0\u52a0\u5bc6\u7684\u6587\u4ef6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# gpg -o mydecrypt -d myfile.gpg<\/pre>\n\n\n\n

\u751f\u6210\u5bc6\u94a5\u5bf9\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# gpg --gen-key<\/pre>\n\n\n\n

\u67e5\u770b\u5df2\u6709\u7684\u5bc6\u94a5\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# gpg --list-keys<\/pre>\n","protected":false},"excerpt":{"rendered":"

gpg\u662f\u52a0\u5bc6\u548c\u6570\u5b57\u7b7e\u540d\u7684\u514d\u8d39\u5de5\u5177\uff0c\u5927\u591a\u7528\u4e8e\u52a0\u5bc6\u4fe1\u606f\u7684\u4f20\u9012\u3002\u9664\u4e86\u4ec5\u7528\u5bc6\u7801\u52a0\u5bc6\u5916\uff0cgpg\u6700\u5927\u7684\u4e0d\u540c\u662f\u63d0\u4f9b\u4e86\u201c\u516c\u94a5\/ […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8316"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=8316"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8316\/revisions"}],"predecessor-version":[{"id":8363,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8316\/revisions\/8363"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=8316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=8316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=8316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}