spr.h 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. /*
  2. * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the OpenSSL license (the "License"). You may not use
  5. * this file except in compliance with the License. You can obtain a copy
  6. * in the file LICENSE in the source distribution or at
  7. * https://www.openssl.org/source/license.html
  8. */
  9. const DES_LONG DES_SPtrans[8][64] = {
  10. {
  11. /* nibble 0 */
  12. 0x02080800L, 0x00080000L, 0x02000002L, 0x02080802L,
  13. 0x02000000L, 0x00080802L, 0x00080002L, 0x02000002L,
  14. 0x00080802L, 0x02080800L, 0x02080000L, 0x00000802L,
  15. 0x02000802L, 0x02000000L, 0x00000000L, 0x00080002L,
  16. 0x00080000L, 0x00000002L, 0x02000800L, 0x00080800L,
  17. 0x02080802L, 0x02080000L, 0x00000802L, 0x02000800L,
  18. 0x00000002L, 0x00000800L, 0x00080800L, 0x02080002L,
  19. 0x00000800L, 0x02000802L, 0x02080002L, 0x00000000L,
  20. 0x00000000L, 0x02080802L, 0x02000800L, 0x00080002L,
  21. 0x02080800L, 0x00080000L, 0x00000802L, 0x02000800L,
  22. 0x02080002L, 0x00000800L, 0x00080800L, 0x02000002L,
  23. 0x00080802L, 0x00000002L, 0x02000002L, 0x02080000L,
  24. 0x02080802L, 0x00080800L, 0x02080000L, 0x02000802L,
  25. 0x02000000L, 0x00000802L, 0x00080002L, 0x00000000L,
  26. 0x00080000L, 0x02000000L, 0x02000802L, 0x02080800L,
  27. 0x00000002L, 0x02080002L, 0x00000800L, 0x00080802L,
  28. },
  29. {
  30. /* nibble 1 */
  31. 0x40108010L, 0x00000000L, 0x00108000L, 0x40100000L,
  32. 0x40000010L, 0x00008010L, 0x40008000L, 0x00108000L,
  33. 0x00008000L, 0x40100010L, 0x00000010L, 0x40008000L,
  34. 0x00100010L, 0x40108000L, 0x40100000L, 0x00000010L,
  35. 0x00100000L, 0x40008010L, 0x40100010L, 0x00008000L,
  36. 0x00108010L, 0x40000000L, 0x00000000L, 0x00100010L,
  37. 0x40008010L, 0x00108010L, 0x40108000L, 0x40000010L,
  38. 0x40000000L, 0x00100000L, 0x00008010L, 0x40108010L,
  39. 0x00100010L, 0x40108000L, 0x40008000L, 0x00108010L,
  40. 0x40108010L, 0x00100010L, 0x40000010L, 0x00000000L,
  41. 0x40000000L, 0x00008010L, 0x00100000L, 0x40100010L,
  42. 0x00008000L, 0x40000000L, 0x00108010L, 0x40008010L,
  43. 0x40108000L, 0x00008000L, 0x00000000L, 0x40000010L,
  44. 0x00000010L, 0x40108010L, 0x00108000L, 0x40100000L,
  45. 0x40100010L, 0x00100000L, 0x00008010L, 0x40008000L,
  46. 0x40008010L, 0x00000010L, 0x40100000L, 0x00108000L,
  47. },
  48. {
  49. /* nibble 2 */
  50. 0x04000001L, 0x04040100L, 0x00000100L, 0x04000101L,
  51. 0x00040001L, 0x04000000L, 0x04000101L, 0x00040100L,
  52. 0x04000100L, 0x00040000L, 0x04040000L, 0x00000001L,
  53. 0x04040101L, 0x00000101L, 0x00000001L, 0x04040001L,
  54. 0x00000000L, 0x00040001L, 0x04040100L, 0x00000100L,
  55. 0x00000101L, 0x04040101L, 0x00040000L, 0x04000001L,
  56. 0x04040001L, 0x04000100L, 0x00040101L, 0x04040000L,
  57. 0x00040100L, 0x00000000L, 0x04000000L, 0x00040101L,
  58. 0x04040100L, 0x00000100L, 0x00000001L, 0x00040000L,
  59. 0x00000101L, 0x00040001L, 0x04040000L, 0x04000101L,
  60. 0x00000000L, 0x04040100L, 0x00040100L, 0x04040001L,
  61. 0x00040001L, 0x04000000L, 0x04040101L, 0x00000001L,
  62. 0x00040101L, 0x04000001L, 0x04000000L, 0x04040101L,
  63. 0x00040000L, 0x04000100L, 0x04000101L, 0x00040100L,
  64. 0x04000100L, 0x00000000L, 0x04040001L, 0x00000101L,
  65. 0x04000001L, 0x00040101L, 0x00000100L, 0x04040000L,
  66. },
  67. {
  68. /* nibble 3 */
  69. 0x00401008L, 0x10001000L, 0x00000008L, 0x10401008L,
  70. 0x00000000L, 0x10400000L, 0x10001008L, 0x00400008L,
  71. 0x10401000L, 0x10000008L, 0x10000000L, 0x00001008L,
  72. 0x10000008L, 0x00401008L, 0x00400000L, 0x10000000L,
  73. 0x10400008L, 0x00401000L, 0x00001000L, 0x00000008L,
  74. 0x00401000L, 0x10001008L, 0x10400000L, 0x00001000L,
  75. 0x00001008L, 0x00000000L, 0x00400008L, 0x10401000L,
  76. 0x10001000L, 0x10400008L, 0x10401008L, 0x00400000L,
  77. 0x10400008L, 0x00001008L, 0x00400000L, 0x10000008L,
  78. 0x00401000L, 0x10001000L, 0x00000008L, 0x10400000L,
  79. 0x10001008L, 0x00000000L, 0x00001000L, 0x00400008L,
  80. 0x00000000L, 0x10400008L, 0x10401000L, 0x00001000L,
  81. 0x10000000L, 0x10401008L, 0x00401008L, 0x00400000L,
  82. 0x10401008L, 0x00000008L, 0x10001000L, 0x00401008L,
  83. 0x00400008L, 0x00401000L, 0x10400000L, 0x10001008L,
  84. 0x00001008L, 0x10000000L, 0x10000008L, 0x10401000L,
  85. },
  86. {
  87. /* nibble 4 */
  88. 0x08000000L, 0x00010000L, 0x00000400L, 0x08010420L,
  89. 0x08010020L, 0x08000400L, 0x00010420L, 0x08010000L,
  90. 0x00010000L, 0x00000020L, 0x08000020L, 0x00010400L,
  91. 0x08000420L, 0x08010020L, 0x08010400L, 0x00000000L,
  92. 0x00010400L, 0x08000000L, 0x00010020L, 0x00000420L,
  93. 0x08000400L, 0x00010420L, 0x00000000L, 0x08000020L,
  94. 0x00000020L, 0x08000420L, 0x08010420L, 0x00010020L,
  95. 0x08010000L, 0x00000400L, 0x00000420L, 0x08010400L,
  96. 0x08010400L, 0x08000420L, 0x00010020L, 0x08010000L,
  97. 0x00010000L, 0x00000020L, 0x08000020L, 0x08000400L,
  98. 0x08000000L, 0x00010400L, 0x08010420L, 0x00000000L,
  99. 0x00010420L, 0x08000000L, 0x00000400L, 0x00010020L,
  100. 0x08000420L, 0x00000400L, 0x00000000L, 0x08010420L,
  101. 0x08010020L, 0x08010400L, 0x00000420L, 0x00010000L,
  102. 0x00010400L, 0x08010020L, 0x08000400L, 0x00000420L,
  103. 0x00000020L, 0x00010420L, 0x08010000L, 0x08000020L,
  104. },
  105. {
  106. /* nibble 5 */
  107. 0x80000040L, 0x00200040L, 0x00000000L, 0x80202000L,
  108. 0x00200040L, 0x00002000L, 0x80002040L, 0x00200000L,
  109. 0x00002040L, 0x80202040L, 0x00202000L, 0x80000000L,
  110. 0x80002000L, 0x80000040L, 0x80200000L, 0x00202040L,
  111. 0x00200000L, 0x80002040L, 0x80200040L, 0x00000000L,
  112. 0x00002000L, 0x00000040L, 0x80202000L, 0x80200040L,
  113. 0x80202040L, 0x80200000L, 0x80000000L, 0x00002040L,
  114. 0x00000040L, 0x00202000L, 0x00202040L, 0x80002000L,
  115. 0x00002040L, 0x80000000L, 0x80002000L, 0x00202040L,
  116. 0x80202000L, 0x00200040L, 0x00000000L, 0x80002000L,
  117. 0x80000000L, 0x00002000L, 0x80200040L, 0x00200000L,
  118. 0x00200040L, 0x80202040L, 0x00202000L, 0x00000040L,
  119. 0x80202040L, 0x00202000L, 0x00200000L, 0x80002040L,
  120. 0x80000040L, 0x80200000L, 0x00202040L, 0x00000000L,
  121. 0x00002000L, 0x80000040L, 0x80002040L, 0x80202000L,
  122. 0x80200000L, 0x00002040L, 0x00000040L, 0x80200040L,
  123. },
  124. {
  125. /* nibble 6 */
  126. 0x00004000L, 0x00000200L, 0x01000200L, 0x01000004L,
  127. 0x01004204L, 0x00004004L, 0x00004200L, 0x00000000L,
  128. 0x01000000L, 0x01000204L, 0x00000204L, 0x01004000L,
  129. 0x00000004L, 0x01004200L, 0x01004000L, 0x00000204L,
  130. 0x01000204L, 0x00004000L, 0x00004004L, 0x01004204L,
  131. 0x00000000L, 0x01000200L, 0x01000004L, 0x00004200L,
  132. 0x01004004L, 0x00004204L, 0x01004200L, 0x00000004L,
  133. 0x00004204L, 0x01004004L, 0x00000200L, 0x01000000L,
  134. 0x00004204L, 0x01004000L, 0x01004004L, 0x00000204L,
  135. 0x00004000L, 0x00000200L, 0x01000000L, 0x01004004L,
  136. 0x01000204L, 0x00004204L, 0x00004200L, 0x00000000L,
  137. 0x00000200L, 0x01000004L, 0x00000004L, 0x01000200L,
  138. 0x00000000L, 0x01000204L, 0x01000200L, 0x00004200L,
  139. 0x00000204L, 0x00004000L, 0x01004204L, 0x01000000L,
  140. 0x01004200L, 0x00000004L, 0x00004004L, 0x01004204L,
  141. 0x01000004L, 0x01004200L, 0x01004000L, 0x00004004L,
  142. },
  143. {
  144. /* nibble 7 */
  145. 0x20800080L, 0x20820000L, 0x00020080L, 0x00000000L,
  146. 0x20020000L, 0x00800080L, 0x20800000L, 0x20820080L,
  147. 0x00000080L, 0x20000000L, 0x00820000L, 0x00020080L,
  148. 0x00820080L, 0x20020080L, 0x20000080L, 0x20800000L,
  149. 0x00020000L, 0x00820080L, 0x00800080L, 0x20020000L,
  150. 0x20820080L, 0x20000080L, 0x00000000L, 0x00820000L,
  151. 0x20000000L, 0x00800000L, 0x20020080L, 0x20800080L,
  152. 0x00800000L, 0x00020000L, 0x20820000L, 0x00000080L,
  153. 0x00800000L, 0x00020000L, 0x20000080L, 0x20820080L,
  154. 0x00020080L, 0x20000000L, 0x00000000L, 0x00820000L,
  155. 0x20800080L, 0x20020080L, 0x20020000L, 0x00800080L,
  156. 0x20820000L, 0x00000080L, 0x00800080L, 0x20020000L,
  157. 0x20820080L, 0x00800000L, 0x20800000L, 0x20000080L,
  158. 0x00820000L, 0x00020080L, 0x20020080L, 0x20800000L,
  159. 0x00000080L, 0x20820000L, 0x00820080L, 0x00000000L,
  160. 0x20000000L, 0x20800080L, 0x00020000L, 0x00820080L,
  161. }
  162. };