General
cancel
Showing results for 
Search instead for 
Did you mean: 

File compression and encryption in a single application for HP-UX

Mark Bly
Regular Advisor

File compression and encryption in a single application for HP-UX

Hi,
I am looking for some software that will both compress and encrypt a file for tranmission across the network.
Normally we would use gzip and then PGP for this, but this is a bit overkill for this task.
I have seen that 7zip has been ported to HP-UX but appears to have some bugs.
Does anyone know of any other product (preferably not expensive) that can do a compression and encryption on HP-UX?

The file will be sent to a Windows server that must able to unencrypt the file.
Source O/S: HP-UX 11.11
Destination O/S: Windows 2003

Thanks in advance.
Mark
Remember to think before you react................but always make sure there is still time to react
15 REPLIES
Laurent Menase
Honored Contributor

Re: File compression and encryption in a single application for HP-UX

why don't use directly scp/sftp?
it both compress & crypt during transfert and decrypt uncompress at the other end
Steven Schweda
Honored Contributor

Re: File compression and encryption in a single application for HP-UX

How strong does the encryption need to be?

Info-ZIP Zip and UnZip offer relatively weak
encryption, and are widely available
(including on HP-UX and Windows).

> [...] software that will both compress and
> encrypt a file [...]

How good does the compression need to be?

I thought that PGP (and GnuPG) normally did
some compression (zlib?) before they did any
encryption.

> [...] this is a bit overkill for this task.

In what sense? Too much work? (Why?)
Missing software at the far end? It's hard
to offer non-pointless suggestions without
some clues as to the selection criteria.
Steven Schweda
Honored Contributor

Re: File compression and encryption in a single application for HP-UX

> May 26, 2010 13:35:16 GMT 6 pts

As highly prized as these forum points are
(cough), actual answers to questions would
be more satisfying.

> [...] and are widely available
> (including on HP-UX and Windows).

And, of course, there are many (largely)
compatible unzip programs for Windows, so
the actual Info-ZIP UnZip need not be
installed at that end.


There is some chance that the Info-ZIP
programs will eventually gain stronger
encryption features, but breath-holding would
probably be unwise.
Mark Bly
Regular Advisor

Re: File compression and encryption in a single application for HP-UX

Thank you for replying.

We are looking to simplify our existing solution:
1. Compress file using Gzip
2. Encrypt using PGP (Running on Linux)
3. FTP file as a PGP self extracting executable
The above is automated as a batch job.

The encryption requirement for this latest request does not need to be strong, but must prevent an unauthorised person from reading the file (the file will remain within our network)

We are interested in investigating any alternative solutions.
Our aim is to provide a simple solution that is easy to setup as some of these requests can be for a temporary file transfer.

Regards,
Mark
Remember to think before you react................but always make sure there is still time to react
Steven Schweda
Honored Contributor

Re: File compression and encryption in a single application for HP-UX

> 1. Compress file using Gzip
> 2. Encrypt using PGP (Running on Linux)

Really PGP, not GPG?

Have you looked at the file sizes if you skip
the gzip step?

> 3. FTP file as a PGP self extracting executable

I'm not a serious Windows user, but I believe
that Info-ZIP UnZip offers a self-extractor
on Windows, too, if that's important.
Knowing nothing, I'd assume that it'd have
a command-line interface for the user to
provide the password, but there could be some
GUI thing for Windows of which I'm unaware.

On the other hand, the built-in Windows unzip
capability might obviate a self-extracting
archive. (If double-clicking on a simple
archive gets the job done, then why bother
with an SFX archive?)

> [...] does not need to be strong [...]

zip -e

Zip's "deflate" compression is probably not
as good as gzip's (and the built-in Windows
unzip stuff probably can't handle Zip's
optional bzip2 compression), but it should be
reasonably good.

It's always wise to run the experiment --
Trust no one, I always say -- but if the
target system is Windows, and if the
encryption requirement is not very strict,
then Zip may be about as streamlined as
things can get, at both ends.
TTr
Honored Contributor

Re: File compression and encryption in a single application for HP-UX

> Normally we would use gzip and then PGP for this, but this is a bit overkill for this task.

> 1. Compress file using Gzip
on HP-UX?

> 2. Encrypt using PGP (Running on Linux)
> 3. FTP file as a PGP self extracting executable


Why is it an overkill? Because you are doing the first step on HP-UX and the other 2 steps on Linux?

PGP is available for HP-UX 11.11, apparently only on media not (not anymore?) on a web site for download.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1255839

It is still on the HP-UX portal site
http://hpux.connect.org.uk/hppd/hpux/Users/gnupg-2.0.15/
Steven Schweda
Honored Contributor

Re: File compression and encryption in a single application for HP-UX

> > 1. Compress file using Gzip
> on HP-UX?

Why _not_ on HP-UX? It comes with the OS,
doesn't it? Around here, for example:

dyi # uname -a
HP-UX dyi B.11.31 U ia64 4235313755 unlimited-user license

dyi # type gzip
gzip is hashed (/usr/contrib/bin/gzip)

dyi # gzip --version
gzip 1.3.5 (HP-UX fixlevel 1)
(2002-09-30)
Copyright 2002 Free Software Foundation
Copyright 1992-1993 Jean-loup Gailly
This program comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of this program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
Compilation options:
DIRENT UTIME STDC_HEADERS HAVE_UNISTD_H HAVE_MEMORY_H HAVE_STRING_H HAVE_LSTAT
Written by Jean-loup Gailly.


Or were you thinking that Info-ZIP _Zip_ is
unavailable on HP-UX?

dyi # zip -v
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 3.0 (July 5th 2008), by Info-ZIP.
Currently maintained by E. Gordon. Please send bug reports to
the authors using the web page at www.info-zip.org; see README for details.

Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip,
as of above date; see http://www.info-zip.org/ for other sites.

Compiled with HP C version A.06.12 for Unix (HP-UX) on Oct 12 2008.

Zip special compilation options:
USE_EF_UT_TIME (store Universal Time)
BZIP2_SUPPORT (bzip2 library version 1.0.5, 10-Dec-2007)
bzip2 code and library copyright (c) Julian R Seward
(See the bzip2 license for terms of use)
SYMLINK_SUPPORT (symbolic links supported)
LARGE_FILE_SUPPORT (can read and write large files on file system)
ZIP64_SUPPORT (use Zip64 to store large files in archives)
UNICODE_SUPPORT (store and read UTF-8 Unicode paths)
STORE_UNIX_UIDs_GIDs (store UID/GID sizes/values using new extra field)
UIDGID_NOT_16BIT (old Unix 16-bit UID/GID extra field not used)
[encryption, version 2.91 of 05 Jan 2007] (modified for Zip 3)

Encryption notice:
The encryption code of this program is not copyrighted and is
put in the public domain. It was originally written in Europe
and, to the best of our knowledge, can be freely distributed
in both source and object forms from any country, including
the USA under License Exception TSU of the U.S. Export
Administration Regulations (section 740.13(e)) of 6 June 2002.

Zip environment options:
ZIP: [none]
ZIPOPT: [none]


> PGP is available for HP-UX 11.11, [...]

Is there a relevant link there?

> It is still on the HP-UX portal site
> http://hpux.connect.org.uk/hppd/hpux/Users/gnupg-2.0.15/

PGP and GPG are spelled differently for a
reason.
Mark Bly
Regular Advisor

Re: File compression and encryption in a single application for HP-UX


We only have a PGP license for our Linux server, therefore we have the additional step of transfering the file to the linux system (The PGP license is per CPU which would involve more expense running on the HP-UX system)

Our version of pgp is as follows with a 2 CPU license:
rpm -qa |grep pgp
pgpcmdln-9.5.1.1027-1

Gzip works well for our compression requirements (it is a pity that there is not an option in Gzip for simple encryption)

Ideally the extraction of the file at the receiving end needs to be automated.
Also we can not always guarentee that the receiver has PGP software installed, therefore a self extracting file is useful (though I believe that the free gpg can be used to open PGP encrypted files)

