[[!meta title="OpenPGP public-key encryption"]]
With <span class="application">Tails gpgApplet</span> you can **encrypt or sign
text using the public key encryption of OpenPGP**.
[[!inline pages="doc/encryption_and_privacy/gpgapplet.warning" raw="yes"]]
<div class="note">
<strong>This technique requires you to use public-key
encryption.</strong> If you never used OpenPGP keys before, you might
rather want to encrypt your text using a passphrase with OpenPGP
passphrase encryption. [[See the corresponding
documentation.|gpgapplet/passphrase_encryption]]
</div>
1. Write your text in a text editor. **Do not write it in the web browser!**
For example, open <span class="application">gedit</span> from the menu
<span class="menuchoice">
<span class="guimenu">Applications</span>&nbsp;▸
<span class="guisubmenu">Accessories</span>&nbsp;▸
<span class="guimenuitem">gedit Text Editor</span></span>.
2. Select with the mouse the text that you want to encrypt or sign. To
copy it into the [[!wikipedia Clipboard_(computing) desc="clipboard"]],
right-click on the selected text and choose <span
class="guimenuitem">Copy</span> from the menu.
<span class="application">Tails gpgApplet</span> now show
lines of text, meaning that the clipboard contains non-encrypted text.
[[!img gpgapplet_with_text.png link=no alt="Tails gpgApplet with lines of
text"]]
3. Click on <span class="application">Tails gpgApplet</span> and select <span
class="guimenuitem">Sign/Encrypt Clipboard with Public Keys</span> from the
menu.
If you receive the error message “<span class="guilabel">The clipboard does
not contain valid input data</span>”, try to copy your text again, starting
from step 2.
4. If you want to encrypt the text, select one or more public keys for the
recipients of the encrypted text in the <span class="guilabel">Choose
keys</span> dialog box. To select a public key, double-click on the
corresponding line in the <span class="guilabel">Select recipients</span> list
box.
5. If you want to sign the text, select the secret key with which you want to
sign the text in the <span class="guilabel">Sign message as</span> drop-down
list.
6. If you want to hide the recipients of the encrypted text, select the <span
class="guilabel">Hide recipients</span> check box. Otherwise anyone who sees the
encrypted text can know who the recipients are.
7. Click on the <span class="guilabel">OK</span> button.
If you receive the warning message <span class="guilabel">Do you trust these
keys</span>, answer it accordingly.
8. If you selected one or several public keys to encrypt the text,
<span class="application">Tails gpgApplet</span> now shows a padlock, meaning
that the clipboard contains encrypted text.
[[!img gpgapplet_with_padlock.png link=no alt="Tails gpgApplet with a
padlock"]]
If you only selected a secret key to sign the text, <span
class="application">Tails gpgApplet</span> now shows a seal, meaning that the
clipboard contains signed text.
[[!img gpgapplet_with_seal.png link=no alt="Tails gpgApplet with a seal"]]
9. To paste the encrypted or signed text into another application, right-click in
the application where you want to paste it and choose <span
class="guimenuitem">Paste</span> from the menu.
For example, you can paste it into the web browser to send it by email.
[[!img browser_paste.png link=no alt="Encrypted text starting with
-----BEGIN PGP MESSAGE-----"]]
<div class="next">
You can also [[decrypt or verify a text that is encrypted or signed using
public-key encryption|decrypt_verify]] using <span class="application">Tails
gpgApplet</span>.
</div>