patch-2.4.25 linux-2.4.25/crypto/sha512.c

Next file: linux-2.4.25/crypto/tcrypt.c
Previous file: linux-2.4.25/crypto/sha256.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.24/crypto/sha512.c linux-2.4.25/crypto/sha512.c
@@ -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)
@@ -249,7 +249,7 @@
 {
         struct sha512_ctx *sctx = ctx;
 	
-        const static u8 padding[128] = { 0x80, };
+        static u8 padding[128] = { 0x80, };
 
         u32 t;
 	u64 t2;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)