spr.h revision 62587
1/* $FreeBSD: head/sys/crypto/des/spr.h 62587 2000-07-04 16:35:15Z itojun $ */ 2/* $KAME: spr.h,v 1.3 2000/03/27 04:36:35 sumikawa Exp $ */ 3 4/* crypto/des/spr.h */ 5/* Copyright (C) 1995-1996 Eric Young (eay@mincom.oz.au) 6 * All rights reserved. 7 * 8 * This file is part of an SSL implementation written 9 * by Eric Young (eay@mincom.oz.au). 10 * The implementation was written so as to conform with Netscapes SSL 11 * specification. This library and applications are 12 * FREE FOR COMMERCIAL AND NON-COMMERCIAL USE 13 * as long as the following conditions are aheared to. 14 * 15 * Copyright remains Eric Young's, and as such any Copyright notices in 16 * the code are not to be removed. If this code is used in a product, 17 * Eric Young should be given attribution as the author of the parts used. 18 * This can be in the form of a textual message at program startup or 19 * in documentation (online or textual) provided with the package. 20 * 21 * Redistribution and use in source and binary forms, with or without 22 * modification, are permitted provided that the following conditions 23 * are met: 24 * 1. Redistributions of source code must retain the copyright 25 * notice, this list of conditions and the following disclaimer. 26 * 2. Redistributions in binary form must reproduce the above copyright 27 * notice, this list of conditions and the following disclaimer in the 28 * documentation and/or other materials provided with the distribution. 29 * 3. All advertising materials mentioning features or use of this software 30 * must display the following acknowledgement: 31 * This product includes software developed by Eric Young (eay@mincom.oz.au) 32 * 33 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 34 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 35 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 36 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 37 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 43 * SUCH DAMAGE. 44 * 45 * The licence and distribution terms for any publically available version or 46 * derivative of this code cannot be changed. i.e. this code cannot simply be 47 * copied and put under another distribution licence 48 * [including the GNU Public Licence.] 49 */ 50 51static const DES_LONG des_SPtrans[8][64]={ 52{ 53/* nibble 0 */ 540x00820200L, 0x00020000L, 0x80800000L, 0x80820200L, 550x00800000L, 0x80020200L, 0x80020000L, 0x80800000L, 560x80020200L, 0x00820200L, 0x00820000L, 0x80000200L, 570x80800200L, 0x00800000L, 0x00000000L, 0x80020000L, 580x00020000L, 0x80000000L, 0x00800200L, 0x00020200L, 590x80820200L, 0x00820000L, 0x80000200L, 0x00800200L, 600x80000000L, 0x00000200L, 0x00020200L, 0x80820000L, 610x00000200L, 0x80800200L, 0x80820000L, 0x00000000L, 620x00000000L, 0x80820200L, 0x00800200L, 0x80020000L, 630x00820200L, 0x00020000L, 0x80000200L, 0x00800200L, 640x80820000L, 0x00000200L, 0x00020200L, 0x80800000L, 650x80020200L, 0x80000000L, 0x80800000L, 0x00820000L, 660x80820200L, 0x00020200L, 0x00820000L, 0x80800200L, 670x00800000L, 0x80000200L, 0x80020000L, 0x00000000L, 680x00020000L, 0x00800000L, 0x80800200L, 0x00820200L, 690x80000000L, 0x80820000L, 0x00000200L, 0x80020200L, 70},{ 71/* nibble 1 */ 720x10042004L, 0x00000000L, 0x00042000L, 0x10040000L, 730x10000004L, 0x00002004L, 0x10002000L, 0x00042000L, 740x00002000L, 0x10040004L, 0x00000004L, 0x10002000L, 750x00040004L, 0x10042000L, 0x10040000L, 0x00000004L, 760x00040000L, 0x10002004L, 0x10040004L, 0x00002000L, 770x00042004L, 0x10000000L, 0x00000000L, 0x00040004L, 780x10002004L, 0x00042004L, 0x10042000L, 0x10000004L, 790x10000000L, 0x00040000L, 0x00002004L, 0x10042004L, 800x00040004L, 0x10042000L, 0x10002000L, 0x00042004L, 810x10042004L, 0x00040004L, 0x10000004L, 0x00000000L, 820x10000000L, 0x00002004L, 0x00040000L, 0x10040004L, 830x00002000L, 0x10000000L, 0x00042004L, 0x10002004L, 840x10042000L, 0x00002000L, 0x00000000L, 0x10000004L, 850x00000004L, 0x10042004L, 0x00042000L, 0x10040000L, 860x10040004L, 0x00040000L, 0x00002004L, 0x10002000L, 870x10002004L, 0x00000004L, 0x10040000L, 0x00042000L, 88},{ 89/* nibble 2 */ 900x41000000L, 0x01010040L, 0x00000040L, 0x41000040L, 910x40010000L, 0x01000000L, 0x41000040L, 0x00010040L, 920x01000040L, 0x00010000L, 0x01010000L, 0x40000000L, 930x41010040L, 0x40000040L, 0x40000000L, 0x41010000L, 940x00000000L, 0x40010000L, 0x01010040L, 0x00000040L, 950x40000040L, 0x41010040L, 0x00010000L, 0x41000000L, 960x41010000L, 0x01000040L, 0x40010040L, 0x01010000L, 970x00010040L, 0x00000000L, 0x01000000L, 0x40010040L, 980x01010040L, 0x00000040L, 0x40000000L, 0x00010000L, 990x40000040L, 0x40010000L, 0x01010000L, 0x41000040L, 1000x00000000L, 0x01010040L, 0x00010040L, 0x41010000L, 1010x40010000L, 0x01000000L, 0x41010040L, 0x40000000L, 1020x40010040L, 0x41000000L, 0x01000000L, 0x41010040L, 1030x00010000L, 0x01000040L, 0x41000040L, 0x00010040L, 1040x01000040L, 0x00000000L, 0x41010000L, 0x40000040L, 1050x41000000L, 0x40010040L, 0x00000040L, 0x01010000L, 106},{ 107/* nibble 3 */ 1080x00100402L, 0x04000400L, 0x00000002L, 0x04100402L, 1090x00000000L, 0x04100000L, 0x04000402L, 0x00100002L, 1100x04100400L, 0x04000002L, 0x04000000L, 0x00000402L, 1110x04000002L, 0x00100402L, 0x00100000L, 0x04000000L, 1120x04100002L, 0x00100400L, 0x00000400L, 0x00000002L, 1130x00100400L, 0x04000402L, 0x04100000L, 0x00000400L, 1140x00000402L, 0x00000000L, 0x00100002L, 0x04100400L, 1150x04000400L, 0x04100002L, 0x04100402L, 0x00100000L, 1160x04100002L, 0x00000402L, 0x00100000L, 0x04000002L, 1170x00100400L, 0x04000400L, 0x00000002L, 0x04100000L, 1180x04000402L, 0x00000000L, 0x00000400L, 0x00100002L, 1190x00000000L, 0x04100002L, 0x04100400L, 0x00000400L, 1200x04000000L, 0x04100402L, 0x00100402L, 0x00100000L, 1210x04100402L, 0x00000002L, 0x04000400L, 0x00100402L, 1220x00100002L, 0x00100400L, 0x04100000L, 0x04000402L, 1230x00000402L, 0x04000000L, 0x04000002L, 0x04100400L, 124},{ 125/* nibble 4 */ 1260x02000000L, 0x00004000L, 0x00000100L, 0x02004108L, 1270x02004008L, 0x02000100L, 0x00004108L, 0x02004000L, 1280x00004000L, 0x00000008L, 0x02000008L, 0x00004100L, 1290x02000108L, 0x02004008L, 0x02004100L, 0x00000000L, 1300x00004100L, 0x02000000L, 0x00004008L, 0x00000108L, 1310x02000100L, 0x00004108L, 0x00000000L, 0x02000008L, 1320x00000008L, 0x02000108L, 0x02004108L, 0x00004008L, 1330x02004000L, 0x00000100L, 0x00000108L, 0x02004100L, 1340x02004100L, 0x02000108L, 0x00004008L, 0x02004000L, 1350x00004000L, 0x00000008L, 0x02000008L, 0x02000100L, 1360x02000000L, 0x00004100L, 0x02004108L, 0x00000000L, 1370x00004108L, 0x02000000L, 0x00000100L, 0x00004008L, 1380x02000108L, 0x00000100L, 0x00000000L, 0x02004108L, 1390x02004008L, 0x02004100L, 0x00000108L, 0x00004000L, 1400x00004100L, 0x02004008L, 0x02000100L, 0x00000108L, 1410x00000008L, 0x00004108L, 0x02004000L, 0x02000008L, 142},{ 143/* nibble 5 */ 1440x20000010L, 0x00080010L, 0x00000000L, 0x20080800L, 1450x00080010L, 0x00000800L, 0x20000810L, 0x00080000L, 1460x00000810L, 0x20080810L, 0x00080800L, 0x20000000L, 1470x20000800L, 0x20000010L, 0x20080000L, 0x00080810L, 1480x00080000L, 0x20000810L, 0x20080010L, 0x00000000L, 1490x00000800L, 0x00000010L, 0x20080800L, 0x20080010L, 1500x20080810L, 0x20080000L, 0x20000000L, 0x00000810L, 1510x00000010L, 0x00080800L, 0x00080810L, 0x20000800L, 1520x00000810L, 0x20000000L, 0x20000800L, 0x00080810L, 1530x20080800L, 0x00080010L, 0x00000000L, 0x20000800L, 1540x20000000L, 0x00000800L, 0x20080010L, 0x00080000L, 1550x00080010L, 0x20080810L, 0x00080800L, 0x00000010L, 1560x20080810L, 0x00080800L, 0x00080000L, 0x20000810L, 1570x20000010L, 0x20080000L, 0x00080810L, 0x00000000L, 1580x00000800L, 0x20000010L, 0x20000810L, 0x20080800L, 1590x20080000L, 0x00000810L, 0x00000010L, 0x20080010L, 160},{ 161/* nibble 6 */ 1620x00001000L, 0x00000080L, 0x00400080L, 0x00400001L, 1630x00401081L, 0x00001001L, 0x00001080L, 0x00000000L, 1640x00400000L, 0x00400081L, 0x00000081L, 0x00401000L, 1650x00000001L, 0x00401080L, 0x00401000L, 0x00000081L, 1660x00400081L, 0x00001000L, 0x00001001L, 0x00401081L, 1670x00000000L, 0x00400080L, 0x00400001L, 0x00001080L, 1680x00401001L, 0x00001081L, 0x00401080L, 0x00000001L, 1690x00001081L, 0x00401001L, 0x00000080L, 0x00400000L, 1700x00001081L, 0x00401000L, 0x00401001L, 0x00000081L, 1710x00001000L, 0x00000080L, 0x00400000L, 0x00401001L, 1720x00400081L, 0x00001081L, 0x00001080L, 0x00000000L, 1730x00000080L, 0x00400001L, 0x00000001L, 0x00400080L, 1740x00000000L, 0x00400081L, 0x00400080L, 0x00001080L, 1750x00000081L, 0x00001000L, 0x00401081L, 0x00400000L, 1760x00401080L, 0x00000001L, 0x00001001L, 0x00401081L, 1770x00400001L, 0x00401080L, 0x00401000L, 0x00001001L, 178},{ 179/* nibble 7 */ 1800x08200020L, 0x08208000L, 0x00008020L, 0x00000000L, 1810x08008000L, 0x00200020L, 0x08200000L, 0x08208020L, 1820x00000020L, 0x08000000L, 0x00208000L, 0x00008020L, 1830x00208020L, 0x08008020L, 0x08000020L, 0x08200000L, 1840x00008000L, 0x00208020L, 0x00200020L, 0x08008000L, 1850x08208020L, 0x08000020L, 0x00000000L, 0x00208000L, 1860x08000000L, 0x00200000L, 0x08008020L, 0x08200020L, 1870x00200000L, 0x00008000L, 0x08208000L, 0x00000020L, 1880x00200000L, 0x00008000L, 0x08000020L, 0x08208020L, 1890x00008020L, 0x08000000L, 0x00000000L, 0x00208000L, 1900x08200020L, 0x08008020L, 0x08008000L, 0x00200020L, 1910x08208000L, 0x00000020L, 0x00200020L, 0x08008000L, 1920x08208020L, 0x00200000L, 0x08200000L, 0x08000020L, 1930x00208000L, 0x00008020L, 0x08008020L, 0x08200000L, 1940x00000020L, 0x08208000L, 0x00208020L, 0x00000000L, 1950x08000000L, 0x08200020L, 0x00008000L, 0x00208020L, 196}}; 197