• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 675
  • Last Modified:

3DES encrypt on windows / decrypt on unix (EBCRYPT)

I got the following problem:

I have to encrypt a given text on a Windows NT machine with 3DES (using Visual Basic 6), transfer the resulted cipher to a unix machine where I want to decrypt it with openssl (symmetric encryption).

I am using the ebcrypt.dll (without salt) for that purpose, but when I try to decrypt the data on unix it tells my that it can't read the input file (or "bad decrypt"). The output cipher is base64 encoded.

If I try to encrypt the same phrase/text on unix with openssl it gives me a different cipher.

Why does an 3DES encryption with the same keyphrase (w/o salt) result in two different base64-ciphers, depending on the platform? Does VB add a nullchar or something like that, that unix don't?

eg:

3DES:
Text: "text"
Key: "password"
Salt: (none)

Result on Windows NT: essdS+C9IDA=
Result on Unix:  ZxfLoy29ydw=

Any ideas? Thanks in advance.

Lorenz
0
syndroma
Asked:
syndroma
1 Solution
 
syndromaAuthor Commented:
Oh I found the solution myself, sorry for any inconvenience. I just compared the cipher, but due to the base64 it is never the same. But I can decrypt it now.
0
 
CleanupPingCommented:
syndroma:
This old question needs to be finalized -- no Experts commented, so delete it and get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
DanRollinsCommented:
syndroma, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.

DanRollins -- EE database cleanup volunteer
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now