1

If I encrypt a file using gpg2 and specifying AES256 as my encryption algorithm, can I decrypt it with tools other than gpg2?

More generally, does the fact that one tool used AES256 for encrypting a file imply that any other tool that also supports AES256 can decrypt the file?

  • 1
    Well, of course you can use GPG version 1, and any number of things that use or wrap (either version of) GPG for example Kleopatra; I don't know if you count those as 'other'. As I commented to user10216038 answer, PGP uses a particular mode and key derivation, and also a particular file/message format, that differ from other crypto systems and are not supported by tools designed for e.g. SMIME/CMS, SSL/TLS, SSH, and so on. But there are other implementations of PGP including Phil Z's original (now Symantec) and libraries in at least Java, Perl, PHP, Python, and Ruby you can use. – dave_thompson_085 Mar 15 at 11:31
1

AES256 is a standard algorithm. Any tool that correctly implements a standard is interchangeable.

That said, a given tool may append decorators before and after that might need to be stripped out or altered for another tool, but the core encryption is the same.

  • 1
    AES itself is indeed standard, but PGP uses it in a variant of CFB mode (prefix block instead of IV, plus a 2-byte 'stutter' for quick key verification) that no one else uses. Also it uses a key derived from the password by a string-to-key (s2k) operation no one else uses. – dave_thompson_085 Mar 15 at 11:26

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.