Re: [rc4-amd64] RC4 optimized for AMD64

From: Marc Bevand
Date: Mon Nov 01 2004 - 07:25:41 EST


On 2004-11-01, James Morris <jmorris@xxxxxxxxxx> wrote:
|
| Only problem is that the setkey code is released under a GPL incompatible
| license. Although it's probably not difficult to make the kernel's
| existing C setkey code to work with the new asm code.

Yes, it would be very easy to do. This patch (completetly untested)
is probably all that is necessary to make Linux arc4_set_key() work
with rc4-amd64:

--- 8< -----------------------------------------------------------------
--- crypto/arc4.c.orig 2004-11-01 13:16:41.739375512 +0100
+++ crypto/arc4.c 2004-11-01 13:18:16.799924112 +0100
@@ -20,8 +20,8 @@
#define ARC4_BLOCK_SIZE 1

struct arc4_ctx {
- u8 S[256];
- u8 x, y;
+ u64 x, y;
+ u64 S[256];
};

static int arc4_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
--- 8< -----------------------------------------------------------------

--
Marc Bevand http://www.epita.fr/~bevand_m
Computer Science School EPITA - System, Network and Security Dept.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/