summaryrefslogtreecommitdiffstats
path: root/src/crypto/cipher/blowfish_ctr
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-12-04 18:22:33 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-12-04 19:15:56 +0100
commit822c9e935a25a7590cd99b4c5407bb6596be41b7 (patch)
treebbb54a32dc204bd87174b6c444032a306f7e5c73 /src/crypto/cipher/blowfish_ctr
parent35748654f39a99c226cd14f3b92822eb64bd7037 (diff)
downloadfastd-822c9e935a25a7590cd99b4c5407bb6596be41b7.tar
fastd-822c9e935a25a7590cd99b4c5407bb6596be41b7.zip
Change xor and xor_a back to work on pointers
For some reason, this makes GCC generate much better code on MIPS with -Os
Diffstat (limited to 'src/crypto/cipher/blowfish_ctr')
-rw-r--r--src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c b/src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c
index feb1406..64ea0f1 100644
--- a/src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c
+++ b/src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c
@@ -267,7 +267,11 @@ static bool blowfish_ctr_crypt(const fastd_cipher_state_t *state, fastd_block128
block.u32[2] = htonl(block.u32[2]);
block.u32[3] = htonl(block.u32[3]);
- xor(out++, *(in++), block.b);
+ out->qw[0] = in->qw[0] ^ block.b.qw[0];
+ out->qw[1] = in->qw[1] ^ block.b.qw[1];
+
+ in++;
+ out++;
}
return true;