summaryrefslogtreecommitdiff
path: root/arcfour.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2004-02-05 19:40:06 +0100
committerNiels Möller <nisse@lysator.liu.se>2004-02-05 19:40:06 +0100
commitc284ea4aeae3fdf4c935b0f61e3bac2fa777f3bc (patch)
treedf8d9b15b70cf80d45d70cd0d96bd2b152c49413 /arcfour.c
parente2c1560410591c31b060a245b748a0281a5efc11 (diff)
downloadnettle-c284ea4aeae3fdf4c935b0f61e3bac2fa777f3bc.tar.gz
* x86/arcfour-crypt.asm (nettle_arcfour_crypt): Bug fix, half of
the S array swap was forgotten. * arcfour.c (arcfour_stream): Likewise. * arcfour-crypt.c (arcfour_crypt): Likewise. Rev: src/nettle/ChangeLog:1.233 Rev: src/nettle/arcfour-crypt.c:1.2 Rev: src/nettle/arcfour.c:1.6 Rev: src/nettle/x86/arcfour-crypt.asm:1.5
Diffstat (limited to 'arcfour.c')
-rw-r--r--arcfour.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arcfour.c b/arcfour.c
index da039428..d8334222 100644
--- a/arcfour.c
+++ b/arcfour.c
@@ -70,6 +70,7 @@ arcfour_stream(struct arcfour_ctx *ctx,
si = ctx->S[i];
j += si; j &= 0xff;
sj = ctx->S[i] = ctx->S[j];
+ ctx->S[j] = si;
*dst++ = ctx->S[ (si + sj) & 0xff ];
}
ctx->i = i; ctx->j = j;