Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266206AbUA1WJV (ORCPT ); Wed, 28 Jan 2004 17:09:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266209AbUA1WJV (ORCPT ); Wed, 28 Jan 2004 17:09:21 -0500 Received: from mx1.redhat.com ([66.187.233.31]:40578 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S266206AbUA1WJC (ORCPT ); Wed, 28 Jan 2004 17:09:02 -0500 Date: Wed, 28 Jan 2004 17:08:58 -0500 (EST) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: Jean-Luc Cooke cc: linux-kernel@vger.kernel.org, "David S. Miller" Subject: Re: [PATCH] crypto/sha256.c crypto/sha512.c In-Reply-To: <20040128213050.GB23977@certainkey.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1548 Lines: 56 On Wed, 28 Jan 2004, Jean-Luc Cooke wrote: > Pardon my ignorance, but does silence mean "yes"? No, but the patch looks fine to me and passes the test vectors. Dave, I've included it below. - James -- James Morris diff -Naur linux-2.6.1/crypto/sha256.c linux-2.6.1-patched/crypto/sha256.c --- linux-2.6.1/crypto/sha256.c 2004-01-09 01:59:26.000000000 -0500 +++ linux-2.6.1-patched/crypto/sha256.c 2004-01-27 14:22:00.000000000 -0500 @@ -34,12 +34,12 @@ static inline u32 Ch(u32 x, u32 y, u32 z) { - return ((x & y) ^ (~x & z)); + return z ^ (x & (y ^ z)); } static inline u32 Maj(u32 x, u32 y, u32 z) { - return ((x & y) ^ (x & z) ^ (y & z)); + return (x & y) | (z & (x | y)); } static inline u32 RORu32(u32 x, u32 y) diff -Naur linux-2.6.1/crypto/sha512.c linux-2.6.1-patched/crypto/sha512.c --- linux-2.6.1/crypto/sha512.c 2004-01-09 02:00:03.000000000 -0500 +++ linux-2.6.1-patched/crypto/sha512.c 2004-01-27 14:22:26.000000000 -0500 @@ -34,12 +34,12 @@ static inline u64 Ch(u64 x, u64 y, u64 z) { - return ((x & y) ^ (~x & z)); + return z ^ (x & (y ^ z)); } static inline u64 Maj(u64 x, u64 y, u64 z) { - return ((x & y) ^ (x & z) ^ (y & z)); + return (x & y) | (z & (x | y)); } static inline u64 RORu64(u64 x, u64 y) - 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/