POK
|
00001 /* 00002 * POK header 00003 * 00004 * The following file is a part of the POK project. Any modification should 00005 * made according to the POK licence. You CANNOT use this file or a part of 00006 * this file is this part of a file for your own project 00007 * 00008 * For more information on the POK licence, please see our LICENCE FILE 00009 * 00010 * Please follow the coding guidelines described in doc/CODING_GUIDELINES 00011 * 00012 * Copyright (c) 2007-2009 POK team 00013 * 00014 * Created by julien on Tue Dec 8 15:53:28 2009 00015 */ 00016 00017 /* crypto/des/des_locl.h */ 00018 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 00019 * All rights reserved. 00020 * 00021 * This package is an SSL implementation written 00022 * by Eric Young (eay@cryptsoft.com). 00023 * The implementation was written so as to conform with Netscapes SSL. 00024 * 00025 * This library is free for commercial and non-commercial use as long as 00026 * the following conditions are aheared to. The following conditions 00027 * apply to all code found in this distribution, be it the RC4, RSA, 00028 * lhash, DES, etc., code; not just the SSL code. The SSL documentation 00029 * included with this distribution is covered by the same copyright terms 00030 * except that the holder is Tim Hudson (tjh@cryptsoft.com). 00031 * 00032 * Copyright remains Eric Young's, and as such any Copyright notices in 00033 * the code are not to be removed. 00034 * If this package is used in a product, Eric Young should be given attribution 00035 * as the author of the parts of the library used. 00036 * This can be in the form of a textual message at program startup or 00037 * in documentation (online or textual) provided with the package. 00038 * 00039 * Redistribution and use in source and binary forms, with or without 00040 * modification, are permitted provided that the following conditions 00041 * are met: 00042 * 1. Redistributions of source code must retain the copyright 00043 * notice, this list of conditions and the following disclaimer. 00044 * 2. Redistributions in binary form must reproduce the above copyright 00045 * notice, this list of conditions and the following disclaimer in the 00046 * documentation and/or other materials provided with the distribution. 00047 * 3. All advertising materials mentioning features or use of this software 00048 * must display the following acknowledgement: 00049 * "This product includes cryptographic software written by 00050 * Eric Young (eay@cryptsoft.com)" 00051 * The word 'cryptographic' can be left out if the rouines from the library 00052 * being used are not cryptographic related :-). 00053 * 4. If you include any Windows specific code (or a derivative thereof) from 00054 * the apps directory (application code) you must include an acknowledgement: 00055 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 00056 * 00057 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 00058 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00059 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00060 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 00061 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00062 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00063 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00064 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00065 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00066 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00067 * SUCH DAMAGE. 00068 * 00069 * The licence and distribution terms for any publically available version or 00070 * derivative of this code cannot be changed. i.e. this code cannot simply be 00071 * copied and put under another distribution licence 00072 * [including the GNU Public Licence.] 00073 */ 00074 00075 #ifdef POK_NEEDS_PROTOCOLS_DES 00076 00077 #ifndef HEADER_DES_LOCL_H 00078 #define HEADER_DES_LOCL_H 00079 00080 /* 00081 #include <openssl/e_os2.h> 00082 */ 00083 00084 00085 #define DES_LONG unsigned long 00086 #if defined(OPENSSL_SYS_VMS_NODECC) 00087 # define OPENSSL_EXPORT globalref 00088 # define OPENSSL_IMPORT globalref 00089 # define OPENSSL_GLOBAL globaldef 00090 #elif defined(OPENSSL_SYS_WINDOWS) && defined(OPENSSL_OPT_WINDLL) 00091 # define OPENSSL_EXPORT extern __declspec(dllexport) 00092 # define OPENSSL_IMPORT extern __declspec(dllimport) 00093 # define OPENSSL_GLOBAL 00094 #else 00095 # define OPENSSL_EXPORT extern 00096 # define OPENSSL_IMPORT extern 00097 # define OPENSSL_GLOBAL 00098 #endif 00099 #define OPENSSL_EXTERN OPENSSL_IMPORT 00100 00101 00102 #ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION 00103 # define OPENSSL_IMPLEMENT_GLOBAL(type,name) \ 00104 extern type _hide_##name; \ 00105 type *_shadow_##name(void) { return &_hide_##name; } \ 00106 static type _hide_##name 00107 # define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void) 00108 # define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name())) 00109 #else 00110 # define OPENSSL_IMPLEMENT_GLOBAL(type,name) OPENSSL_GLOBAL type _shadow_##name 00111 # define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name 00112 # define OPENSSL_GLOBAL_REF(name) _shadow_##name 00113 #endif 00114 00115 00116 #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16) 00117 #ifndef OPENSSL_SYS_MSDOS 00118 #define OPENSSL_SYS_MSDOS 00119 #endif 00120 #endif 00121 00122 #include <stdio.h> 00123 #include <stdlib.h> 00124 00125 #ifndef OPENSSL_SYS_MSDOS 00126 #if !defined(OPENSSL_SYS_VMS) || defined(__DECC) 00127 #ifdef OPENSSL_UNISTD 00128 # include OPENSSL_UNISTD 00129 #else 00130 # include <libc/stdlib.h> 00131 # include <libc/stdio.h> 00132 #include <libc/string.h> 00133 #endif 00134 //#include <libm.h> 00135 #endif 00136 #endif 00137 #include "des.h" 00138 00139 #ifdef OPENSSL_SYS_MSDOS /* Visual C++ 2.1 (Windows NT/95) */ 00140 #include <stdlib.h> 00141 #include <errno.h> 00142 #include <time.h> 00143 #include <io.h> 00144 #endif 00145 00146 #if defined(__STDC__) || defined(OPENSSL_SYS_VMS) || defined(M_XENIX) || defined(OPENSSL_SYS_MSDOS) 00147 #include <string.h> 00148 #endif 00149 00150 #ifdef OPENSSL_BUILD_SHLIBCRYPTO 00151 # undef OPENSSL_EXTERN 00152 # define OPENSSL_EXTERN OPENSSL_EXPORT 00153 #endif 00154 00155 #define ITERATIONS 16 00156 #define HALF_ITERATIONS 8 00157 00158 /* used in des_read and des_write */ 00159 #define MAXWRITE (1024*16) 00160 #define BSIZE (MAXWRITE+4) 00161 00162 #define c2l(c,l) (l =((DES_LONG)(*((c)++))) , \ 00163 l|=((DES_LONG)(*((c)++)))<< 8L, \ 00164 l|=((DES_LONG)(*((c)++)))<<16L, \ 00165 l|=((DES_LONG)(*((c)++)))<<24L) 00166 00167 /* NOTE - c is not incremented as per c2l */ 00168 #define c2ln(c,l1,l2,n) { \ 00169 c+=n; \ 00170 l1=l2=0; \ 00171 switch (n) { \ 00172 case 8: l2 =((DES_LONG)(*(--(c))))<<24L; \ 00173 case 7: l2|=((DES_LONG)(*(--(c))))<<16L; \ 00174 case 6: l2|=((DES_LONG)(*(--(c))))<< 8L; \ 00175 case 5: l2|=((DES_LONG)(*(--(c)))); \ 00176 case 4: l1 =((DES_LONG)(*(--(c))))<<24L; \ 00177 case 3: l1|=((DES_LONG)(*(--(c))))<<16L; \ 00178 case 2: l1|=((DES_LONG)(*(--(c))))<< 8L; \ 00179 case 1: l1|=((DES_LONG)(*(--(c)))); \ 00180 } \ 00181 } 00182 00183 #define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \ 00184 *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ 00185 *((c)++)=(unsigned char)(((l)>>16L)&0xff), \ 00186 *((c)++)=(unsigned char)(((l)>>24L)&0xff)) 00187 00188 /* replacements for htonl and ntohl since I have no idea what to do 00189 * when faced with machines with 8 byte longs. */ 00190 #define HDRSIZE 4 00191 00192 #define n2l(c,l) (l =((DES_LONG)(*((c)++)))<<24L, \ 00193 l|=((DES_LONG)(*((c)++)))<<16L, \ 00194 l|=((DES_LONG)(*((c)++)))<< 8L, \ 00195 l|=((DES_LONG)(*((c)++)))) 00196 00197 #define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \ 00198 *((c)++)=(unsigned char)(((l)>>16L)&0xff), \ 00199 *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ 00200 *((c)++)=(unsigned char)(((l) )&0xff)) 00201 00202 /* NOTE - c is not incremented as per l2c */ 00203 #define l2cn(l1,l2,c,n) { \ 00204 c+=n; \ 00205 switch (n) { \ 00206 case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); \ 00207 case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); \ 00208 case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); \ 00209 case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \ 00210 case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); \ 00211 case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); \ 00212 case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); \ 00213 case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \ 00214 } \ 00215 } 00216 00217 #if (defined(OPENSSL_SYS_WIN32) && defined(_MSC_VER)) || defined(__ICC) 00218 #define ROTATE(a,n) (_lrotr(a,n)) 00219 #elif defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) && !defined(PEDANTIC) 00220 # if defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) 00221 # define ROTATE(a,n) ({ register unsigned int ret; \ 00222 asm ("rorl %1,%0" \ 00223 : "=r"(ret) \ 00224 : "I"(n),"0"(a) \ 00225 : "cc"); \ 00226 ret; \ 00227 }) 00228 # endif 00229 #endif 00230 #ifndef ROTATE 00231 #define ROTATE(a,n) (((a)>>(n))+((a)<<(32-(n)))) 00232 #endif 00233 00234 /* Don't worry about the LOAD_DATA() stuff, that is used by 00235 * fcrypt() to add it's little bit to the front */ 00236 00237 #ifdef DES_FCRYPT 00238 00239 #define LOAD_DATA_tmp(R,S,u,t,E0,E1) \ 00240 { DES_LONG tmp; LOAD_DATA(R,S,u,t,E0,E1,tmp); } 00241 00242 #define LOAD_DATA(R,S,u,t,E0,E1,tmp) \ 00243 t=R^(R>>16L); \ 00244 u=t&E0; t&=E1; \ 00245 tmp=(u<<16); u^=R^s[S ]; u^=tmp; \ 00246 tmp=(t<<16); t^=R^s[S+1]; t^=tmp 00247 #else 00248 #define LOAD_DATA_tmp(a,b,c,d,e,f) LOAD_DATA(a,b,c,d,e,f,g) 00249 #define LOAD_DATA(R,S,u,t,E0,E1,tmp) \ 00250 u=R^s[S ]; \ 00251 t=R^s[S+1] 00252 #endif 00253 00254 /* The changes to this macro may help or hinder, depending on the 00255 * compiler and the architecture. gcc2 always seems to do well :-). 00256 * Inspired by Dana How <how@isl.stanford.edu> 00257 * DO NOT use the alternative version on machines with 8 byte longs. 00258 * It does not seem to work on the Alpha, even when DES_LONG is 4 00259 * bytes, probably an issue of accessing non-word aligned objects :-( */ 00260 #ifdef DES_PTR 00261 00262 /* It recently occurred to me that 0^0^0^0^0^0^0 == 0, so there 00263 * is no reason to not xor all the sub items together. This potentially 00264 * saves a register since things can be xored directly into L */ 00265 00266 #if defined(DES_RISC1) || defined(DES_RISC2) 00267 #ifdef DES_RISC1 00268 #define D_ENCRYPT(LL,R,S) { \ 00269 unsigned int u1,u2,u3; \ 00270 LOAD_DATA(R,S,u,t,E0,E1,u1); \ 00271 u2=(int)u>>8L; \ 00272 u1=(int)u&0xfc; \ 00273 u2&=0xfc; \ 00274 t=ROTATE(t,4); \ 00275 u>>=16L; \ 00276 LL^= *(const DES_LONG *)(des_SP +u1); \ 00277 LL^= *(const DES_LONG *)(des_SP+0x200+u2); \ 00278 u3=(int)(u>>8L); \ 00279 u1=(int)u&0xfc; \ 00280 u3&=0xfc; \ 00281 LL^= *(const DES_LONG *)(des_SP+0x400+u1); \ 00282 LL^= *(const DES_LONG *)(des_SP+0x600+u3); \ 00283 u2=(int)t>>8L; \ 00284 u1=(int)t&0xfc; \ 00285 u2&=0xfc; \ 00286 t>>=16L; \ 00287 LL^= *(const DES_LONG *)(des_SP+0x100+u1); \ 00288 LL^= *(const DES_LONG *)(des_SP+0x300+u2); \ 00289 u3=(int)t>>8L; \ 00290 u1=(int)t&0xfc; \ 00291 u3&=0xfc; \ 00292 LL^= *(const DES_LONG *)(des_SP+0x500+u1); \ 00293 LL^= *(const DES_LONG *)(des_SP+0x700+u3); } 00294 #endif 00295 #ifdef DES_RISC2 00296 #define D_ENCRYPT(LL,R,S) { \ 00297 unsigned int u1,u2,s1,s2; \ 00298 LOAD_DATA(R,S,u,t,E0,E1,u1); \ 00299 u2=(int)u>>8L; \ 00300 u1=(int)u&0xfc; \ 00301 u2&=0xfc; \ 00302 t=ROTATE(t,4); \ 00303 LL^= *(const DES_LONG *)(des_SP +u1); \ 00304 LL^= *(const DES_LONG *)(des_SP+0x200+u2); \ 00305 s1=(int)(u>>16L); \ 00306 s2=(int)(u>>24L); \ 00307 s1&=0xfc; \ 00308 s2&=0xfc; \ 00309 LL^= *(const DES_LONG *)(des_SP+0x400+s1); \ 00310 LL^= *(const DES_LONG *)(des_SP+0x600+s2); \ 00311 u2=(int)t>>8L; \ 00312 u1=(int)t&0xfc; \ 00313 u2&=0xfc; \ 00314 LL^= *(const DES_LONG *)(des_SP+0x100+u1); \ 00315 LL^= *(const DES_LONG *)(des_SP+0x300+u2); \ 00316 s1=(int)(t>>16L); \ 00317 s2=(int)(t>>24L); \ 00318 s1&=0xfc; \ 00319 s2&=0xfc; \ 00320 LL^= *(const DES_LONG *)(des_SP+0x500+s1); \ 00321 LL^= *(const DES_LONG *)(des_SP+0x700+s2); } 00322 #endif 00323 #else 00324 #define D_ENCRYPT(LL,R,S) { \ 00325 LOAD_DATA_tmp(R,S,u,t,E0,E1); \ 00326 t=ROTATE(t,4); \ 00327 LL^= \ 00328 *(const DES_LONG *)(des_SP +((u )&0xfc))^ \ 00329 *(const DES_LONG *)(des_SP+0x200+((u>> 8L)&0xfc))^ \ 00330 *(const DES_LONG *)(des_SP+0x400+((u>>16L)&0xfc))^ \ 00331 *(const DES_LONG *)(des_SP+0x600+((u>>24L)&0xfc))^ \ 00332 *(const DES_LONG *)(des_SP+0x100+((t )&0xfc))^ \ 00333 *(const DES_LONG *)(des_SP+0x300+((t>> 8L)&0xfc))^ \ 00334 *(const DES_LONG *)(des_SP+0x500+((t>>16L)&0xfc))^ \ 00335 *(const DES_LONG *)(des_SP+0x700+((t>>24L)&0xfc)); } 00336 #endif 00337 00338 #else /* original version */ 00339 00340 #if defined(DES_RISC1) || defined(DES_RISC2) 00341 #ifdef DES_RISC1 00342 #define D_ENCRYPT(LL,R,S) {\ 00343 unsigned int u1,u2,u3; \ 00344 LOAD_DATA(R,S,u,t,E0,E1,u1); \ 00345 u>>=2L; \ 00346 t=ROTATE(t,6); \ 00347 u2=(int)u>>8L; \ 00348 u1=(int)u&0x3f; \ 00349 u2&=0x3f; \ 00350 u>>=16L; \ 00351 LL^=DES_SPtrans[0][u1]; \ 00352 LL^=DES_SPtrans[2][u2]; \ 00353 u3=(int)u>>8L; \ 00354 u1=(int)u&0x3f; \ 00355 u3&=0x3f; \ 00356 LL^=DES_SPtrans[4][u1]; \ 00357 LL^=DES_SPtrans[6][u3]; \ 00358 u2=(int)t>>8L; \ 00359 u1=(int)t&0x3f; \ 00360 u2&=0x3f; \ 00361 t>>=16L; \ 00362 LL^=DES_SPtrans[1][u1]; \ 00363 LL^=DES_SPtrans[3][u2]; \ 00364 u3=(int)t>>8L; \ 00365 u1=(int)t&0x3f; \ 00366 u3&=0x3f; \ 00367 LL^=DES_SPtrans[5][u1]; \ 00368 LL^=DES_SPtrans[7][u3]; } 00369 #endif 00370 #ifdef DES_RISC2 00371 #define D_ENCRYPT(LL,R,S) {\ 00372 unsigned int u1,u2,s1,s2; \ 00373 LOAD_DATA(R,S,u,t,E0,E1,u1); \ 00374 u>>=2L; \ 00375 t=ROTATE(t,6); \ 00376 u2=(int)u>>8L; \ 00377 u1=(int)u&0x3f; \ 00378 u2&=0x3f; \ 00379 LL^=DES_SPtrans[0][u1]; \ 00380 LL^=DES_SPtrans[2][u2]; \ 00381 s1=(int)u>>16L; \ 00382 s2=(int)u>>24L; \ 00383 s1&=0x3f; \ 00384 s2&=0x3f; \ 00385 LL^=DES_SPtrans[4][s1]; \ 00386 LL^=DES_SPtrans[6][s2]; \ 00387 u2=(int)t>>8L; \ 00388 u1=(int)t&0x3f; \ 00389 u2&=0x3f; \ 00390 LL^=DES_SPtrans[1][u1]; \ 00391 LL^=DES_SPtrans[3][u2]; \ 00392 s1=(int)t>>16; \ 00393 s2=(int)t>>24L; \ 00394 s1&=0x3f; \ 00395 s2&=0x3f; \ 00396 LL^=DES_SPtrans[5][s1]; \ 00397 LL^=DES_SPtrans[7][s2]; } 00398 #endif 00399 00400 #else 00401 00402 #define D_ENCRYPT(LL,R,S) {\ 00403 LOAD_DATA_tmp(R,S,u,t,E0,E1); \ 00404 t=ROTATE(t,4); \ 00405 LL^=\ 00406 DES_SPtrans[0][(u>> 2L)&0x3f]^ \ 00407 DES_SPtrans[2][(u>>10L)&0x3f]^ \ 00408 DES_SPtrans[4][(u>>18L)&0x3f]^ \ 00409 DES_SPtrans[6][(u>>26L)&0x3f]^ \ 00410 DES_SPtrans[1][(t>> 2L)&0x3f]^ \ 00411 DES_SPtrans[3][(t>>10L)&0x3f]^ \ 00412 DES_SPtrans[5][(t>>18L)&0x3f]^ \ 00413 DES_SPtrans[7][(t>>26L)&0x3f]; } 00414 #endif 00415 #endif 00416 00417 /* IP and FP 00418 * The problem is more of a geometric problem that random bit fiddling. 00419 0 1 2 3 4 5 6 7 62 54 46 38 30 22 14 6 00420 8 9 10 11 12 13 14 15 60 52 44 36 28 20 12 4 00421 16 17 18 19 20 21 22 23 58 50 42 34 26 18 10 2 00422 24 25 26 27 28 29 30 31 to 56 48 40 32 24 16 8 0 00423 00424 32 33 34 35 36 37 38 39 63 55 47 39 31 23 15 7 00425 40 41 42 43 44 45 46 47 61 53 45 37 29 21 13 5 00426 48 49 50 51 52 53 54 55 59 51 43 35 27 19 11 3 00427 56 57 58 59 60 61 62 63 57 49 41 33 25 17 9 1 00428 00429 The output has been subject to swaps of the form 00430 0 1 -> 3 1 but the odd and even bits have been put into 00431 2 3 2 0 00432 different words. The main trick is to remember that 00433 t=((l>>size)^r)&(mask); 00434 r^=t; 00435 l^=(t<<size); 00436 can be used to swap and move bits between words. 00437 00438 So l = 0 1 2 3 r = 16 17 18 19 00439 4 5 6 7 20 21 22 23 00440 8 9 10 11 24 25 26 27 00441 12 13 14 15 28 29 30 31 00442 becomes (for size == 2 and mask == 0x3333) 00443 t = 2^16 3^17 -- -- l = 0 1 16 17 r = 2 3 18 19 00444 6^20 7^21 -- -- 4 5 20 21 6 7 22 23 00445 10^24 11^25 -- -- 8 9 24 25 10 11 24 25 00446 14^28 15^29 -- -- 12 13 28 29 14 15 28 29 00447 00448 Thanks for hints from Richard Outerbridge - he told me IP&FP 00449 could be done in 15 xor, 10 shifts and 5 ands. 00450 When I finally started to think of the problem in 2D 00451 I first got ~42 operations without xors. When I remembered 00452 how to use xors :-) I got it to its final state. 00453 */ 00454 #define PERM_OP(a,b,t,n,m) ((t)=((((a)>>(n))^(b))&(m)),\ 00455 (b)^=(t),\ 00456 (a)^=((t)<<(n))) 00457 00458 #define IP(l,r) \ 00459 { \ 00460 register DES_LONG tt; \ 00461 PERM_OP(r,l,tt, 4,0x0f0f0f0fL); \ 00462 PERM_OP(l,r,tt,16,0x0000ffffL); \ 00463 PERM_OP(r,l,tt, 2,0x33333333L); \ 00464 PERM_OP(l,r,tt, 8,0x00ff00ffL); \ 00465 PERM_OP(r,l,tt, 1,0x55555555L); \ 00466 } 00467 00468 #define FP(l,r) \ 00469 { \ 00470 register DES_LONG tt; \ 00471 PERM_OP(l,r,tt, 1,0x55555555L); \ 00472 PERM_OP(r,l,tt, 8,0x00ff00ffL); \ 00473 PERM_OP(l,r,tt, 2,0x33333333L); \ 00474 PERM_OP(r,l,tt,16,0x0000ffffL); \ 00475 PERM_OP(l,r,tt, 4,0x0f0f0f0fL); \ 00476 } 00477 00478 extern const DES_LONG DES_SPtrans[8][64]; 00479 00480 #endif 00481 00482 #endif /* POK_NEEDS_ ... */