Compression with openssl


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Compression with openssl
# 1  
Old 08-12-2013
Compression with openssl

Hi ,

1-I need to know please if it's possible to compress using openssl?

Here is the version used:
Code:
openssl version -a
OpenSSL 0.9.7d 17 Mar 2004 (+ security fixes for: CVE-2005-2969 CVE-2006-2937 CVE-2006-2940 CVE2006-3738 CVE-2006-4339 CVE-2006-4343 CVE-2007-5135 CVE-2008-5077 CVE-2009-0590)
built on: date not available
platform: information not available
options:  bn(64,32) md2(int) rc4(ptr,char) des(ptr,risc1,16,long) blowfish(ptr)
compiler: information not available
OPENSSLDIR: "/etc/sfw/openssl"

2-does the compression with openssl save space more than gzip command?


I have been compressing using a command like this:
Code:
openssl  aes-256-cbc -a  -salt -in  test.in   -out  test.txt.enc -pass file:./mypass.txt


Last edited by Scott; 08-12-2013 at 09:29 AM.. Reason: Code tags, please...
# 2  
Old 08-20-2013
Yes, it uses the gzip libs = no difference. Use 'ssh -C' or the like, but you need a sub-option to set the level '-o CompressionLevel=9' Man Page for ssh (all Section 0) - The UNIX and Linux Forums
Man Page for ssh_config (all Section 5) - The UNIX and Linux Forums

You can always use a piped compression tool with ssh, like bzip2 or compress. Since ssh connections are binary, this works great. More CPUs makes light work. If you want to use many CPU and multiply the network speed, many compressed sessions in parallel are a neat ticket. Compression on a single file may actoally slow transfer, but it lightens net load in busy environments.
# 3  
Old 08-21-2013
Thanks a lot , but the option "-C" is unknown to the version i use:

i_ebp@vfnla90s-z3> openssl version
OpenSSL 0.9.7d 17 Mar 2004 (+ security fixes for: CVE-2005-2969 CVE-2006-2937 CVE-2006-2940 CVE-2006-3738 CVE-2006-4339 CVE-2006-4343 CVE-2007-5135 CVE-2008-5077 CVE-2009-0590)
i_ebp@vfnla90s-z3>


Here is how i wrote the command:
i_ebp@vfnla90s-z3> openssl aes-256-cbc -a -Z -o CompressionLevel=9 -salt -in Archivedcollect.tared_on20130730224443.tar -out Archivedcollect.tared_on20130730224443.tar.gz.out -pass file:./pass.txt
unknown option '-Z'
# 4  
Old 08-23-2013
Compression is in 'cms -comprress' or 'enc -z':
OpenSSL: Documents, cms(1)
OpenSSL: Documents, enc(1)
-C os the ssh/scp/sftp option.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Best Compression technique ?

Hi all, I am working on a sample backup code, where i read the files per 7200 bytes and send it to server. Before sending to server, i compress each 7200 bytes using zlib compression algorithm using dictionary max length of 1.5 MB . I find zlib is slow. Can anyone recommend me a... (3 Replies)
Discussion started by: selvarajvss
3 Replies

2. Shell Programming and Scripting

file compression

I'am looking for script (or tool) that would compress all files with given extension in all subdirectory. Important part is that every one file have to end in separate archive whit it's own name. Eaven if I could point multiple file in one directory and compress them it would be ok. I' am... (1 Reply)
Discussion started by: Demerzel
1 Replies

3. Shell Programming and Scripting

Folder compression

Hi Guys, totally new to scripting. I have a huge list of foleders. I want to tar the contents of each folder inside the same folder and the name of the tar file is the same name as the folder. how would I go about this in scirpt? cheers Viper (3 Replies)
Discussion started by: brownviper1966
3 Replies

4. AIX

Tape compression

Hello everyone I want to use compression in my tape when I backup some file. For example I have several files that use 50gb. If I backup this I need to use two cartridge because without compression I can backup 36gb. My question is with flag I need to use to compress and I can use 72gb in... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

5. Shell Programming and Scripting

How to avoid CR after compression

Hi all, I am having few files which needs to be concted into a single file and then it is compressed and FTPed from the UNIX server to the Windows server. For the above purpose i am using gzip command to compress the files after concetenation. And i am FTP ing the compressed file in the... (3 Replies)
Discussion started by: Codesearcher
3 Replies

6. UNIX for Dummies Questions & Answers

Un-compression types...

Hi Folks, As I am familiar wih both types compresion forms: gun-zip and .rpm. My questions is how do I uncompress gunz.zip type? As the .rpm I can double click and it will extract...Can someone shed some light on this and thank you... M (2 Replies)
Discussion started by: Mombo_Z
2 Replies

7. UNIX for Dummies Questions & Answers

.z file compression

Hello, I have a .z file which i understand to be UNIX. I'm on PC (no UNIX boxes) and have tried many different unzipping programs to extract this .z file, but only PicoZip has allowed me to view what is inside (telling me, i think, that it's not corrupt), but i have not been able to extract... (3 Replies)
Discussion started by: Gonecat
3 Replies

8. UNIX for Advanced & Expert Users

Predictor compression

Hi everybody, Does anybody know,whether linux-2.4.20-8 supports predictor1 compression in PPP protocol support,as i was able to see there were only two compression techniques that r being supported i.e bsd and deflate compression from "make menuconfig" under network device... (0 Replies)
Discussion started by: sriram.ec
0 Replies

9. UNIX for Advanced & Expert Users

Move with compression

How can I move a file and compress it at the same time? (8 Replies)
Discussion started by: truma1
8 Replies

10. UNIX for Dummies Questions & Answers

file compression

Is it possible to unzip / compress a file that was zipped using WinZip? thanks, kristy (2 Replies)
Discussion started by: kristy
2 Replies
Login or Register to Ask a Question