POK
/home/jaouen/pok_official/pok/trunk/libpok/protocols/des/spr.h
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/spr.h */
00018 /* Copyright (C) 1995-1998 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 
00076 #ifdef POK_NEEDS_PROTOCOLS_DES
00077 
00078 OPENSSL_GLOBAL const DES_LONG DES_SPtrans[8][64]={
00079 {
00080 /* nibble 0 */
00081 0x02080800L, 0x00080000L, 0x02000002L, 0x02080802L,
00082 0x02000000L, 0x00080802L, 0x00080002L, 0x02000002L,
00083 0x00080802L, 0x02080800L, 0x02080000L, 0x00000802L,
00084 0x02000802L, 0x02000000L, 0x00000000L, 0x00080002L,
00085 0x00080000L, 0x00000002L, 0x02000800L, 0x00080800L,
00086 0x02080802L, 0x02080000L, 0x00000802L, 0x02000800L,
00087 0x00000002L, 0x00000800L, 0x00080800L, 0x02080002L,
00088 0x00000800L, 0x02000802L, 0x02080002L, 0x00000000L,
00089 0x00000000L, 0x02080802L, 0x02000800L, 0x00080002L,
00090 0x02080800L, 0x00080000L, 0x00000802L, 0x02000800L,
00091 0x02080002L, 0x00000800L, 0x00080800L, 0x02000002L,
00092 0x00080802L, 0x00000002L, 0x02000002L, 0x02080000L,
00093 0x02080802L, 0x00080800L, 0x02080000L, 0x02000802L,
00094 0x02000000L, 0x00000802L, 0x00080002L, 0x00000000L,
00095 0x00080000L, 0x02000000L, 0x02000802L, 0x02080800L,
00096 0x00000002L, 0x02080002L, 0x00000800L, 0x00080802L,
00097 },{
00098 /* nibble 1 */
00099 0x40108010L, 0x00000000L, 0x00108000L, 0x40100000L,
00100 0x40000010L, 0x00008010L, 0x40008000L, 0x00108000L,
00101 0x00008000L, 0x40100010L, 0x00000010L, 0x40008000L,
00102 0x00100010L, 0x40108000L, 0x40100000L, 0x00000010L,
00103 0x00100000L, 0x40008010L, 0x40100010L, 0x00008000L,
00104 0x00108010L, 0x40000000L, 0x00000000L, 0x00100010L,
00105 0x40008010L, 0x00108010L, 0x40108000L, 0x40000010L,
00106 0x40000000L, 0x00100000L, 0x00008010L, 0x40108010L,
00107 0x00100010L, 0x40108000L, 0x40008000L, 0x00108010L,
00108 0x40108010L, 0x00100010L, 0x40000010L, 0x00000000L,
00109 0x40000000L, 0x00008010L, 0x00100000L, 0x40100010L,
00110 0x00008000L, 0x40000000L, 0x00108010L, 0x40008010L,
00111 0x40108000L, 0x00008000L, 0x00000000L, 0x40000010L,
00112 0x00000010L, 0x40108010L, 0x00108000L, 0x40100000L,
00113 0x40100010L, 0x00100000L, 0x00008010L, 0x40008000L,
00114 0x40008010L, 0x00000010L, 0x40100000L, 0x00108000L,
00115 },{
00116 /* nibble 2 */
00117 0x04000001L, 0x04040100L, 0x00000100L, 0x04000101L,
00118 0x00040001L, 0x04000000L, 0x04000101L, 0x00040100L,
00119 0x04000100L, 0x00040000L, 0x04040000L, 0x00000001L,
00120 0x04040101L, 0x00000101L, 0x00000001L, 0x04040001L,
00121 0x00000000L, 0x00040001L, 0x04040100L, 0x00000100L,
00122 0x00000101L, 0x04040101L, 0x00040000L, 0x04000001L,
00123 0x04040001L, 0x04000100L, 0x00040101L, 0x04040000L,
00124 0x00040100L, 0x00000000L, 0x04000000L, 0x00040101L,
00125 0x04040100L, 0x00000100L, 0x00000001L, 0x00040000L,
00126 0x00000101L, 0x00040001L, 0x04040000L, 0x04000101L,
00127 0x00000000L, 0x04040100L, 0x00040100L, 0x04040001L,
00128 0x00040001L, 0x04000000L, 0x04040101L, 0x00000001L,
00129 0x00040101L, 0x04000001L, 0x04000000L, 0x04040101L,
00130 0x00040000L, 0x04000100L, 0x04000101L, 0x00040100L,
00131 0x04000100L, 0x00000000L, 0x04040001L, 0x00000101L,
00132 0x04000001L, 0x00040101L, 0x00000100L, 0x04040000L,
00133 },{
00134 /* nibble 3 */
00135 0x00401008L, 0x10001000L, 0x00000008L, 0x10401008L,
00136 0x00000000L, 0x10400000L, 0x10001008L, 0x00400008L,
00137 0x10401000L, 0x10000008L, 0x10000000L, 0x00001008L,
00138 0x10000008L, 0x00401008L, 0x00400000L, 0x10000000L,
00139 0x10400008L, 0x00401000L, 0x00001000L, 0x00000008L,
00140 0x00401000L, 0x10001008L, 0x10400000L, 0x00001000L,
00141 0x00001008L, 0x00000000L, 0x00400008L, 0x10401000L,
00142 0x10001000L, 0x10400008L, 0x10401008L, 0x00400000L,
00143 0x10400008L, 0x00001008L, 0x00400000L, 0x10000008L,
00144 0x00401000L, 0x10001000L, 0x00000008L, 0x10400000L,
00145 0x10001008L, 0x00000000L, 0x00001000L, 0x00400008L,
00146 0x00000000L, 0x10400008L, 0x10401000L, 0x00001000L,
00147 0x10000000L, 0x10401008L, 0x00401008L, 0x00400000L,
00148 0x10401008L, 0x00000008L, 0x10001000L, 0x00401008L,
00149 0x00400008L, 0x00401000L, 0x10400000L, 0x10001008L,
00150 0x00001008L, 0x10000000L, 0x10000008L, 0x10401000L,
00151 },{
00152 /* nibble 4 */
00153 0x08000000L, 0x00010000L, 0x00000400L, 0x08010420L,
00154 0x08010020L, 0x08000400L, 0x00010420L, 0x08010000L,
00155 0x00010000L, 0x00000020L, 0x08000020L, 0x00010400L,
00156 0x08000420L, 0x08010020L, 0x08010400L, 0x00000000L,
00157 0x00010400L, 0x08000000L, 0x00010020L, 0x00000420L,
00158 0x08000400L, 0x00010420L, 0x00000000L, 0x08000020L,
00159 0x00000020L, 0x08000420L, 0x08010420L, 0x00010020L,
00160 0x08010000L, 0x00000400L, 0x00000420L, 0x08010400L,
00161 0x08010400L, 0x08000420L, 0x00010020L, 0x08010000L,
00162 0x00010000L, 0x00000020L, 0x08000020L, 0x08000400L,
00163 0x08000000L, 0x00010400L, 0x08010420L, 0x00000000L,
00164 0x00010420L, 0x08000000L, 0x00000400L, 0x00010020L,
00165 0x08000420L, 0x00000400L, 0x00000000L, 0x08010420L,
00166 0x08010020L, 0x08010400L, 0x00000420L, 0x00010000L,
00167 0x00010400L, 0x08010020L, 0x08000400L, 0x00000420L,
00168 0x00000020L, 0x00010420L, 0x08010000L, 0x08000020L,
00169 },{
00170 /* nibble 5 */
00171 0x80000040L, 0x00200040L, 0x00000000L, 0x80202000L,
00172 0x00200040L, 0x00002000L, 0x80002040L, 0x00200000L,
00173 0x00002040L, 0x80202040L, 0x00202000L, 0x80000000L,
00174 0x80002000L, 0x80000040L, 0x80200000L, 0x00202040L,
00175 0x00200000L, 0x80002040L, 0x80200040L, 0x00000000L,
00176 0x00002000L, 0x00000040L, 0x80202000L, 0x80200040L,
00177 0x80202040L, 0x80200000L, 0x80000000L, 0x00002040L,
00178 0x00000040L, 0x00202000L, 0x00202040L, 0x80002000L,
00179 0x00002040L, 0x80000000L, 0x80002000L, 0x00202040L,
00180 0x80202000L, 0x00200040L, 0x00000000L, 0x80002000L,
00181 0x80000000L, 0x00002000L, 0x80200040L, 0x00200000L,
00182 0x00200040L, 0x80202040L, 0x00202000L, 0x00000040L,
00183 0x80202040L, 0x00202000L, 0x00200000L, 0x80002040L,
00184 0x80000040L, 0x80200000L, 0x00202040L, 0x00000000L,
00185 0x00002000L, 0x80000040L, 0x80002040L, 0x80202000L,
00186 0x80200000L, 0x00002040L, 0x00000040L, 0x80200040L,
00187 },{
00188 /* nibble 6 */
00189 0x00004000L, 0x00000200L, 0x01000200L, 0x01000004L,
00190 0x01004204L, 0x00004004L, 0x00004200L, 0x00000000L,
00191 0x01000000L, 0x01000204L, 0x00000204L, 0x01004000L,
00192 0x00000004L, 0x01004200L, 0x01004000L, 0x00000204L,
00193 0x01000204L, 0x00004000L, 0x00004004L, 0x01004204L,
00194 0x00000000L, 0x01000200L, 0x01000004L, 0x00004200L,
00195 0x01004004L, 0x00004204L, 0x01004200L, 0x00000004L,
00196 0x00004204L, 0x01004004L, 0x00000200L, 0x01000000L,
00197 0x00004204L, 0x01004000L, 0x01004004L, 0x00000204L,
00198 0x00004000L, 0x00000200L, 0x01000000L, 0x01004004L,
00199 0x01000204L, 0x00004204L, 0x00004200L, 0x00000000L,
00200 0x00000200L, 0x01000004L, 0x00000004L, 0x01000200L,
00201 0x00000000L, 0x01000204L, 0x01000200L, 0x00004200L,
00202 0x00000204L, 0x00004000L, 0x01004204L, 0x01000000L,
00203 0x01004200L, 0x00000004L, 0x00004004L, 0x01004204L,
00204 0x01000004L, 0x01004200L, 0x01004000L, 0x00004004L,
00205 },{
00206 /* nibble 7 */
00207 0x20800080L, 0x20820000L, 0x00020080L, 0x00000000L,
00208 0x20020000L, 0x00800080L, 0x20800000L, 0x20820080L,
00209 0x00000080L, 0x20000000L, 0x00820000L, 0x00020080L,
00210 0x00820080L, 0x20020080L, 0x20000080L, 0x20800000L,
00211 0x00020000L, 0x00820080L, 0x00800080L, 0x20020000L,
00212 0x20820080L, 0x20000080L, 0x00000000L, 0x00820000L,
00213 0x20000000L, 0x00800000L, 0x20020080L, 0x20800080L,
00214 0x00800000L, 0x00020000L, 0x20820000L, 0x00000080L,
00215 0x00800000L, 0x00020000L, 0x20000080L, 0x20820080L,
00216 0x00020080L, 0x20000000L, 0x00000000L, 0x00820000L,
00217 0x20800080L, 0x20020080L, 0x20020000L, 0x00800080L,
00218 0x20820000L, 0x00000080L, 0x00800080L, 0x20020000L,
00219 0x20820080L, 0x00800000L, 0x20800000L, 0x20000080L,
00220 0x00820000L, 0x00020080L, 0x20020080L, 0x20800000L,
00221 0x00000080L, 0x20820000L, 0x00820080L, 0x00000000L,
00222 0x20000000L, 0x20800080L, 0x00020000L, 0x00820080L,
00223 }};
00224 
00225 #endif /* POK_NEEDS_ ...*/