Renaming and obfuscating encrypted files.

johnF's Avatar


13 Oct, 2021 06:15 PM

Out of curiosity I wanted to see what would happen if an encrypted file was renamed and even removing the .gpg extension

I encrypted a file "untitled.txt" and the resultant file was "untitled.txt.gpg"

I renamed the encrypted file to "picture.jpg".

Obviously double-clicking this would not launch GPG Keychain and services, and just appeared to be a corrupted jpg file that would not open.

However when i right-clicked on "picture.jpg" and chose Services > OpenPGP : Decrypt File, it was decrypted successfully with the original filename of "untitled.txt" intact.

Question 1 : Am I right in that the .gpg extention isn't really all that important and is just for file association convenience for GUI front-ends?

Question 2 : In the case where a user would like to make it less obvious that a file is an encrypted file, are there any dangers or drawbacks to renaming an encrypted file (aside from forgetting about it)?

  1. Support Staff 1 Posted by Steve on 14 Oct, 2021 10:50 PM

    Steve's Avatar

    Hi johnF,

    interesting questions you bring up here.

    In the end the relevant aspect is the data which is contained in the file. It depends who or what you want to obfuscate the files from. An attacker with access to your files may as well just be able to scan files for encrypted data.

    In the worst case your encrypted data becomes corrupted. So we do not recommend this method.

    If you want to get more detailed feedback to this question, I would suggest to ask at the gnupg users mailling list.

    Feel free to share useful feedback you receive in this discussion here so it can be discovered by other users.

    All the best,

  2. Steve closed this discussion on 20 Oct, 2021 09:59 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac