Hello,
I was absolutely sure that parameters of all AES functions are
equivalent in all implementations. However, I found that
AES_cbc_encrypt and aesni_cbc_encrypt differ in length parameter if it's
not a multiple of 16. For example,
AES_cbc_encrypt (in, out, 15, ... ) is returning 15 bytes in out buffer, but
aesni_cbc_encrypt (in, out, 15, ...) is returning only 1 byte.
I looked into the aesni-x86.pl code, and found the strange lines:
&mov ("ecx",16); # zero tail
&sub ("ecx",$len);
That's why the output length is always (16-len). I'm not sure this is a
bug, but I can't find a good reason why the length is changed here.
By the way, vpaes routines can't accept length if it's not a multiple of
16 at all.
--
SY / C4acT/\uBo Pavel Semjanov
_ _ _ http://www.semjanov.com
| | |-| |_|_| |-|
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]