[Mono-dev] System.Security.Cryptography : TripleDES Issue

Yogendra Thakur YogendraT at ami.com
Wed Oct 19 14:05:49 EDT 2005


I have opened bug for this issue (bug# 76483).
Please see attached file for source code.

To Compile : mcs TestEncryption.cs
To Run     : mono TestEncryption.exe

Result :
Unhandled Exception:
System.Security.Cryptography.CryptographicException: IV length cannot be
larger than block size
in <0x000e0> System.Security.Cryptography.SymmetricAlgorithm:set_IV
(System.Byte[] value)
in <0x00020>
tor (System.Byte[] rgbKey, System.Byte[] rgbIV)
in <0x0013d> TestEncryption.TestEncryption:Main (System.String[] args)

Yogendra Thakur

-----Original Message-----
From: Sebastien Pouliot [mailto:sebastien.pouliot at gmail.com] 
Sent: Monday, October 17, 2005 7:18 PM
To: Yogendra Thakur
Cc: mono-devel-list at lists.ximian.com
Subject: Re: [Mono-dev] System.Security.Cryptography : TripleDES Issue

Hello Yogendra,

On Mon, 2005-10-17 at 17:39 -0400, Yogendra Thakur wrote:
> Hello,
> Is Triple DES Encryption supported in Mono?


> I have small code which uses Triple DES algorithm to encrypt /Decrypt
> data.
> This works fine in MS .NET. When I run same code on Mono, it throws
> length can not be greater than Block Size" exception. 

Sorry I can't help you without more details.

Please open a bug report at http://bugzilla.ximian.com and include a
small source code sample that reproduce the problem. Don't forget to
indicate which version of Mono you are using and on which platform.

> I don't find any entry for this class in documentation. I searched
> base but couldn't find anything.

You can access the documentation from http://www.mono-project.com
Click on "manuals and docs" (icon on top right) then navigate the tree
view to get to the desired class documentation.

Here's a direct link to the TripleDES class

> Also I see Crypto classes are implemented under two different
> System.Security.Cryptography and Mono.Security.Cryptography. What is
> difference between them?

System.Security.Cryptography implements the same classes (i.e. same
features/same limites) as MS base class library.

Mono.Security.Cryptography offer extra classes (i.e. not available on
the MS framework).
Sebastien Pouliot
email: sebastien at ximian.com
blog: http://pages.infinit.net/ctech/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestEncryption.cs
Type: application/octet-stream
Size: 2458 bytes
Desc: TestEncryption.cs
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20051019/ca53f7c6/attachment.obj 

More information about the Mono-devel-list mailing list