Page 1 of 1

AESCrypt encryption speed

Posted: Fri Aug 05, 2022 8:27 pm
by F8Y
Hello, people! First, I want to thank you all for the AESCrypt tool.

I was comparing encryption speeds of various tools on my machine and the result was:

Code: Select all

Tool                 Encryption speed   Decryption speed
------------------   ----------------   ----------------
aescrypt (AES-256)   45  MB/s           43  MB/s
ccrypt   (AES-256)   44  MB/s           44  MB/s
openssl  (AES-256)   133 MB/s           131 MB/s
GnuPG    (AES-128)   126 MB/s           76  MB/s
GnuPG    (AES-192)   99  MB/s           64  MB/s
GnuPG    (AES-256)   92  MB/s           62  MB/s
I do not know why aescrypt is so much slower. Could anyone explain why?

Thank you!

Re: AESCrypt encryption speed

Posted: Sun Aug 07, 2022 7:43 pm
by paulej
I'm not sure, but a likely reason is that OpenSSL, for example, utilizes Intel's AES instructions to perform encryption. AES Crypt doesn't.

Re: AESCrypt encryption speed

Posted: Sun Aug 07, 2022 9:45 pm
by F8Y
paulej wrote: Sun Aug 07, 2022 7:43 pm I'm not sure, but a likely reason is that OpenSSL, for example, utilizes Intel's AES instructions to perform encryption. AES Crypt doesn't.
That is not possible because my CPU does not support AES instructions, as far as I know (it is an Intel Celeron G1610 Ivy Bridge processor).

Thanks for answering!

Re: AESCrypt encryption speed

Posted: Sun Aug 07, 2022 9:59 pm
by paulej
You are correct that that processor does not support AES instructions. It might be due to the fact that AES Crypt performs an HMAC-SHA256 operation while encrypting to facilitate data integrity checks. This allows AES Crypt to figure out while decrypting if any part of the encrypted data was modified. SHA-256 is a bit slow, relatively speaking, and if OpenSSL is not doing that, it would certainly explain part of the difference.

Re: AESCrypt encryption speed

Posted: Wed Jan 04, 2023 3:25 am
by paulej
@F8Y,

I decided to go look at the OpenSSL code to see why and I found it pretty quickly: they implemented AES using assembly code, whereas AES Crypt is written entirely in C and C++ code. So in addition to possible performance hits due to use of SHA-256, OpenSSL has the benefit of highly optimized assembly code.

Paul