[svn] / ecrypt / trunk / submissions / nls / v2 / sync-ae / nls.h  

svn: ecrypt/trunk/submissions/nls/v2/sync-ae/nls.h

Diff for /ecrypt/trunk/submissions/nls/v2/sync-ae/nls.h between version 206 and 207

version 206, Mon Jan 29 20:29:42 2007 UTC version 207, Fri Mar 23 09:43:20 2007 UTC
Line 1 
Line 1 
 /* $Id: nls.h 388 2005-04-28 21:04:09Z mwp $ */  /* $Id: nls.h 444 2006-05-17 07:41:23Z mwp $ */
 /* nls: NLS stream cipher and Mundja MAC header files */  /* nls: NLS stream cipher and Mundja MAC header files */
   
 /*  /*
Line 18 
Line 18 
 #ifndef _NLS_DEFINED  #ifndef _NLS_DEFINED
 #define _NLS_DEFINED 1  #define _NLS_DEFINED 1
   
   #ifndef ECRYPT_API
   #include <limits.h>
   #if __STDC_VERSION__ >= 199901
   #include <stdint.h>
   #endif
   #endif
   
 /*  /*
  * NLS maintains a counter that perturbs the state of the register   * NLS maintains a counter that perturbs the state of the register
  * at long intervals to ensure that short cycles are impossibile.   * at long intervals to ensure that short cycles are impossibile.
Line 38 
Line 45 
 #define WORD u32  #define WORD u32
 #define UCHAR u8  #define UCHAR u8
 #else  #else
   #if __STDC_VERSION__ >= 199901
   #define WORD uint32_t
   #define WORD_MAX UINT32_MAX
   #elif UINT_MAX >= 0xffffffff
   #define WORD unsigned int
   #define WORD_MAX UINT_MAX
   #else
 #define WORD unsigned long  #define WORD unsigned long
   #define WORD_MAX ULONG_MAX
   #endif
 #define UCHAR unsigned char  #define UCHAR unsigned char
 #endif  #endif
   
Line 47 
Line 63 
 #endif /*NLS_LONG_OUTPUT*/  #endif /*NLS_LONG_OUTPUT*/
 #define MACKONST 8  #define MACKONST 8
   
   #ifdef ECRYPT_API
   #define ROTL ROTL32
   #define ROTR ROTR32
   #else
   #if WORD_MAX == 0xffffffff
 #define ROTL(w,x) (((w) << (x))|((w) >> (32 - (x))))  #define ROTL(w,x) (((w) << (x))|((w) >> (32 - (x))))
 #define ROTR(w,x) (((w) >> (x))|((w) << (32 - (x))))  #define ROTR(w,x) (((w) >> (x))|((w) << (32 - (x))))
   #else
   #define ROTL(w,x) (((w) << (x))|(((w) & 0xffffffff) >> (32 - (x))))
   #define ROTR(w,x) ((((w) & 0xffffffff) >> (x))|((w) << (32 - (x))))
   #endif
   #endif
   
 typedef struct {  typedef struct {
     WORD        R[N];           /* Working storage for the shift register */      WORD        R[N];           /* Working storage for the shift register */


Generate output suitable for use with a patch program
Legend:
Removed from v.206  
changed lines
  Added in v.207

eSTREAM Project

Powered by ViewCVS 1.0-dev
(Powered by Apache)

ViewCVS and CVS Help