projects
/
BearSSL
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed IV processing for CBC decryption with AES (x86ni implementation) when data...
[BearSSL]
/
src
/
symcipher
/
aes_x86ni_cbcdec.c
diff --git
a/src/symcipher/aes_x86ni_cbcdec.c
b/src/symcipher/aes_x86ni_cbcdec.c
index
6f75348
..
c97ce48
100644
(file)
--- a/
src/symcipher/aes_x86ni_cbcdec.c
+++ b/
src/symcipher/aes_x86ni_cbcdec.c
@@
-27,6
+27,9
@@
#if BR_AES_X86NI
#if BR_AES_X86NI_GCC
#if BR_AES_X86NI
#if BR_AES_X86NI_GCC
+#if BR_AES_X86NI_GCC_OLD
+#pragma GCC target("sse2,sse4.1,aes,pclmul")
+#endif
#include <wmmintrin.h>
#endif
#include <wmmintrin.h>
#endif
@@
-75,14
+78,16
@@
br_aes_x86ni_cbcdec_run(const br_aes_x86ni_cbcdec_keys *ctx,
if (len >= 48) {
x2 = _mm_loadu_si128(
(void *)(buf + 32));
if (len >= 48) {
x2 = _mm_loadu_si128(
(void *)(buf + 32));
+ x3 = x2;
} else {
x2 = x0;
} else {
x2 = x0;
+ x3 = x1;
}
} else {
x1 = x0;
x2 = x0;
}
} else {
x1 = x0;
x2 = x0;
+ x3 = x0;
}
}
- x3 = x0;
}
e0 = x0;
e1 = x1;
}
e0 = x0;
e1 = x1;