[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Use correct aes-ctr implementation in mainline, too.



Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv10959/src/common

Modified Files:
	aes.c 
Log Message:
Use correct aes-ctr implementation in mainline, too.

Index: aes.c
===================================================================
RCS file: /home/or/cvsroot/src/common/aes.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- aes.c	7 Apr 2004 19:57:39 -0000	1.10
+++ aes.c	6 May 2004 19:41:33 -0000	1.11
@@ -47,14 +47,14 @@
   u32 counter1 = cipher->counter1;
   u8 buf[16];
   memset(buf, 0, 8);
-  buf[15] = (counter0 >> 0)  && 0xff;
-  buf[14] = (counter0 >> 8)   && 0xff;
-  buf[13] = (counter0 >> 16) && 0xff;
-  buf[12] = (counter0 >> 24) && 0xff;
-  buf[11] = (counter1 >> 0)  && 0xff;
-  buf[10] = (counter1 >> 8)  && 0xff;
-  buf[ 9] = (counter1 >> 16) && 0xff;
-  buf[ 8] = (counter1 >> 24) && 0xff;
+  buf[15] = (counter0 >> 0)  & 0xff;
+  buf[14] = (counter0 >> 8)  & 0xff;
+  buf[13] = (counter0 >> 16) & 0xff;
+  buf[12] = (counter0 >> 24) & 0xff;
+  buf[11] = (counter1 >> 0)  & 0xff;
+  buf[10] = (counter1 >> 8)  & 0xff;
+  buf[ 9] = (counter1 >> 16) & 0xff;
+  buf[ 8] = (counter1 >> 24) & 0xff;
 
   rijndaelEncrypt(cipher->rk, cipher->nr, buf, cipher->buf);
   cipher->pos = 0;