ref_des.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. /*
  2. ChibiOS - Copyright (C) 2006..2017 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. #include "hal.h"
  14. const uint8_t refDES_ECB_8[]={
  15. 0x5A,0x45,0xE3,0x30,0x6B,0x7E,0xF0,0x87,0x27,0xE2,
  16. 0x92,0x19,0x09,0xE1,0x4E,0x68,0x84,0x84,0x01,0x45,
  17. 0xED,0x86,0xB4,0x41,0x4A,0xE9,0x1F,0x1A,0xC0,0xE0,
  18. 0x05,0x90,0x9B,0x8A,0x47,0xD7,0x64,0x5D,0xC5,0x92,
  19. 0xB4,0x23,0x6B,0x0E,0x7E,0x4F,0xB8,0x86,0x23,0x75,
  20. 0x6D,0x35,0xBF,0xE0,0x1F,0x58,0x23,0xAF,0x11,0x95,
  21. 0x64,0xE4,0x4E,0xE1,0xD6,0xBB,0x00,0xCC,0xA9,0xBA,
  22. 0x33,0xA1,0xDD,0xAC,0x79,0xCB,0x05,0xA6,0x5F,0x07,
  23. 0x98,0xF1,0x9F,0xAA,0x9B,0xE2,0x37,0xCB,0xC1,0xA8,
  24. 0x06,0x2C,0x8C,0xD1,0x34,0xE4,0x90,0x72,0x32,0xA8,
  25. 0x5B,0x82,0x03,0x36,0x89,0x34,0x8A,0xD7,0xB0,0x63,
  26. 0x2E,0x84,0x71,0xCB,0x97,0x01,0x9C,0x4D,0x31,0xE3,
  27. 0x00,0x33,0x5C,0x76,0x08,0x52,0x8B,0xE4,0x86,0x5D,
  28. 0xB2,0x5A,0xFF,0xF2,0xB1,0x18,0x66,0xCC,0xCC,0x05,
  29. 0x64,0x4E,0x59,0x83,0x04,0x52,0xD8,0x66,0x4C,0xD0,
  30. 0xA9,0xD1,0xB0,0xC0,0x9A,0x4D,0xA1,0xC6,0x64,0xB4,
  31. 0x4E,0x7F,0xAB,0xD3,0x83,0x74,0x7A,0xCB,0xC2,0x66,
  32. 0x2D,0x83,0xCC,0x25,0x7C,0xEA,0x81,0x95,0x30,0x71,
  33. 0xD3,0x40,0x94,0x57,0xF8,0x09,0x34,0x8C,0xF1,0x0C,
  34. 0xC4,0xEF,0x57,0x8C,0x25,0xB3,0x63,0x4B,0xBB,0x40,
  35. 0x5D,0x65,0xDA,0x9E,0x18,0xBE,0xD4,0x81,0xE3,0x0C,
  36. 0x43,0x4D,0x97,0x24,0x9F,0x88,0x09,0x74,0xA0,0x7A,
  37. 0xA9,0xCC,0xF1,0x56,0xA5,0x83,0xEE,0x98,0x2A,0x8B,
  38. 0x6E,0xA3,0x6A,0x44,0x75,0xC4,0x6F,0x77,0xD6,0xAD,
  39. 0x96,0xE4,0x92,0x4B,0x77,0x1C,0xF4,0x31,0x1C,0x8F,
  40. 0x6A,0x72,0x01,0xDE,0x8F,0x2E,0xA3,0x3E,0xEB,0xC8,
  41. 0xFC,0xA5,0x77,0xC7,0xA2,0x2F,0x7D,0x03,0xA4,0x1B,
  42. 0x83,0xA3,0x78,0x03,0xE3,0x05,0xB5,0x1B,0x53,0x15,
  43. 0xCA,0x8B,0x88,0x12,0xA1,0x31,0x0E,0x7B,0x37,0xEB,
  44. 0xDA,0xCD,0x0E,0x88,0x0E,0xE4,0x3B,0x76,0x6A,0xA0,
  45. 0x89,0x6D,0x69,0x58,0xBA,0x80,0x59,0x72,0x53,0x6F,
  46. 0xEF,0x1A,0xB5,0xE0,0xEF,0x54,0xF2,0xBA,0x09,0x74,
  47. 0xFE,0x22,0x9A,0xF6,0x3C,0xE3,0x59,0x23,0xF2,0x0E,
  48. 0xE0,0xC6,0xD5,0xFD,0xB9,0xA4,0x25,0xE4,0xC6,0xBA,
  49. 0x55,0xBE,0x93,0x60,0x21,0x91,0x22,0xD0,0xEC,0xC4,
  50. 0x93,0x8E,0x58,0x51,0xCA,0x02,0x06,0x68,0x81,0xA2,
  51. 0x90,0xCC,0x13,0x92,0xC7,0x0B,0x95,0x57,0xBB,0x28,
  52. 0xB5,0x8F,0xAB,0x54,0xA0,0x70,0x8D,0xB6,0x8D,0x5C,
  53. 0x3A,0xBC,0xC9,0xD3,0x76,0x5E,0x65,0x12,0x24,0x2E,
  54. 0x0C,0xA4,0x05,0x9B,0xDD,0x3C,0xB3,0x9D,0x7D,0xC3,
  55. 0xEC,0x01,0x05,0xBD,0x34,0x57,0xF7,0xB1,0xE1,0xA3,
  56. 0x83,0x06,0x9D,0x7E,0x6A,0x86,0x00,0xAD,0x1E,0x52,
  57. 0x33,0xC3,0xD5,0x36,0xFD,0x31,0x91,0x0E,0xE0,0xAD,
  58. 0x48,0x16,0x54,0x50,0x0E,0xE5,0x54,0x29,0x4B,0x6C,
  59. 0xD2,0x34,0xCA,0xD8,0x01,0x3C,0x86,0xDE,0x50,0x1C,
  60. 0xEA,0xB7,0xDE,0xBA,0x25,0x3F,0x8A,0x9A,0xF0,0xD9,
  61. 0xA5,0x79,0x06,0x65,0x06,0x11,0xD9,0x71,0x87,0x4C,
  62. 0xEA,0x73,0xA4,0x77,0xA3,0x18,0x87,0xED,0xE7,0x0C,
  63. 0x79,0x22,0x08,0xC9,0x81,0xB7,0xF3,0x4F,0x2E,0x3E,
  64. 0xD2,0x35,0x00,0xAA,0xEC,0x24,0xDF,0x4F,0x53,0x03,
  65. 0x57,0x02,0xB6,0x97,0x22,0x12,0xB4,0xBE,0xC0,0xCF,
  66. 0x8D,0x32,0x8C,0xFF,0x6A,0x91,0xCE,0x1A,0x71,0xBC,
  67. 0x86,0x7F,0x17,0x60,0xB3,0x23,0x79,0x63,0x3C,0x88,
  68. 0x7F,0xA0,0x2B,0x71,0x27,0x31,0xEC,0x9C,0x37,0xBF,
  69. 0xC1,0xEC,0x81,0xD1,0xD4,0x94,0x4F,0x5D,0xC3,0xE1,
  70. 0xC6,0xDA,0xF3,0x6B,0xDF,0x94,0x44,0xB1,0x80,0xC8,
  71. 0x21,0x23,0xF3,0x8C,0xD0,0x4C,0xAA,0x34,0x68,0x4E,
  72. 0xAD,0x3E,0xF6,0xBC,0xB9,0x14,0x4D,0x15,0xD0,0x8B,
  73. 0x31,0xD4,0x04,0x9D,0xFC,0x6A,0x2E,0x6F,0xC8,0x4D,
  74. 0x8F,0x26,0x51,0x9D,0xFF,0x51,0x4E,0xD8,0x9A,0x06,
  75. 0xC0,0x8B,0xE0,0xE6,0x84,0x50,0xD1,0x24,0x9E,0x43,
  76. 0xA3,0xCD,0x3A,0xE7,0x81,0xA7,0x98,0xA9,0x8D,0xAE,
  77. 0x08,0xD7,0x22,0x89,0x50,0x4C,0x7C,0x81,0x2F,0x4D,
  78. 0xB8,0xA6,0xED,0x1D,0xB9,0x9B,0x1B,0xFE,0xC9,0x10,
  79. };
  80. const uint8_t refTDES_ECB_16[]={
  81. 0x75,0xF8,0x54,0x8A,0xE9,0x66,0xF6,0xCB,0xDA,0x0D,
  82. 0xEA,0xB3,0x89,0x3B,0x68,0xDE,0x9A,0xD4,0xB9,0x92,
  83. 0xCE,0x65,0x24,0x22,0x63,0x5E,0x3A,0xFB,0x90,0x71,
  84. 0xA3,0x89,0x86,0x0A,0xB6,0xA7,0x84,0x27,0x8E,0xAA,
  85. 0xC8,0x8C,0xA6,0xF2,0xB9,0x11,0x28,0x67,0x6F,0xF8,
  86. 0x43,0x1C,0x7D,0x78,0x9B,0xB1,0xF8,0x2E,0xBE,0xF4,
  87. 0xE1,0xB4,0x66,0xA1,0xB5,0xE0,0x52,0x6A,0x66,0xC8,
  88. 0xAA,0xB0,0xEF,0x69,0xB9,0xC5,0xC8,0x62,0x13,0x21,
  89. 0x0B,0xE6,0x66,0x37,0x1A,0x55,0xA1,0xB7,0xF4,0x82,
  90. 0x88,0xDC,0x9D,0x28,0xF1,0x74,0x60,0x9E,0x2F,0xCA,
  91. 0x62,0x03,0xC9,0x6B,0x00,0x89,0x5D,0x58,0x4A,0x5A,
  92. 0x44,0xCD,0xA4,0x77,0x63,0x4A,0xDB,0x44,0xA3,0xBE,
  93. 0x73,0xE7,0xD0,0x6F,0xA5,0xDA,0xC2,0x54,0x8B,0x87,
  94. 0x68,0xE4,0x72,0x4A,0x5E,0x90,0x1E,0x97,0x5F,0xF6,
  95. 0x2F,0xC6,0x99,0x86,0x04,0xB4,0x6E,0x28,0x9A,0x79,
  96. 0x06,0xA9,0xC7,0x6C,0x8B,0x56,0x44,0x71,0x9A,0x7F,
  97. 0xC8,0x02,0x94,0x57,0x45,0xA8,0x9B,0x49,0xAB,0x0A,
  98. 0xAD,0xAB,0x4D,0xB6,0xE0,0x66,0x22,0xF9,0x11,0x1E,
  99. 0xBB,0xBB,0xAD,0x62,0x28,0x01,0x77,0x8E,0xA4,0x90,
  100. 0x41,0xB3,0x4E,0x38,0xC6,0x0B,0x18,0x6C,0xDA,0x77,
  101. 0x0C,0x7D,0xC8,0x70,0xD9,0x75,0xB7,0xDD,0x28,0x7B,
  102. 0x15,0xA7,0x0C,0x8E,0x9C,0xAB,0x38,0x60,0x7D,0x52,
  103. 0x1D,0x72,0x17,0x45,0x17,0x79,0x6A,0x22,0x23,0xC3,
  104. 0x1A,0xD1,0xC6,0x93,0xF2,0x47,0x3D,0x3F,0xC0,0x43,
  105. 0x0A,0x61,0x25,0x39,0x33,0xB4,0x76,0x31,0x6D,0xE5,
  106. 0xC0,0xE8,0x1B,0x8B,0x52,0x69,0x7C,0x39,0x03,0xAF,
  107. 0x60,0x0B,0x29,0x8A,0x5D,0x68,0x96,0x18,0x22,0xB3,
  108. 0x0D,0x6C,0xA1,0x96,0xD2,0x49,0xBA,0x7D,0x65,0xD1,
  109. 0x47,0x5E,0x30,0x7E,0xD3,0xFC,0xA9,0x9C,0x79,0x50,
  110. 0x25,0x29,0x2B,0xCC,0x73,0x55,0x71,0xEE,0xC7,0x47,
  111. 0x01,0x99,0x5D,0x4C,0x40,0x45,0x2C,0x4A,0xE6,0xFE,
  112. 0x74,0xFF,0xB7,0x9F,0x8B,0x4C,0xEC,0x2D,0xDC,0xA3,
  113. 0xA2,0xCD,0x82,0xBE,0xFD,0x0A,0xAB,0xD6,0x13,0x5C,
  114. 0x06,0x9E,0xAA,0x12,0x1C,0x91,0x99,0xC1,0xEF,0x5D,
  115. 0x6F,0x77,0x90,0x7A,0x65,0x4A,0xC3,0x6F,0x2A,0xD0,
  116. 0xD5,0x60,0xE9,0x41,0x25,0x0D,0x60,0x37,0x5F,0x17,
  117. 0xC3,0x1A,0xD2,0x9E,0xA0,0xBB,0xDB,0xC9,0x53,0x28,
  118. 0x8D,0x52,0x74,0x85,0x84,0xBB,0xAC,0x16,0xEA,0x48,
  119. 0xC7,0x7D,0x89,0x72,0x9F,0x3D,0x85,0xF0,0x38,0x44,
  120. 0x3A,0x21,0x09,0xD9,0xA5,0x04,0x40,0x8F,0xAF,0xFA,
  121. 0xDB,0xEC,0xBA,0x5C,0xC2,0xCA,0x7A,0x27,0xB4,0x8E,
  122. 0x71,0x0F,0x66,0xF0,0xC7,0xA3,0x9A,0x5A,0xA4,0x04,
  123. 0x3C,0xAB,0xAA,0x7A,0x92,0x03,0x32,0x5A,0xA5,0xE7,
  124. 0x64,0x9F,0x9A,0x65,0xD0,0xCE,0xCC,0x65,0xF4,0xB0,
  125. 0x79,0xEE,0xE3,0x4F,0x98,0xCA,0x41,0xE4,0x7A,0x97,
  126. 0x89,0xE6,0xBE,0xA0,0xF9,0xA2,0xE3,0xF8,0x46,0xA4,
  127. 0xD8,0x1B,0x2F,0x80,0x1B,0xF6,0xF3,0x01,0xAE,0x4F,
  128. 0xB3,0xAC,0x55,0xF4,0xA3,0x13,0xD7,0xBB,0xA1,0x50,
  129. 0xF7,0x76,0x54,0x5F,0x50,0x22,0xDB,0x19,0xE5,0x45,
  130. 0xF0,0x2C,0x6B,0x14,0x93,0xE6,0xA5,0xCF,0x66,0x9C,
  131. 0x66,0x2D,0x4D,0x9F,0x60,0x50,0x32,0xBC,0xF0,0x90,
  132. 0x7C,0xC9,0xC0,0x51,0x7D,0x1B,0xA4,0x37,0x64,0xC2,
  133. 0xB2,0x75,0x0A,0x13,0x2B,0xE9,0x4A,0x18,0xB2,0x34,
  134. 0xB0,0xD4,0x86,0xBD,0xCE,0x17,0x5B,0xBF,0x5C,0x7B,
  135. 0x94,0x87,0x4E,0x38,0xA9,0x67,0x1A,0x69,0xD9,0x61,
  136. 0x5E,0xD2,0x21,0xB4,0x73,0x22,0x2D,0xF9,0x04,0xFC,
  137. 0x13,0x3B,0x5C,0x8F,0x51,0x19,0x6A,0x2F,0x32,0x97,
  138. 0x7C,0x9F,0x6E,0x39,0x74,0xA3,0x88,0x2B,0x56,0x93,
  139. 0x94,0x57,0xD8,0xFE,0x22,0xD9,0x59,0x6A,0x1F,0x12,
  140. 0xDD,0x33,0x79,0x4D,0x8F,0x7F,0x8E,0x6C,0xFD,0x79,
  141. 0x15,0xB4,0x52,0x20,0x15,0xB5,0xEC,0xDA,0x55,0xB0,
  142. 0xD1,0xE1,0x95,0x6C,0x24,0xB9,0xB2,0x3A,0xCC,0x22,
  143. 0x4A,0xA0,0x57,0xC4,0x6A,0xC5,0x4B,0xB5,0xEF,0x4F,
  144. 0x1F,0x1D,0xA0,0xFD,0x48,0xCF,0x6C,0x0F,0x9E,0x9E,
  145. };
  146. const uint8_t refTDES_ECB_24[]={
  147. 0xFA,0x2C,0xB2,0x40,0x09,0xB1,0xD7,0x08,0x99,0x68,
  148. 0x9E,0x64,0x98,0x41,0x6C,0x25,0x02,0xA9,0x5B,0x2D,
  149. 0xE8,0xDA,0x49,0x9A,0x9B,0x75,0xAC,0x98,0x7B,0x75,
  150. 0x00,0xB5,0x19,0x81,0x2A,0xA5,0xC4,0x56,0x56,0xA4,
  151. 0x31,0x2B,0x5F,0x11,0xC0,0x9A,0xBD,0x88,0xCC,0x61,
  152. 0xD2,0x88,0xE5,0xAC,0x68,0xBC,0xBC,0xEF,0x5D,0x20,
  153. 0xA5,0xD3,0x9C,0xFC,0xCF,0x84,0xC1,0x0D,0x32,0x0E,
  154. 0xAF,0x71,0x1C,0x02,0xF4,0x2D,0xD4,0xFB,0xEC,0x44,
  155. 0x6F,0xC4,0x8A,0x30,0x02,0x20,0x4D,0x4C,0x56,0x4F,
  156. 0xA4,0x2B,0x2E,0x48,0xDF,0x12,0x46,0x97,0xB0,0x40,
  157. 0x29,0xB6,0xAD,0xFA,0xF6,0x1B,0x32,0xF7,0x4E,0xDD,
  158. 0x13,0xB1,0x72,0x94,0x6F,0x72,0xE4,0x50,0x02,0x5F,
  159. 0xFF,0x71,0x77,0xE4,0x34,0x58,0xEC,0x45,0x49,0xE8,
  160. 0x9E,0x09,0x92,0xBF,0xCE,0x4B,0x5B,0x0B,0x5A,0xF4,
  161. 0xD6,0xA4,0x16,0xF5,0x1E,0x5B,0xA4,0x88,0x15,0x85,
  162. 0xE8,0xA2,0x13,0xAA,0x16,0x47,0x95,0xB5,0xC0,0x94,
  163. 0xA3,0x1B,0xAF,0x65,0x07,0x83,0xFF,0xCA,0xEE,0xBA,
  164. 0xF4,0xA4,0xD5,0x96,0x2B,0x45,0xF4,0x07,0xEB,0x50,
  165. 0xA0,0xD7,0x59,0x2B,0x6E,0x6D,0xD1,0x5D,0x9D,0x3A,
  166. 0xEC,0x43,0x1B,0xEF,0x3C,0xAD,0x8C,0x7A,0x60,0x15,
  167. 0x67,0x9A,0x6E,0x35,0xF1,0x09,0x7F,0xC4,0xBA,0x0A,
  168. 0x54,0xBF,0xCF,0xE7,0x42,0x18,0xB2,0x3D,0xAB,0xF4,
  169. 0x43,0x2F,0xF6,0xCA,0x94,0x4D,0x9A,0x16,0x14,0x90,
  170. 0xFB,0x1D,0x30,0x05,0x37,0x69,0x5A,0xCB,0xB4,0x54,
  171. 0x91,0x5A,0xC9,0x26,0x58,0x2B,0xE5,0x44,0x3F,0x2D,
  172. 0x17,0xEE,0x17,0xDD,0xFD,0x37,0x73,0xFD,0xFB,0x0F,
  173. 0xB7,0x20,0x03,0xA2,0x0F,0x8B,0xBF,0x56,0x7D,0x19,
  174. 0xA9,0x3A,0x02,0x78,0xD2,0xDF,0xC9,0xEA,0x53,0x57,
  175. 0xD7,0x1C,0xCE,0xBA,0x38,0xAB,0x1F,0xC1,0x1E,0x8F,
  176. 0x55,0x27,0x61,0x98,0xA4,0x84,0xAC,0x77,0x34,0xF4,
  177. 0xF0,0x98,0xDF,0x35,0x49,0x1D,0x73,0x9F,0xAF,0x7F,
  178. 0x3B,0x6C,0x90,0xEE,0x6D,0xC9,0xF8,0x04,0xE7,0xFD,
  179. 0x63,0x88,0xAA,0x22,0x84,0xCB,0xB6,0x2B,0xAA,0xD7,
  180. 0x3F,0xBD,0xC9,0xFC,0x6C,0xAD,0x29,0xAD,0x43,0x93,
  181. 0x18,0x99,0xE9,0x3D,0xFE,0x1A,0x6E,0xD0,0x56,0xD3,
  182. 0x81,0x26,0xA7,0x99,0x01,0x09,0xF9,0x07,0xE1,0x3A,
  183. 0xFC,0xEA,0xC5,0x83,0x03,0x60,0x02,0x83,0x1F,0x77,
  184. 0x7D,0x82,0x35,0x4A,0x52,0x76,0xF5,0xE9,0xDF,0x5B,
  185. 0xB8,0xAB,0x53,0x39,0xA7,0x8A,0x64,0xAB,0x1E,0x08,
  186. 0x16,0x14,0x92,0x06,0x29,0xB4,0xBF,0xAA,0xE9,0xE0,
  187. 0xFB,0xE9,0x04,0xAF,0x8A,0xBF,0xEC,0xB2,0x6C,0xBF,
  188. 0x82,0x59,0x37,0x51,0x8D,0xF1,0x97,0x1A,0x85,0x55,
  189. 0x55,0x6A,0xD2,0xD1,0xA9,0x7A,0xF8,0xF4,0x21,0xC9,
  190. 0xF5,0xE1,0x2E,0x6C,0x91,0x28,0x46,0x61,0x4A,0x28,
  191. 0xCE,0xFB,0xB4,0x07,0xA7,0xB7,0xB1,0xF7,0x92,0x5A,
  192. 0x57,0x48,0x8F,0xF3,0x76,0xA2,0xCC,0x9D,0xA7,0x2A,
  193. 0x87,0xB4,0x63,0xFC,0x9E,0x45,0x0A,0x04,0xC6,0x09,
  194. 0xCF,0x1A,0x12,0x19,0xDC,0x33,0x05,0x41,0x9E,0x7F,
  195. 0xDB,0x20,0x65,0x77,0x5B,0xB8,0x17,0x2B,0x01,0x7C,
  196. 0x36,0xB4,0x69,0x94,0xDF,0x63,0x3D,0xFB,0x00,0xA1,
  197. 0xC2,0x55,0xB2,0x77,0x45,0x71,0x90,0xE8,0x18,0x7D,
  198. 0xF3,0x00,0xD5,0xAB,0xDF,0x15,0x7D,0xE9,0x57,0x49,
  199. 0x5A,0x8D,0x7B,0xDA,0x35,0x5E,0x70,0x9F,0xF5,0xA6,
  200. 0xBB,0x6C,0xEC,0xB3,0x82,0x84,0xFF,0xB7,0x52,0x04,
  201. 0xBA,0x0B,0x5A,0x9E,0xE3,0x3D,0x6F,0x3B,0x78,0xC9,
  202. 0xF7,0xB4,0x19,0x73,0xEB,0xDF,0x7A,0xD9,0x18,0xE4,
  203. 0xB4,0x42,0xE8,0x6A,0xB9,0x0B,0xD9,0x26,0x69,0xB8,
  204. 0xC2,0x62,0x59,0x4C,0xD6,0x2F,0xAB,0x08,0x7A,0xBF,
  205. 0xAC,0xAA,0x71,0x8C,0xE9,0x11,0x13,0xB3,0xD3,0xEB,
  206. 0xA5,0xDB,0x57,0x8A,0x45,0xCB,0x50,0x7E,0xE3,0xF0,
  207. 0xEF,0x04,0xC5,0x11,0xF0,0x7F,0x5D,0xA8,0xA6,0x02,
  208. 0x2E,0xCC,0xA6,0xB7,0xE4,0x25,0x96,0x12,0xCF,0x73,
  209. 0xE6,0x69,0x23,0x08,0x62,0x9D,0xE2,0x4D,0x6C,0x46,
  210. 0x0F,0x15,0x15,0x28,0xF0,0x78,0x17,0x2B,0x2C,0x14,
  211. };
  212. const uint8_t refTDES_CBC_16[]={
  213. 0x0B,0x04,0xBB,0x49,0x87,0xB0,0x7B,0xB0,0xAB,0xBD,
  214. 0x6E,0x9F,0x10,0x42,0x8B,0x3A,0x58,0x0D,0xA7,0x8F,
  215. 0x54,0xEC,0x24,0x5A,0xE2,0xE2,0xB9,0x15,0x34,0x2B,
  216. 0x73,0x53,0x6F,0x4C,0x58,0x3B,0xA8,0x83,0x2D,0x8A,
  217. 0x37,0xC8,0x9A,0x75,0xCA,0xC2,0x36,0xE8,0x02,0x9F,
  218. 0x40,0x9B,0xB1,0x21,0x1A,0x96,0x44,0x46,0x9B,0xCB,
  219. 0xB8,0xF0,0xF5,0x8F,0x4E,0xB4,0xE6,0xD4,0x7E,0xC3,
  220. 0xFE,0x42,0xD6,0x6C,0x08,0x9E,0x27,0xDB,0xE7,0x73,
  221. 0x54,0x17,0x6C,0x64,0x58,0x2F,0x44,0x66,0xC2,0xEC,
  222. 0xFE,0x85,0x46,0xDD,0x19,0xFB,0xD8,0x6C,0x2D,0x86,
  223. 0xB4,0x89,0x1B,0x65,0xD2,0x94,0x2A,0xD5,0x5D,0x79,
  224. 0xC0,0xB0,0x2A,0xA0,0x3B,0xB7,0x7C,0x78,0x27,0x0B,
  225. 0x1A,0xA2,0xAB,0x49,0x16,0x70,0x89,0x38,0xA1,0x3C,
  226. 0xE1,0x2F,0x69,0xEB,0x4B,0x71,0x33,0x26,0xAE,0xC1,
  227. 0x1C,0x8E,0x00,0x93,0x25,0x28,0x6A,0x61,0xC0,0x6C,
  228. 0xFE,0x50,0x90,0x40,0x84,0x7A,0xA6,0x5A,0xF8,0x70,
  229. 0xEB,0x87,0xCF,0xE8,0xD3,0x4A,0x1C,0x30,0x87,0xDC,
  230. 0x4F,0x5A,0xED,0x02,0x4F,0x02,0x16,0xF1,0xF0,0x41,
  231. 0x99,0x4F,0x87,0x77,0x4B,0x1D,0x3C,0x10,0xC2,0x45,
  232. 0x6A,0xB2,0x60,0x22,0x00,0x42,0x83,0x10,0xB0,0x4E,
  233. 0x88,0x7A,0x1C,0x49,0xA4,0x4B,0x2B,0xA0,0xB2,0x18,
  234. 0x19,0xF3,0x46,0x34,0xCD,0xF7,0x48,0xDF,0x97,0x1B,
  235. 0xD5,0xC6,0x5D,0x5E,0x48,0x64,0x3A,0x03,0x80,0x55,
  236. 0xD4,0xF7,0x28,0x47,0xA7,0xED,0xEA,0x56,0xA4,0xA8,
  237. 0x0A,0xF4,0x97,0x05,0xB9,0x90,0x35,0x1E,0xE0,0xC3,
  238. 0xF1,0xFA,0x24,0x5D,0x48,0xF7,0xDC,0xD6,0x7F,0x11,
  239. 0x36,0xD3,0xFA,0x05,0xE8,0xF5,0x2B,0xD9,0x3B,0xFA,
  240. 0x69,0xF9,0x16,0x81,0xEB,0x56,0xE8,0x23,0x44,0x42,
  241. 0xDE,0x4C,0x36,0x88,0xD0,0x5A,0xC0,0xD1,0xF0,0xD4,
  242. 0xA2,0x28,0x2D,0x23,0xA5,0x8A,0xD7,0x84,0xB2,0xD8,
  243. 0x23,0x29,0x8E,0xD1,0x8C,0x3C,0x61,0x29,0x91,0x49,
  244. 0x3F,0x33,0xE5,0xF7,0x19,0xCA,0xE7,0x81,0x97,0x18,
  245. 0xC6,0xD3,0xD3,0xB6,0x79,0x53,0x38,0x76,0xF6,0x15,
  246. 0xD2,0xA6,0xDC,0xBD,0x50,0x47,0x16,0x2D,0x6C,0x31,
  247. 0x53,0x69,0x15,0x06,0x01,0x12,0x71,0xA1,0xC9,0x9D,
  248. 0xEE,0x1A,0x40,0x44,0x61,0x08,0x65,0xA1,0x34,0x1C,
  249. 0x6F,0xAF,0x30,0x4A,0xC0,0xD9,0x4E,0x58,0xFE,0x97,
  250. 0x95,0xA4,0xB5,0xCA,0xCD,0x90,0x67,0xDC,0xBE,0x10,
  251. 0x28,0x67,0xAF,0x67,0x16,0x25,0xD9,0x96,0xDC,0x5E,
  252. 0x26,0xD3,0x55,0x70,0xE2,0xFF,0x88,0x01,0x1E,0x2C,
  253. 0x3C,0x8A,0xD6,0x34,0xE9,0x91,0x4D,0xFD,0xAD,0x6E,
  254. 0xC9,0x15,0xFA,0x92,0xA4,0x0E,0xBF,0x8B,0x9B,0xB5,
  255. 0xB9,0x2E,0xE3,0xA1,0x71,0xA9,0xE6,0xD5,0xC1,0x36,
  256. 0x56,0xF6,0xCB,0xED,0x66,0x61,0x3B,0x00,0x5B,0x44,
  257. 0xEC,0x9F,0xD7,0xF0,0x04,0x34,0xB3,0x1A,0xF5,0x5B,
  258. 0x49,0x6F,0x08,0xBB,0xDD,0xD1,0x02,0x28,0x23,0xB5,
  259. 0x8F,0x19,0x1E,0x01,0x81,0x4E,0x47,0xCC,0x86,0xB4,
  260. 0x03,0x89,0x10,0xF0,0x7F,0xCD,0x21,0x72,0x22,0x0A,
  261. 0x5B,0xBD,0x70,0xC9,0xC9,0x79,0x79,0x1E,0x16,0x66,
  262. 0x3C,0xF4,0x0A,0x9D,0x50,0x9A,0xCC,0x49,0x27,0x8B,
  263. 0x30,0x8C,0x62,0xFF,0x2C,0xF8,0x79,0xBD,0x4F,0x31,
  264. 0x6E,0xBC,0x5A,0x21,0xB5,0xB2,0xEF,0x1D,0x95,0x19,
  265. 0xCE,0x38,0x7E,0x06,0xA5,0xB8,0x71,0xC2,0x72,0x5F,
  266. 0x2B,0x9F,0x04,0x5E,0x94,0x46,0xD3,0x6D,0xFC,0x88,
  267. 0x06,0xDD,0x79,0xB4,0x23,0x52,0x77,0x2F,0x93,0x17,
  268. 0x0C,0x3D,0x24,0xDD,0x77,0x91,0x27,0xA1,0x50,0x4E,
  269. 0x25,0x99,0x6B,0x11,0x06,0x80,0xC3,0x0C,0x47,0xB1,
  270. 0xDB,0x31,0xDE,0x4D,0x05,0xAF,0x2C,0x73,0x94,0xA3,
  271. 0x79,0xBB,0x03,0xB8,0xBF,0x8F,0x53,0x2E,0xBF,0x5F,
  272. 0xA8,0x23,0x8D,0x34,0x3A,0x28,0xB4,0x02,0xD0,0x95,
  273. 0x78,0x07,0x14,0x55,0x2A,0x2C,0xE0,0x9E,0xA9,0x67,
  274. 0x96,0xFE,0xBB,0xE0,0x4D,0xE5,0x30,0xCB,0xA2,0x83,
  275. 0x6A,0xA9,0x0D,0x96,0xA3,0x24,0x78,0xB1,0xD4,0xF7,
  276. 0x07,0x70,0xE0,0xBE,0x16,0xA0,0xE1,0xB4,0x97,0x06,
  277. };
  278. const uint8_t refTDES_CBC_24[]={
  279. 0x78,0xCA,0xC6,0x02,0x50,0x7C,0x1F,0x56,0xCB,0x91,
  280. 0x27,0x7B,0xEA,0xD3,0x8F,0x9A,0xF8,0xC9,0x61,0xD0,
  281. 0xAC,0x67,0x4C,0xE3,0x54,0xC3,0x4A,0xB0,0xDF,0x67,
  282. 0xE8,0xF9,0x10,0xEC,0x3F,0x78,0x52,0x57,0xE8,0x66,
  283. 0x34,0x43,0x57,0xAC,0xBC,0x31,0x14,0x9D,0x7A,0x6E,
  284. 0x05,0x83,0x74,0xA1,0xC5,0x2D,0x15,0x47,0x3F,0x01,
  285. 0x00,0x8C,0x42,0x6C,0xC2,0x67,0x9B,0xD8,0xFE,0xAF,
  286. 0xA3,0x12,0xCD,0xFD,0x8A,0x51,0xC6,0x3C,0x53,0xDC,
  287. 0xBF,0x75,0xA7,0x03,0x21,0xE6,0xE3,0x60,0xA0,0xD5,
  288. 0x62,0xF5,0x16,0x8B,0x89,0xFE,0x6A,0x18,0x57,0x5A,
  289. 0x01,0xE7,0xFF,0x67,0x75,0xC6,0x3A,0xE7,0xD2,0x38,
  290. 0xBC,0x1F,0x3A,0xD9,0x0A,0x25,0xCD,0x44,0xA5,0x2D,
  291. 0x76,0xBA,0x04,0xF5,0x06,0xEA,0x46,0x2B,0x91,0xFF,
  292. 0xA8,0x70,0xA3,0x71,0xDB,0x22,0x32,0x80,0x82,0xAA,
  293. 0x76,0x0B,0x09,0xB4,0x2E,0x15,0x40,0x05,0x86,0xBA,
  294. 0xE6,0x3A,0x27,0x40,0x8F,0x35,0xBF,0xC6,0xC7,0xA7,
  295. 0xA8,0xC8,0x7A,0x6F,0x0A,0xE5,0x7F,0x06,0x9F,0xCD,
  296. 0x6C,0x25,0x37,0x04,0x77,0xEB,0x55,0x89,0x5F,0x7A,
  297. 0xA7,0x72,0xB6,0x4D,0xEB,0x12,0x0D,0x37,0x15,0xC2,
  298. 0xB0,0x64,0x79,0xB7,0x31,0xBA,0x74,0x2F,0x5B,0x90,
  299. 0x44,0xC5,0x06,0xAF,0xF3,0x3F,0xC4,0x1C,0x29,0x6D,
  300. 0xD5,0x26,0x96,0x0C,0xBB,0x44,0x35,0xC4,0x65,0x5A,
  301. 0x9A,0x3A,0x6B,0x2E,0xDC,0xF3,0xD2,0x58,0xF9,0xE9,
  302. 0xC1,0xEC,0x91,0xF5,0x64,0xC7,0xE2,0x3C,0x68,0x7C,
  303. 0xC5,0xCE,0x69,0xB8,0xDC,0x69,0xE9,0x5C,0x74,0x3F,
  304. 0xF5,0xA3,0x56,0x29,0x7D,0x56,0x04,0x6C,0xEE,0x8C,
  305. 0xB1,0xDE,0x00,0xA5,0x55,0x7C,0x21,0xFC,0x45,0xC7,
  306. 0xE2,0x78,0xE8,0x10,0xE2,0xCE,0x23,0x6B,0xD6,0x44,
  307. 0x56,0x80,0xE7,0x59,0xCE,0x70,0x91,0x62,0xF9,0xCF,
  308. 0xE1,0x62,0xAC,0x72,0x36,0x33,0xC0,0x37,0x89,0xED,
  309. 0xE3,0xA4,0xAE,0xB1,0x4F,0xD5,0x31,0x0F,0x22,0x5E,
  310. 0x75,0x4E,0x34,0x44,0x7F,0xC9,0xF0,0xE7,0xE0,0x06,
  311. 0x2F,0xBB,0xB7,0xB9,0x26,0xFC,0x6E,0xEC,0x21,0x47,
  312. 0xDF,0xF9,0x67,0x1B,0x23,0xA1,0x69,0xBD,0xCE,0x2F,
  313. 0x58,0x59,0xA5,0x31,0x17,0xD5,0x31,0x5F,0x98,0xFC,
  314. 0xBF,0x63,0xEC,0x1B,0x1D,0xD2,0xBE,0x99,0x6E,0x8E,
  315. 0xFC,0xF1,0x0B,0xE8,0x46,0x87,0xDE,0xED,0x58,0xC6,
  316. 0xA2,0xD0,0x50,0x72,0x7B,0x23,0x0F,0xBF,0xFA,0xBA,
  317. 0x3E,0xCD,0x13,0x80,0x90,0xC5,0xFC,0xA7,0x2B,0x73,
  318. 0x06,0x2E,0xA8,0x9B,0x73,0xD5,0xA4,0x4F,0xCB,0x75,
  319. 0x4C,0xB2,0x74,0xC8,0xBF,0x8D,0xBC,0x83,0x0C,0xC9,
  320. 0xEA,0x9D,0x32,0x95,0x62,0x28,0xEB,0x03,0x2D,0xD7,
  321. 0x90,0x14,0xA4,0x31,0x7A,0x6C,0xCD,0xBF,0x2A,0xA9,
  322. 0x9B,0x68,0x74,0x72,0x25,0x87,0x0B,0x99,0xCE,0xA6,
  323. 0xA4,0xFC,0x44,0x17,0x37,0x17,0xE7,0xEA,0x3E,0xEA,
  324. 0xA2,0xA5,0x38,0xB3,0x2C,0xB4,0x1B,0xA6,0xA9,0xC9,
  325. 0x7D,0xB5,0x2E,0xCA,0x13,0x67,0xF7,0x9C,0xF3,0x91,
  326. 0x2D,0xBD,0x2D,0xCE,0x1F,0x22,0xE7,0x2E,0x1E,0xA0,
  327. 0xC7,0x07,0xA6,0x42,0xFF,0xCC,0xC2,0x1A,0x16,0xB6,
  328. 0x7D,0x33,0x93,0x58,0x58,0x17,0xD2,0x59,0xE6,0xD2,
  329. 0x5C,0x5E,0xEF,0x88,0xD1,0x75,0xDA,0x27,0x3E,0xD0,
  330. 0xAF,0xCA,0xDE,0x87,0x93,0x08,0x55,0x5F,0x01,0xC3,
  331. 0x11,0xCB,0xF7,0xD6,0xE1,0x44,0x91,0x96,0x1C,0x8E,
  332. 0xD5,0xFA,0x23,0xE1,0xC0,0xCA,0xA0,0x50,0xCB,0x5E,
  333. 0xCE,0x9D,0xE6,0x7E,0xF5,0x00,0xA5,0x59,0x2D,0x89,
  334. 0x78,0x61,0xAC,0x5B,0xE3,0xC1,0x75,0xB9,0x42,0x29,
  335. 0xE9,0x25,0x1C,0x8B,0x4A,0x08,0xCC,0x06,0xC7,0x5B,
  336. 0x28,0x3C,0xCF,0xF5,0xC3,0x9E,0x56,0x16,0x0C,0x36,
  337. 0x06,0x28,0x3F,0xD3,0x1B,0x86,0xAC,0xF7,0x57,0x7B,
  338. 0xCF,0x3F,0x24,0x3E,0x92,0xB1,0x89,0x8A,0x40,0xDD,
  339. 0x77,0xEA,0x6F,0xE5,0x9C,0x26,0xF9,0xD9,0x75,0x08,
  340. 0x6B,0xD0,0xD1,0xF3,0xDD,0xCB,0x39,0x07,0xCE,0xC0,
  341. 0xAE,0xD1,0xB9,0x4E,0x22,0x21,0xDB,0xC1,0x9D,0xED,
  342. 0x9F,0xE1,0xBA,0x29,0x60,0x18,0xC5,0x7F,0x7B,0x5E,
  343. };