Skip to content

Conversation

@Russtopia
Copy link

See https://forums.gentoo.org/viewtopic-t-1070876.html

Summary: default (openpgp) mode does not properly handle addition and stripping of .gz/.bz
file components, resulting in mismatching plaintext/decoded file names and misleads
the user to believe openpgp ciphertext has been first compressed using external tools.

mcrypt w/default config uses openpgp, but does not indicate that the -z option's calls
to external gzip or bzip are not used in this mode.

As compression before encryption is generally considered good for security, this is
misleading and use of -z with the default openpgp mode should cause an error informing
that the openpgp mode will not use external gzip/bzip tools prior to encryption.

In addition, the .gz/.bz path component should not be added if the program is
using openpgp mode and will not call gzip or bzip. Doing so results, on decryption,
with a misleading .gz/.bz extension to the resulting (uncompressed) plaintext.

Steps to Reproduce

  1. echo "plaintext" >foo.txt
  2. mcrypt -z foo.txt
Result: foo.txt.gz.nc is written. Note this should be foo.txt.nc, as by default openpgp mode is active and no call to gzip is performed.
  1. mcrypt -dz foo.txt.gz.nc
Result: foo.txt.gz is written (which is plaintext, not a .gz file), *not* foo.txt

@Russtopia
Copy link
Author

Hello? Is anyone there?

Who is current upstream for this project?

@Russtopia
Copy link
Author

Bump. If anyone is still here please consider merging. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant