[Mono-dev] RSA and ECDH
Edward Ned Harvey (mono)
edward.harvey.mono at clevertrove.com
Sun Feb 16 16:45:29 UTC 2014
> From: Brandon Perry [mailto:bperry.volatile at gmail.com]
> I wonder, you are instantiating the RSACryptoServiceProvider object
> after storing the before ticks, how much of the time is simply
> instantiating the object? Maybe move that ahead of before ticks if you
> want to measure just the key generation.
Yeah, I thought of that - when I first did this a few months ago, I did as you suggested, but then, I think, the mono implementation differs from the .NET implementation - where I think .NET generates key in constructor, but since key generation is so expensive, mono delays key generation until something needs it, just *hoping* the RSA object will be disposed unused (which is probably very rare, I'm guessing). Which is the reason that I do the export of the key. It's the cheapest way I can see to force creation of the key.
More information about the Mono-devel-list