[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[minion-cvs] Batch of changes for 0.0.3rc1



Update of /home/minion/cvsroot/src/minion/src
In directory moria.mit.edu:/tmp/cvs-serv18039/src

Modified Files:
	aes_ctr.c 
Log Message:
Batch of changes for 0.0.3rc1

README:
	- Document changes and new features in 0.0.3

setup.py:
	- Bump version number to 0.0.3rc1

ClientMain:
	- Change directory URL, so that 0.0.3 clients will look for a
          directory at a different place.
	- Add support for recommended versions
	- Update directory cache format
	- Finish documentation
	- Notice early if we have no unused SURBs

Main:
	- Fix bug in 'mixminion version'.
Packet:
	- Increment packet version number

ServerInfo, ServerList:
	- Add 'Recommended-Software' section to directories.

test:
	- Temporarily disable testStallingTransmission
	- Add test for counter mode consistency

ServerMain: 
        - documentation

aes_ctr.c:
	- Break backward compatibility by fixing bug in counter mode.



Index: aes_ctr.c
===================================================================
RCS file: /home/minion/cvsroot/src/minion/src/aes_ctr.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- aes_ctr.c	12 Feb 2003 01:23:24 -0000	1.12
+++ aes_ctr.c	13 Feb 2003 10:56:40 -0000	1.13
@@ -31,14 +31,11 @@
 #undef GET_U32
 #undef SET_U32
 
-#if 0
-/* Reinstate this code when we do the big backward-compatibility lossage. */
 #ifdef MM_B_ENDIAN
 #define GET_U32(ptr) (*(u32*)(ptr))
 #define SET_U32(ptr,i) (*(u32*)(ptr)) = i
 #define INCR_U32(ptr, i) i = ++(*(u32*)(ptr))
 #endif
-#endif
 
 /* An earlier version used bswap_32 where available to try to get the
    supposed benefits of inline assembly.  Bizarrely, on my Athlon,
@@ -46,30 +43,6 @@
    the code in glib/gtypes.h _is_ faster; but shaves only 1%
    off encryption.  We seem to be near the point of diminishing
    returns here. */
-
-/*
- * This code is incorrect; the correct version appears below.  Sadly,
- * Mixminion 0.0.1 through 0.0.2.2 shipped with this junk, so if we
- * change it, we'll make packets nobody can read.  With 0.0.3, we'll
- * bump the packet version and do the right thing.
- * XXXX003
- */ 
-#ifndef GET_U32
-#define GET_U32_cp(ptr) (  (u32)ptr[0] ^         \
-                         (((u32)ptr[1]) << 8) ^  \
-                         (((u32)ptr[2]) << 16) ^ \
-                         (((u32)ptr[3]) << 24))
-#define SET_U32_cp(ptr, i) { ptr[0] = (i)     & 0xff; \
-                             ptr[1] = (i>>8)  & 0xff; \
-                             ptr[2] = (i>>16) & 0xff; \
-                             ptr[3] = (i>>24) & 0xff; }
-#define GET_U32(ptr)   GET_U32_cp(((u8*)(ptr)))
-#define SET_U32(ptr,i) SET_U32_cp(((u8*)(ptr)), i)
-#define INCR_U32(ptr, i) { i = GET_U32(ptr)+1; SET_U32(ptr,i); }
-#endif
-
-
-#if 0
 #ifndef GET_U32
 #define GET_U32_cp(ptr) (  (u32)ptr[3] ^         \
                          (((u32)ptr[2]) << 8) ^  \
@@ -82,7 +55,6 @@
 #define GET_U32(ptr)   GET_U32_cp(((u8*)(ptr)))
 #define SET_U32(ptr,i) SET_U32_cp(((u8*)(ptr)), i)
 #define INCR_U32(ptr, i) { i = GET_U32(ptr)+1; SET_U32(ptr,i); }
-#endif
 #endif
 
 static inline void