[Mono-dev] BouncyCastle C# port under Mono

Carlos J. Muentes carlos at rockwithme.org
Mon Aug 21 12:04:55 EDT 2006


    I don't mean to plug my software in this list, but I built a wrapper
library for the .NET FCL encryption libraries.  It compiles in mono with
no changes (I use it in a text editor app I built to provide
encryption).  It's extremely simple to use, and I started building
support for certificates, but haven't had time to finish it (it's
licensed under the GPL, so changes are very welcome).  Check it out
here:
http://www.rockwithme.org/index.php?option=com_remository&Itemid=37&func=fileinfo&id=3


On Mon, 2006-08-21 at 08:37 -0400, Sebastien Pouliot wrote:

> Hello Peter,
> 
> On Mon, 2006-08-21 at 16:17 +1000, Peter Dettman wrote:
> > Hi all,
> > 
> > I want to report on my recent experiences getting the C# port of  
> > BouncyCastle Crypto API (http://www.bouncycastle.org/csharp/) running on 
> > Mono. It will be a reasonably brief report as it turned out to be mostly 
> > painless :).
> > 
> > (BC is written entirely in C# for .NET 1.1 by the way).
> 
> BouncyCastle is a great cryptographic library. However it's C# port
> doesn't use the cryptographic base classes of the FX so it somewhat
> limits it's usefulness (e.g. yet another API to learn and difficult
> interop with existing code).
> 
> > Here's what I did:
> > - Installed Mono 1.1.13.6  and MonoDevelop 0.10 via the Ubuntu package 
> > manager.
> > - Imported the existing VS2003 solution file in MonoDevelop, and built 
> > everything, with no significant issues.
> > - The existing NAnt build file also seemed to work without modification 
> > (although I am having a little trouble running the nunit tests via nant).
> > - Ran our regression tests revealing only one failure, which I tracked 
> > down to a bug in the x86 runtime (Bug# 79087), fixed in svn.
> > 
> > ...and that's all there was to it.
> > 
> > I certainly expected it to be more painful; that it wasn't is to the 
> > credit of the Mono developers.
> > 
> > The regression tests take a few minutes to run, allowing a (very) 
> > ballpark performance observation that Mono is about twice as slow as 
> > MS.NET for running these tests. I guess anyone concerned with 
> > performance of Mono might find some or all of these tests a useful 
> > benchmark.
> 
> The results are similar to running our cryptographic code on top of the
> MS runtime, i.e. they get twice as fast.
> 
> > I would be interested in hearing from people who are able to test 
> > BC/Mono on other architectures than x86. The crypto algorithms do a lot 
> > of bit/byte twiddling, and could potentially shake out similar problems 
> > in other runtimes to the bug above.
> 
> You can get an approximate idea of the time required by other
> architectures when looking at monobuild, compare the unit tests
> execution time with the runtime build time. However the results will be
> more "general" (and better reflect real-life scenarios) than CPU-bound
> cryptographic tests.
> 
> > Cheers,
> > Pete.
> 
> Thanks for the report!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060821/5cbc7781/attachment.html 


More information about the Mono-devel-list mailing list