[deyu1@kvm8 ~]$ echo 'abc123' > demo.txt [deyu1@kvm8 ~]$ cat demo.txt abc123
[deyu1@kvm8 ~]$ gpg --check-sigs /home/deyu1/.gnupg/pubring.gpg ------------------------------ pub 2048R/A98B198E 2014-05-26 uid abc123 (ABC) <abc123@csie.cyut.edu.tw> sig!3 A98B198E 2014-05-26 abc123 (ABC) <abc123@csie.cyut.edu.tw> sub 2048R/C039E2B6 2014-05-26 sig! A98B198E 2014-05-26 abc123 (ABC) <abc123@csie.cyut.edu.tw>
[deyu1@kvm8 ~]$ gpg --recipient A98B198E --output demo.en.txt --encrypt demo.txt
[deyu1@kvm8 ~]$ cat demo.en.txt ...........................................
[deyu1@kvm8 ~]$ gpg --output demo.de.txt --decrypt demo.en.txt You need a passphrase to unlock the secret key for user: "abc123 (ABC) <abc123@csie.cyut.edu.tw>" 2048-bit RSA key, ID C039E2B6, created 2014-05-26 (main key ID A98B198E) gpg: encrypted with 2048-bit RSA key, ID C039E2B6, created 2014-05-26 "abc123 (ABC) <abc123@csie.cyut.edu.tw>"
[deyu1@kvm8 ~]$ cat demo.de.txt abc123
[deyu1@kvm8 ~]$ gpg --decrypt demo.en.txt You need a passphrase to unlock the secret key for user: "abc123 (ABC) <abc123@csie.cyut.edu.tw>" 2048-bit RSA key, ID C039E2B6, created 2014-05-26 (main key ID A98B198E) gpg: encrypted with 2048-bit RSA key, ID C039E2B6, created 2014-05-26 "abc123 (ABC) <abc123@csie.cyut.edu.tw>" abc123