1. gpg --list-keys
// 列出所有公鑰
2. gpg --list-secret-keys
// 列出所有私鑰
3. gpg --armor --export 9148B5A2 > pub.key
// 導出指定公鑰
4. gpg --armor --export-secret-keys 9148B5A2 > pri.key
// 導出指定私鑰
5. gpg --import xxx.key
// 導入私(公)鑰
6. gpg --encrypt --local-user "YourName" --recipient "TheirName" --armor xxx.txt
// 加密文件
// local-user參數指定用發信者的私鑰簽名,recipient參數指定用接收者的公鑰加密
// armor參數表示採用ASCII碼形式顯示
gpg --encrypt --local-user "YourName" --recipient "TheirName" --sign --armor xxx.txt
// 帶簽名加密
7. gog --decrypt xxx.txt.asc
// 解密文件
8. gpg --clearsign xxx.txt
// 簽名
9. gpg --verify xxx.txt.asc
// 驗證簽名