Thank you for the feedback. The Cryptographic purpose I*m using BC.BigInt is with MSFT UProve. That SDK modifies the Bouncy Castle source and includes the implicit operators I included.
https://uprovecsharp.codeplex.com/SourceControl/latest#UProveCrypto/UProveC rypto/Math I did look into the .NET BigInteger and the BC BigInteger, and one thing I noticed is that they have different Endian-ness. Conversion between .NET and Bouncy castle using the string constructor might introduce latency that is unnecessary. The reason I*m interested in adding this support to BouncyCastle is because I need to port BC to various devices using Xamarin (iPhone, Android, OS X, etc). Adding those methods will make it easier to maintain BC with new releases. On 11/18/14, 7:35 AM, "Edward Ned Harvey (bouncycastle)" <bouncycas...@nedharvey.com> wrote: >> From: Mankowski, Chris [mailto:cmankow...@nfp.com] >> >> I would be interested in seeing implicit operators in BouncyCastle易s >> BigInt, and don易t see them in the most recent release of BC. >> >> Does anyone have an objection to adding these methods, or have a better >> approach? > >Haven't seen anybody else respond, so I'll make my response just to keep >the conversation alive - > >I'm not sure why you would want those things. In crypto, the main reason >for existence of BigInteger is things like large random primes and >defining named curves, etc. (128 bits to 4096 bits or thereabouts). The >reason arithmetic operations haven't been created is because they're not >used for anything crypto-related. Conversion from long to BigInteger >kind of defeats the purpose of BigInteger, which is to handle number that >are much larger than 64 bits. > >BigInteger already supports constructor from a string, so technically you >could convert a long to a BigInteger by using >new BigInteger(someLong.ToString()) > >.Net does have a BigInteger that supports arithmetic operations (and >comparisons, check for odd/even, etc as you described). >System.Numerics.BigInteger. I would imagine this is probably what you >want to use, if you want to perform those operations. The one in >BouncyCastle - Org.BouncyCastle.Math.BigInteger, is only used for crypto >stuff in BC. The one that's included in .Net is a general purpose >BigInteger. No sense in recreating it... > >I don't have any objection, I just don't perceive a demand to justify any >effort. ********************************************************************** This e-mail may contain information that is privileged, confidential or protected under state or federal law. If you are not an intended recipient of this email, please delete it, notify the sender immediately, and do not copy, use or disseminate any information in the e-mail. Pursuant to IRS Circular 230, any tax advice in this email may not be used to avoid any penalties imposed under U.S. tax laws. E-mail sent to or from this e-mail address may be monitored, reviewed and archived.