Does .NET detect and use Hardware Cryptographic Accelerator for its cryptography operations (the way that it detects GPU and uses it for graphic operations)?
If not, what managed library do you suggest?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
.NET is pretty large.
In Microsoft .NET, under Windows, you’ll find types named:
*Managed, e.g.SHA1Managedthat are fully managed implementations. There won’t be any hardware acceleration on them;*CryptoServiceProvider, e.g.SHA1CryptoServiceManagerthat will use CryptoAPI (native) code. If the native CSP has hardware acceleration then you’ll get it.on newer frameworks versions,
*CNG(Cryptography Next Generation). That’s the replacement for CryptoAPI – same rules applies (if the native code can use hardware acceleration you’ll get it).In Mono, all platforms, you’ll have fully managed implementations (whatever the name of the type) by default.
Now, in both (MS and Mono), cases you can also use your own (or a third party) implementation. That can even be totally transparent to your application when you use
CryptoConfig.CreateFrom(directly or indirectly, e.g.SHA1.Create) and yourmachine.configfile includes a reference to the alternative implementation. This allow you (or anyone else) to add (or replace) any implementation with another (including hardware accelerated) implementation.Note: version 4.0 of the framework makes this even easier with the new
AddAlgorithmmethod.