Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261766AbUKAMYT (ORCPT ); Mon, 1 Nov 2004 07:24:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261767AbUKAMYT (ORCPT ); Mon, 1 Nov 2004 07:24:19 -0500 Received: from main.gmane.org ([80.91.229.2]:64390 "EHLO main.gmane.org") by vger.kernel.org with ESMTP id S261766AbUKAMYP (ORCPT ); Mon, 1 Nov 2004 07:24:15 -0500 X-Injected-Via-Gmane: http://gmane.org/ To: linux-kernel@vger.kernel.org From: Marc Bevand Subject: Re: [rc4-amd64] RC4 optimized for AMD64 Date: Mon, 1 Nov 2004 12:24:07 +0000 (UTC) Message-ID: References: X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ivry-1-81-57-179-18.fbx.proxad.net User-Agent: slrn/0.9.8.0pl1 (Linux) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1321 Lines: 29 On 2004-11-01, James Morris 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/