[Mono-bugs] [Bug 74645][Wis] Changed - Windows does not decrypt the first block correctly when decrypting some data that was encrypted using mono

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 18 Apr 2005 11:34:07 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by sebastien@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=74645

--- shadow/74645	2005-04-18 09:27:00.000000000 -0400
+++ shadow/74645.tmp.12540	2005-04-18 11:34:07.000000000 -0400
@@ -1,12 +1,12 @@
 Bug#: 74645
 Product: Mono: Class Libraries
 Version: 1.0
 OS: unknown
 OS Details: Linux and Windows XP
-Status: NEW   
+Status: NEEDINFO   
 Resolution: 
 Severity: Unknown
 Priority: Wishlist
 Component: CORLIB
 AssignedTo: sebastien@ximian.com                            
 ReportedBy: eric@extremeboredom.net               
@@ -172,6 +172,55 @@
 |
 | I even tried using the same key/iv that failed 
 | in Meshwork and it worked fine in here.
 |
 | I have no idea what's going on. It does work 
 | mono<->mono so i guess there's still a bug here ...
+
+------- Additional Comments From sebastien@ximian.com  2005-04-18 11:34 -------
+I did something else to help you. You'll have to compile a modified
+version of Mono.Security.dll (only add
+Mono.Security.Cryptography/Null.cs to the Mono.Security.dll.sources -
+as I don't want the new class to be in release builds) and modify your
+machine.config (see next attachment) so CryptoConfig can find the new
+"Null" encryption algorithm.
+
+When done you should be able to do this:
+
+> mono firerabbit.exe Null e FireRabbit
+encrypting...
+46-69-72-65-52-61-62-62-69-74
+46-69-72-65-52-61-62-62-69-74-06-06-06-06-06-06
+RmlyZVJhYmJpdAYGBgYGBg==
+
+> mono firerabbit.exe Null d RmlyZVJhYmJpdAYGBgYGBg==
+decrypting...
+46-69-72-65-52-61-62-62-69-74-06-06-06-06-06-06
+46-69-72-65-52-61-62-62-69-74
+FireRabbit
+
+When that works then export MONO_DEBUG and try it again...
+
+> export MONO_DEBUG=on
+> mono firerabbit.exe Null e FireRabbit
+encrypting...
+Mode: encryption
+Key:  00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
+IV:   00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
+46-69-72-65-52-61-62-62-69-74
+ECB on block #0: 46-69-72-65-52-61-62-62-69-74-06-06-06-06-06-06
+46-69-72-65-52-61-62-62-69-74-06-06-06-06-06-06
+RmlyZVJhYmJpdAYGBgYGBg==
+
+> mono firerabbit.exe Null d RmlyZVJhYmJpdAYGBgYGBg==
+decrypting...
+Mode: decryption
+Key:  00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
+IV:   00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
+46-69-72-65-52-61-62-62-69-74-06-06-06-06-06-06
+ECB on block #0: 46-69-72-65-52-61-62-62-69-74-06-06-06-06-06-06
+46-69-72-65-52-61-62-62-69-74
+FireRabbit
+
+At this point you should be able to run your own application (without
+changes) and see all buffers going thru encryption/decryption.
+Hopefully you'll see something "weird" in the output.