Operating System - HP-UX
1826279 Members
4185 Online
109692 Solutions
New Discussion

Re: Encrypting a character string

 
raiden
Regular Advisor

Encrypting a character string

Hi all,

Is there any program or tool available in HPUX 11.23, where I can encrypt a character string using a "public key" generated by some 3rd party software.

8 REPLIES 8
Matti_Kurkela
Honored Contributor

Re: Encrypting a character string

If the encryption result must be decryptable with the same 3rd party software, then you must find either a HP-UX version of the same 3rd party software, or some other HP-UX software that is compatible with that 3rd party software.

If the 3rd party software is called "PGP", then the compatible GnuPG could be used for encryption. It is available for free in the HP-UX Internet Express kit. The latest version for 11.23 is downloadable from software.hp.com:

https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1123

The Internet Express kit DVD is also included in most HP-UX installation media kits, so you probably already have it.

MK
MK
raiden
Regular Advisor

Re: Encrypting a character string

Hi ,

Thnks for ur reply. The 3rd party software is not GnuPg . Customer has informed us that they will provide us the public key generated by their software and we have to use it to encrpyt some string (eg: some passwd) and sennd them the encrypted text.

I have GnupG installed in my server. Plz let me know how can this string encryption be achieved using the gnupg sftwr.
Steven Schweda
Honored Contributor

Re: Encrypting a character string

> [...] The 3rd party software is not GnuPg .
> [...] their software [...]

Are we supposed to guess what it is, or do
you think that you might tell us someday?

> [...] Plz let me know how [...]

Please supply some useful information.
raiden
Regular Advisor

Re: Encrypting a character string

Hi Steven,

The name of that sftwr is not important (neither to me nor it should be to you). If you read my above post carefully, then you will know I am not asking about compatibility of gnupg with some 3rd party sftwr.

I just wan to know how this gnupg encryption is achieved in general using a public key of the recepient..

If you could provide me the command I would check if it works. I just want to reach on a "YES" or "NO" conclusion with the customer.

Steven Schweda
Honored Contributor

Re: Encrypting a character string

> The name of that sftwr is not important
> (neither to me nor it should be to you).
> [...]

Ok, then yes, GnuPG is compatible with some
third-party software. (It _is_ third-party
software.) It's probably not compatible with
_all_ third-party software.

> [...] I just want to reach on a "YES" or
> "NO" conclusion with the customer.

And I just want to know what you're talking
about, if you know, yourself.
raiden
Regular Advisor

Re: Encrypting a character string

Steven,

DO u really know the command.. I doubt that..
Steven Schweda
Honored Contributor

Re: Encrypting a character string

> DO u really know the command.. I doubt
> that..

Which "the command" are you talking about
here?

If you want information about GnuPG, then you
might try going to the source:

http://gnupg.org/
http://www.gnupg.org/documentation/index.en.html


One advantage in reading the documentation is
that it doesn't require you to explain to
anyone else what you really want.
Matti_Kurkela
Honored Contributor

Re: Encrypting a character string

> The name of that sftwr is not important
> (neither to me nor it should be to you).
> [...]

It definitely should be. Not all public key encryption is the same.

GnuPG is compatible with PGP and other PGP-compatible software, nothing else.
It can encrypt with properly-formatted PGP or GnuPG public keys, and nothing else.

If you still insist that the name of "some 3rd party software that is not GnuPG" is not important, then you must be able to provide a lot of details about the format of the private key and the type of public key algorithm used. It is usually way more difficult to get all these details than the name of the software. Providing the name of the software would also allow me, Steven or anyone else to Google for any missing details.

For example: is the public key algorithm RSA, DSA, Diffie-Hellman or something else?

How is the key file packaged: is it just raw key data, or is it in some standard format: PGP, PEM, DER, PKCS#12 or something else?

The OpenSSL library/toolkit (also available for free at software.hp.com) supports many key formats and encryption algorithms, but to use it effectively, you must know exactly the type of algorithm you need to use. It's a toolkit, not an application.

The OpenSSL toolkit was originally developed for implementing SSL/TLS support, but since then it has become a more general package of open-source encryption algorithms.

If you use the wrong algorithm for encryption, the encryption may be successful, but the recipient of the data gets only meaningless gibberish when s/he tries to decrypt it using the correct algorithm.

Some encryption applications also include some headers, checksums or other metadata in the encrypted data. If you cannot produce these correctly, the 3rd party software will most likely refuse to decrypt it, with an error message like "encrypted data is in wrong format or corrupted".

Without knowing the name of the 3rd party application, it's impossible to know what kind of metadata (if any) it might require.

MK
MK