Thank you all for your replies.
I am interested in looking at Info-Zip in our test environment, but time constraints will probably force us to use our current solution.

Regards,
Mark
Remember to think before you react................but always make sure there is still time to react
Steven Schweda
Honored Contributor

Re: File compression and encryption in a single application for HP-UX

> Ideally the extraction of the file at the
> receiving end needs to be automated.

The exact meaning of that is not clear to me.

> [...] time constraints [...]

I have trouble imagining anything much
simpler than installing (and using) Info-ZIP
Zip, but you're the boss.
Mark Bly
Regular Advisor

Re: File compression and encryption in a single application for HP-UX

Hi,
To clarify,
This is a production environment, so we would not have much time to test and raise the required changes.
The receiving server must be able to automatically unencrypt and upload the file as part of a batch job. (The batch will run overnight)

Thanks once again for everyones help.
Mark
Remember to think before you react................but always make sure there is still time to react
Matti_Kurkela
Honored Contributor

Re: File compression and encryption in a single application for HP-UX

Must the file transfer be commanded from the source side, or can it be done from the destination side?

If you install a free HP-UX Secure Shell (available from software.hp.com) to your HP-UX system, and a free PuTTY client package to the Windows side, you could use a single Windows command to transfer the file, automatically compressing & encrypting it for the transfer and decrypting & decompressing it at the destination:

pscp -batch -C username@hpuxsystem:/some/path/file C:\somedir\

If the transfer needs to be commanded at the HP-UX side, you could use a similar "scp" command (included in HP-UX Secure Shell package) on the HP-UX, but you would require a SSH server package at the Windows side.

Once the SSH key authentication is set up, there is no need to type any passwords, so the process is really easy to automate.

PuTTY is very widely used SSH client for Windows and can be found here:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Unfortunately, I don't know of any SSH server implementation for Windows that would be production quality, free, and easy to use at the same time. (You can get any 2 out of 3, though.)

Cygwin is a free package for Windows that includes a version of OpenSSH server, which uses the same source codebase as HP Secure Shell. But it requires the Windows admin to understand UNIXy things, so it isn't necessarily easy for an average Windows admin.

http://www.freesshd.com/ is a free and easy-to-use SSH server for Windows, but it isn't necessarily production quality. The worst thing is, if you choose to run it as a service, it will give the remote user Administrator-equivalent access.

Commercial SSH servers can of course be both easy and secure, but will require a license.

MK
MK
Mark Bly
Regular Advisor

Re: File compression and encryption in a single application for HP-UX

Thank you for the reply.
Unfortunately we need the file to remain encrypted at the receiving end until another batch job picks it up. I believe that scp will only encrypt the file during transfer, and it would not be encrypted on the receving server.(correct me if I am wrong)

The file is created as part of a batch run on the UNIX server and part of the schedule will compress, encrypt and send the file.
Therefore the file must be pushed from the UNIX server.


Regards,
Mark
Remember to think before you react................but always make sure there is still time to react
Mhanby
Regular Advisor

Re: File compression and encryption in a single application for HP-UX

We have a similar need for something like this. I was wondering if it's possible to encrypt the files and then use scp to transfer them? We have a similar need and they were doing encryption and then using sftp to transfer the files after setting up ssh. Would it be possible to instead use scp versus sftp for the file transfer? Would this be as or any less secure than sftp'ing them as is done currently? Would scripting this be easier than scripting using sftp?
Steven Schweda
Honored Contributor

Re: File compression and encryption in a single application for HP-UX

> We have a similar need for something like
> this. [...]

You should start your own thread, and provide
your own actual requirements. (You're
allowed, in your own thread, to provide a
link to this one, if you think that it would
be useful.)
Alzhy
Honored Contributor

Re: File compression and encryption in a single application for HP-UX

I can recommend FastCopy.

It does encyrption, compression and persistent transmittal. www.repliweb.com I think is where it is now offered.


You can also look at ndm.


Hakuna Matata.