Hello,

On Thu, Aug 25, 2011 at 3:16 AM, Nic Wise <n...@fastchicken.co.nz> wrote:
> This could be worth a look:
>
> http://iphonedevelopment.blogspot.com/2009/04/crypto-library.html

That looks like an ObjectiveC wrapper. Since CommonCrypto is a C-based
API it would be easier to p/invoke directly.

> however, it also could be that generating a 2048 bit key is just a
> LONG operation, which takes a while on a slow CPU....
>
> how long does it take on the desktop (ie, same code in a commandline app)?
>
> On Wed, Aug 24, 2011 at 22:15, monojobs <sj...@rocketmail.com> wrote:
>> Hello,
>>
>>  I am currently trying to generate a RSA key pair for an app I am working
>> on.  The issue is that using RSACryptoServiceProvider (which internally uses
>> RSAManaged) is horribly slow.  Generating even a small 512 bit key pair
>> takes ~7 seconds on device.  1024 bit takes ~15s.  The big issue is that
>> 2048 bit takes minutes.  This seems be a problem with how RSAManaged is
>> implemented specifically how BigInteger is used.  I realize that generating
>> a RSA key pair is an expensive operation, however, the 2048 bit case is not
>> usable.

Time will vary a lot depending on your device. I'm not aware (did not
really check) of any RSA-accelerated iOS devices (like some have
accelerated support for AES and SHA1). Other devices, like smartcards,
generally use specialized hardware to ensure such operations are "fast
enough".

>>  Does anyone know of any Mono bindings to native crypto library?
>>
>>  I have tried to use MonoTouch.Security.SecKey.GenerateKeyPair, however, it
>> always returns with a SecStatusCode.Unimplemented.  There is a good
>> possibility that I am using it incorrectly as well, so if anyone has an
>> example it would be much appreciated.

Fill a bug report, with an attached test case, and we'll look into the
'Unimplemented' bit.

Sebastien

>>
>> Thanks!
>>
>>
>> --
>> View this message in context: 
>> http://monotouch.2284126.n4.nabble.com/RSA-key-pair-generation-tp3766685p3766685.html
>> Sent from the MonoTouch mailing list archive at Nabble.com.
>> _______________________________________________
>> MonoTouch mailing list
>> MonoTouch@lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/monotouch
>>
>
>
>
> --
> Nic Wise
> t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
> b. http://www.fastchicken.co.nz/
>
> mobileAgent (for FreeAgent): get your accounts in your pocket.
> http://goo.gl/IuBU
> Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
> London Bike App: Find the nearest Boris Bike, and get riding! 
> http://goo.gl/Icp2
> _______________________________________________
> MonoTouch mailing list
> MonoTouch@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
_______________________________________________
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to