Option to set current cert to server certificate.
[openssl.git] / crypto / idea / idea_lcl.h
index fcd007f2b44f30d532b9a43901f0f38b0d64f286..f3dbfa67e9ed46adac2ecd8825f5e074ecb31b5b 100644 (file)
@@ -1,5 +1,5 @@
 /* crypto/idea/idea_lcl.h */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
  * This package is an SSL implementation written
@@ -56,7 +56,7 @@
  * [including the GNU Public Licence.]
  */
 
-/* The new form of this macro (check if the a*b == 0) was sugested by 
+/* The new form of this macro (check if the a*b == 0) was suggested by 
  * Colin Plumb <colin@nyx10.cs.du.edu> */
 /* Removal of the inner if from from Wei Dai 24/4/96 */
 #define idea_mul(r,a,b,ul) \
@@ -65,10 +65,9 @@ if (ul != 0) \
        { \
        r=(ul&0xffff)-(ul>>16); \
        r-=((r)>>16); \
-/*     if (r&0xffff0000L) r=(r+0x10001); */ \
        } \
 else \
-       r=(-(int)a-b+1); /* assuming a or b is 0 and in range */ \
+       r=(-(int)a-b+1); /* assuming a or b is 0 and in range */ 
 
 #ifdef undef
 #define idea_mul(r,a,b,ul,sl) \
@@ -195,3 +194,22 @@ else       { \
                         *((c)++)=(unsigned char)(((l)>>16L)&0xff), \
                         *((c)++)=(unsigned char)(((l)>>24L)&0xff))
 #endif
+
+#define E_IDEA(num) \
+       x1&=0xffff; \
+       idea_mul(x1,x1,*p,ul); p++; \
+       x2+= *(p++); \
+       x3+= *(p++); \
+       x4&=0xffff; \
+       idea_mul(x4,x4,*p,ul); p++; \
+       t0=(x1^x3)&0xffff; \
+       idea_mul(t0,t0,*p,ul); p++; \
+       t1=(t0+(x2^x4))&0xffff; \
+       idea_mul(t1,t1,*p,ul); p++; \
+       t0+=t1; \
+       x1^=t1; \
+       x4^=t0; \
+       ul=x2^t0; /* do the swap to x3 */ \
+       x2=x3^t1; \
+       x3=ul;
+