Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

  • Print
  • + Share This
Like this article? We recommend

File Encryption/Decryption

Open the KDE Konqueror file browser, not the GPG Key Management window or the GPG right-click menu. You can see the files created by GPG via its integration with Konqueror in Figure 19 and the right-click menu you use to take advantage of this. The Crypto-test1.doc file highlighted in the browser is the original file, crypto-test1.doc.asc is the encrypted file, and crypto-test.doc.sig is the detached digital signature file.

Figure 19

Figure 19 Konqueror file browser integration with KGpg

Sign and Encrypt

  1. Right-click filename > Actions > Sign File. You’ll get a passphrase prompt. Fill it in correctly, and a file with a .sig extension (for example, filename.sig) with the original filename will appear in your file browser. This is a detached signature file. If you don’t want to sign the document, skip to the next step.
  2. Right-click filename > Actions > Encrypt File. Your list of keys opens. Pick one or more and double-click or click the OK button. A new file with the original filename with .asc extension appears.
  3. Send both the encrypted .asc file and the signature .sig file as file attachments with your e-mail.

Decrypt and then Verify

  1. From Konqueror (KDE file manager), right-click filename.asc > Actions > Decrypt File.
  2. You get a passphrase prompt, assuming that it matches a private key on your keyring (and if it doesn’t, you probably have no business opening it, anyway). Fill it in correctly, and the file will appear in your file browser.
  3. To verify it, go the filename.sig file.
  4. Right-click filename.sig > Actions > Decrypt File. This will check for the matching decrypted original file; if its content matches the signature, you’ll see either a "Good Signature" or "Bad Signature" prompt.
  • + Share This
  • 🔖 Save To Your Account