summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/idea/idea_lcl.h
diff options
context:
space:
mode:
authordoug <>2015-02-07 13:19:15 +0000
committerdoug <>2015-02-07 13:19:15 +0000
commitbd790e322a40e6362231f517d5795d4079eeb2a2 (patch)
tree1f11c8eab9ee5f3f265f1010c299c7fd574d9cdf /src/lib/libcrypto/idea/idea_lcl.h
parentff826d3cb94a579275eb6e97b3cf80ca69016d4b (diff)
downloadopenbsd-bd790e322a40e6362231f517d5795d4079eeb2a2.tar.gz
openbsd-bd790e322a40e6362231f517d5795d4079eeb2a2.tar.bz2
openbsd-bd790e322a40e6362231f517d5795d4079eeb2a2.zip
Delete a lot of #if 0 code in libressl.
There are a few instances where #if 1 is removed but the code remains. Based on the following OpenSSL commits. Some of the commits weren't strictly deletions so they are going to be split up into separate commits. 6f91b017bbb7140f816721141ac156d1b828a6b3 3d47c1d331fdc7574d2275cda1a630ccdb624b08 dfb56425b68314b2b57e17c82c1df42e7a015132 c8fa2356a00cbaada8963f739e5570298311a060 f16a64d11f55c01f56baa62ebf1dec7f8fe718cb 9ccc00ef6ea65567622e40c49aca43f2c6d79cdb 02a938c953b3e1ced71d9a832de1618f907eb96d 75d0ebef2aef7a2c77b27575b8da898e22f3ccd5 d6fbb194095312f4722c81c9362dbd0de66cb656 6f1a93ad111c7dfe36a09a976c4c009079b19ea1 1a5adcfb5edfe23908b350f8757df405b0f5f71f 8de24b792743d11e1d5a0dcd336a49368750c577 a2b18e657ea1a932d125154f4e13ab2258796d90 8e964419603d2478dfb391c66e7ccb2dcc9776b4 32dfde107636ac9bc62a5b3233fe2a54dbc27008 input + ok jsing@, miod@, tedu@
Diffstat (limited to 'src/lib/libcrypto/idea/idea_lcl.h')
-rw-r--r--src/lib/libcrypto/idea/idea_lcl.h67
1 files changed, 1 insertions, 66 deletions
diff --git a/src/lib/libcrypto/idea/idea_lcl.h b/src/lib/libcrypto/idea/idea_lcl.h
index cc58b360ad..e46c960875 100644
--- a/src/lib/libcrypto/idea/idea_lcl.h
+++ b/src/lib/libcrypto/idea/idea_lcl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: idea_lcl.h,v 1.2 2014/06/12 15:49:29 deraadt Exp $ */ 1/* $OpenBSD: idea_lcl.h,v 1.3 2015/02/07 13:19:15 doug Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -69,18 +69,6 @@ if (ul != 0) \
69else \ 69else \
70 r=(-(int)a-b+1); /* assuming a or b is 0 and in range */ 70 r=(-(int)a-b+1); /* assuming a or b is 0 and in range */
71 71
72#ifdef undef
73#define idea_mul(r,a,b,ul,sl) \
74if (a == 0) r=(0x10001-b)&0xffff; \
75else if (b == 0) r=(0x10001-a)&0xffff; \
76else { \
77 ul=(unsigned long)a*b; \
78 sl=(ul&0xffff)-(ul>>16); \
79 if (sl <= 0) sl+=0x10001; \
80 r=sl; \
81 }
82#endif
83
84/* 7/12/95 - Many thanks to Rhys Weatherley <rweather@us.oracle.com> 72/* 7/12/95 - Many thanks to Rhys Weatherley <rweather@us.oracle.com>
85 * for pointing out that I was assuming little endian 73 * for pointing out that I was assuming little endian
86 * byte order for all quantities what idea 74 * byte order for all quantities what idea
@@ -142,59 +130,6 @@ else { \
142#define n2s(c,l) (l =((IDEA_INT)(*((c)++)))<< 8L, \ 130#define n2s(c,l) (l =((IDEA_INT)(*((c)++)))<< 8L, \
143 l|=((IDEA_INT)(*((c)++))) ) 131 l|=((IDEA_INT)(*((c)++))) )
144 132
145#ifdef undef
146/* NOTE - c is not incremented as per c2l */
147#define c2ln(c,l1,l2,n) { \
148 c+=n; \
149 l1=l2=0; \
150 switch (n) { \
151 case 8: l2 =((unsigned long)(*(--(c))))<<24; \
152 case 7: l2|=((unsigned long)(*(--(c))))<<16; \
153 case 6: l2|=((unsigned long)(*(--(c))))<< 8; \
154 case 5: l2|=((unsigned long)(*(--(c)))); \
155 case 4: l1 =((unsigned long)(*(--(c))))<<24; \
156 case 3: l1|=((unsigned long)(*(--(c))))<<16; \
157 case 2: l1|=((unsigned long)(*(--(c))))<< 8; \
158 case 1: l1|=((unsigned long)(*(--(c)))); \
159 } \
160 }
161
162/* NOTE - c is not incremented as per l2c */
163#define l2cn(l1,l2,c,n) { \
164 c+=n; \
165 switch (n) { \
166 case 8: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \
167 case 7: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \
168 case 6: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \
169 case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \
170 case 4: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \
171 case 3: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \
172 case 2: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \
173 case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \
174 } \
175 }
176
177#undef c2s
178#define c2s(c,l) (l =((unsigned long)(*((c)++))) , \
179 l|=((unsigned long)(*((c)++)))<< 8L)
180
181#undef s2c
182#define s2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \
183 *((c)++)=(unsigned char)(((l)>> 8L)&0xff))
184
185#undef c2l
186#define c2l(c,l) (l =((unsigned long)(*((c)++))) , \
187 l|=((unsigned long)(*((c)++)))<< 8L, \
188 l|=((unsigned long)(*((c)++)))<<16L, \
189 l|=((unsigned long)(*((c)++)))<<24L)
190
191#undef l2c
192#define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \
193 *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
194 *((c)++)=(unsigned char)(((l)>>16L)&0xff), \
195 *((c)++)=(unsigned char)(((l)>>24L)&0xff))
196#endif
197
198#define E_IDEA(num) \ 133#define E_IDEA(num) \
199 x1&=0xffff; \ 134 x1&=0xffff; \
200 idea_mul(x1,x1,*p,ul); p++; \ 135 idea_mul(x1,x1,*p,ul); p++; \