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