[Mono-list] TripleDES encryption problem

Carlos Guzman Alvarez carlosga@telefonica.net
Sat, 30 Aug 2003 13:10:20 +0200


Hello:

I have made a new test using my own padding, for this i'm using 
PaddingMode.None and it works on Windows/.NET and doesn't work with 
Linux/Mono, here are the outputs of OpenSSL in both platforms:


OpenSSL debug output - Windows & MS .NET 1.0

tls1_enc(0)
EVP_Cipher(ds=00A11E68,rec->data=00A0330D,rec->input=00A0330D,l=40) ==>
	EVP_CIPHER_CTX: 0 buf_len, 24 key_len [8 128], 8 iv_len
		IV: DDF328077C527F56
	rec->input= cc d1 09 6d f0 89 73 86 de fb 78 fd a0 a7 6f b2 28 88 cf e5 
48 54 f6 c6 0d 44 35 bb 56 61 47 ad 08 4a 28 12 f5 69 55 72
des_ede_cbc_cipher(ctx=a11e68, buflen=0)
	 iv= DDF328077C527F56
	rec->data= 14 00 00 0c 67 5a bf 9e 52 6b 32 48 54 4d 9f 5b 9e 8c 63 84 
f5 1a c3 e3 53 f8 bd 16 8b 2f 77 3d c7 f8 0b 0f 03 03 03 03
dec 36
14 00 00 0C 67 5A BF 9E 52 6B 32 48 54 4D 9F 5B
9E 8C 63 84 F5 1A C3 E3 53 F8 BD 16 8B 2F 77 3D
C7 F8 0B 0F



OpenSSL debug output - Linux Red Hat 8 & Mono


tls1_enc(0)
EVP_Cipher(ds=0x8184188,rec->data=0x81744c5,rec->input=0x81744c5,l=40) ==>
         EVP_CIPHER_CTX: 0 buf_len, 24 key_len [8 128], 8 iv_len
                 IV: 30F1692DF83B4F2A
         rec->input= 48 f6 6f 63 fb 55 b1 f8 65 92 93 1e bb d4 e8 97 97 
b7 73 75
95 84 0a 35 a3 d7 33 7e da 28 7f c0 07 1c da 05 4c 07 15 86
des_ede_cbc_cipher(ctx=8184188, buflen=0)
          iv= 30F1692DF83B4F2A
         rec->data= 14 00 00 0c 1a ac d3 ae af 1e 11 2b 5c 29 c8 0f f7 
b6 7b 07 6d 5c af 8d cd fd ac a9 da 68 45 d8 03 00 00 00 00 00 00 00
dec 40
14 00 00 0C 1A AC D3 AE AF 1E 11 2B 5C 29 C8 0F
F7 B6 7B 07 6D 5C AF 8D CD FD AC A9 DA 68 45 D8
03 00 00 00 00 00 00 00






-- 
Best regards

Carlos Guzmán Álvarez
Vigo-Spain