Jun 4, 2010 at 1:08 PM
Currently, I'm working on getting together more documentation and am revising exception handling to be a bit more thorough and complete. I always hate it when you get a generic exception and it doesn't actually tell you what the problem is, so that's what
I'm working to avoid for those of you who encounter such an exception. Additionally, I've been getting together a few extra functions for those of you who have requested that I immediately add cryptography related methods, such as for finding prime numbers
and doing modular exponentiation. I assure you, the cryptography related methods will be in the
next change set.
In addition to simply reviewing the code for completeness and obvious bugs, I have been working on a full scale line by line and logical audit of the entire library, to ensure that there are no potential security issues and to also make sure that if the
internal state is invalidated or otherwise corrupted, that you don't get incorrect results but rather the application will crash. I feel that a crash is better than incorrect results, because I don't know what everyone is using this project for; it could very
well be used in large corporate systems that ensure the security of payment information or social security numbers. The fact that C# is most commonly run under the Common Language Runtime helps with security, but I can't guarantee that the system will have
buffer over/under run checking and must be sure to do all of this checking myself, for things such as copying results and preparing data for low level function calls. This audit will take some time, but I would rather make sure everything is secure before
becoming the guy who released the vulnerable build.
Next up, we have some good news for those of you who just want the binding and not the Integer class. I've added several new methods to the binding which you should find rather useful in your own applications. These include everything that Integer uses,
as well as most of the number theoretic functions that GNU MP offers; from finding primes to getting a modular inverse.
It probably won't happen in the Alpha release, but it will eventually happen... but I've been thinking about CLS compliance of the actual IntegerCore class. I mean, if Integer is CLS compliant, why shouldn't IntegerCore be as well. Some of the functions
GNU MP offers rely on unsigned integers and certain types which are simply not CLS compliant. I will be adding alternative methods that wrap the GNU MP functions and make them CLS compliant; of course the problem with this is increased overhead from stack
utilization, but for most of you it won't be problematic.
I hope that for most of you, this library is a great alternative to Microsoft's System.Numerics.BigInteger and that it is superior to most of the other arbitrary precision arithmetic bindings and libraries out there in the world for C# and other languages.
My goal is to make available a great library that was once not easy to access, to those who choose to use high level languages like C#. If you find it useful but have a few problems with it or want new things added, let me know by starting up a discussion
or by emailing me!