Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-20-2011, 04:39
TmC TmC is offline
VIP
 
Join Date: Aug 2004
Posts: 330
Rept. Given: 1
Rept. Rcvd 15 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 23 Times in 17 Posts
TmC Reputation: 15
Delphi + DCPCrypt 2 (RC6) vs RAD Studio + DCPCrypt 2 (RC6) = KABOOM!

Hi...

Just a question:

I've coded an application with delphi, that generates files encrypted with RC6, just as a security measure so the user must generate file through the program and not by hand with notepad.

Later on...i moved to RAD Studio XE and used exactly the same files (no modifications at all), to further develop the program to version 2.

Well...hard to say, but RC6 fails. Files generated by version 1 (delphi 7) are unreadable from version 2 (rad studio xe). From what i see, difference is not so important...it happens very rarely... here it is an example:

Plain String before encryption:
###BDB###R#G#Gx#V#RG#RGx#RV#GG#GV#GxVx#GxVy#RGG#RGV#RGxVx#RGxVy#R#G#Gx#V#RG#RGx#RV#GG#GV#GxVx#GxVy#RGG#RGV#RGxVx#RGxVy###EDB######BOB###3###EOB###

Plain String after decryption:
###BDB#oŽVÌ'#$0090'NŒ™^Z'#$11'‹.M™“#RV#GG#GV#GxVx#GxVy#RGG#RGV#RGxVx#RGxVy#R#G#Gx#V#RG#RGx#RV#GG#GV#GxVx#GxVy#RGG#RGV#RGxVx#RGxVy###EDB######BOB###3###EOB###

As you can see...something breaks in the middle...you can try with various other strings...and it happens the same...even multiple times if the string is long enough.

One thought came to my mind: Delphi 7 is ASCII while RAD Studio XE is UNICODE. That causes many problems and a new version of DPCrypt 2 has been released to address UNICODE issues...

I have even problems encrypting and decrypting with the same library on RAD Studio XE by itself...it encrypts but after decryption the result is the same of above.

So the question is:
a) is it normal that going unicode, i receive different results. If I try on delphi 7 everything is fine...on rad studio and between different versions of delphi the entire thing go mess.
b) what can be the problem? dpcrypt 2, unicode, rad studio xe or other things?
It's a month that I'm bashing my head on the pc without a solution...tried to change everything but this is the most close to unencrypted i got...

Thanks in advance to everyone...

(P.S. I can share the code if necessary, nothing secret)
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT +8. The time now is 17:43.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )