[[!meta title="Decrypt or verify a text created using OpenPGP Applet"]]

With <span class="application">OpenPGP Applet</span> you can
**decrypt text that is encrypted using OpenPGP** or **verify text that
is signed using OpenPGP**.

1. Select with the mouse the encrypted text that you want to decrypt or
the signed text that you want to verify. Include the lines “*-----BEGIN
PGP MESSAGE-----*“ and “*-----END PGP MESSAGE-----*”.

   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.

2. If the text that you selected is encrypted, <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=""]]

   If the text that you selected is only signed, but not encrypted,
   <span class="application">OpenPGP Applet</span> now shows a seal, meaning
   that the clipboard contains signed text:
   [[!img gpgapplet_with_seal.png link="no" class="symbolic-22" alt=""]]

3. Click on <span class="application">OpenPGP Applet</span> and select <span
class="guimenuitem">Decrypt/Verify Clipboard</span> from the menu.

4. If the text that you selected is only signed and the signature is
valid, the <span class="guilabel">GnuPG results</span> window described
in step 6 appears directly.

   If the text is signed and the signature is invalid, a <span
   class="guilabel">GnuPG error</span> message appears that mentions
   <span class="guilabel">BAD signature from…</span>.

   If the text is encrypted with a passphrase, the <span
   class="guilabel">Enter passphrase</span> dialog box appears. Enter
   the passphrase that has been used to encrypt the text and click <span
   class="guilabel">OK</span>.

   If the text is encrypted using public-key cryptography, two different
   dialog boxes can appear.

   a. If the passphrase for the corresponding private key is not already cached
   in memory, a dialog box appears with the following message: <span
   class="guilabel">You need a passphrase to unlock the secret key for
   user</span>. Enter the passphrase for this secret key and click <span
   class="guilabel">OK</span>.

   b. If no secret key for which the text is encrypted is available in
   your keyring, a GnuPG error message appears that mentions <span
   class="guilabel">decryption failed: secret key not available</span>.

5. If the passphrase provided in step 4 is incorrect, a <span
class="guilabel">GnuPG error</span> message appears that mentions <span
class="guilabel">decryption failed: bad key</span>.

6. If the passphrase provided in step 4 is correct, or if the signature
of the text is valid, or both, a <span class="guilabel">GnuPG
results</span> window appears.

   The decrypted text appears in the <span class="guilabel">Output of GnuPG</span> text box.

   In the <span class="guilabel">Other messages provided by GnuPG</span>
   text box, the message <span class="guilabel">Good signature
   from…</span>, confirms that the signature of the text is valid.

<div class="tip">

To store your GnuPG keys and configuration across separate working sessions,
you can activate the [[<span class="guilabel">GnuPG</span> persistence
feature|doc/first_steps/persistence/configure/#gnupg]].

</div>
