views:

162

answers:

3

Hi!

I have an webservice that performs many RSA-signature operations. I use the CryptograhyProvider from .net. This uses the unmanaged CyptoAPI from Windows.

I often have this error:

System.Security.Cryptography.CryptographicException: Der RPC-Server ist für diesen Vorgang zu stark ausgelastet. [=The rpc server is too busy to complete the transaction]

bei System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr) bei System.Security.Cryptography.Utils._ImportKey(SafeProvHandle hCSP, Int32 keyNumber, CspProviderFlags flags, Object cspObject, SafeKeyHandle& hKey) bei System.Security.Cryptography.RSACryptoServiceProvider.ImportParameters(RSAParameters parameters)

Instead of trying to fix this, I'd rather replace my RSA-signing operation with an DLLImport to a high performance RSA C implementation.

Does someone know one or can recommend one?

Is OpenSSL faster than MS CryptoApi? I also suspect that loading the key might cause serious overhead.

Thanks!

+2  A: 

You may also want to consider NSS. This is 2 years old, but could still be worth perusing.

Nathon
Thanks! But they unfortunately only test symmetric algorithms, not RSA
Christian
+3  A: 

I would recommend OpenSSL but i dont know the comparison with MS CryptoAPI. Its simple to use and documentation is extensive along with sample source code.

Check the detailed description of the APIs here.

Praveen S
+1  A: 

http://www.cryptopp.com/ might be a good library.

It was used in this speed test: http://www.cryptopp.com/benchmarks.html

Unfortunately there is no comparison with OpenSSL available

Christian