?
Solved

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

Posted on 2003-03-04
3
Medium Priority
?
664 Views
Last Modified: 2007-12-19
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
Comment
Question by:syndroma
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Accepted Solution

by:
syndroma earned 0 total points
ID: 8070868
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
 

Expert Comment

by:CleanupPing
ID: 8900727
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
 
LVL 49

Expert Comment

by:DanRollins
ID: 9046785
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question