-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AES-GCM an order of magnitude slower than AES-CBC #89
Comments
Nope, that's concerning. I'll look into it when I have some time. |
Hello @cachapa |
@redDwarf03 that's interesting. At the time when I was reading about both algorithms I was pretty convinced that GCM was supposed to be more efficient. Now the details are lost to me, so I can't have a meaningful discussion on it. In any case the difference between 73 ms and 2 seconds is staggering. It reminds me of a Dart performance issue I read recently (sorry don't have the link right now) where reading a file is much faster with the sync method than with the async one. |
@cachapa How do you want to follow up on this issue ? |
How do you mean? I believe the bug report is valid and have provided a test case, so it's up to the maintainers now. |
sorry, I just wanted to know if there was still a need |
I was forced to go with CBC on my implementation because of the performance issue. Honestly the GCM performace makes it nearly unusable except for very small payloads, so I would say the need is very much there. |
In experimenting with this library I'm getting an order of magnitude lower performance when using AES-GCM compared to AES-CBC in both encoding and decoding.
Testing on my PC with a 1.7 MB image file I'm getting ~100ms with CBC and ~2s with GCM.
Here's the file I'm using for testing: https://upload.wikimedia.org/wikipedia/commons/4/4e/Macaca_nigra_self-portrait_large.jpg
And here's the code:
Results on my machine:
I'm concerned about this since online resources say GCM should be more efficient, if anything.
I'd be grateful for pointers if I'm doing something wrong here.
The text was updated successfully, but these errors were encountered: