projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab3c5e4
)
tls: on x86, use xorbuf_aligned_AES_BLOCK_SIZE() even with non-aligned source
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 25 Nov 2018 11:01:44 +0000
(12:01 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 25 Nov 2018 11:02:45 +0000
(12:02 +0100)
function old new delta
aesgcm_GHASH 228 223 -5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/tls_aesgcm.c
patch
|
blob
|
history
diff --git
a/networking/tls_aesgcm.c
b/networking/tls_aesgcm.c
index fd72540c4091b7c2180d2b4f665087b5d6ecff89..32ca40260bcba6cc6fbdb28f9513ca8fe7e85b9e 100644
(file)
--- a/
networking/tls_aesgcm.c
+++ b/
networking/tls_aesgcm.c
@@
-116,8
+116,10
@@
void FAST_FUNC aesgcm_GHASH(byte* h,
blocks = cSz / AES_BLOCK_SIZE;
partial = cSz % AES_BLOCK_SIZE;
while (blocks--) {
- //xorbuf_aligned_AES_BLOCK_SIZE(x, c); - c is not guaranteed to be aligned
- xorbuf(x, c, AES_BLOCK_SIZE);
+ if (BB_UNALIGNED_MEMACCESS_OK) // c is not guaranteed to be aligned
+ xorbuf_aligned_AES_BLOCK_SIZE(x, c);
+ else
+ xorbuf(x, c, AES_BLOCK_SIZE);
GMULT(x, h);
c += AES_BLOCK_SIZE;
}