[[!meta title="OpenPGP passphrase encryption"]]

With <span class="application">OpenPGP Applet</span> you can **encrypt text
with a passphrase** using the passphrase encryption of OpenPGP.

[[!inline pages="doc/encryption_and_privacy/gpgapplet.warning" raw="yes"]]

<div class="note">

<strong>This technique requires you to share a secret passphrase with the people
who will decrypt the text.</strong> OpenPGP also allows you to use public-key
cryptography to send confidential messages without having a shared passphrase.
[[See the corresponding documentation.|gpgapplet/public-key_cryptography]]

</div>

1. Write your text in a text editor. **Do not write it in the web browser!**

   Click on <span class="application">OpenPGP Applet</span> and
   choose <span class="guimenuitem">Open Text Editor</span> to open
   <span class="application">gedit</span>.

2. Select with the mouse the text that you want to encrypt. 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">OpenPGP Applet</span> now shows
   lines of text, meaning that the clipboard contains non-encrypted text:
   [[!img gpgapplet_with_text.png link="no" class="symbolic-22" alt=""]]

3. Click on <span class="application">OpenPGP Applet</span> and select <span
class="guimenuitem">Encrypt Clipboard with Passphrase</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. In the <span class="guilabel">Passphrase</span> dialog box, enter a
passphrase of your choice. Repeat the same passphrase in the second dialog box.

5. <span class="application">OpenPGP Applet</span> now shows a
padlock, meaning that the clipboard contains encrypted text:
[[!img gpgapplet_with_padlock.png link="no" class="symbolic-22" alt=""]]

6. To paste the encrypted 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 a text that is encrypted with a
passphrase|decrypt_verify]] using <span class="application">
OpenPGP Applet</span>.

</div>
