155714Skris/* crypto/des/spr.h */ 255714Skris/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 355714Skris * All rights reserved. 455714Skris * 555714Skris * This package is an SSL implementation written 655714Skris * by Eric Young (eay@cryptsoft.com). 755714Skris * The implementation was written so as to conform with Netscapes SSL. 8296465Sdelphij * 955714Skris * This library is free for commercial and non-commercial use as long as 1055714Skris * the following conditions are aheared to. The following conditions 1155714Skris * apply to all code found in this distribution, be it the RC4, RSA, 1255714Skris * lhash, DES, etc., code; not just the SSL code. The SSL documentation 1355714Skris * included with this distribution is covered by the same copyright terms 1455714Skris * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15296465Sdelphij * 1655714Skris * Copyright remains Eric Young's, and as such any Copyright notices in 1755714Skris * the code are not to be removed. 1855714Skris * If this package is used in a product, Eric Young should be given attribution 1955714Skris * as the author of the parts of the library used. 2055714Skris * This can be in the form of a textual message at program startup or 2155714Skris * in documentation (online or textual) provided with the package. 22296465Sdelphij * 2355714Skris * Redistribution and use in source and binary forms, with or without 2455714Skris * modification, are permitted provided that the following conditions 2555714Skris * are met: 2655714Skris * 1. Redistributions of source code must retain the copyright 2755714Skris * notice, this list of conditions and the following disclaimer. 2855714Skris * 2. Redistributions in binary form must reproduce the above copyright 2955714Skris * notice, this list of conditions and the following disclaimer in the 3055714Skris * documentation and/or other materials provided with the distribution. 3155714Skris * 3. All advertising materials mentioning features or use of this software 3255714Skris * must display the following acknowledgement: 3355714Skris * "This product includes cryptographic software written by 3455714Skris * Eric Young (eay@cryptsoft.com)" 3555714Skris * The word 'cryptographic' can be left out if the rouines from the library 3655714Skris * being used are not cryptographic related :-). 37296465Sdelphij * 4. If you include any Windows specific code (or a derivative thereof) from 3855714Skris * the apps directory (application code) you must include an acknowledgement: 3955714Skris * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40296465Sdelphij * 4155714Skris * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 4255714Skris * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 4355714Skris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 4455714Skris * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 4555714Skris * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 4655714Skris * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 4755714Skris * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 4855714Skris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 4955714Skris * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 5055714Skris * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 5155714Skris * SUCH DAMAGE. 52296465Sdelphij * 5355714Skris * The licence and distribution terms for any publically available version or 5455714Skris * derivative of this code cannot be changed. i.e. this code cannot simply be 5555714Skris * copied and put under another distribution licence 5655714Skris * [including the GNU Public Licence.] 5755714Skris */ 5855714Skris 59296465SdelphijOPENSSL_GLOBAL const DES_LONG DES_SPtrans[8][64] = { 60296465Sdelphij { 61296465Sdelphij /* nibble 0 */ 62296465Sdelphij 0x02080800L, 0x00080000L, 0x02000002L, 0x02080802L, 63296465Sdelphij 0x02000000L, 0x00080802L, 0x00080002L, 0x02000002L, 64296465Sdelphij 0x00080802L, 0x02080800L, 0x02080000L, 0x00000802L, 65296465Sdelphij 0x02000802L, 0x02000000L, 0x00000000L, 0x00080002L, 66296465Sdelphij 0x00080000L, 0x00000002L, 0x02000800L, 0x00080800L, 67296465Sdelphij 0x02080802L, 0x02080000L, 0x00000802L, 0x02000800L, 68296465Sdelphij 0x00000002L, 0x00000800L, 0x00080800L, 0x02080002L, 69296465Sdelphij 0x00000800L, 0x02000802L, 0x02080002L, 0x00000000L, 70296465Sdelphij 0x00000000L, 0x02080802L, 0x02000800L, 0x00080002L, 71296465Sdelphij 0x02080800L, 0x00080000L, 0x00000802L, 0x02000800L, 72296465Sdelphij 0x02080002L, 0x00000800L, 0x00080800L, 0x02000002L, 73296465Sdelphij 0x00080802L, 0x00000002L, 0x02000002L, 0x02080000L, 74296465Sdelphij 0x02080802L, 0x00080800L, 0x02080000L, 0x02000802L, 75296465Sdelphij 0x02000000L, 0x00000802L, 0x00080002L, 0x00000000L, 76296465Sdelphij 0x00080000L, 0x02000000L, 0x02000802L, 0x02080800L, 77296465Sdelphij 0x00000002L, 0x02080002L, 0x00000800L, 0x00080802L, 78296465Sdelphij }, 79296465Sdelphij { 80296465Sdelphij /* nibble 1 */ 81296465Sdelphij 0x40108010L, 0x00000000L, 0x00108000L, 0x40100000L, 82296465Sdelphij 0x40000010L, 0x00008010L, 0x40008000L, 0x00108000L, 83296465Sdelphij 0x00008000L, 0x40100010L, 0x00000010L, 0x40008000L, 84296465Sdelphij 0x00100010L, 0x40108000L, 0x40100000L, 0x00000010L, 85296465Sdelphij 0x00100000L, 0x40008010L, 0x40100010L, 0x00008000L, 86296465Sdelphij 0x00108010L, 0x40000000L, 0x00000000L, 0x00100010L, 87296465Sdelphij 0x40008010L, 0x00108010L, 0x40108000L, 0x40000010L, 88296465Sdelphij 0x40000000L, 0x00100000L, 0x00008010L, 0x40108010L, 89296465Sdelphij 0x00100010L, 0x40108000L, 0x40008000L, 0x00108010L, 90296465Sdelphij 0x40108010L, 0x00100010L, 0x40000010L, 0x00000000L, 91296465Sdelphij 0x40000000L, 0x00008010L, 0x00100000L, 0x40100010L, 92296465Sdelphij 0x00008000L, 0x40000000L, 0x00108010L, 0x40008010L, 93296465Sdelphij 0x40108000L, 0x00008000L, 0x00000000L, 0x40000010L, 94296465Sdelphij 0x00000010L, 0x40108010L, 0x00108000L, 0x40100000L, 95296465Sdelphij 0x40100010L, 0x00100000L, 0x00008010L, 0x40008000L, 96296465Sdelphij 0x40008010L, 0x00000010L, 0x40100000L, 0x00108000L, 97296465Sdelphij }, 98296465Sdelphij { 99296465Sdelphij /* nibble 2 */ 100296465Sdelphij 0x04000001L, 0x04040100L, 0x00000100L, 0x04000101L, 101296465Sdelphij 0x00040001L, 0x04000000L, 0x04000101L, 0x00040100L, 102296465Sdelphij 0x04000100L, 0x00040000L, 0x04040000L, 0x00000001L, 103296465Sdelphij 0x04040101L, 0x00000101L, 0x00000001L, 0x04040001L, 104296465Sdelphij 0x00000000L, 0x00040001L, 0x04040100L, 0x00000100L, 105296465Sdelphij 0x00000101L, 0x04040101L, 0x00040000L, 0x04000001L, 106296465Sdelphij 0x04040001L, 0x04000100L, 0x00040101L, 0x04040000L, 107296465Sdelphij 0x00040100L, 0x00000000L, 0x04000000L, 0x00040101L, 108296465Sdelphij 0x04040100L, 0x00000100L, 0x00000001L, 0x00040000L, 109296465Sdelphij 0x00000101L, 0x00040001L, 0x04040000L, 0x04000101L, 110296465Sdelphij 0x00000000L, 0x04040100L, 0x00040100L, 0x04040001L, 111296465Sdelphij 0x00040001L, 0x04000000L, 0x04040101L, 0x00000001L, 112296465Sdelphij 0x00040101L, 0x04000001L, 0x04000000L, 0x04040101L, 113296465Sdelphij 0x00040000L, 0x04000100L, 0x04000101L, 0x00040100L, 114296465Sdelphij 0x04000100L, 0x00000000L, 0x04040001L, 0x00000101L, 115296465Sdelphij 0x04000001L, 0x00040101L, 0x00000100L, 0x04040000L, 116296465Sdelphij }, 117296465Sdelphij { 118296465Sdelphij /* nibble 3 */ 119296465Sdelphij 0x00401008L, 0x10001000L, 0x00000008L, 0x10401008L, 120296465Sdelphij 0x00000000L, 0x10400000L, 0x10001008L, 0x00400008L, 121296465Sdelphij 0x10401000L, 0x10000008L, 0x10000000L, 0x00001008L, 122296465Sdelphij 0x10000008L, 0x00401008L, 0x00400000L, 0x10000000L, 123296465Sdelphij 0x10400008L, 0x00401000L, 0x00001000L, 0x00000008L, 124296465Sdelphij 0x00401000L, 0x10001008L, 0x10400000L, 0x00001000L, 125296465Sdelphij 0x00001008L, 0x00000000L, 0x00400008L, 0x10401000L, 126296465Sdelphij 0x10001000L, 0x10400008L, 0x10401008L, 0x00400000L, 127296465Sdelphij 0x10400008L, 0x00001008L, 0x00400000L, 0x10000008L, 128296465Sdelphij 0x00401000L, 0x10001000L, 0x00000008L, 0x10400000L, 129296465Sdelphij 0x10001008L, 0x00000000L, 0x00001000L, 0x00400008L, 130296465Sdelphij 0x00000000L, 0x10400008L, 0x10401000L, 0x00001000L, 131296465Sdelphij 0x10000000L, 0x10401008L, 0x00401008L, 0x00400000L, 132296465Sdelphij 0x10401008L, 0x00000008L, 0x10001000L, 0x00401008L, 133296465Sdelphij 0x00400008L, 0x00401000L, 0x10400000L, 0x10001008L, 134296465Sdelphij 0x00001008L, 0x10000000L, 0x10000008L, 0x10401000L, 135296465Sdelphij }, 136296465Sdelphij { 137296465Sdelphij /* nibble 4 */ 138296465Sdelphij 0x08000000L, 0x00010000L, 0x00000400L, 0x08010420L, 139296465Sdelphij 0x08010020L, 0x08000400L, 0x00010420L, 0x08010000L, 140296465Sdelphij 0x00010000L, 0x00000020L, 0x08000020L, 0x00010400L, 141296465Sdelphij 0x08000420L, 0x08010020L, 0x08010400L, 0x00000000L, 142296465Sdelphij 0x00010400L, 0x08000000L, 0x00010020L, 0x00000420L, 143296465Sdelphij 0x08000400L, 0x00010420L, 0x00000000L, 0x08000020L, 144296465Sdelphij 0x00000020L, 0x08000420L, 0x08010420L, 0x00010020L, 145296465Sdelphij 0x08010000L, 0x00000400L, 0x00000420L, 0x08010400L, 146296465Sdelphij 0x08010400L, 0x08000420L, 0x00010020L, 0x08010000L, 147296465Sdelphij 0x00010000L, 0x00000020L, 0x08000020L, 0x08000400L, 148296465Sdelphij 0x08000000L, 0x00010400L, 0x08010420L, 0x00000000L, 149296465Sdelphij 0x00010420L, 0x08000000L, 0x00000400L, 0x00010020L, 150296465Sdelphij 0x08000420L, 0x00000400L, 0x00000000L, 0x08010420L, 151296465Sdelphij 0x08010020L, 0x08010400L, 0x00000420L, 0x00010000L, 152296465Sdelphij 0x00010400L, 0x08010020L, 0x08000400L, 0x00000420L, 153296465Sdelphij 0x00000020L, 0x00010420L, 0x08010000L, 0x08000020L, 154296465Sdelphij }, 155296465Sdelphij { 156296465Sdelphij /* nibble 5 */ 157296465Sdelphij 0x80000040L, 0x00200040L, 0x00000000L, 0x80202000L, 158296465Sdelphij 0x00200040L, 0x00002000L, 0x80002040L, 0x00200000L, 159296465Sdelphij 0x00002040L, 0x80202040L, 0x00202000L, 0x80000000L, 160296465Sdelphij 0x80002000L, 0x80000040L, 0x80200000L, 0x00202040L, 161296465Sdelphij 0x00200000L, 0x80002040L, 0x80200040L, 0x00000000L, 162296465Sdelphij 0x00002000L, 0x00000040L, 0x80202000L, 0x80200040L, 163296465Sdelphij 0x80202040L, 0x80200000L, 0x80000000L, 0x00002040L, 164296465Sdelphij 0x00000040L, 0x00202000L, 0x00202040L, 0x80002000L, 165296465Sdelphij 0x00002040L, 0x80000000L, 0x80002000L, 0x00202040L, 166296465Sdelphij 0x80202000L, 0x00200040L, 0x00000000L, 0x80002000L, 167296465Sdelphij 0x80000000L, 0x00002000L, 0x80200040L, 0x00200000L, 168296465Sdelphij 0x00200040L, 0x80202040L, 0x00202000L, 0x00000040L, 169296465Sdelphij 0x80202040L, 0x00202000L, 0x00200000L, 0x80002040L, 170296465Sdelphij 0x80000040L, 0x80200000L, 0x00202040L, 0x00000000L, 171296465Sdelphij 0x00002000L, 0x80000040L, 0x80002040L, 0x80202000L, 172296465Sdelphij 0x80200000L, 0x00002040L, 0x00000040L, 0x80200040L, 173296465Sdelphij }, 174296465Sdelphij { 175296465Sdelphij /* nibble 6 */ 176296465Sdelphij 0x00004000L, 0x00000200L, 0x01000200L, 0x01000004L, 177296465Sdelphij 0x01004204L, 0x00004004L, 0x00004200L, 0x00000000L, 178296465Sdelphij 0x01000000L, 0x01000204L, 0x00000204L, 0x01004000L, 179296465Sdelphij 0x00000004L, 0x01004200L, 0x01004000L, 0x00000204L, 180296465Sdelphij 0x01000204L, 0x00004000L, 0x00004004L, 0x01004204L, 181296465Sdelphij 0x00000000L, 0x01000200L, 0x01000004L, 0x00004200L, 182296465Sdelphij 0x01004004L, 0x00004204L, 0x01004200L, 0x00000004L, 183296465Sdelphij 0x00004204L, 0x01004004L, 0x00000200L, 0x01000000L, 184296465Sdelphij 0x00004204L, 0x01004000L, 0x01004004L, 0x00000204L, 185296465Sdelphij 0x00004000L, 0x00000200L, 0x01000000L, 0x01004004L, 186296465Sdelphij 0x01000204L, 0x00004204L, 0x00004200L, 0x00000000L, 187296465Sdelphij 0x00000200L, 0x01000004L, 0x00000004L, 0x01000200L, 188296465Sdelphij 0x00000000L, 0x01000204L, 0x01000200L, 0x00004200L, 189296465Sdelphij 0x00000204L, 0x00004000L, 0x01004204L, 0x01000000L, 190296465Sdelphij 0x01004200L, 0x00000004L, 0x00004004L, 0x01004204L, 191296465Sdelphij 0x01000004L, 0x01004200L, 0x01004000L, 0x00004004L, 192296465Sdelphij }, 193296465Sdelphij { 194296465Sdelphij /* nibble 7 */ 195296465Sdelphij 0x20800080L, 0x20820000L, 0x00020080L, 0x00000000L, 196296465Sdelphij 0x20020000L, 0x00800080L, 0x20800000L, 0x20820080L, 197296465Sdelphij 0x00000080L, 0x20000000L, 0x00820000L, 0x00020080L, 198296465Sdelphij 0x00820080L, 0x20020080L, 0x20000080L, 0x20800000L, 199296465Sdelphij 0x00020000L, 0x00820080L, 0x00800080L, 0x20020000L, 200296465Sdelphij 0x20820080L, 0x20000080L, 0x00000000L, 0x00820000L, 201296465Sdelphij 0x20000000L, 0x00800000L, 0x20020080L, 0x20800080L, 202296465Sdelphij 0x00800000L, 0x00020000L, 0x20820000L, 0x00000080L, 203296465Sdelphij 0x00800000L, 0x00020000L, 0x20000080L, 0x20820080L, 204296465Sdelphij 0x00020080L, 0x20000000L, 0x00000000L, 0x00820000L, 205296465Sdelphij 0x20800080L, 0x20020080L, 0x20020000L, 0x00800080L, 206296465Sdelphij 0x20820000L, 0x00000080L, 0x00800080L, 0x20020000L, 207296465Sdelphij 0x20820080L, 0x00800000L, 0x20800000L, 0x20000080L, 208296465Sdelphij 0x00820000L, 0x00020080L, 0x20020080L, 0x20800000L, 209296465Sdelphij 0x00000080L, 0x20820000L, 0x00820080L, 0x00000000L, 210296465Sdelphij 0x20000000L, 0x20800080L, 0x00020000L, 0x00820080L, 211296465Sdelphij } 212296465Sdelphij}; 213