I built it for OS X and installed it so Pikefarm can find it. Anyway, while looking at the code I optimized the RC4 function for better performance :-)
arcfour_crypt(struct arcfour_ctx *ctx, unsigned length, uint8_t *dst, const uint8_t *src) { register uint8_t i, j; register int si, sj;
i = ctx->i; j = ctx->j; while(length--) { i++; i &= 0xff; si = ctx->S[i]; j += si; j &= 0xff; sj = ctx->S[i] = ctx->S[j]; ctx->S[j] = si; *dst++ = *src++ ^ ctx->S[ (si + sj) & 0xff ]; } ctx->i = i; ctx->j = j; }
This improved performance from ~25 MB/s to ~39 MB/s on my G4/500 (gcc 3.3), and from ~14 MB/s to ~17 MB/s on a x86/600 (gcc 2.95). Feel free to verify and incorporate it. (arcfour_stream() should be modified in the same way of course.)
/ Jonas Walldén
Previous text:
2004-02-03 10:50: Subject: Nettle
ftp://ftp.lysator.liu.se/pub/security/lsh/nettle-1.8.tar.gz
There's a fairly minimal home page at http://www.lysator.liu.se/~nisse/nettle.
/ Niels Möller (vässar rödpennan)