I had encrypted a file on my Ubuntu, I know the password. But I had to fresh install the OS, and now decryption of the file failing.
It says: Decryption failed, you probably do not have the decryption key.
What am I missing?
I had encrypted a file on my Ubuntu, I know the password. But I had to fresh install the OS, and now decryption of the file failing.
It says: Decryption failed, you probably do not have the decryption key.
What am I missing?
Encryption algorithms that use the same passphrase to encrypt/decrypt data are called symmetric. PGP-compliant applications (like gnupg/gpg2) use asymmetric encryption.
This means they use PGP keys generated by an application to encrypt files (keys are generated in pairs, but that's beside the point here). These system-generated keys are protected with user-generated passwords, you can't use your key to encrypt/decrypt files if you don't know the password guarding that key.
You probably destroyed the key required to decrypt the file when you performed the fresh install on the OS. Even though you remember the password to unlock that key you wont be able to decrypt the file unless you have a backup of the key.