It's basically a limitation of managed code (not to rule out that our implementation might yet be improved).

You might consider experimenting with unsafe code in EncryptBlock/DecryptBlock to see if there are array bounds checks that can be eliminated, but I don't really have any idea what sort of improvement that's likely to give, if any.

Pete.


On 18/01/2013 9:00 PM, Ray Kelly wrote:
I am decrypting a CFB8/No Padding Stream. BouncyCastle is about 80% slower that the native decryption (I cant use native Rijndael in my project for various reasons). I ran a test decrypting 30k bytes in a single ProcessBytes call. I compared the native Rijndael(TransformBlock) to the AesFastEngine and BouncyCastle Rijndael. Here are the results:

Native Rijndael: 21ms
AesFastEngine: 34ms
BC Rijndael: 288ms

Native Rijndael: 19ms
AesFastEngine: 31ms
BC Rijndael: 288ms

Native Rijndael: 19ms
AesFastEngine: 31ms
BC Rijndael: 287ms

Is there another engine I should use or something I am doing wrong? Thanks for your help,
Ray





Reply via email to