CNG is slow?
Not quite sure why, but CNG (Cryptography-Next-Generation) is considerably slower than good old RSACryptoServiceProvider
:
Method | KeySize | Mean | Error | StdDev |
---|---|---|---|---|
RSAEncrypt | 512 | 7.304 μs | 7.521 μs | 0.4122 μs |
RSADecrypt | 512 | 31.200 μs | 3.130 μs | 0.1715 μs |
RSACngEncrypt | 512 | 142.589 μs | 8.738 μs | 0.4790 μs |
RSACngDecrypt | 512 | 184.463 μs | 36.394 μs | 1.9949 μs |
Thanks! You can always email me or use contact form for more questions/comments etc.