ref_aes.c 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822
  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 refAES_ECB_128[]={
  15. 0x65,0x86,0x9F,0x20,0x63,0x89,0x1C,0x2F,0x20,0x5D,
  16. 0x94,0x7F,0x55,0x67,0x58,0xFF,0xE9,0xFE,0x4F,0xD7,
  17. 0x93,0x03,0x43,0xDD,0xD0,0x7E,0xA3,0x37,0x58,0x83,
  18. 0x22,0xA2,0x2D,0x61,0xA0,0x41,0x57,0x31,0x65,0x0F,
  19. 0x7A,0x08,0x8F,0xD8,0x9C,0xA3,0xAB,0xC3,0x8E,0x6E,
  20. 0x16,0x11,0xED,0x0C,0xE4,0xA8,0x6C,0x86,0xBB,0x99,
  21. 0x3F,0x79,0x0A,0xAC,0x9F,0xD6,0xFC,0xCC,0xD9,0x71,
  22. 0x36,0x46,0x6F,0xFA,0xD7,0x61,0xCE,0x1F,0xF0,0x9C,
  23. 0xE8,0xE8,0x18,0x39,0x47,0x74,0x2C,0xCA,0x5A,0xDA,
  24. 0x5A,0x60,0xD3,0xD7,0x22,0xD5,0x3E,0x6A,0xD7,0x28,
  25. 0x59,0xF6,0x1C,0x3D,0x6E,0x02,0x06,0x28,0xE0,0x17,
  26. 0x7B,0x1F,0xC2,0xFD,0xE5,0x7C,0x11,0xE7,0x3D,0xC2,
  27. 0x82,0xC9,0xBB,0x62,0xA8,0xCB,0xF0,0x9A,0x9A,0x9E,
  28. 0x75,0x54,0x49,0xEE,0x97,0x66,0x66,0x00,0x79,0xEC,
  29. 0x9E,0xBF,0x91,0x47,0xCE,0x10,0xC3,0x78,0x2B,0x3C,
  30. 0xDA,0xFD,0x3D,0xBA,0xBE,0x51,0x60,0x46,0x6E,0xE3,
  31. 0x87,0x70,0x9D,0x9F,0x9E,0x4C,0x12,0xC3,0xA2,0x91,
  32. 0xEF,0xF5,0xAC,0xDE,0x8E,0x6C,0x5A,0x81,0xE3,0x42,
  33. 0x87,0x83,0xFC,0x22,0x32,0xED,0x85,0x39,0xB0,0x32,
  34. 0x49,0x77,0x49,0x9E,0xA1,0x8E,0x81,0x0B,0x2A,0x66,
  35. 0xD8,0x68,0x57,0x2D,0xDC,0x71,0x0C,0x41,0xBE,0x19,
  36. 0x2F,0x16,0x07,0x69,0x53,0xFF,0x63,0xE0,0xBB,0x2B,
  37. 0x98,0xD8,0xA5,0x58,0xB0,0xFA,0x98,0xBB,0xB4,0x98,
  38. 0x57,0x60,0xE1,0xD2,0x28,0x92,0x26,0xDD,0x81,0xC2,
  39. 0xEE,0xD9,0xD5,0x2F,0x54,0x75,0xAA,0x58,0x7D,0x9D,
  40. 0x7E,0x74,0x66,0xC1,0x43,0xD9,0x00,0x53,0xA4,0x8D,
  41. 0xFD,0xF0,0xEC,0x07,0xFB,0xAA,0x2C,0x9B,0x7B,0x09,
  42. 0x99,0x06,0x51,0xE2,0x68,0xAB,0xDF,0x8D,0x46,0x2D,
  43. 0x7D,0xCB,0x87,0x2A,0x3F,0x62,0x82,0x6D,0xAF,0xE6,
  44. 0xBB,0xAE,0x28,0x56,0x58,0x46,0x45,0xC4,0x51,0x61,
  45. 0x2E,0x52,0x21,0x20,0x7B,0xEF,0x8D,0x4A,0x7B,0xF9,
  46. 0x72,0xE7,0x3C,0x88,0x72,0x88,0xD4,0x87,0x90,0xE1,
  47. 0xD8,0xB0,0x33,0x6C,0x57,0xB7,0xD5,0x6E,0x2B,0x37,
  48. 0xCC,0x42,0xB0,0xAC,0xBB,0xED,0xB3,0x3D,0xD0,0xF5,
  49. 0xF4,0xF3,0x5E,0x17,0x66,0xE6,0x2D,0xF2,0x0D,0x89,
  50. 0x48,0xA1,0x10,0x3E,0xD2,0x92,0x0D,0x3C,0xAE,0x4E,
  51. 0x78,0xDD,0x6E,0x38,0x6E,0x8B,0x2A,0x80,0x5B,0x5A,
  52. 0x53,0x74,0x2B,0x55,0xD8,0x62,0xE9,0x00,0x98,0x60,
  53. 0x61,0x70,0x0E,0x2F,0x41,0x92,0xD5,0x5D,0xBD,0x94,
  54. 0x16,0x16,0x37,0x3C,0xE1,0x30,0x19,0xAF,0x4A,0xDD,
  55. 0x05,0xD7,0x67,0x96,0x24,0xE7,0x8E,0xBD,0x11,0x73,
  56. 0x85,0x42,0xD4,0x79,0xB2,0xA9,0xD3,0x4A,0x42,0x53,
  57. 0x76,0x1D,0x77,0xDB,0x35,0xE0,0x24,0xEA,0x8D,0xAA,
  58. 0x17,0x8F,0x4D,0xC7,0x34,0xF9,0xA5,0x8D,0x7A,0xF3,
  59. 0x94,0x67,0xC7,0xF0,0x2B,0x76,0x20,0xFA,0xAD,0xF2,
  60. 0x20,0x4C,0xAC,0xEC,0x74,0x6C,0xE1,0x06,0x2D,0x95,
  61. 0xAC,0xD5,0x16,0xEE,0x4E,0x32,0xF2,0x3E,0x5B,0x1C,
  62. 0x1B,0x2D,0xF6,0x6F,0x16,0x1E,0xAA,0x86,0x95,0xA4,
  63. 0x7B,0xA4,0xC1,0xDC,0xD6,0xF4,0x4F,0xDB,0xCB,0x9F,
  64. 0xC6,0x25,0x52,0xBA,0x64,0xCE,0x4E,0x18,0xB0,0xE3,
  65. 0x26,0xCE,0x56,0x0A,0x18,0x49,0x50,0x77,0xB1,0x54,
  66. 0xC9,0xA0,0x4E,0x96,0xBA,0x8E,0x0D,0xBC,0x60,0x27,
  67. 0x0F,0xD9,0x45,0x34,0x94,0x40,0x3C,0x11,0xB1,0x62,
  68. 0x40,0x7A,0xDF,0x94,0x6E,0x8A,0xD9,0x52,0xE1,0x01,
  69. 0x1D,0x05,0xF8,0xB0,0xE0,0x5D,0x8A,0xD7,0x4C,0x8D,
  70. 0x27,0x8E,0xDB,0xB3,0x55,0x68,0x35,0x8D,0xF0,0xD5,
  71. 0x2B,0x0B,0xEC,0x04,0x8E,0xAF,0x98,0x4A,0xD4,0xCA,
  72. 0x88,0xF9,0xB5,0x1D,0xF3,0x20,0xB2,0x71,0x80,0x3F,
  73. 0xDB,0x5D,0x0E,0x2A,0xA2,0xB2,0x75,0x21,0x33,0x74,
  74. 0x72,0x2E,0xA6,0x2F,0xC8,0xB0,0x68,0x99,0xB9,0xA6,
  75. 0x3E,0xA5,0x13,0xF7,0x3F,0xED,0xC5,0x0B,0xD1,0xCB,
  76. 0xAC,0x8B,0x83,0xFF,0x50,0x5E,0xBD,0x60,0x09,0x40,
  77. 0xA5,0xE0,0x99,0x1D,0xC8,0x9B,0x2F,0x6F,0x1A,0x5A,
  78. 0x9D,0x90,0x62,0xBB,0x61,0xBD,0x6E,0x3B,0xD9,0x13,
  79. };
  80. const uint8_t refAES_ECB_192[]={
  81. 0x28,0xEA,0xD0,0xAB,0xC6,0x9F,0x53,0xAF,0xF1,0xB3,
  82. 0xC4,0x7C,0xAD,0x1F,0x12,0x35,0x05,0x23,0x89,0x52,
  83. 0x06,0xA3,0x4C,0x0A,0xCC,0x3E,0x0D,0xE3,0xCD,0x93,
  84. 0xC7,0x2D,0xFD,0x79,0x4B,0x5F,0xAC,0x7E,0xD5,0x9F,
  85. 0xE7,0x6D,0x74,0x35,0x43,0xD7,0xB0,0x28,0x69,0x3E,
  86. 0xF6,0xA0,0xCE,0xA8,0x66,0xBA,0x5A,0xDE,0x86,0xCE,
  87. 0x72,0x88,0x85,0xA8,0x01,0xB4,0x9E,0xC3,0xCA,0xCA,
  88. 0xEA,0xD8,0x60,0x8E,0x0A,0x46,0x63,0x8E,0x59,0xFA,
  89. 0xAE,0xE0,0xC7,0xCC,0x8C,0xB3,0x63,0x26,0xB5,0xFC,
  90. 0xF5,0xF9,0x06,0x93,0x91,0xF4,0x4E,0x25,0xB6,0x0E,
  91. 0xA4,0x82,0xC2,0xED,0x86,0xBB,0xB5,0x96,0x85,0x6B,
  92. 0xFA,0xA9,0xF0,0xFF,0x85,0x16,0xA9,0x48,0x83,0x9E,
  93. 0x4F,0x8E,0x74,0x6B,0x57,0x3D,0x67,0x3E,0xDE,0xC8,
  94. 0x4F,0x45,0xD0,0xBA,0x58,0x81,0x4C,0xAA,0x59,0x76,
  95. 0xA8,0xC7,0xF1,0x9B,0x9A,0x7A,0x4C,0xBE,0xC2,0x82,
  96. 0x63,0xFB,0xDA,0x57,0x4D,0x6A,0x79,0x94,0x3C,0x00,
  97. 0xE2,0xA9,0xE0,0x2D,0x9F,0x73,0x9F,0xFE,0x09,0x3B,
  98. 0x08,0xFC,0xFE,0x1E,0x4F,0x5F,0xD6,0x11,0x6C,0xAD,
  99. 0xF8,0x78,0x3E,0x2C,0xB6,0x80,0xD9,0x6D,0x91,0xC1,
  100. 0x92,0xAB,0xA2,0x63,0xBF,0x0F,0x19,0xC0,0xBF,0x9B,
  101. 0xF0,0x73,0xB2,0x19,0x3C,0xF1,0x06,0x1A,0x26,0x3C,
  102. 0x36,0xC0,0x2D,0x86,0x08,0x3A,0x5F,0xD7,0x81,0xD3,
  103. 0xCD,0xA1,0xF6,0x33,0xD4,0x65,0xD2,0xDC,0x18,0x80,
  104. 0x89,0xAC,0x4C,0xAA,0x7C,0x0D,0x16,0xCF,0xE9,0xDA,
  105. 0x4D,0xCF,0x20,0x6D,0x1D,0x6A,0x71,0x62,0xB8,0x74,
  106. 0x08,0x5D,0x77,0xBE,0x25,0x5F,0x91,0x51,0xA7,0x99,
  107. 0xB6,0xE9,0x3C,0x53,0xCD,0x21,0x61,0xE0,0x8B,0xC6,
  108. 0xCF,0xB6,0x33,0xEB,0xF4,0x45,0xBC,0x18,0x04,0x02,
  109. 0x00,0xC8,0x86,0xE7,0x30,0x3C,0xC6,0xBA,0x4D,0xE0,
  110. 0x5A,0x3D,0xB5,0xD8,0x9A,0x97,0xF4,0xA7,0x4F,0x07,
  111. 0x4A,0x2C,0x00,0x01,0xEB,0x58,0x91,0x8D,0x71,0xB3,
  112. 0x68,0xEC,0xEA,0xD0,0x59,0xBE,0x4F,0x99,0xD7,0x36,
  113. 0x2E,0x60,0xE4,0x9F,0x14,0x71,0x74,0x94,0x00,0x34,
  114. 0xCC,0xD0,0x3F,0x4D,0xDC,0xC7,0xCD,0xF5,0x95,0x94,
  115. 0xA2,0x6B,0x71,0x7F,0x3E,0xB5,0xC9,0x70,0x0D,0x33,
  116. 0x98,0x8D,0x7B,0x62,0x21,0xB5,0xA3,0xC3,0xD5,0xF6,
  117. 0x90,0x50,0x6B,0x55,0xB7,0x8B,0x78,0x4B,0x1C,0x27,
  118. 0xE3,0x37,0x96,0x82,0x7B,0xCE,0xF9,0x2B,0xF2,0xC2,
  119. 0x6E,0x89,0xE8,0x21,0x24,0xCB,0x58,0x53,0xAD,0x99,
  120. 0xCA,0x21,0x0A,0x80,0xE8,0xDD,0x28,0xE4,0x08,0x50,
  121. 0x06,0xCF,0xFF,0x59,0x28,0x7F,0xE6,0x53,0x4C,0x74,
  122. 0xA1,0xE0,0x92,0xA2,0x58,0x83,0x05,0xEA,0xBD,0x8B,
  123. 0x90,0xEC,0xBE,0x6F,0xFF,0xAF,0x74,0x60,0x0D,0x18,
  124. 0xBF,0xB5,0x68,0x18,0xDA,0xD5,0x20,0x85,0xDC,0xCB,
  125. 0xD0,0xC4,0x42,0x16,0xFE,0xE8,0x37,0x38,0x26,0xE4,
  126. 0x28,0xD5,0x64,0x2C,0xDC,0x88,0x2D,0x0D,0x20,0x7E,
  127. 0x82,0x48,0xB8,0x6B,0xD1,0x69,0xC5,0x2A,0xAB,0x3F,
  128. 0xBA,0x3E,0xEC,0xDF,0xCC,0xB9,0x89,0x84,0x80,0x9E,
  129. 0xC7,0xF6,0x36,0x06,0xD8,0xEA,0x8A,0x65,0x7E,0xFB,
  130. 0x91,0xD5,0x13,0x90,0xB1,0x21,0x70,0x15,0x39,0xDF,
  131. 0x1C,0x9C,0xEB,0x98,0x3D,0x01,0xA8,0x7B,0x28,0x7C,
  132. 0x6A,0x9E,0x40,0xB7,0xFA,0xE2,0xBE,0xEC,0x0D,0x9F,
  133. 0x53,0x10,0xAB,0x60,0x10,0x6F,0xC1,0x54,0x7A,0xAC,
  134. 0x0A,0x6A,0x91,0xE5,0xB6,0x6E,0x2D,0xF2,0x99,0x2B,
  135. 0xB5,0xA1,0xE3,0x2D,0x89,0x28,0x6E,0xC3,0xE7,0x0C,
  136. 0x28,0x6C,0xEF,0x42,0x8F,0xBC,0xAC,0xFA,0xA5,0x7C,
  137. 0xEB,0x4B,0x14,0xD9,0xF6,0x0F,0x9C,0x1E,0x21,0xB4,
  138. 0x82,0x9A,0x3E,0x98,0x0C,0xE2,0xCC,0xCB,0xE9,0xF0,
  139. 0xF4,0x45,0x0D,0xDD,0x50,0x16,0x91,0xDB,0xBD,0xA7,
  140. 0xE3,0x81,0x47,0x33,0x63,0x30,0xB5,0x4B,0xD8,0xB1,
  141. 0xF6,0x54,0xE0,0xB5,0x43,0x06,0xAB,0x34,0x1E,0x12,
  142. 0xCC,0x68,0xFF,0xAF,0x59,0xDF,0x65,0xB1,0x7F,0x59,
  143. 0x5D,0x74,0xAE,0x93,0xB3,0x79,0xE6,0xA0,0xD6,0xE6,
  144. 0x67,0x7E,0x6D,0x44,0x87,0x8B,0xB1,0x12,0xA1,0x0F,
  145. };
  146. const uint8_t refAES_ECB_256[]={
  147. 0xC5,0x1C,0x71,0x03,0xC3,0x2E,0x0A,0xF7,0xB7,0xF9,
  148. 0xEC,0xF2,0x47,0xA8,0xE5,0xE2,0xA0,0x43,0x78,0xF4,
  149. 0xB7,0x56,0xD8,0x14,0x13,0x60,0x30,0xFC,0xB2,0xF0,
  150. 0x22,0x4C,0xB6,0x5B,0x7E,0xB2,0x20,0x28,0x4E,0x46,
  151. 0x26,0x8D,0xD9,0x86,0x38,0x0C,0x71,0x8F,0x4E,0xAD,
  152. 0xC9,0xC9,0x70,0x74,0x5B,0xA9,0x10,0xBC,0xA8,0xBC,
  153. 0x09,0xEF,0xBA,0x65,0x2A,0xAC,0xFB,0x60,0xD1,0xA1,
  154. 0x65,0x0D,0x91,0xD0,0x43,0x73,0xD8,0xF9,0x73,0x6E,
  155. 0x2E,0x0F,0x7D,0x93,0xB2,0x34,0x74,0x31,0x27,0x02,
  156. 0x6B,0x61,0xE7,0x8F,0xD8,0x6B,0x13,0xC9,0xC8,0x9D,
  157. 0xF7,0x88,0xBC,0x88,0x79,0x51,0x5E,0x92,0x43,0x83,
  158. 0xE6,0x3C,0x55,0x8E,0xB2,0x70,0x42,0x36,0x78,0xBF,
  159. 0x61,0x6D,0xB7,0x96,0xFC,0xEA,0x55,0xEB,0x66,0x0F,
  160. 0xFB,0xAC,0x24,0xB7,0x14,0x2D,0x56,0x6D,0xE6,0x88,
  161. 0x1F,0x9F,0xF7,0xAF,0x7D,0x57,0x0A,0x00,0x54,0x0E,
  162. 0x5B,0xA8,0x0D,0xC3,0x9E,0xFC,0x21,0x8E,0x6E,0xDD,
  163. 0x19,0xA3,0xAA,0xBC,0x92,0xAB,0x10,0xA5,0x0E,0x9D,
  164. 0xC7,0x31,0x66,0xDE,0xA9,0xDC,0x35,0xEF,0x34,0x23,
  165. 0x03,0x3C,0xBB,0x44,0xD4,0x14,0x0D,0xD3,0x0C,0xCE,
  166. 0x4F,0x91,0xAE,0x46,0x13,0x0D,0x55,0xF2,0x2E,0xBC,
  167. 0xDD,0xAC,0x83,0xB2,0x8A,0x19,0xE1,0x3E,0xC0,0x8E,
  168. 0x9F,0x50,0x92,0x8A,0x6C,0xE6,0x4A,0x79,0xBB,0x80,
  169. 0xCA,0x2D,0x01,0x48,0x30,0x95,0xE2,0xFA,0x2B,0x2B,
  170. 0x67,0x60,0x2B,0x13,0x03,0xF5,0x1E,0x74,0x76,0xA9,
  171. 0x9C,0x04,0x56,0x2B,0xEF,0xFC,0xFD,0xEC,0xD5,0x8A,
  172. 0xE1,0x3D,0x3D,0x70,0x2A,0x08,0x77,0x0B,0x3D,0xD2,
  173. 0x33,0x1D,0xE7,0xF8,0x8C,0x41,0xB0,0x62,0x6D,0x01,
  174. 0xC0,0xD3,0xA8,0x4E,0x8C,0xAA,0xA0,0xDC,0x91,0xAC,
  175. 0x33,0xE2,0x55,0x6C,0xC4,0xE2,0x4E,0xCF,0xE4,0x53,
  176. 0xCA,0xA6,0x18,0x8B,0xA6,0x3A,0xAE,0x7A,0xAE,0x73,
  177. 0xA5,0x98,0x9A,0x85,0xD6,0x89,0xA6,0x34,0x1C,0x9A,
  178. 0x69,0xE2,0x89,0x64,0x9D,0xEE,0x13,0xE3,0x9D,0x59,
  179. 0x91,0xFE,0x3C,0x97,0xE6,0xE9,0x1A,0xF4,0x2E,0xAC,
  180. 0xE1,0x3D,0xC7,0xC4,0x68,0xED,0xF4,0xDB,0x6D,0xFC,
  181. 0xD0,0xB1,0x4D,0x76,0xA4,0x13,0x68,0x9E,0x0E,0x51,
  182. 0x8A,0x71,0x61,0xF9,0x8C,0x39,0xEF,0x0E,0x1F,0x19,
  183. 0xA4,0x20,0xBC,0xCC,0x19,0xAF,0x80,0x6F,0x88,0x93,
  184. 0x2A,0xF7,0x50,0x37,0xF1,0x83,0x90,0xEE,0xC6,0x63,
  185. 0x31,0x1A,0x1B,0xD2,0x53,0x85,0x77,0x22,0x44,0xB7,
  186. 0x75,0x55,0x57,0xBB,0xA7,0xF4,0xC9,0x8B,0x0E,0xC8,
  187. 0xCB,0xB9,0x62,0x87,0xCF,0x1E,0x60,0x5E,0x53,0x64,
  188. 0x29,0xC9,0x7D,0xA1,0x4A,0x9E,0xDD,0x38,0xD9,0xB6,
  189. 0xE3,0xF7,0x9B,0xC6,0xF7,0x4C,0xDB,0xE9,0x92,0x08,
  190. 0x3E,0xE2,0x45,0xB9,0xF3,0x14,0x44,0xD7,0x78,0xA0,
  191. 0x78,0x56,0x2A,0xC8,0x83,0x64,0xAF,0xF1,0xD0,0x53,
  192. 0x0B,0xFA,0x2C,0xDA,0x0B,0xE5,0xE0,0xD2,0x70,0xA2,
  193. 0x5A,0x12,0x48,0xF1,0xD7,0xF3,0x00,0x4E,0xBD,0x16,
  194. 0xB3,0x1F,0x9A,0x2C,0x2A,0xF2,0xF7,0xAB,0x84,0x2C,
  195. 0x96,0x00,0x8F,0x0D,0x9A,0x5F,0xFA,0x56,0x5D,0x7A,
  196. 0x0B,0xBC,0xC1,0xFE,0x14,0x2F,0xF4,0x9A,0xEB,0xAF,
  197. 0x78,0x29,0x34,0x16,0x93,0xE7,0x57,0xCA,0x05,0xF2,
  198. 0x46,0x77,0x03,0x90,0x46,0xF0,0x65,0x05,0x9E,0xCF,
  199. 0xD0,0xCE,0xC5,0xE0,0x43,0xE0,0x9F,0x8B,0xA0,0x9F,
  200. 0x44,0x0B,0x5F,0xD5,0x19,0x1E,0x5A,0xCF,0x26,0xD4,
  201. 0x2D,0x67,0xC2,0x8F,0x6F,0xE5,0x29,0xDA,0xF1,0x26,
  202. 0x5B,0x87,0xA0,0x4C,0xA1,0xB6,0x27,0x7A,0x70,0x07,
  203. 0xBE,0x8E,0xCD,0x8F,0x4E,0x0E,0xBE,0xCB,0xF3,0x43,
  204. 0x79,0xB8,0xFB,0x06,0x41,0x96,0xA0,0xE9,0xDC,0x78,
  205. 0x23,0x26,0x79,0x71,0x26,0x4E,0x08,0x03,0x16,0x25,
  206. 0xEE,0xF6,0xF9,0x61,0xDF,0x73,0x13,0xA5,0xF6,0x04,
  207. 0x5E,0x17,0x52,0x6D,0x17,0x3A,0x4A,0x88,0x95,0x7D,
  208. 0x8F,0x44,0x38,0x38,0x06,0xD1,0xF8,0x8E,0x72,0x55,
  209. 0x7A,0xB5,0x3B,0xAA,0xBB,0x00,0x2D,0x6F,0xFA,0x6B,
  210. 0x1D,0x90,0x2B,0x02,0xF4,0xBB,0xDE,0x6C,0xC7,0x9F,
  211. };
  212. const uint8_t refAES_CBC_128[]={
  213. 0x9E,0xB2,0x93,0xCF,0xA3,0xF3,0x9F,0x22,0xAB,0x7D,
  214. 0xBB,0x11,0xF8,0xD5,0xD0,0xE7,0x76,0x6F,0xCD,0xF5,
  215. 0x24,0xF2,0xEB,0x75,0x01,0x33,0x66,0xD0,0x8B,0x38,
  216. 0xB1,0x06,0xDA,0xD7,0xFA,0x4D,0x99,0x19,0x9F,0x8F,
  217. 0xE7,0xDE,0x06,0xC8,0xE3,0x0E,0x52,0x42,0x37,0xCE,
  218. 0x85,0x51,0xBA,0x01,0x6F,0x3F,0xB5,0x33,0xF5,0xF6,
  219. 0x2A,0x87,0x04,0xB1,0x2C,0xB7,0x0A,0x0E,0x42,0x9F,
  220. 0xCE,0xCA,0x09,0x21,0xB0,0xBD,0x09,0x82,0xEF,0x37,
  221. 0xAF,0x93,0xE0,0xF4,0x4B,0x15,0x35,0xB5,0x80,0x52,
  222. 0x0B,0xCA,0xA7,0x0C,0x66,0x85,0x6C,0x32,0xAF,0x2E,
  223. 0x82,0xED,0x44,0xC0,0x0D,0xE1,0x73,0xE2,0xD4,0xEB,
  224. 0xD9,0x08,0x64,0x09,0x55,0x00,0xB0,0xD8,0x5E,0x9E,
  225. 0x72,0xCC,0x44,0xA7,0xBA,0x31,0xCB,0xC2,0xCA,0xB0,
  226. 0x32,0x7C,0xEF,0xC1,0xE2,0x1A,0x68,0xC4,0x0C,0x5B,
  227. 0x1C,0x63,0xBC,0xFF,0x47,0xC4,0x01,0xA8,0x7B,0x16,
  228. 0x41,0xA0,0x43,0x87,0x06,0x0B,0x19,0x0C,0x72,0x4B,
  229. 0xED,0xEA,0x5A,0x5E,0x0A,0x14,0xC9,0xB4,0xDF,0xEC,
  230. 0x57,0x01,0x37,0x3D,0xCC,0x97,0x07,0x4C,0x48,0x64,
  231. 0x78,0xAB,0x5B,0x23,0xBF,0xE4,0x5C,0xC2,0xB4,0x06,
  232. 0xEC,0x75,0x18,0x56,0x70,0x6C,0xCF,0xC2,0x86,0x7F,
  233. 0xD5,0xBB,0x32,0x8F,0x9E,0x63,0x45,0x7B,0xD8,0x87,
  234. 0x1C,0x08,0xA4,0x51,0x6F,0x34,0x49,0x64,0xEB,0x16,
  235. 0x0B,0x95,0xB6,0xCB,0x75,0x27,0x4B,0xE3,0x15,0x2D,
  236. 0x9E,0x49,0xF1,0x09,0xAC,0xE0,0x70,0x34,0x59,0x6B,
  237. 0xE8,0x01,0x13,0x65,0xA5,0x43,0x7E,0xD6,0xBD,0xE7,
  238. 0x59,0x68,0x83,0x7F,0x85,0x56,0xAF,0x91,0x69,0xDE,
  239. 0x2E,0x79,0x3F,0xA7,0x82,0x5B,0x91,0xA2,0x81,0x26,
  240. 0xAC,0xEC,0xBF,0x25,0x8E,0x03,0x03,0x3E,0x38,0xC4,
  241. 0xC6,0x7B,0x74,0xFD,0x9B,0x56,0x92,0xA1,0x01,0x8A,
  242. 0xBE,0xB0,0xEE,0x76,0x80,0xC8,0x72,0xBF,0xCE,0xCE,
  243. 0xE2,0xF6,0xF7,0xC6,0xE2,0x68,0x3E,0xA6,0x06,0x7A,
  244. 0x7F,0xE8,0xF8,0xCA,0x15,0xA5,0xCA,0xC0,0x41,0x15,
  245. 0x87,0xF8,0xC9,0xFE,0xBB,0x64,0xDC,0xF7,0x36,0x18,
  246. 0x16,0xC6,0x30,0xCA,0xAA,0x47,0x9A,0xD0,0x0D,0x19,
  247. 0xF6,0x95,0xE1,0x55,0x15,0x0A,0xCA,0xED,0xBF,0x01,
  248. 0x22,0xEA,0x3F,0xF1,0x95,0x0F,0x21,0x18,0x3F,0xA6,
  249. 0x6E,0xB2,0x3D,0x01,0x8F,0x3B,0x3B,0x5E,0x4E,0xFA,
  250. 0xE1,0x76,0x50,0x3A,0x29,0xAE,0xB1,0x92,0x65,0x51,
  251. 0x5E,0xA7,0x1B,0x08,0x06,0x6E,0x06,0x5F,0xFD,0x87,
  252. 0xF8,0x23,0xE9,0xED,0x6E,0x38,0x6F,0x30,0x78,0x6E,
  253. 0x8D,0xB6,0x7A,0x8F,0x40,0x37,0x18,0x0F,0xD1,0x7E,
  254. 0xB7,0xF3,0x4E,0xFE,0x8F,0x0B,0x5A,0xC0,0x47,0xF7,
  255. 0xB9,0xB7,0xAD,0xEC,0x87,0x3D,0xB1,0xE9,0x7F,0x11,
  256. 0xCD,0x8F,0x08,0xE8,0x2A,0x9A,0x08,0xC4,0xE3,0xB2,
  257. 0x9A,0xCB,0x9C,0xA9,0xCD,0x14,0xC6,0x9C,0xF1,0x92,
  258. 0x49,0xC6,0xF2,0xC9,0xC0,0x43,0xF5,0xCE,0x38,0x82,
  259. 0xD5,0x41,0x31,0x96,0xB7,0x27,0xC6,0x5C,0x15,0x0E,
  260. 0x78,0x5E,0xEB,0xE1,0x89,0x1A,0x5C,0xC4,0xEE,0xF0,
  261. 0x53,0xD6,0x60,0x90,0xC8,0xB3,0xE5,0x5D,0x5F,0xD0,
  262. 0x52,0xCD,0xCA,0xC8,0xB9,0xA3,0x43,0x4E,0x6A,0xED,
  263. 0xEE,0x03,0xC8,0x22,0xE0,0x11,0x15,0x53,0xB8,0x62,
  264. 0x6B,0x0A,0x9F,0x90,0x4F,0xF6,0x6C,0x24,0xED,0xFB,
  265. 0x0E,0xF0,0x1F,0x1F,0xAB,0x72,0xBD,0x54,0xCC,0xDF,
  266. 0x8B,0x86,0x5C,0xC9,0xEF,0x41,0x1B,0xC6,0x67,0x57,
  267. 0xA7,0xDD,0xF2,0x0D,0x1D,0x02,0xD7,0xF1,0x90,0xE3,
  268. 0x3E,0xE4,0x9F,0xEA,0x6D,0x21,0x4D,0xCA,0x33,0xE0,
  269. 0x09,0xB6,0xEB,0xC5,0xE8,0xF2,0x87,0x0D,0x40,0x7A,
  270. 0xDC,0x98,0x28,0x0B,0xFF,0xD2,0x62,0x76,0xF0,0xDB,
  271. 0x40,0x27,0xB0,0x60,0x05,0x27,0x27,0xF5,0xE5,0xD2,
  272. 0xE0,0x4B,0x2D,0x1F,0x7B,0x79,0x8B,0xE4,0x4F,0xFD,
  273. 0xC0,0x69,0xEB,0x87,0x8B,0xCB,0xCB,0xB8,0x8E,0x17,
  274. 0x8B,0xF0,0x31,0x6B,0x5B,0x92,0x41,0xB5,0xA5,0x98,
  275. 0xCF,0x2B,0x4C,0xC2,0x26,0x4D,0x90,0xE4,0x9B,0xD2,
  276. 0xAB,0x5C,0x06,0x1F,0x38,0x36,0x35,0xB5,0x2F,0x9D,
  277. };
  278. const uint8_t refAES_CBC_192[]={
  279. 0x62,0xD5,0x8D,0x83,0xA0,0xF5,0x6D,0x48,0xF5,0xD2,
  280. 0x46,0x3C,0x31,0x96,0x88,0xFB,0x17,0x77,0x4B,0x59,
  281. 0xBE,0x56,0xBE,0x27,0xB4,0x54,0x09,0xA0,0xF3,0x22,
  282. 0x0C,0xAD,0x98,0x6E,0xB9,0xE5,0x73,0xDB,0x02,0xD1,
  283. 0x9C,0x2B,0x24,0x1F,0x16,0x31,0xED,0xED,0x11,0xB4,
  284. 0x7C,0x1E,0x5D,0xBA,0xFC,0xA8,0xC3,0xCC,0x22,0x0F,
  285. 0xDF,0x3E,0x86,0xB3,0x98,0x40,0x82,0x80,0x84,0xFD,
  286. 0xAB,0x84,0xF8,0x53,0x86,0x31,0x7E,0x85,0x2E,0x3F,
  287. 0xE1,0xB7,0xAD,0x5D,0x7A,0x48,0x0D,0xF5,0x4F,0xDA,
  288. 0x0A,0x52,0x1A,0x8D,0x9E,0x63,0xD2,0xA7,0xDA,0x0D,
  289. 0x95,0xD7,0x85,0x00,0x11,0xDC,0xAA,0x07,0xBF,0x02,
  290. 0x29,0xCB,0x96,0x8F,0x24,0x02,0x74,0x0E,0x6A,0xA6,
  291. 0xDA,0x5C,0x8D,0xD0,0x4E,0x92,0xE5,0x63,0x84,0x1B,
  292. 0x00,0xA5,0x54,0xE6,0x50,0x4C,0x6D,0x0E,0x10,0x93,
  293. 0x75,0x31,0x26,0x64,0xD7,0x91,0x3E,0xE1,0xF1,0xA0,
  294. 0xA5,0x3C,0xCD,0x1F,0x6A,0x9B,0x51,0xE2,0xA7,0xA1,
  295. 0xFC,0x01,0xD9,0xA1,0xF0,0xE0,0xA6,0x38,0x79,0x74,
  296. 0xC8,0x51,0xCE,0x6A,0xEC,0x7C,0xA8,0xC1,0xBA,0x2C,
  297. 0x1F,0x94,0x32,0xF0,0x9A,0xBB,0x60,0x54,0xCE,0xEE,
  298. 0xC2,0x95,0xA6,0x6C,0x99,0xE2,0xB7,0xCB,0xCA,0x43,
  299. 0x23,0x5A,0xA3,0x16,0x9A,0xBA,0x33,0xBE,0x09,0x72,
  300. 0xE5,0x7A,0x7F,0x57,0xB1,0xC5,0xC8,0xB6,0x83,0x37,
  301. 0xEC,0x94,0xBB,0x39,0x12,0x5B,0x5E,0x36,0xA6,0xC5,
  302. 0x9C,0x2B,0x32,0xE3,0x2B,0xCB,0x72,0x64,0x11,0x88,
  303. 0x05,0x97,0x59,0x20,0xCB,0x34,0xC2,0x55,0x7B,0xE2,
  304. 0x63,0x4C,0x05,0xCF,0x68,0x82,0x34,0x18,0x5A,0x1A,
  305. 0x35,0xAC,0x3C,0xE7,0x43,0x06,0x68,0x9B,0xE9,0x4D,
  306. 0x4C,0x8A,0xD9,0xCF,0xDD,0x76,0x68,0x12,0x52,0x97,
  307. 0xE0,0x6A,0x27,0x51,0x5D,0x84,0x3F,0x61,0x56,0x12,
  308. 0xE7,0x20,0xC0,0x80,0x61,0xD5,0x50,0x19,0x55,0x21,
  309. 0x7B,0x71,0x4C,0xC1,0x27,0x5A,0x3C,0x05,0xCA,0xBF,
  310. 0xFE,0xD8,0x84,0x70,0x63,0x71,0x59,0x8C,0xDC,0x01,
  311. 0x8C,0x8D,0x16,0xB5,0x85,0xF6,0x7B,0xA9,0x26,0x9F,
  312. 0xEA,0xAC,0xD6,0x3E,0x83,0xE9,0xE0,0x8C,0x06,0x00,
  313. 0x7E,0x36,0x49,0x85,0xBE,0x82,0xDD,0x68,0x98,0x90,
  314. 0x68,0xE4,0xDA,0x28,0x40,0xA9,0x71,0x83,0xEC,0xCC,
  315. 0x10,0x4A,0xC3,0x51,0x99,0x16,0xC8,0x63,0xF1,0x45,
  316. 0xF6,0xAD,0x8E,0xE9,0x2D,0xC0,0x20,0xA3,0x5F,0x9A,
  317. 0xCD,0xD7,0xB2,0x2D,0xC5,0xF5,0x67,0x53,0xB0,0xE5,
  318. 0xFB,0x51,0x8A,0x5D,0x75,0xE5,0x40,0xF4,0x5E,0xA5,
  319. 0xA5,0x98,0x69,0x26,0xC5,0xFF,0x05,0xE7,0x3A,0x3D,
  320. 0xB3,0x01,0xF6,0xF6,0xA8,0x21,0x9F,0xA4,0x67,0xB1,
  321. 0xA2,0x4A,0x45,0x74,0x18,0xC5,0x5B,0x31,0xA4,0x9D,
  322. 0x57,0x69,0xEF,0xCD,0xD7,0x81,0x4A,0xF8,0x3A,0xFF,
  323. 0xBD,0x9E,0x5D,0xBC,0x08,0x84,0x50,0x8C,0x21,0x80,
  324. 0x65,0x15,0xF4,0x50,0x94,0x65,0x8E,0xE9,0x6A,0xEE,
  325. 0x63,0xF8,0x56,0x4C,0x89,0x16,0x3F,0x70,0x4C,0x57,
  326. 0xF2,0x64,0xCB,0x86,0x5A,0x3E,0x84,0x52,0x7F,0xEA,
  327. 0x67,0xE7,0x96,0xCB,0x3F,0x9F,0xFF,0xDB,0x59,0xE7,
  328. 0x33,0xE9,0xCB,0x73,0xAB,0x80,0x90,0x4C,0xD8,0xCF,
  329. 0x3C,0xE2,0xA1,0xCF,0xEA,0xBE,0x60,0xD7,0xA6,0x4C,
  330. 0x9A,0x08,0x64,0x22,0x85,0xC4,0x06,0x8E,0x6B,0x44,
  331. 0x10,0x8F,0xC2,0x9B,0xEE,0x4C,0x30,0xFB,0xC2,0x71,
  332. 0x63,0x06,0x76,0xF0,0x79,0xE8,0xF0,0x70,0xDE,0x48,
  333. 0xB8,0x8A,0x5D,0x41,0x2B,0x4A,0x0C,0x7F,0x8E,0xBF,
  334. 0xAF,0x5F,0xB3,0x28,0xFD,0x01,0xCF,0xCE,0xBA,0xA7,
  335. 0x1B,0x9A,0xBC,0xD0,0x62,0x5F,0xB6,0x63,0x5A,0xC6,
  336. 0x74,0xE0,0xE4,0x20,0xCE,0x9B,0xC6,0xAA,0x0F,0x60,
  337. 0xB1,0xD3,0x54,0x39,0x2E,0x42,0x68,0x46,0x6F,0xBE,
  338. 0x1D,0x68,0xF4,0x28,0x66,0xDE,0xC3,0x81,0x03,0x81,
  339. 0x18,0x77,0xAD,0xD2,0xEC,0x0D,0x91,0xD0,0x0F,0x35,
  340. 0x29,0x79,0xA4,0xDE,0xD8,0xC5,0xBD,0x4D,0xEA,0xFC,
  341. 0xAF,0x5D,0xA1,0x31,0x90,0xBA,0x92,0x1A,0x8F,0x93,
  342. 0x94,0xFE,0x6E,0xC3,0xEB,0xEC,0x37,0x77,0x35,0x59,
  343. };
  344. const uint8_t refAES_CBC_256[]={
  345. 0x0E,0x02,0x38,0x69,0x61,0x5C,0x16,0x1F,0xA8,0xE5,
  346. 0x12,0x40,0x87,0xF7,0xAE,0xB2,0xCC,0xE5,0x54,0x0E,
  347. 0xCC,0x12,0xCF,0x94,0x3E,0x92,0xE7,0x6C,0x9A,0x11,
  348. 0x9E,0x76,0x71,0xC5,0xC0,0xE5,0x34,0xBB,0x6C,0x95,
  349. 0xA7,0x63,0xD1,0x95,0x19,0x44,0xCB,0x85,0x17,0x92,
  350. 0xB4,0x23,0x22,0x54,0xAB,0x76,0x1F,0xE4,0xB1,0x8E,
  351. 0x1D,0xF2,0x19,0x21,0xA6,0x65,0xAA,0x14,0x60,0xAF,
  352. 0xD9,0x11,0x6F,0x79,0xD1,0xCE,0x5E,0xAF,0x7D,0xE0,
  353. 0x49,0x00,0x2C,0x17,0x97,0xA5,0x73,0x4E,0x21,0xB1,
  354. 0xBB,0xF5,0x82,0xC9,0xF7,0xAA,0x19,0x4B,0x83,0xE3,
  355. 0xA3,0xEF,0x31,0x4A,0xE6,0xB2,0x98,0x8F,0x8D,0xD3,
  356. 0x01,0x56,0x4D,0x90,0x10,0x90,0x6B,0xBD,0x35,0x06,
  357. 0x25,0x6D,0x03,0x9B,0xED,0xBC,0x78,0xA1,0x6E,0x73,
  358. 0x79,0x25,0xAD,0x8A,0x56,0x2C,0x93,0xAC,0x1F,0x15,
  359. 0xA0,0x70,0xD3,0xFA,0xA6,0x1D,0xE0,0x41,0x88,0x97,
  360. 0xE2,0xBA,0x76,0x98,0x6A,0xBA,0x86,0xFE,0x1A,0x71,
  361. 0x52,0x61,0xBB,0x80,0x7A,0x77,0xE2,0x7E,0x64,0xD5,
  362. 0xEE,0xFC,0x33,0x9B,0x3E,0x53,0xB2,0x22,0xF8,0xD3,
  363. 0x5A,0x65,0xC8,0x6F,0x3A,0xC0,0xFB,0xAF,0xD4,0xD9,
  364. 0x29,0x92,0x30,0x3E,0xB1,0x35,0x7D,0x27,0x77,0xA4,
  365. 0xF1,0x17,0x48,0xE6,0x5C,0x55,0x48,0xE6,0x2B,0x83,
  366. 0x57,0x0E,0xDE,0xBA,0xCA,0x39,0x1C,0x6A,0x7C,0xBA,
  367. 0x01,0x82,0xE1,0x2E,0xC7,0xB0,0xD1,0xBF,0xF1,0x1B,
  368. 0xB8,0x3C,0x6E,0x02,0xA7,0xFF,0xC0,0x3E,0xEA,0xF9,
  369. 0x50,0xA7,0xF9,0x1A,0xF7,0xDA,0x65,0x26,0xFF,0x37,
  370. 0xCA,0x50,0x59,0x7A,0xA5,0x75,0x8E,0x79,0xFD,0xE6,
  371. 0xA1,0x53,0x44,0x49,0xA9,0x5C,0x81,0x6A,0x7D,0x07,
  372. 0x17,0xE5,0x12,0x3B,0xE3,0x80,0x95,0x76,0x6D,0x35,
  373. 0xDD,0x42,0xBF,0xE7,0xD5,0xFF,0xB6,0x7F,0xEA,0x25,
  374. 0x3E,0xCF,0x64,0x9E,0xA2,0x48,0xE8,0x65,0x4B,0x65,
  375. 0x57,0xE4,0xD7,0x2A,0xC3,0x7B,0x48,0xA1,0xBE,0xFB,
  376. 0x33,0x54,0xD8,0xA4,0x0D,0x16,0x08,0xCC,0xB3,0xC7,
  377. 0x21,0xA8,0xD8,0xAE,0x60,0x29,0x2E,0xF5,0x8C,0xBD,
  378. 0x6C,0x0F,0x04,0xDE,0x9D,0x52,0xA8,0xCD,0x90,0xF9,
  379. 0x9D,0xC5,0xDE,0x63,0x1C,0xF7,0x25,0xF5,0xFA,0x3E,
  380. 0xC8,0xFA,0x4D,0x5A,0x72,0x84,0xF7,0x86,0xF3,0xBA,
  381. 0x4E,0x52,0x22,0x8B,0x3D,0x85,0xB3,0x04,0xEF,0x49,
  382. 0x7E,0xB7,0x42,0x25,0x48,0xC9,0xF0,0x26,0xB7,0x87,
  383. 0x57,0x84,0xFC,0x7C,0xA8,0xC1,0x08,0xC5,0xBD,0x0F,
  384. 0x5B,0x59,0x62,0xCD,0xDC,0x48,0x4A,0x1D,0xFB,0x78,
  385. 0x05,0x40,0x16,0x9C,0x7B,0xCF,0x50,0xF1,0xE5,0x16,
  386. 0x24,0xD4,0xA2,0xBF,0xAC,0x6A,0x0F,0x45,0x22,0xDB,
  387. 0x51,0x3A,0x65,0xA3,0x7C,0x2B,0x1C,0xAF,0x6F,0x85,
  388. 0x8F,0xA3,0xD3,0xE4,0x80,0x6C,0x73,0xA5,0xDC,0xC9,
  389. 0x9C,0x74,0x68,0xE6,0x17,0x1E,0x57,0x42,0xA9,0x57,
  390. 0xE1,0xE0,0x03,0xF4,0xD3,0x10,0xC6,0xBF,0x4F,0x89,
  391. 0xD1,0x6E,0xB2,0xBF,0xFB,0x43,0xCB,0x6B,0x96,0x80,
  392. 0x44,0xF5,0x70,0x26,0xD1,0xFF,0x1C,0x74,0x04,0x4D,
  393. 0x48,0x17,0xFB,0x37,0xA8,0x97,0x96,0x15,0xD0,0xC8,
  394. 0x88,0xA6,0x5D,0x1B,0x34,0xCE,0xE9,0xA0,0xAD,0x34,
  395. 0xE9,0x9A,0xF4,0xA2,0x24,0x71,0x06,0x52,0xA1,0xC8,
  396. 0x16,0xCE,0xB2,0xE2,0xEC,0xAC,0x31,0x5F,0x93,0x64,
  397. 0x8C,0x3E,0xF4,0xC5,0xED,0x62,0xD3,0xDD,0xB8,0xB6,
  398. 0x2C,0x97,0xFC,0x11,0x19,0x91,0xBB,0xE5,0xB7,0xE7,
  399. 0xE5,0xD2,0xDA,0x39,0xE1,0x5A,0x63,0x16,0xA0,0x46,
  400. 0x1A,0xE5,0x79,0x78,0x78,0xAE,0x2E,0xB2,0xB3,0x97,
  401. 0xF0,0xC6,0x87,0x0F,0x2F,0x39,0x46,0x2D,0x45,0xFE,
  402. 0x34,0xD4,0xA9,0x9F,0x51,0xDA,0x95,0xD7,0x6E,0xCA,
  403. 0x0C,0x25,0xD6,0x3D,0x50,0x6A,0x40,0x3E,0x48,0x40,
  404. 0xC9,0xAD,0x80,0x47,0x93,0x33,0x32,0x8E,0xE6,0xD4,
  405. 0xAF,0xAA,0xF4,0xBD,0x9F,0xA7,0xDE,0xBA,0x95,0x30,
  406. 0x2B,0xE2,0xF0,0xFE,0xE4,0x90,0xB3,0x98,0x89,0x7E,
  407. 0x68,0xA0,0x94,0x44,0x27,0xBF,0x08,0xC4,0x80,0x7D,
  408. 0xB3,0xB3,0x64,0x30,0xE7,0x59,0x9D,0x98,0x3C,0xDC,
  409. };
  410. const uint8_t refAES_CTR_128[]={
  411. 0xFF,0x50,0x83,0x66,0x68,0x80,0x52,0xE8,0xAE,0x43,
  412. 0xC1,0xCC,0x8D,0x60,0x9C,0xF9,0x11,0xA6,0x1F,0x82,
  413. 0xF1,0xD9,0xFF,0x23,0xAF,0x47,0xF1,0xCE,0x99,0xA1,
  414. 0xDD,0xD2,0x82,0xAD,0x44,0x96,0x73,0xA1,0xB2,0x0B,
  415. 0x2E,0x30,0x37,0x89,0x4C,0xEC,0x20,0x73,0x29,0xE0,
  416. 0x5D,0xCD,0xAE,0x32,0x25,0xF3,0x14,0xB8,0xB3,0x98,
  417. 0x55,0x44,0xE5,0x12,0x47,0xD1,0x82,0x37,0xDB,0x9A,
  418. 0x1B,0x82,0x0A,0xF7,0x66,0xCA,0x4F,0xC0,0xB7,0xC9,
  419. 0xC8,0xD6,0xC9,0x0E,0xAE,0xC3,0x69,0xDB,0x3D,0x56,
  420. 0xC1,0x0E,0x74,0x54,0x1A,0xA1,0x79,0x90,0x1F,0xC4,
  421. 0x10,0xA8,0xFA,0x0E,0x4C,0xD8,0xD1,0x15,0x0C,0x9D,
  422. 0x88,0x1C,0xDE,0x6C,0x4D,0x31,0x1C,0xCA,0x06,0xFC,
  423. 0xC4,0x0B,0x40,0xC7,0xEF,0x0F,0x7C,0x21,0x90,0xAE,
  424. 0xB1,0x8F,0x1B,0xC9,0x7B,0xA6,0xF7,0xB9,0x66,0xFE,
  425. 0xED,0x5C,0x6C,0x2B,0xD1,0x9A,0x76,0x89,0xEC,0xC5,
  426. 0xE2,0x97,0x71,0x32,0x8D,0xE3,0xAE,0xF4,0x8B,0x4C,
  427. 0x8E,0x6A,0xCC,0xB6,0xC9,0xAD,0xE2,0x59,0x82,0xEB,
  428. 0x31,0xB2,0xA3,0xF7,0x61,0xC6,0xA9,0x00,0x82,0xA4,
  429. 0x9E,0xF2,0x51,0xB0,0xDE,0x5A,0xF9,0x79,0x3D,0x17,
  430. 0xFD,0xE1,0xA0,0xAD,0x22,0x72,0x41,0xC3,0xB6,0xD0,
  431. 0xDC,0xE3,0xD5,0xDB,0xAA,0x83,0x77,0x80,0xD0,0x8B,
  432. 0x14,0x3C,0xE4,0x66,0x7B,0xC4,0x15,0x80,0x19,0x9D,
  433. 0x22,0x13,0xE6,0x82,0x14,0xDC,0x73,0xC4,0x1D,0xBC,
  434. 0x79,0x7A,0x84,0x07,0xCD,0x46,0x96,0x0C,0x42,0xFA,
  435. 0xB7,0xD2,0x5B,0xA3,0x0A,0x86,0xDD,0xAD,0x07,0xCE,
  436. 0x11,0xE8,0xC6,0xAC,0xF3,0xDF,0xCB,0x80,0x7C,0x54,
  437. 0x2B,0xE2,0x12,0xCC,0xFF,0xC0,0x20,0xFF,0x47,0x1F,
  438. 0x6A,0x46,0x4A,0x3F,0xDD,0x65,0x15,0x5D,0xC8,0x3A,
  439. 0xDD,0x39,0x8C,0xAB,0x2E,0x34,0x5D,0x17,0xF9,0x4C,
  440. 0x92,0x6D,0xA7,0x8A,0x32,0x2B,0xD7,0xCF,0x17,0xDC,
  441. 0x48,0xE5,0xAA,0x31,0x3E,0x8C,0xCC,0x29,0x7A,0x5A,
  442. 0x60,0x92,0xC8,0x71,0x16,0x92,0xAE,0x1C,0x70,0x82,
  443. 0xAA,0x04,0x42,0xAE,0x84,0x8B,0x88,0x15,0x10,0x80,
  444. 0x14,0xFD,0xAD,0xBB,0x12,0x56,0x2E,0x8A,0xDF,0x9C,
  445. 0xC0,0x99,0x94,0xE1,0xB4,0xA2,0x04,0x90,0xAE,0xDD,
  446. 0xF9,0xE5,0xEF,0x5E,0x94,0x0B,0xAC,0x17,0x7C,0x59,
  447. 0x4A,0x55,0xC4,0x67,0xCE,0xFB,0x59,0xB2,0xAA,0x5B,
  448. 0xEE,0x07,0x59,0xC1,0xAB,0xB9,0xDE,0xB2,0xDE,0xFC,
  449. 0x75,0xAF,0xC0,0x93,0xAF,0x6D,0xC2,0x5B,0x16,0xE5,
  450. 0xAF,0x6B,0x27,0x91,0x9C,0x63,0x87,0x2D,0x3F,0xAD,
  451. 0x3F,0x19,0x17,0xDF,0xE3,0x71,0x65,0x84,0xDA,0xFD,
  452. 0x08,0x48,0x80,0x3F,0x9D,0x1E,0x4E,0x94,0xB4,0xA6,
  453. 0xFE,0xEE,0x47,0x6F,0x94,0x8F,0xF6,0x45,0x0A,0x33,
  454. 0x12,0xB2,0x76,0x86,0xBE,0x06,0xBA,0x78,0x0F,0x17,
  455. 0xEB,0x3E,0xAB,0xAE,0x7A,0xB0,0x6E,0x5D,0xAB,0x84,
  456. 0x67,0x9C,0x5E,0xDD,0xA9,0xDA,0x96,0x90,0x6E,0x84,
  457. 0x06,0x14,0x5C,0xC4,0x26,0xD3,0x38,0xE7,0x2D,0xFE,
  458. 0x1C,0xD2,0x9B,0x3C,0x34,0xA0,0xF5,0x24,0x2D,0x84,
  459. 0x92,0x4C,0x10,0x2C,0xCD,0xDA,0xDC,0x80,0xC9,0x04,
  460. 0x34,0xFD,0x3F,0x20,0x53,0xD0,0xE0,0xE6,0x33,0xD2,
  461. 0x17,0x82,0xB1,0x6A,0x48,0xC0,0xA9,0xDC,0x55,0x18,
  462. 0x68,0xBE,0xE5,0x3C,0x91,0xAD,0x28,0x76,0xAA,0xEB,
  463. 0x85,0xE1,0x71,0xD3,0x69,0x25,0xA0,0xE4,0x75,0xDA,
  464. 0x28,0x0B,0x60,0x26,0x4A,0x81,0x2E,0x50,0x3C,0x4E,
  465. 0xD9,0xBB,0xD8,0xF9,0x11,0x3A,0xC0,0xBB,0xDA,0x41,
  466. 0xDF,0xAC,0x1B,0x07,0x22,0xAC,0x54,0x05,0x99,0x4D,
  467. 0xCC,0xF9,0xDE,0x66,0xE9,0x57,0xE3,0xE3,0x4C,0x6A,
  468. 0x91,0xEB,0xE6,0xED,0x76,0x4A,0xE9,0xCD,0x04,0x8E,
  469. 0x51,0x32,0x43,0x5D,0x10,0x35,0x81,0x7F,0xEE,0x31,
  470. 0xB0,0x0B,0x8A,0xE5,0xE0,0x30,0x38,0xBA,0xAA,0x48,
  471. 0x43,0xC0,0xF9,0x60,0x79,0x6B,0x27,0xCD,0xF0,0x6E,
  472. 0x61,0x2C,0x0F,0x0A,0xB0,0xD5,0xA6,0x0A,0x50,0x51,
  473. 0x6C,0xD8,0x9F,0x3E,0x47,0x2F,0x39,0x42,0x61,0x5E,
  474. 0x68,0x1C,0xE6,0x56,0x8F,0x88,0x1D,0x46,0xBB,0x41,
  475. 0xD6,0x4D,
  476. };
  477. const uint8_t refAES_CTR_192[]={
  478. 0x7F,0x90,0x5A,0x78,0x3E,0x20,0x82,0xB7,0xBA,0xCE,
  479. 0xF7,0x14,0x40,0x93,0xF3,0x4C,0x80,0x03,0x13,0x1F,
  480. 0x76,0xEA,0xC2,0xA9,0xD2,0x45,0x88,0x60,0x98,0xC0,
  481. 0xD4,0xDB,0x01,0x9A,0x8D,0x88,0x55,0x85,0x01,0x03,
  482. 0x9E,0x20,0x0C,0xFA,0xE1,0xA8,0x11,0x1F,0x47,0xF5,
  483. 0x9A,0x58,0x47,0xB0,0x0A,0x54,0x80,0x81,0x9A,0x20,
  484. 0x7C,0x1A,0xBA,0x2B,0xDD,0xFA,0xFA,0x9A,0x42,0xA7,
  485. 0x7B,0xCE,0x9D,0x22,0x77,0x1B,0x3C,0xAC,0x39,0x85,
  486. 0xE1,0xCE,0x4D,0x6C,0x89,0x09,0x12,0xBD,0xBA,0x4C,
  487. 0x02,0x07,0x79,0x48,0x3E,0x70,0xC3,0x85,0x19,0xE6,
  488. 0xC0,0xA0,0x52,0x59,0x0E,0x19,0xC0,0xCC,0x88,0x3C,
  489. 0x0C,0xB8,0x37,0xE4,0x06,0x75,0x0C,0x43,0xF4,0xF4,
  490. 0xA4,0xA4,0xA9,0x2B,0xAB,0xC4,0x26,0xA5,0xC4,0x8A,
  491. 0xAC,0x16,0xC1,0x43,0x1D,0xDD,0x0B,0xF1,0xD5,0x4E,
  492. 0xDE,0xF9,0x27,0xE4,0x1B,0x3B,0xC5,0x29,0xC8,0xE5,
  493. 0x64,0xF7,0x0E,0xCE,0x43,0xD6,0x57,0xF7,0x1C,0x81,
  494. 0x81,0x2E,0xEC,0x47,0x8E,0xC1,0x01,0x23,0xAF,0x96,
  495. 0xD6,0x58,0x2B,0x1A,0xE0,0x84,0xA9,0xAF,0xFC,0xCF,
  496. 0xFD,0x42,0x66,0xC4,0x83,0x42,0xF1,0x3B,0x47,0xEB,
  497. 0x8D,0x92,0xCB,0x3C,0x5F,0x25,0xB6,0x29,0x5D,0x19,
  498. 0x0B,0x9A,0x5F,0xD0,0xD7,0xC6,0xBE,0xAE,0xC5,0x3B,
  499. 0xA5,0x07,0xBE,0x8E,0xC8,0xF3,0xAE,0x83,0xB6,0xF7,
  500. 0xA4,0x04,0xFC,0x0C,0x95,0x6C,0x6E,0xEB,0x82,0xB4,
  501. 0xE9,0x3D,0x38,0xAF,0x07,0xEB,0xFE,0x64,0x06,0xA2,
  502. 0x35,0x57,0x90,0x1C,0x0C,0x4F,0x94,0xCF,0x5B,0x54,
  503. 0x7A,0x0B,0x71,0x02,0x39,0x89,0xFA,0x83,0xFC,0x9C,
  504. 0xA4,0x16,0x67,0x44,0x69,0x4D,0x97,0x5A,0xC3,0x49,
  505. 0xE1,0x03,0x13,0xA7,0x44,0x86,0xC2,0x30,0xEF,0xBA,
  506. 0xBA,0xD6,0xCF,0xCC,0xF0,0x12,0x42,0x1E,0x22,0xE3,
  507. 0x9F,0xA2,0xE7,0xCD,0x39,0xCC,0x1C,0xAF,0xB0,0xFC,
  508. 0x2B,0x31,0xFA,0xD7,0x0A,0x23,0x48,0x5C,0x5B,0x53,
  509. 0x18,0x5A,0xC6,0x7F,0x14,0x21,0xF0,0xB3,0x89,0xFA,
  510. 0xEA,0xF3,0x62,0x51,0x75,0x09,0xAA,0x5A,0x7A,0x51,
  511. 0x23,0xA4,0x86,0xAF,0xFB,0xFF,0xDE,0x48,0xE2,0xEA,
  512. 0x13,0xFC,0x81,0x36,0x17,0x36,0xED,0xDF,0x71,0x9E,
  513. 0x58,0x65,0xFF,0x95,0xA4,0x95,0xF3,0x3D,0xEC,0xC7,
  514. 0xFF,0x19,0x73,0x89,0x2A,0x59,0x60,0x71,0x81,0x4F,
  515. 0x6B,0xB1,0xE4,0x35,0xCA,0x55,0x3B,0x47,0x24,0xBA,
  516. 0x14,0x76,0x21,0xEE,0x6D,0x97,0x1B,0x27,0x87,0x98,
  517. 0x39,0x11,0xEC,0x86,0x8F,0x21,0x61,0x87,0xF3,0xF9,
  518. 0xC1,0x85,0x5D,0x38,0xE9,0xC5,0x72,0xA1,0xA1,0x39,
  519. 0x75,0x41,0x39,0x36,0x32,0xDF,0x6D,0x16,0x5D,0x8A,
  520. 0x23,0x79,0x58,0x0B,0x08,0xF8,0x6C,0x75,0x00,0x2B,
  521. 0xE1,0x1D,0x24,0xEB,0x3B,0xD2,0x9E,0x50,0x94,0xC5,
  522. 0xE1,0x34,0xD0,0xE9,0x86,0x8E,0x48,0xD8,0x98,0xA4,
  523. 0xA3,0x47,0x44,0xD7,0xA8,0xDB,0xF9,0x7E,0x31,0x58,
  524. 0x14,0x24,0xFF,0x89,0x26,0x0D,0x08,0x12,0xC0,0x07,
  525. 0x94,0x51,0x0F,0xA8,0xF8,0x92,0xCB,0x85,0x19,0x5A,
  526. 0xDD,0xAD,0x4A,0x56,0xBA,0x5F,0x6E,0xAE,0x59,0x78,
  527. 0x0E,0x25,0x03,0x8A,0xA8,0x37,0xA9,0xB5,0x5F,0x08,
  528. 0x5D,0x1D,0xD9,0xBE,0xCE,0x63,0x91,0x9B,0x13,0x01,
  529. 0x7C,0x17,0xCE,0x8C,0x67,0xA7,0x17,0xBE,0x3B,0x51,
  530. 0x5E,0x01,0xC3,0xA6,0x87,0x2A,0x72,0x32,0x20,0x7C,
  531. 0x40,0x0A,0xA9,0x1D,0xB3,0x9F,0x61,0xF5,0x8B,0x2B,
  532. 0xD2,0xEB,0x28,0x07,0x83,0x9E,0x4E,0x7C,0xF5,0x75,
  533. 0x95,0xB3,0xF4,0x4C,0x1C,0xD5,0x92,0xF2,0x8B,0x04,
  534. 0xEF,0x5B,0x67,0x90,0xD1,0x4E,0x0F,0x7B,0x8D,0x6F,
  535. 0x31,0x64,0xED,0xBA,0x8A,0x47,0xD5,0x92,0x36,0x12,
  536. 0x15,0xD7,0x99,0x2C,0xD2,0x11,0x5B,0xB4,0x74,0x10,
  537. 0xF4,0x55,0xE8,0x7C,0x75,0xC3,0x85,0x01,0x4C,0xD2,
  538. 0x0E,0x62,0xEC,0x41,0xBE,0x45,0xE6,0x97,0xE4,0xE3,
  539. 0x9B,0x2F,0x7B,0x98,0x19,0x4E,0xC3,0xB5,0xD0,0x86,
  540. 0x63,0x61,0xD2,0x3E,0xB3,0x0A,0xAB,0x12,0x2A,0x64,
  541. 0x1E,0x9F,0xFD,0x66,0x66,0x4B,0xB0,0xFB,0xA0,0x36,
  542. 0xFA,0xDF,
  543. };
  544. const uint8_t refAES_CTR_256[]={
  545. 0x5F,0xD7,0x96,0x16,0x8E,0x0C,0x4E,0xD1,0x60,0x71,
  546. 0xF0,0xD6,0x8A,0x48,0x9C,0x69,0x7F,0xA7,0xFD,0x4A,
  547. 0x2E,0x6A,0x50,0x09,0xF6,0x51,0xA5,0xA0,0x26,0x04,
  548. 0x52,0xE9,0x4F,0x46,0xB2,0x83,0xB9,0x43,0x0F,0x69,
  549. 0xE9,0x27,0x84,0x8B,0x60,0x1C,0x4C,0xD4,0xC0,0xE5,
  550. 0x96,0x76,0x8D,0xB6,0xC6,0xAE,0x79,0x2F,0xAF,0xDC,
  551. 0x74,0xF5,0x6D,0x3B,0x53,0x6E,0x90,0x12,0x67,0xD0,
  552. 0xAB,0x2E,0xD5,0x1D,0x70,0x26,0x71,0xF9,0xF5,0x9C,
  553. 0xFD,0x80,0x49,0x16,0x96,0xA7,0x3B,0xAF,0xE0,0xB0,
  554. 0xDB,0x8F,0xAE,0x9D,0x7D,0x60,0x4F,0x16,0x3B,0x34,
  555. 0x54,0xA3,0xF6,0xE4,0xE4,0x71,0xCE,0x93,0x3C,0x92,
  556. 0xC5,0x53,0x3E,0x3E,0xC9,0xC5,0x4A,0x9C,0x26,0xC5,
  557. 0x37,0xCD,0x72,0x40,0x83,0xE1,0xC8,0xEE,0x0E,0xCE,
  558. 0x4D,0x37,0xB4,0xDC,0x70,0x5E,0xF0,0xE2,0x06,0xEB,
  559. 0xF0,0x82,0x6B,0x25,0x96,0x8C,0x50,0xBF,0xA3,0x68,
  560. 0x0A,0x5C,0x37,0xA8,0x3C,0x16,0xE6,0x1A,0xC6,0x94,
  561. 0x06,0xCB,0x70,0xBB,0xA6,0x57,0xF0,0x54,0xD2,0xB5,
  562. 0x08,0x05,0x9C,0x3C,0x96,0x47,0x36,0x57,0xC1,0xFC,
  563. 0x67,0x15,0x8F,0x2E,0x7F,0xCA,0xFA,0x59,0x77,0xEB,
  564. 0xD1,0xDC,0x71,0xFD,0x05,0xD0,0x98,0x19,0x83,0x87,
  565. 0xBB,0x48,0xE5,0xB5,0xC5,0xD3,0xEC,0x4B,0xD3,0xD1,
  566. 0xD3,0x13,0xFE,0x52,0xC1,0xD8,0xB0,0x51,0x7B,0x3C,
  567. 0x61,0xC0,0x4D,0xAC,0xAC,0x70,0xFE,0xFC,0xC1,0x17,
  568. 0xC1,0xC7,0x6B,0x54,0x23,0x2E,0x7A,0xA5,0x17,0xEB,
  569. 0x3E,0xC5,0xD7,0xB1,0x86,0x47,0x10,0x91,0x3A,0x58,
  570. 0x12,0xEE,0xAE,0x75,0xD5,0xE4,0x17,0xB5,0xB2,0xCA,
  571. 0xF8,0xE4,0x1C,0x3C,0x42,0xF2,0xDE,0xF3,0x70,0x86,
  572. 0x40,0x10,0xA5,0x14,0x14,0x37,0x51,0x51,0x20,0x4E,
  573. 0xB3,0x83,0xC2,0xB7,0x09,0x9E,0xD9,0x48,0x38,0xD0,
  574. 0x8C,0x99,0xDD,0x2C,0x18,0x87,0x19,0x8C,0xEC,0x65,
  575. 0x58,0x90,0xE1,0x02,0xB9,0x7E,0x46,0x6A,0xF6,0x95,
  576. 0x4B,0xB0,0x1E,0x96,0x11,0x05,0x8F,0x43,0xFB,0x39,
  577. 0xB9,0x47,0x3D,0x67,0x35,0xCA,0x89,0x97,0xFD,0x20,
  578. 0x85,0xDC,0x45,0xDB,0x85,0x4A,0xC8,0x93,0x15,0x07,
  579. 0x34,0x32,0x03,0x63,0xC7,0xDC,0xA5,0x9A,0x48,0x07,
  580. 0x15,0x8D,0xD8,0x85,0xC4,0xA1,0x68,0x37,0xB2,0x48,
  581. 0xB2,0x41,0x3C,0xA1,0x35,0x12,0xD4,0xF0,0x95,0xF7,
  582. 0xCB,0x8B,0x36,0xB2,0x79,0xC9,0x08,0xB3,0x9B,0x76,
  583. 0x6E,0xC2,0x81,0xAB,0x4D,0x55,0x89,0x40,0x5C,0x7E,
  584. 0x7F,0x56,0xFD,0xF0,0x40,0xB9,0xBD,0x83,0x78,0xF9,
  585. 0xF4,0xC3,0x0B,0x59,0x1F,0x92,0xEF,0x80,0x96,0x8F,
  586. 0xB9,0x20,0x53,0x9D,0x4A,0xE4,0x2C,0x55,0xBD,0xF2,
  587. 0xC5,0xE4,0xF4,0x48,0x56,0x46,0x41,0x4F,0x93,0x62,
  588. 0x8F,0xB1,0xC8,0x0A,0xF7,0xFB,0x8D,0x10,0x2D,0x13,
  589. 0xE4,0x2C,0x8F,0x32,0x8B,0xD4,0xD6,0x2E,0xE3,0x86,
  590. 0x3E,0xE4,0xF2,0x0C,0xD2,0x9C,0xD0,0x0C,0xC6,0x94,
  591. 0x29,0x62,0x0F,0x53,0xAF,0xD5,0x3B,0xA6,0x53,0x17,
  592. 0xB5,0x2A,0xDE,0xA0,0xB3,0x37,0x0A,0x13,0xDE,0xAA,
  593. 0x4F,0xB2,0x42,0xD7,0x72,0x35,0x20,0x55,0xBC,0x3B,
  594. 0x20,0x05,0xED,0x93,0x6B,0x40,0xD0,0x42,0xA8,0x1B,
  595. 0xD2,0x23,0xF5,0xBA,0x33,0xC6,0x2F,0x63,0x7D,0x83,
  596. 0x1E,0xAA,0x4B,0x19,0x27,0xC8,0x12,0x1B,0x46,0x77,
  597. 0x9E,0x21,0xC8,0x3B,0xA3,0xFF,0x8B,0x0C,0x0C,0x47,
  598. 0xD9,0xEA,0xA8,0x4F,0x40,0x42,0x5B,0x4A,0xEA,0xF8,
  599. 0x13,0x96,0xAF,0x66,0x90,0xE4,0x8D,0xB8,0x18,0x65,
  600. 0x67,0x21,0x97,0xFA,0xF1,0x67,0x11,0x2E,0x01,0x87,
  601. 0xE1,0x7E,0x18,0x48,0x4F,0x9E,0x84,0xDB,0x50,0xD8,
  602. 0xDB,0x63,0x4B,0x95,0x89,0x42,0x2E,0xE2,0xF6,0xD7,
  603. 0xD6,0xEC,0x92,0x55,0x39,0x25,0x89,0x94,0xE2,0x68,
  604. 0xE3,0x6B,0x76,0x60,0xA0,0xA1,0xA5,0x2F,0xA1,0x92,
  605. 0x8E,0xCE,0xED,0x72,0xA0,0x22,0x66,0x48,0xA2,0x24,
  606. 0xD2,0x1D,0x48,0xF2,0x1C,0xA6,0x2E,0x8E,0x78,0xAB,
  607. 0xDB,0x02,0x10,0x74,0x03,0x9B,0x5E,0x41,0xF0,0xA4,
  608. 0x81,0xF8,0x7B,0xC2,0x87,0x06,0x0F,0xED,0x44,0xAE,
  609. 0xB2,0x44,
  610. };
  611. const uint8_t refAES_CFB_128[]={
  612. 0xFF,0x50,0x83,0x66,0x68,0x80,0x52,0xE8,0xAE,0x43,
  613. 0xC1,0xCC,0x8D,0x60,0x9C,0xF9,0x00,0xA8,0x01,0xB3,
  614. 0xCE,0x04,0x10,0xA9,0xFC,0xD8,0x04,0x5E,0x03,0xAF,
  615. 0x4A,0xB6,0xC2,0xE2,0x1E,0xDF,0xFA,0xE0,0x2F,0x90,
  616. 0x8C,0x7A,0xC2,0x99,0xD4,0xA0,0x57,0x10,0xE8,0x03,
  617. 0x53,0x53,0x93,0x1C,0x6F,0x08,0xF0,0x90,0x27,0x1D,
  618. 0xFD,0x31,0xB9,0xD6,0x8C,0x26,0xBA,0x5C,0xD4,0x2A,
  619. 0x9A,0xF6,0x33,0x28,0x23,0xD2,0xC0,0x25,0xD5,0x70,
  620. 0x0F,0x4C,0x0E,0xDA,0xC0,0x2B,0xA6,0xD9,0x73,0xDD,
  621. 0x31,0x1B,0xBE,0xBE,0x2A,0x6D,0x1F,0x21,0xAC,0xE6,
  622. 0x1D,0x0F,0x10,0xC7,0x54,0x3E,0x4E,0x96,0xF3,0x7F,
  623. 0xF4,0x5A,0x6F,0x71,0x77,0x2E,0x23,0xF4,0xE4,0x38,
  624. 0x01,0x9A,0x14,0xF2,0x14,0x0B,0x58,0x73,0x2B,0xF1,
  625. 0x18,0x11,0xCD,0x4A,0x40,0x10,0x7C,0x44,0xE0,0xF6,
  626. 0x8C,0x68,0x41,0x68,0x53,0x5E,0x23,0x2A,0x31,0x08,
  627. 0x09,0xB3,0x73,0xE4,0x77,0x01,0x86,0xDC,0x89,0x00,
  628. 0xA1,0x46,0xF0,0xE8,0xEF,0x91,0xB0,0x21,0x76,0xD5,
  629. 0xBF,0xBF,0x8A,0x7A,0xD6,0xA5,0x2E,0xBF,0xDD,0x92,
  630. 0x2A,0x39,0x62,0x9C,0xA3,0xA9,0x35,0x8F,0x7D,0x85,
  631. 0x28,0x06,0x7F,0xC0,0x8A,0x6E,0xE2,0x1D,0xC8,0x81,
  632. 0x9E,0x14,0x3B,0xA1,0x3A,0xBB,0x14,0x0B,0x43,0x9C,
  633. 0x23,0xC2,0x2E,0x9F,0x45,0x4E,0x1F,0x75,0x3A,0x1F,
  634. 0x20,0x28,0x83,0x47,0x99,0xC2,0xA5,0x2D,0x98,0x98,
  635. 0x4F,0x26,0xEF,0x24,0x39,0xCB,0xD3,0x15,0x65,0x71,
  636. 0x81,0x8E,0xDB,0x4E,0x11,0xEF,0x74,0x2E,0x6E,0xDA,
  637. 0x2A,0xC4,0x42,0xD7,0xC5,0xDC,0xD5,0xA7,0x8A,0x22,
  638. 0x68,0x6A,0xEF,0xF8,0x3A,0xA1,0x5E,0x4D,0xD0,0x3E,
  639. 0x54,0xB5,0xDC,0x91,0xC6,0x00,0x68,0x56,0x73,0x21,
  640. 0x8F,0x36,0x3F,0xEC,0xD0,0xAE,0xD9,0x76,0xFD,0xB7,
  641. 0xD2,0x8E,0xBF,0xF8,0x3A,0x73,0x06,0xA8,0x42,0xBC,
  642. 0x3C,0x30,0xC2,0x7D,0xD5,0x27,0x1B,0x2B,0x09,0x47,
  643. 0x53,0x7C,0xF2,0xCB,0xE3,0xA4,0xC2,0x1C,0xFB,0x5A,
  644. 0x77,0xF6,0x6E,0xA5,0xFB,0x32,0x64,0xBC,0x8E,0x34,
  645. 0x0F,0x75,0xCB,0xD6,0xBF,0x05,0x93,0xBB,0xDC,0x2B,
  646. 0x4C,0x55,0xB5,0x4A,0x9E,0xF3,0x13,0xAC,0x7B,0x41,
  647. 0xE2,0x91,0x8F,0x3A,0x4E,0x6E,0x43,0x2C,0xFB,0xF0,
  648. 0xCB,0x56,0x8A,0xE4,0xF1,0x81,0xBF,0x47,0x2A,0xCF,
  649. 0xAD,0x3F,0xD1,0xEF,0x3C,0x87,0x10,0xA3,0x25,0x90,
  650. 0x7A,0xA7,0x58,0x87,0x45,0xBA,0x0C,0x76,0x9B,0x24,
  651. 0xEC,0x3B,0x63,0xFC,0x9A,0x7F,0xB7,0xEA,0x58,0x5B,
  652. 0x5A,0xAB,0x3F,0x4E,0x96,0xE9,0x8D,0x05,0xBF,0xE3,
  653. 0x59,0x0D,0x56,0x46,0x47,0xAB,0x18,0x3C,0x2E,0x5E,
  654. 0x7A,0x80,0xEA,0x40,0x34,0xBD,0x21,0x59,0x02,0x68,
  655. 0x3F,0xB2,0x58,0x9D,0xC8,0xEE,0xDE,0xA3,0xB0,0x8C,
  656. 0x5D,0x0A,0x8A,0xDC,0x15,0x7A,0xCB,0x72,0xA5,0x71,
  657. 0x07,0x62,0xBC,0xCB,0x1D,0xA7,0x30,0xAD,0x8A,0x41,
  658. 0xE3,0xE7,0xE9,0x42,0xDE,0x00,0x1A,0xD7,0xD5,0x2B,
  659. 0xC4,0x39,0x94,0xEC,0xC9,0x62,0x01,0x4F,0xAA,0x06,
  660. 0x28,0x82,0x6E,0x21,0xBD,0x5C,0x76,0xC7,0xF7,0x30,
  661. 0x1B,0xEF,0x85,0x0E,0x3D,0xED,0x14,0x4C,0x0D,0x14,
  662. 0xA6,0x87,0x52,0xFE,0xDC,0xB1,0x04,0xEC,0x34,0xBB,
  663. 0x92,0x67,0x06,0xBA,0xF4,0x9D,0x52,0xCD,0xF9,0xE1,
  664. 0x37,0xCB,0x7B,0x33,0x51,0x79,0x3E,0x76,0x75,0xDA,
  665. 0xA0,0xC3,0x9A,0xE0,0xA8,0xB2,0x68,0x26,0xD1,0xDC,
  666. 0x26,0xC1,0xB7,0x10,0xEA,0xF9,0x01,0xA9,0x41,0xD8,
  667. 0x0F,0xDE,0xAD,0x98,0x7B,0xE4,0x9C,0xDF,0xB2,0x0F,
  668. 0x11,0xA7,0x11,0xD8,0x61,0x24,0xD1,0x3D,0x7A,0xED,
  669. 0x55,0xC1,0x38,0x22,0x5F,0x03,0x12,0x3E,0x42,0xF0,
  670. 0x46,0x5C,0x8F,0x3A,0x98,0x8A,0x5E,0x88,0xA7,0x7E,
  671. 0x89,0x30,0xFF,0x8A,0xB0,0xF2,0x4C,0x58,0x0A,0x6F,
  672. 0xE1,0x27,0xDD,0x51,0xFA,0xCA,0x8F,0x59,0x77,0x17,
  673. 0xE8,0x3F,0x1F,0xF9,0x1E,0xC4,0xE7,0xC0,0x6C,0xFE,
  674. 0xA4,0xA8,0xEA,0x06,0xF4,0x51,0xB4,0xEA,0xBA,0x4A,
  675. 0x0D,0x9F,0xD0,0xD8,0xF2,0xB1,0x9D,0x34,0x2C,0x56,
  676. 0xE9,0xD5,
  677. };
  678. const uint8_t refAES_CFB_192[]={
  679. 0x7F,0x90,0x5A,0x78,0x3E,0x20,0x82,0xB7,0xBA,0xCE,
  680. 0xF7,0x14,0x40,0x93,0xF3,0x4C,0xC4,0x55,0x5B,0xCD,
  681. 0x46,0xA8,0xC9,0x29,0xE9,0xA7,0x86,0x4D,0x53,0xEA,
  682. 0x6C,0x7E,0xFA,0x11,0x5F,0xB3,0xA8,0xB6,0xD8,0x40,
  683. 0xFE,0xBB,0x05,0xB4,0xB0,0x9A,0x3C,0xC4,0x4E,0x01,
  684. 0x66,0xF6,0x27,0x28,0x7B,0x59,0x2A,0x34,0xF3,0x8B,
  685. 0xD9,0x8E,0x2E,0x03,0x38,0x56,0xE9,0xC9,0x5E,0x2B,
  686. 0x1F,0x9B,0x42,0x56,0xDD,0xE0,0x5E,0x7E,0x58,0x14,
  687. 0x9B,0x63,0xB7,0x81,0x31,0xED,0x19,0xC0,0xDE,0x3A,
  688. 0x13,0x22,0x4A,0x2D,0x90,0xAD,0x16,0x89,0xD2,0xAB,
  689. 0xB7,0xCA,0xAD,0x7A,0xF1,0xEB,0xAB,0x57,0x65,0x29,
  690. 0xE1,0x01,0xC3,0x7F,0xE0,0x08,0x28,0x22,0x60,0xBF,
  691. 0x4B,0x5F,0xCD,0xCE,0x81,0xBC,0x69,0x87,0x05,0x1D,
  692. 0x88,0xAB,0x85,0x2A,0x53,0x82,0x9A,0x14,0x20,0xCB,
  693. 0x37,0xEB,0x97,0x57,0xCC,0x92,0xCB,0x45,0xC1,0xC0,
  694. 0xA8,0xEC,0xDB,0x38,0x90,0x9C,0xD4,0xA4,0x49,0xBA,
  695. 0x2D,0xB7,0x90,0x00,0x50,0x7E,0x36,0x84,0x61,0x34,
  696. 0x47,0x8D,0x32,0x45,0x0F,0x2C,0x69,0xB9,0x39,0x05,
  697. 0x07,0xD8,0x20,0x26,0x46,0x7A,0x29,0x6A,0x41,0xC4,
  698. 0xF0,0x0B,0x0C,0x2B,0x22,0x4F,0x18,0x96,0x1E,0x74,
  699. 0x49,0x32,0xB0,0x00,0x82,0x69,0x4B,0xEB,0x27,0x9B,
  700. 0xA1,0x40,0x76,0x27,0x9A,0x59,0xAB,0x64,0x50,0xC3,
  701. 0x5E,0x8A,0x08,0x67,0x03,0x15,0xC3,0x12,0x29,0x10,
  702. 0xAE,0x23,0x33,0xC5,0x67,0xAB,0xA3,0xDE,0xE3,0x13,
  703. 0x0F,0xC9,0xCE,0x22,0xF4,0x83,0x3F,0xDD,0xFA,0xF6,
  704. 0x6E,0xBF,0xA9,0x5C,0xE5,0xE3,0xA1,0x37,0x70,0xFD,
  705. 0x2E,0x2C,0x69,0x2C,0x41,0x5D,0x31,0x31,0xC2,0x2E,
  706. 0xBD,0x48,0xA3,0x1F,0xBE,0x31,0x07,0x0A,0xEF,0x27,
  707. 0x22,0xFE,0x1E,0x36,0xC3,0x36,0xE8,0x1B,0x4F,0x74,
  708. 0x70,0x0E,0xDB,0x73,0x32,0x5E,0x21,0x70,0x92,0x0C,
  709. 0xAF,0x70,0xEA,0xC2,0x63,0x9D,0x67,0xC2,0xFA,0x0F,
  710. 0x50,0x23,0xE1,0x5B,0x13,0x78,0xA3,0xFD,0x37,0x87,
  711. 0x0A,0x23,0xF2,0xB6,0x1A,0x98,0xE2,0xE5,0x4A,0x9F,
  712. 0xC1,0x96,0xFF,0x3C,0x2E,0x8A,0xFF,0x53,0xF4,0x20,
  713. 0x23,0xD1,0x07,0xF0,0xFB,0x76,0x3B,0x6A,0x40,0x56,
  714. 0x2E,0x85,0xD7,0xC4,0xF8,0x4F,0x16,0x6F,0x91,0x34,
  715. 0x17,0x7B,0xF4,0xF7,0x0E,0xCF,0x3E,0x22,0xC3,0x87,
  716. 0x39,0xA6,0xB5,0x60,0x6C,0xE1,0x46,0x6C,0x19,0xF5,
  717. 0xE5,0x68,0x98,0xEB,0xE2,0xD0,0xAA,0xFF,0x2B,0xEC,
  718. 0x39,0x2E,0x23,0x8F,0x8E,0x35,0x5E,0x30,0xD5,0x4F,
  719. 0x5D,0x9B,0xF8,0xA1,0xA9,0xD6,0x1D,0x3F,0xB4,0xB4,
  720. 0xE4,0xE6,0x36,0x66,0x8B,0x1E,0x58,0xC6,0xCC,0x67,
  721. 0x53,0xDA,0x0A,0xC5,0x08,0xEC,0xC8,0xDD,0x35,0x9A,
  722. 0x1B,0xB5,0xC4,0xE4,0x8C,0xBD,0x41,0x85,0x4B,0x30,
  723. 0xE2,0x05,0xD9,0x74,0x63,0xA1,0x60,0xEF,0x8E,0xE4,
  724. 0x1B,0x78,0x89,0x3C,0xC3,0x60,0xC6,0x0F,0x61,0x98,
  725. 0xEB,0x09,0x96,0x23,0xCC,0x34,0x66,0xB0,0x4E,0xE1,
  726. 0x68,0x90,0xBC,0x0D,0x8F,0x30,0xFF,0x53,0x92,0x6C,
  727. 0xF7,0xB3,0x47,0xB2,0x6D,0xE3,0x8E,0x5E,0xC5,0x02,
  728. 0xC9,0x62,0xD5,0x97,0x3E,0x05,0xE0,0x7B,0xBD,0x43,
  729. 0xF5,0xD8,0xDE,0x85,0x25,0xDC,0xDC,0x41,0x76,0x04,
  730. 0x6E,0x03,0x07,0xF1,0xA2,0xBA,0x3B,0x3E,0x16,0x63,
  731. 0x09,0x3B,0x4C,0x60,0xC1,0x13,0x63,0xAC,0x31,0x99,
  732. 0xBD,0xFE,0x2C,0x4D,0x03,0xDF,0xAC,0xF5,0x97,0xFF,
  733. 0x28,0xC4,0x7E,0x0C,0x57,0x20,0x12,0xF3,0x34,0x44,
  734. 0xEE,0x1B,0xC5,0x79,0xC1,0x61,0x06,0x38,0x58,0x65,
  735. 0x89,0xFD,0xAF,0x77,0x69,0x49,0xA7,0x40,0x02,0x3F,
  736. 0xD8,0x0F,0x10,0x20,0x0F,0x35,0x19,0x09,0xF1,0xD6,
  737. 0xB9,0x33,0xAF,0xFE,0x81,0x6A,0x75,0x9E,0x98,0x24,
  738. 0x3F,0x6F,0x8F,0x4E,0xFC,0x72,0x08,0x7C,0xAF,0x56,
  739. 0x19,0x90,0x0D,0x56,0xF0,0x80,0x88,0x77,0xAA,0x16,
  740. 0x65,0x55,0x27,0x5B,0x4C,0x23,0x1C,0x04,0x46,0xB0,
  741. 0xA7,0x5D,0x68,0xD0,0x3D,0x8A,0xEF,0x73,0xEA,0xAF,
  742. 0x15,0x1D,0x2A,0xCC,0x86,0x42,0x64,0x54,0xBF,0x05,
  743. 0x98,0xFF,
  744. };
  745. const uint8_t refAES_CFB_256[]={
  746. 0x5F,0xD7,0x96,0x16,0x8E,0x0C,0x4E,0xD1,0x60,0x71,
  747. 0xF0,0xD6,0x8A,0x48,0x9C,0x69,0x70,0xB0,0x34,0x77,
  748. 0x3C,0xF7,0x27,0xFE,0xD2,0x46,0x63,0xE5,0x94,0x1A,
  749. 0xFD,0x2A,0xF9,0x81,0x5D,0xE0,0x67,0xB7,0xA9,0x43,
  750. 0x46,0x4F,0xE3,0x43,0xF6,0xBE,0x30,0xEA,0x54,0x49,
  751. 0xAC,0xC4,0xE1,0x45,0xB4,0x2A,0xDF,0x02,0x52,0x90,
  752. 0x37,0xCF,0x26,0x22,0xA8,0x84,0x98,0x03,0x2C,0xB8,
  753. 0xEA,0xB8,0x5E,0x9A,0xA1,0x50,0xF4,0x89,0xB6,0x78,
  754. 0xCA,0xC6,0xC8,0x6E,0xB8,0x0C,0x69,0xCC,0xC9,0xD5,
  755. 0x75,0xF6,0xB5,0xC5,0x1F,0x26,0xB2,0x97,0x9D,0xF6,
  756. 0x4D,0x68,0x08,0x47,0x76,0x6C,0xAF,0x03,0x5B,0xD7,
  757. 0x0D,0x75,0xAE,0x9D,0x35,0x8A,0x16,0xF0,0xB5,0xAB,
  758. 0x41,0x50,0xD7,0xDB,0x41,0x8F,0xD7,0x58,0x9C,0x5A,
  759. 0x76,0xEC,0xCD,0x7E,0x2E,0x6A,0xE8,0x79,0xBB,0x44,
  760. 0xFA,0x1E,0x17,0xF5,0xA6,0x5F,0xF5,0xF8,0x62,0x70,
  761. 0xF4,0x66,0xE2,0xF0,0x79,0x6A,0xBF,0xB6,0x9D,0xBB,
  762. 0x75,0x0C,0x5D,0x64,0xC3,0xE3,0x14,0xBE,0xE3,0x81,
  763. 0xD8,0x14,0x7C,0x59,0xE3,0xEE,0xEA,0x35,0x33,0xE6,
  764. 0x42,0x1C,0x0C,0x12,0xE1,0x51,0xE8,0xC8,0x24,0xBE,
  765. 0xDB,0x1C,0x00,0xC5,0x60,0x2D,0x5F,0x92,0xE7,0xD4,
  766. 0xD2,0x08,0x72,0xC5,0xC1,0x5C,0xBC,0x1B,0xD8,0x1E,
  767. 0xC3,0x38,0x28,0xDA,0xA3,0x30,0x61,0x5F,0x54,0xEA,
  768. 0x24,0x3B,0x80,0xDE,0x25,0xFE,0x6C,0x04,0x68,0x7B,
  769. 0x9E,0x79,0x1A,0xF2,0x85,0x39,0x5B,0x75,0xC5,0x72,
  770. 0x9B,0xB3,0x40,0xF5,0xA9,0xD8,0x5D,0x9F,0x74,0x66,
  771. 0xE2,0x02,0x58,0x10,0xB3,0x0A,0x34,0xB6,0x5F,0x95,
  772. 0xDF,0xEF,0xDE,0x25,0xCC,0x54,0x6F,0x29,0x57,0x46,
  773. 0xE2,0xE4,0x9C,0x17,0x0F,0x10,0x52,0x49,0x95,0x15,
  774. 0xE3,0xF7,0xA6,0x68,0xE2,0x54,0x47,0xDC,0x54,0xF2,
  775. 0x83,0x2B,0xB1,0x77,0x10,0xC0,0xD1,0x86,0x2D,0xC5,
  776. 0xE6,0x7F,0x72,0xCF,0xBA,0xBE,0x6E,0xA1,0x90,0xDB,
  777. 0xC5,0xC0,0x9C,0xB3,0xD5,0xE3,0xBA,0x85,0x00,0x8A,
  778. 0x5C,0x63,0x34,0xF5,0x66,0x23,0x28,0xD6,0x3A,0x68,
  779. 0x14,0xB3,0x34,0x20,0xA6,0xE8,0x63,0x72,0x00,0x18,
  780. 0xA5,0x69,0x12,0xBA,0x1C,0xA8,0x0E,0xDE,0xD7,0x10,
  781. 0xBE,0x10,0x7F,0x12,0xDC,0x55,0xEF,0x21,0xE2,0x73,
  782. 0x48,0x0D,0x8E,0x59,0x35,0x3A,0x5D,0x63,0x3E,0x7E,
  783. 0xDE,0x1D,0x71,0xF6,0x3B,0xD6,0x08,0xB5,0x64,0x74,
  784. 0xA0,0x82,0x9D,0xF1,0x43,0xDE,0xD9,0x9F,0x5D,0xC0,
  785. 0xBF,0x3E,0x90,0x36,0x60,0x74,0xF0,0xDE,0xBB,0x88,
  786. 0xDF,0xA7,0xD1,0x26,0x50,0xBF,0xA9,0x0C,0xC6,0xE2,
  787. 0xCB,0x8F,0x95,0xB7,0x8B,0xF7,0x1A,0x5E,0x68,0xED,
  788. 0x13,0x5D,0x53,0xED,0xBD,0x34,0xEA,0x37,0x03,0x0D,
  789. 0xCC,0x9F,0x67,0xF1,0xE4,0xED,0xD6,0x0A,0xEA,0x07,
  790. 0xFB,0x43,0x54,0x91,0x57,0xEF,0xFD,0x2B,0xF1,0x48,
  791. 0x82,0x4E,0x2C,0xF0,0x2B,0xB5,0x2F,0x9A,0xEA,0x84,
  792. 0xF1,0x48,0x44,0x9A,0x5E,0x29,0xDA,0xE0,0xAC,0x19,
  793. 0x5A,0xAB,0x67,0x09,0x96,0xE1,0x23,0x29,0xA0,0x31,
  794. 0x0F,0x24,0xE6,0x13,0x97,0x13,0x59,0xEA,0x21,0xA5,
  795. 0xDC,0xE9,0x12,0x1C,0x21,0x14,0xBC,0x3C,0x47,0xF5,
  796. 0xC1,0xCF,0x87,0x3B,0x52,0x01,0xD3,0x5F,0xDA,0xD5,
  797. 0x57,0x15,0xA8,0x56,0x3A,0x86,0xFE,0x63,0x4F,0x34,
  798. 0x85,0xAE,0x32,0x07,0x29,0x15,0xDA,0xCE,0xB5,0x5A,
  799. 0x07,0xD4,0x8C,0xAE,0x16,0x77,0xFF,0xB8,0xCA,0x08,
  800. 0x8F,0x06,0x96,0xC7,0x8A,0x0D,0xD0,0x95,0x38,0x8D,
  801. 0x34,0x0E,0x57,0x35,0x8B,0xEE,0x17,0x23,0x6D,0x91,
  802. 0xD6,0xEB,0x25,0x74,0x0C,0x0A,0x90,0x30,0x81,0x16,
  803. 0xA5,0xBE,0x83,0xF9,0xC4,0xA1,0xE6,0x44,0x5B,0x8F,
  804. 0xCA,0x4D,0x69,0xA6,0x77,0x3A,0x57,0x1E,0x4A,0x0C,
  805. 0xE8,0x9E,0x73,0xF4,0x35,0x09,0x2C,0x04,0xB4,0x24,
  806. 0xDF,0xED,0xB2,0x6F,0x41,0x54,0xC1,0x7D,0xC5,0xFF,
  807. 0xFE,0xD7,0x20,0x02,0x1F,0x60,0xB8,0xD5,0xFB,0xC6,
  808. 0x1F,0xEA,0x1C,0xDA,0xDD,0x5B,0x73,0x41,0x01,0xF6,
  809. 0x4F,0xF4,0xB2,0xE1,0x30,0xC6,0xEE,0x72,0xF0,0x5D,
  810. 0x34,0x2D,
  811. };