Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


What do you use to encrypt and compress files?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

What do you use to encrypt and compress files?

Issam2204Issam2204 Member
edited April 2015 in General

Hi!

What do you think it's the most secure way to compress and to encrypt files on Linux?

«1

Comments

  • SFTP.

  • Duplicity works for me

  • Duplicity it's a great program. And p7zip?

  • It seems things get mixed up here (or I misunderstood the question).

    Compression is one thing, encryption another one (securely?) transferring files yet another one.

    As for compression it's basically a question of size vs. speed.
    For encryption it's mainly a question of availability, know-how, and need for security. I'd assume that for most jobs in the VPS area most admins use something SSL based which is good enough for most jobs (particularly when used with some knowledge).
    As for transfer I guess it's something SSL based for most admins, too.

    I personally usually use scp/sftp for most normal (not sensitive) transfer jobs, gzip or bzip for compression (I don't care about saving yet some more bytes) and for encryption of not too sensitive files I simply use openssl, typically with AES.

    That said, I do not at all trust OpenSSH because I do not at all trust SSL (open, libre, whatever) because it's a code mess, old and badly maintained and too nist (~ nsa) trusting.
    Unfortunately I'm not (yet, I hope) allowed to talk about the software I use for really sensitive stuff. Should that change I'll be glad to talk about it.

  • 4n0nx4n0nx Member

    7zip. It also encrypts the file names (I think winrar etc. do not).

  • Master_BoMaster_Bo Member
    edited April 2015

    Encryption: GnuPG2, VeraCrypt. EncFS as add-on (additional encryption layer) when using clouds like Dropbox.

    Compression: 7-Zip, Bzip2

  • 4n0nx said: 7zip. It also encrypts the file names (I think winrar etc. do not).

    rar does if you select it.

  • A propos 7zip. If I remember correctly (don't count on it, I hardly ever use Windows) there was a version of 7zip for Windows, too. Which, of course, would be very handy for those using both linux and windows.

  • there was a version of 7zip for Windows, too.

    Of course there is, it works very good in both ways.

  • RaptaRapta Member

    bsdguy said: there was a version of 7zip

    it's already out there lad

  • +1 for 7zip

  • KeithKeith Member

    openssh with ed25519 keys (not using openssl).

  • For fastest compression, use pbzip2. Each of the zip and bz2 have parallel equivalents which makes them faster in multi-threaded environments, pigz and pbzip2. ZIP2 is somewhat better in compression, you can adjust how much time you spend on them by using -1 to -9 as arguments, -9 is the slowest and has the best compression, but it's only better by a few percentage points. If you're interested in speed more than the absolute best compression, -5 will probably be quite adequate.

    For encryption use openssl. I don't encrypt files much, but I always encrypt data when it is sent between machines. Although it is possible to use ssl for compression as well, I use openssl exclusively for encryption and pbzip2 for the compression part. Here's an example of copying an entire directory from one computer to another:

    tar -vcf - . | pbzip2 -5 -c | openssl aes-256-cbc -a -salt -pass pass:43kf | nc -l 1001

    On the sending side, tar up a directory, compress the data, encrypt with password 43kf and then give it to netcat, which listens for a connection on port 1001.

    On the receiving side:

    nc $srcIP 1001 | openssl aes-256-cbc -a -salt -pass pass:43kf -d | pbzip2 -dc | tar -xf -

    Open connection over netcat to the machine, decrypt the received data through openssl, uncompress it, and untar it.


    There's more secure ways, I suppose, as a poster above said, but this works for me.

    Thanked by 2Issam2204 deadbeef
  • raindog308raindog308 Administrator, Veteran

    GPG, either with public key or symmetric depending if it's just for me or for someone else.

    Thanked by 1MikePT
  • p7zip 256bit AES

  • Pied Piper...It has a crazy middle-out compression that just kills all the other programs in terms of compression. I'm surprised more of you don't use it :p

  • OnraHost said: Pied Piper...It has a crazy middle-out compression that just kills all the other programs in terms of compression. I'm surprised more of you don't use it :p

    God, that was so annoying - Compresses 3D video to like 25%... sure :p Bad director.

  • sc754sc754 Member

    rar for compression and encryption, I think it's using aes128 which seems fine to me

  • Rar versions after 5.0 are aes 256

    Thanked by 1sc754
  • @William
    hehe. Hey, at least it's funny as hell though...

    I would think more people on her would watch it tbh.

  • emgemg Veteran

    Compress first, then encrypt.

  • @emg said:
    Compress first, then encrypt.

    Yes, but you forgot to mention the reason: Because compression is based on relatively low entropy while encryption typically is about creating very high levels of entropy and such make compression (after encryption) futile.

  • @bsdguy said:
    Unfortunately I'm not (yet, I hope) allowed to talk about the software I use for really sensitive stuff. Should that change I'll be glad to talk about it.

    Not allowed to speak about it? Why?

  • varwww said:

    Not allowed to speak about it? Why?

    Because his employer will send someone to kill him?

  • KBVEKBVE Member

    If its <1mb in size, AES then gzip (at 9), you can also do it all via client side using CryptoJS. So your server only handles encrypted files.

  • emgemg Veteran

    @bsdguy said:

    Yes, but you forgot to mention the reason: Because compression is based on relatively low entropy while encryption typically is about creating very high levels of entropy and such make compression (after encryption) futile.

    No, I did not forget. I chose to leave it as an exercise to encourage independent research and learning.

    Instead of saying "blah blah low entropy blah blah high entropy blah blah futile," I would have said simply, "You can't compress encrypted data."

  • @varwww said: Not allowed to speak about it? Why?

    Because he doesn't want to be prosecuted, cause if he told you, he'd have to kill you ;)

  • @emg said:
    No, I did not forget. I chose to leave it as an exercise to encourage independent research and learning.

    That's a good strategy. Withhold information to teach! I'd be a teacher if that was the way, would never step my foot on the school, let those suckers work on their own. :D

  • @aglodek said:
    Because he doesn't want to be prosecuted, cause if he told you, he'd have to kill you ;)

    Does he work at NSA or what ? lol

  • @emg said:
    Instead of saying "blah blah low entropy blah blah high entropy blah blah futile," I would have said simply, "You can't compress encrypted data."

    ... and would have missed part of the point.

    It's right, what you say but it's not the full thing. Learning is to do with understanding, not with the shortest was to say something.

    Thanked by 1deadbeef
Sign In or Register to comment.