Not logged in. · Lost password · Register
Forum: agsXMPP RSS
msathya03 #1
Member since Mar 2009 · 12 posts
Group memberships: Members
Show profile · Link to this post
Subject: Where can I get the optimized (less size) crypto.dll file?
   I created a Google Talk application for windows mobile 6. It is working fine without any issues. But my application cab size is 1,751 KB(Huge size).

The following files i am using in my application:

1.agsxmpp.dll -->   488KB
2.crypto.dll    -->   1,160KB
3.Code size   -->   103KB
Since crypto.dll file size is more, my application cab size becomes high.  (Actually I have taken both Crypto.dll and agsXmpp.dll files from the link
Could u please help me how to reduce my Application size. I will be very happy if it is less than 1MB. Is it possible to reduce the crypto.dll file? Where can I get the optimized crypto.dll file???

Help me Please

Thanks and Regards,
Alex #2
Member since Feb 2003 · 4296 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post

the crypto dll is from the Bouncy Castle project at:

You can download the code and remove all unneeded stuff. Bouncy Castle Crypto is a very complete crypto SDK, we need it for TLS only because the Compact Framework still has no SslStream. I wanted to do this myself a while ago, but I found no good tools which can automate this process. Doing this manual takes a while, and requires to study the bccrypto code.
Like other crypto SDKs BcCrypto is also using factory patterns to create algorithms like ...Create("SHA-256"), because of this reducing the code size with automated tools fails in the most cases.

You need the crypto.dll only if you want to TLS. What other mobile clients do is to offer 2 downloads, with TLS and without. But TLS security is one of the key features and advantages of XMPP.

agsXMPP support many of the XMPP extensions. When your software does not use most of them you could remove all this classes from the agsXMPP source and recompile it. If you are working under the GPL license model this works always, if your software is commercial you can do this only when you have the non exclusive source code license.

There are also many other free and commercial tools which can reduce the size of .NET assemblies, using obfuscation or compression.

Let me know if this post helps you.

msathya03 #3
Member since Mar 2009 · 12 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,
   Thank you very much for your kind reply. I excluded the crypto.dll file from my application and made a cab and Tested on the windows mobile . It was working fine without any issues. My application size has reduced into 591 KB :)

Thanks nad regards,
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS