[svn] / ecrypt / trunk / submissions / mir-1 / ecrypt-sync.h  

svn: ecrypt/trunk/submissions/mir-1/ecrypt-sync.h

Diff for /ecrypt/trunk/submissions/mir-1/ecrypt-sync.h between version 1 and 71

version 1, Sun Jun 26 18:46:26 2005 UTC version 71, Sun Aug 21 15:55:39 2005 UTC
Line 18 
Line 18 
 /* ------------------------------------------------------------------------- */  /* ------------------------------------------------------------------------- */
 /* Data Types used in coding */  /* Data Types used in coding */
 /* ------------------------------------------------------------------------- */  /* ------------------------------------------------------------------------- */
 typedef unsigned long long ull;  typedef u64 ull;
 typedef u32 ul;  typedef u32 ul;
 typedef u8  uc;  typedef u8  uc;
   
 typedef Int  #if defined(ECRYPT_LITTLE_ENDIAN)
   typedef union
 { struct _b  { struct _b
   { uc b0, b1, b2, b3, b4, b5, b6, b7;    { uc b0, b1, b2, b3, b4, b5, b6, b7;
   } b;     /* 8 -bit access */    } b;     /* 8 -bit access */
Line 30 
Line 31 
   { ul w0, w1;    { ul w0, w1;
   } w;     /* 32-bit access */    } w;     /* 32-bit access */
   ull v;   /* 64-bit access */    ull v;   /* 64-bit access */
 };  } Int;
   #elif defined(ECRYPT_BIG_ENDIAN)
   typedef union
   { struct _b
     { uc b7, b6, b5, b4, b3, b2, b1, b0;
     } b;     /* 8 -bit access */
     struct _w
     { ul w1, w0;
     } w;     /* 32-bit access */
     ull v;   /* 64-bit access */
   } Int;
   #else
   #error Could not detect endianness
   #endif
   
 /* ------------------------------------------------------------------------- */  /* ------------------------------------------------------------------------- */
 /* Data structures */  /* Data structures */
Line 40 
Line 54 
   Int a, b, x0, x1, x2, x3;      /* Internal State */    Int a, b, x0, x1, x2, x3;      /* Internal State */
   uc S[256];                     /* secret S-box   */    uc S[256];                     /* secret S-box   */
   
     u8 key[16];
   
 } ECRYPT_ctx;  } ECRYPT_ctx;
   
 #endif  #endif
Line 53 
Line 69 
  * The name of your cipher.   * The name of your cipher.
  */   */
 #define ECRYPT_NAME "Mir-1"    /* [edit] */  #define ECRYPT_NAME "Mir-1"    /* [edit] */
   #define ECRYPT_PROFILE "SW"
   
 /*  /*
  * Specify which key and IV sizes are supported by your cipher. A user   * Specify which key and IV sizes are supported by your cipher. A user
Line 222 
Line 239 
  * declared below.   * declared below.
  */   */
   
 #define ECRYPT_BLOCKLENGTH 4                  /* [edit] */  #define ECRYPT_BLOCKLENGTH 8                  /* [edit] */
   
 #define ECRYPT_USES_DEFAULT_BLOCK_MACROS      /* [edit] */  #define ECRYPT_USES_DEFAULT_BLOCK_MACROS      /* [edit] */
 #ifdef ECRYPT_USES_DEFAULT_BLOCK_MACROS  #ifdef ECRYPT_USES_DEFAULT_BLOCK_MACROS
Line 268 
Line 285 
   
 #endif  #endif
   
   /*
    * If your cipher can be implemented in different ways, you can use
    * the ECRYPT_VARIANT parameter to allow the user to choose between
    * them at compile time (e.g., gcc -DECRYPT_VARIANT=3 ...). Please
    * only use this possibility if you really think it could make a
    * significant difference and keep the number of variants
    * (ECRYPT_MAXVARIANT) as small as possible (definitely not more than
    * 10). Note also that all variants should have exactly the same
    * external interface (i.e., the same ECRYPT_BLOCKLENGTH, etc.).
    */
   #define ECRYPT_MAXVARIANT 1                   /* [edit] */
   
   #ifndef ECRYPT_VARIANT
   #define ECRYPT_VARIANT 1
   #endif
   
   #if (ECRYPT_VARIANT > ECRYPT_MAXVARIANT)
   #error this variant does not exist
   #endif
   
 /* ------------------------------------------------------------------------- */  /* ------------------------------------------------------------------------- */
   
 #endif  #endif


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

eSTREAM Project

Powered by ViewCVS 1.0-dev
(Powered by Apache)

ViewCVS and CVS Help