2
0

drbg_cavs_data_hmac.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. /*
  2. * Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License 2.0 (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. /*
  10. * Small subset of DRBG test vectors from:
  11. * https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/
  12. * The index in the names given below (e.g- kat1680)- refers to the CAVS index.
  13. */
  14. #include <openssl/obj_mac.h>
  15. #include "internal/nelem.h"
  16. #include "drbg_cavs_data.h"
  17. static const unsigned char kat1_nor_entropyin[] = {
  18. 0xe9, 0x1b, 0x63, 0x30, 0x9e, 0x93, 0xd1, 0xd0, 0x8e, 0x30, 0xe8, 0xd5,
  19. 0x56, 0x90, 0x68, 0x75,
  20. };
  21. static const unsigned char kat1_nor_nonce[] = {
  22. 0xf5, 0x97, 0x47, 0xc4, 0x68, 0xb0, 0xd0, 0xda,
  23. };
  24. static const unsigned char kat1_nor_persstr[] = {0};
  25. static const unsigned char kat1_nor_addin0[] = {0};
  26. static const unsigned char kat1_nor_addin1[] = {0};
  27. static const unsigned char kat1_nor_retbytes[] = {
  28. 0xb7, 0x92, 0x8f, 0x95, 0x03, 0xa4, 0x17, 0x11, 0x07, 0x88, 0xf9, 0xd0,
  29. 0xc2, 0x58, 0x5f, 0x8a, 0xee, 0x6f, 0xb7, 0x3b, 0x22, 0x0a, 0x62, 0x6b,
  30. 0x3a, 0xb9, 0x82, 0x5b, 0x7a, 0x9f, 0xac, 0xc7, 0x97, 0x23, 0xd7, 0xe1,
  31. 0xba, 0x92, 0x55, 0xe4, 0x0e, 0x65, 0xc2, 0x49, 0xb6, 0x08, 0x2a, 0x7b,
  32. 0xc5, 0xe3, 0xf1, 0x29, 0xd3, 0xd8, 0xf6, 0x9b, 0x04, 0xed, 0x11, 0x83,
  33. 0x41, 0x9d, 0x6c, 0x4f, 0x2a, 0x13, 0xb3, 0x04, 0xd2, 0xc5, 0x74, 0x3f,
  34. 0x41, 0xc8, 0xb0, 0xee, 0x73, 0x22, 0x53, 0x47,
  35. };
  36. static const struct drbg_kat_no_reseed kat1_nor_t = {
  37. 0, kat1_nor_entropyin, kat1_nor_nonce, kat1_nor_persstr,
  38. kat1_nor_addin0, kat1_nor_addin1, kat1_nor_retbytes
  39. };
  40. static const struct drbg_kat kat1_nor = {
  41. NO_RESEED, USE_HMAC, NID_sha1, 16, 8, 0, 0, 80, &kat1_nor_t
  42. };
  43. static const unsigned char kat1680_nor_entropyin[] = {
  44. 0x68, 0xcf, 0x3f, 0x51, 0x8b, 0x47, 0x45, 0x45, 0x2a, 0x41, 0x49, 0xd2,
  45. 0x00, 0x43, 0x49, 0x60, 0xcb, 0xe1, 0x0b, 0xcb, 0x78, 0x3c, 0x3f, 0x89,
  46. 0xd3, 0xb8, 0x5f, 0x61, 0x87, 0x99, 0xf5, 0xcb,
  47. };
  48. static const unsigned char kat1680_nor_nonce[] = {
  49. 0xdc, 0x34, 0x5f, 0x21, 0xa3, 0x3c, 0x16, 0x8e, 0x4e, 0x07, 0x60, 0x31,
  50. 0x87, 0x59, 0x2f, 0x9c,
  51. };
  52. static const unsigned char kat1680_nor_persstr[] = {
  53. 0x2c, 0x26, 0xce, 0x79, 0xee, 0x85, 0xd0, 0xc9, 0xca, 0x4d, 0x1a, 0xbc,
  54. 0x6e, 0x0a, 0xc2, 0xad, 0xb2, 0x6c, 0xd2, 0x23, 0xdc, 0xb5, 0x13, 0x40,
  55. 0x3a, 0x53, 0x75, 0x5b, 0x64, 0x75, 0x98, 0xe3,
  56. };
  57. static const unsigned char kat1680_nor_addin0[] = {
  58. 0xac, 0xcf, 0xf5, 0x36, 0x08, 0x61, 0x6d, 0x90, 0x07, 0x19, 0x9e, 0x41,
  59. 0x39, 0x68, 0x46, 0xbe, 0x58, 0x00, 0xee, 0xa5, 0x5f, 0x73, 0xf6, 0x4a,
  60. 0x6d, 0x8c, 0x8f, 0x26, 0xb5, 0xba, 0xe0, 0x7d,
  61. };
  62. static const unsigned char kat1680_nor_addin1[] = {
  63. 0xd8, 0xd5, 0x25, 0x8b, 0xaf, 0xf4, 0x18, 0x50, 0xde, 0x1f, 0xeb, 0x5e,
  64. 0xcb, 0xbd, 0x17, 0x95, 0xcd, 0xf4, 0x53, 0x8a, 0x1c, 0x57, 0xf5, 0x5c,
  65. 0x9f, 0x58, 0x5f, 0xf0, 0x35, 0xa1, 0x3e, 0x55,
  66. };
  67. static const unsigned char kat1680_nor_retbytes[] = {
  68. 0x50, 0x32, 0xda, 0xa0, 0x34, 0x15, 0xb2, 0xb6, 0x78, 0x0e, 0xf4, 0xc6,
  69. 0xcf, 0xec, 0xfa, 0xcc, 0xef, 0xda, 0x71, 0x2f, 0x25, 0x29, 0xd2, 0xcd,
  70. 0xf4, 0xcb, 0x45, 0xd5, 0x22, 0x29, 0xe2, 0xb7, 0x38, 0x8e, 0xbc, 0xe9,
  71. 0x26, 0xa7, 0xaa, 0x05, 0xcc, 0x13, 0x2b, 0x34, 0x79, 0xe7, 0xb9, 0xc0,
  72. 0xb8, 0xb4, 0xcd, 0x02, 0x62, 0xf7, 0xb1, 0x8a, 0x58, 0x32, 0x6e, 0xab,
  73. 0x2b, 0xae, 0xb9, 0x1e, 0xd4, 0x81, 0x8b, 0xf2, 0x0a, 0x10, 0x59, 0x75,
  74. 0x34, 0x2b, 0xed, 0x6a, 0x97, 0xf2, 0xe6, 0x7c, 0x48, 0x3a, 0x40, 0x3f,
  75. 0x98, 0xa4, 0xa5, 0xdf, 0xee, 0x98, 0x13, 0x07, 0x41, 0xb9, 0x09, 0xf0,
  76. 0xc4, 0x81, 0x2c, 0x19, 0x17, 0x33, 0x4d, 0xdc, 0x5e, 0x67, 0x82, 0x56,
  77. 0xb7, 0x8c, 0x23, 0x76, 0x42, 0x17, 0x79, 0x8f, 0x25, 0xdb, 0x20, 0xd8,
  78. 0x0e, 0xa8, 0x5b, 0x69, 0xef, 0xd7, 0x58, 0x92,
  79. };
  80. static const struct drbg_kat_no_reseed kat1680_nor_t = {
  81. 14, kat1680_nor_entropyin, kat1680_nor_nonce, kat1680_nor_persstr,
  82. kat1680_nor_addin0, kat1680_nor_addin1, kat1680_nor_retbytes
  83. };
  84. static const struct drbg_kat kat1680_nor = {
  85. NO_RESEED, USE_HMAC, NID_sha512_256, 32, 16, 32, 32, 128, &kat1680_nor_t
  86. };
  87. /* -------------------------------------------------------------------------- */
  88. static const unsigned char kat2_prt_entropyin[] = {
  89. 0x07, 0xbd, 0xda, 0xb0, 0x6c, 0xf3, 0xd7, 0xf0, 0x94, 0xcc, 0x23, 0x02,
  90. 0xab, 0xd7, 0x00, 0xa9,
  91. };
  92. static const unsigned char kat2_prt_nonce[] = {
  93. 0xd6, 0x74, 0x21, 0xae, 0xb7, 0x11, 0xf4, 0xbb,
  94. };
  95. static const unsigned char kat2_prt_persstr[] = {0};
  96. static const unsigned char kat2_prt_entropyinpr0[] = {
  97. 0xe6, 0x6f, 0x59, 0xe2, 0x8a, 0x46, 0x79, 0x42, 0x13, 0xbf, 0x3d, 0x0c,
  98. 0x3a, 0x2c, 0xbb, 0xb0,
  99. };
  100. static const unsigned char kat2_prt_entropyinpr1[] = {
  101. 0x92, 0x05, 0xb9, 0x0e, 0x0e, 0xf2, 0x12, 0xc7, 0x67, 0x9b, 0x37, 0x52,
  102. 0x6a, 0x80, 0x67, 0x89,
  103. };
  104. static const unsigned char kat2_prt_addin0[] = {0};
  105. static const unsigned char kat2_prt_addin1[] = {0};
  106. static const unsigned char kat2_prt_retbytes[] = {
  107. 0xf7, 0x6f, 0xd2, 0xa4, 0x9d, 0x95, 0x74, 0xc3, 0xf9, 0x08, 0x64, 0xf3,
  108. 0x5f, 0x32, 0x25, 0x3b, 0x83, 0x09, 0x8e, 0xe0, 0x4a, 0x4c, 0x8d, 0xba,
  109. 0x46, 0x4a, 0x80, 0x35, 0xf6, 0x65, 0xca, 0x16, 0x5c, 0x8a, 0x03, 0x8b,
  110. 0xe5, 0xe1, 0xb1, 0x00, 0xd5, 0x67, 0x52, 0xad, 0xcf, 0x59, 0xbe, 0xa1,
  111. 0x67, 0xe1, 0x5b, 0x1d, 0x01, 0xc4, 0x19, 0x94, 0x8d, 0x2d, 0x0a, 0x85,
  112. 0xbe, 0x66, 0xd1, 0x9b, 0xb4, 0x0e, 0x5e, 0x0a, 0x66, 0xcf, 0xd7, 0x6b,
  113. 0xa7, 0x54, 0x7e, 0xba, 0x62, 0x76, 0xea, 0x49,
  114. };
  115. static const struct drbg_kat_pr_true kat2_prt_t = {
  116. 1, kat2_prt_entropyin, kat2_prt_nonce, kat2_prt_persstr,
  117. kat2_prt_entropyinpr0, kat2_prt_addin0, kat2_prt_entropyinpr1,
  118. kat2_prt_addin1, kat2_prt_retbytes
  119. };
  120. static const struct drbg_kat kat2_prt = {
  121. PR_TRUE, USE_HMAC, NID_sha1, 16, 8, 0, 0, 80, &kat2_prt_t
  122. };
  123. static const unsigned char kat1680_prt_entropyin[] = {
  124. 0xfa, 0x18, 0xc7, 0x94, 0x9c, 0xd5, 0xbc, 0xbe, 0x49, 0xc9, 0x6f, 0x4d,
  125. 0x66, 0x70, 0xc8, 0x4f, 0x55, 0xae, 0xe0, 0x0f, 0x36, 0xa4, 0x6c, 0xbf,
  126. 0xaf, 0xbe, 0x54, 0xe6, 0x6b, 0x32, 0x64, 0x23,
  127. };
  128. static const unsigned char kat1680_prt_nonce[] = {
  129. 0xc6, 0xfd, 0xec, 0x42, 0x46, 0xbd, 0xa3, 0xe2, 0xb6, 0x9f, 0xf6, 0x02,
  130. 0x67, 0x5f, 0x7e, 0x6d,
  131. };
  132. static const unsigned char kat1680_prt_persstr[] = {
  133. 0x9b, 0x31, 0xee, 0xbb, 0xe8, 0xbc, 0x02, 0x3c, 0xb8, 0x19, 0x3c, 0xe5,
  134. 0xe1, 0x5a, 0x62, 0x9d, 0x29, 0x20, 0xa0, 0xc4, 0x91, 0x69, 0xd2, 0x98,
  135. 0x92, 0x4b, 0xdb, 0xa2, 0xeb, 0x3b, 0xcd, 0x46,
  136. };
  137. static const unsigned char kat1680_prt_entropyinpr0[] = {
  138. 0xd7, 0x84, 0x2e, 0x7a, 0xd0, 0xcb, 0xac, 0x6b, 0x94, 0x04, 0xe8, 0xe9,
  139. 0x42, 0xfa, 0xbb, 0x77, 0x97, 0x4b, 0x35, 0x3a, 0x7f, 0x96, 0x33, 0x88,
  140. 0x06, 0x95, 0xfb, 0xff, 0xcb, 0x4d, 0x32, 0x79,
  141. };
  142. static const unsigned char kat1680_prt_entropyinpr1[] = {
  143. 0x96, 0xa3, 0x0d, 0x85, 0x93, 0xcc, 0xe5, 0xfe, 0xbd, 0x4f, 0x03, 0x4f,
  144. 0xf9, 0x74, 0x79, 0xeb, 0x88, 0x08, 0xe8, 0x1b, 0xd7, 0xb8, 0xf7, 0xb4,
  145. 0x4a, 0xe9, 0x45, 0xfb, 0xbf, 0x50, 0x35, 0x72,
  146. };
  147. static const unsigned char kat1680_prt_addin0[] = {
  148. 0x2e, 0x08, 0x83, 0xa8, 0x80, 0x21, 0xb7, 0xca, 0x2e, 0x8b, 0xe9, 0xb7,
  149. 0xb2, 0x08, 0xee, 0xc4, 0x10, 0x78, 0x64, 0x60, 0x5f, 0x71, 0x85, 0x10,
  150. 0x32, 0x3d, 0x89, 0xc8, 0x14, 0x6c, 0xa8, 0x93,
  151. };
  152. static const unsigned char kat1680_prt_addin1[] = {
  153. 0x01, 0x55, 0xdc, 0x73, 0xa3, 0x6c, 0x16, 0x0d, 0x9e, 0x13, 0xc0, 0x23,
  154. 0xe7, 0x32, 0x79, 0x8b, 0x4f, 0xba, 0x3a, 0x9f, 0xd8, 0x49, 0xc0, 0xed,
  155. 0xf8, 0x99, 0x76, 0x5c, 0x5f, 0xf7, 0x34, 0x9f,
  156. };
  157. static const unsigned char kat1680_prt_retbytes[] = {
  158. 0xee, 0x19, 0x1d, 0xc6, 0xbe, 0xf0, 0x25, 0xe3, 0x63, 0x02, 0xbb, 0x8c,
  159. 0xe0, 0xe6, 0xa9, 0x49, 0xf7, 0xb0, 0xd2, 0x94, 0x4b, 0x24, 0x6f, 0xc5,
  160. 0x2d, 0x68, 0xa2, 0x0c, 0x3b, 0x2b, 0x78, 0x75, 0x95, 0xca, 0x9d, 0x4b,
  161. 0xae, 0x2f, 0x55, 0xa1, 0x39, 0x24, 0xfa, 0xbb, 0xef, 0x8f, 0x70, 0x0a,
  162. 0xbc, 0x09, 0xd7, 0xda, 0xc1, 0xc1, 0xeb, 0x3a, 0x63, 0xc0, 0x40, 0x86,
  163. 0x75, 0x19, 0xe6, 0x72, 0x4f, 0xae, 0xb5, 0x32, 0xd0, 0x1c, 0xd3, 0x89,
  164. 0x22, 0xe4, 0xe0, 0x97, 0x35, 0x66, 0xfc, 0x23, 0xf5, 0xfb, 0xc0, 0x67,
  165. 0xf4, 0x96, 0xcb, 0x97, 0xfe, 0x3c, 0xe9, 0x75, 0x64, 0xf0, 0x01, 0x0d,
  166. 0x6c, 0xd2, 0xb5, 0xd8, 0x1a, 0x3e, 0x79, 0xfc, 0xb8, 0x5f, 0x01, 0x01,
  167. 0x91, 0xa7, 0x6b, 0x4d, 0x79, 0x6e, 0xa8, 0xc8, 0x5b, 0x11, 0x9d, 0xd2,
  168. 0x42, 0x10, 0xf6, 0x47, 0x25, 0xc0, 0x96, 0x89,
  169. };
  170. static const struct drbg_kat_pr_true kat1680_prt_t = {
  171. 14, kat1680_prt_entropyin, kat1680_prt_nonce, kat1680_prt_persstr,
  172. kat1680_prt_entropyinpr0, kat1680_prt_addin0, kat1680_prt_entropyinpr1,
  173. kat1680_prt_addin1, kat1680_prt_retbytes
  174. };
  175. static const struct drbg_kat kat1680_prt = {
  176. PR_TRUE, USE_HMAC, NID_sha512_256, 32, 16, 32, 32, 128, &kat1680_prt_t
  177. };
  178. /* -------------------------------------------------------------------------- */
  179. static const unsigned char kat7_prf_entropyin[] = {
  180. 0xb3, 0xd4, 0x04, 0x12, 0x01, 0xf4, 0x34, 0x5e, 0x0a, 0x81, 0x8d, 0xe1,
  181. 0x36, 0xc6, 0xaa, 0x7e,
  182. };
  183. static const unsigned char kat7_prf_nonce[] = {
  184. 0x6b, 0x06, 0x12, 0xe1, 0xac, 0x6b, 0x3f, 0x2f,
  185. };
  186. static const unsigned char kat7_prf_persstr[] = {0};
  187. static const unsigned char kat7_prf_entropyin_reseed[] = {
  188. 0x26, 0xf6, 0xec, 0x32, 0x8a, 0xc7, 0xf8, 0x96, 0x6d, 0xca, 0x90, 0xe1,
  189. 0x62, 0xc2, 0x97, 0xef,
  190. };
  191. static const unsigned char kat7_prf_addin_reseed[] = {0};
  192. static const unsigned char kat7_prf_addin0[] = {0};
  193. static const unsigned char kat7_prf_addin1[] = {0};
  194. static const unsigned char kat7_prf_retbytes[] = {
  195. 0xd9, 0x24, 0x5a, 0x4a, 0x0a, 0xb0, 0xca, 0x97, 0xe7, 0x47, 0xc0, 0xd2,
  196. 0x90, 0x98, 0x97, 0x9e, 0x82, 0x48, 0xe5, 0x3f, 0x0e, 0xc6, 0xb9, 0x16,
  197. 0x78, 0x97, 0x2f, 0x3b, 0x56, 0x91, 0xe7, 0x99, 0x5a, 0xd2, 0xeb, 0x99,
  198. 0x64, 0x0d, 0x3e, 0x9a, 0x83, 0x64, 0x89, 0x1d, 0x0f, 0xf1, 0x79, 0x73,
  199. 0x2d, 0x63, 0x3f, 0x76, 0x2d, 0x65, 0x92, 0xa4, 0xd4, 0x9c, 0x4e, 0x66,
  200. 0x7c, 0x69, 0x9b, 0x26, 0x78, 0x92, 0x9c, 0x81, 0xd9, 0xbd, 0xfc, 0x74,
  201. 0xd6, 0x57, 0x5f, 0x5b, 0x72, 0x7f, 0x4d, 0x65,
  202. };
  203. static const struct drbg_kat_pr_false kat7_prf_t = {
  204. 6, kat7_prf_entropyin, kat7_prf_nonce, kat7_prf_persstr,
  205. kat7_prf_entropyin_reseed, kat7_prf_addin_reseed,
  206. kat7_prf_addin0, kat7_prf_addin1, kat7_prf_retbytes
  207. };
  208. static const struct drbg_kat kat7_prf = {
  209. PR_FALSE, USE_HMAC, NID_sha1, 16, 8, 0, 0, 80, &kat7_prf_t
  210. };
  211. static const unsigned char kat1680_prf_entropyin[] = {
  212. 0x03, 0x8f, 0x2d, 0x21, 0x48, 0x1d, 0xe9, 0xf2, 0x28, 0x61, 0x68, 0xc8,
  213. 0x0d, 0xb5, 0x59, 0xb0, 0x37, 0xa3, 0x6a, 0x05, 0x91, 0xe3, 0xc2, 0x46,
  214. 0xa5, 0xe3, 0xa5, 0x5d, 0x0e, 0x39, 0x2b, 0x35,
  215. };
  216. static const unsigned char kat1680_prf_nonce[] = {
  217. 0x86, 0x95, 0x63, 0x4d, 0xb6, 0xfc, 0x1c, 0x67, 0x29, 0x9f, 0xd5, 0x55,
  218. 0x3b, 0x19, 0xc5, 0x4d,
  219. };
  220. static const unsigned char kat1680_prf_persstr[] = {
  221. 0x01, 0x35, 0x28, 0x7e, 0xfe, 0x2f, 0x40, 0xa9, 0xcf, 0x2a, 0xdc, 0x97,
  222. 0xa5, 0x58, 0x20, 0xbb, 0xb9, 0xf9, 0x49, 0x8b, 0xc5, 0x12, 0x70, 0x7c,
  223. 0x5a, 0xc9, 0xc7, 0x21, 0x89, 0x37, 0x57, 0xbf,
  224. };
  225. static const unsigned char kat1680_prf_entropyin_reseed[] = {
  226. 0x7d, 0x20, 0xf5, 0xdd, 0x7e, 0xba, 0x0d, 0x2d, 0xd1, 0x88, 0x2f, 0xd2,
  227. 0xdd, 0x98, 0x72, 0x80, 0xf3, 0xd9, 0x50, 0x2a, 0x62, 0x4d, 0xff, 0x55,
  228. 0x26, 0x7d, 0x59, 0x6d, 0x4a, 0xb0, 0x21, 0xc9,
  229. };
  230. static const unsigned char kat1680_prf_addin_reseed[] = {
  231. 0x7e, 0x78, 0x8d, 0x4f, 0xba, 0xb8, 0x92, 0xa6, 0x67, 0xc1, 0x52, 0xf2,
  232. 0x90, 0x6c, 0x4b, 0xd7, 0xc4, 0xa6, 0x29, 0x5f, 0x11, 0x5b, 0xb6, 0xf6,
  233. 0x5d, 0x80, 0x88, 0xfd, 0xff, 0xc8, 0xb5, 0xe5,
  234. };
  235. static const unsigned char kat1680_prf_addin0[] = {
  236. 0xb7, 0x5e, 0x30, 0x58, 0x84, 0x81, 0x60, 0xfd, 0x30, 0xe7, 0xd0, 0x4a,
  237. 0x72, 0xba, 0x5b, 0x37, 0x6f, 0xad, 0xf2, 0x66, 0xdb, 0x66, 0x6a, 0x95,
  238. 0xed, 0xaa, 0xab, 0x56, 0x52, 0x51, 0x1e, 0xb9,
  239. };
  240. static const unsigned char kat1680_prf_addin1[] = {
  241. 0x69, 0x73, 0xe0, 0x5c, 0xea, 0xb5, 0x31, 0x0b, 0x91, 0x21, 0xe1, 0xde,
  242. 0x19, 0x94, 0x84, 0xdf, 0x58, 0xfc, 0x4b, 0x26, 0x42, 0x9d, 0xdf, 0x44,
  243. 0x65, 0xcd, 0xe7, 0xf7, 0xd6, 0xea, 0x35, 0x54,
  244. };
  245. static const unsigned char kat1680_prf_retbytes[] = {
  246. 0x13, 0x44, 0x5b, 0x39, 0xab, 0x89, 0x3b, 0x31, 0x9c, 0xb0, 0xc4, 0x22,
  247. 0x50, 0x8d, 0x3f, 0x4d, 0x03, 0x26, 0x40, 0x16, 0xf9, 0xf6, 0x91, 0xb9,
  248. 0x16, 0x97, 0xb6, 0x37, 0xc4, 0xea, 0x25, 0x1c, 0x71, 0xec, 0x4c, 0xa3,
  249. 0x55, 0x70, 0xd1, 0x07, 0x24, 0xa3, 0xf9, 0x19, 0xe0, 0x42, 0xdc, 0xe3,
  250. 0x5f, 0x50, 0xfc, 0x10, 0x86, 0x6f, 0x7c, 0x9d, 0xf8, 0x8a, 0xb3, 0x7e,
  251. 0xa3, 0xbc, 0x25, 0xd2, 0x86, 0xfa, 0xe1, 0x55, 0x7f, 0xd9, 0x30, 0xed,
  252. 0x74, 0x7c, 0xdf, 0x24, 0x6b, 0xc7, 0xa3, 0xb2, 0xd6, 0xc9, 0x5d, 0x1f,
  253. 0x77, 0x17, 0xbb, 0xe4, 0x22, 0xd7, 0x10, 0x35, 0x6a, 0xf8, 0xab, 0x7d,
  254. 0xf7, 0xcd, 0x72, 0x4d, 0x02, 0x2f, 0xe5, 0xf8, 0xf2, 0xd8, 0x4d, 0x6f,
  255. 0x2b, 0x27, 0x0d, 0x70, 0xb1, 0x6a, 0xf1, 0x4b, 0x3c, 0xcb, 0x4d, 0x52,
  256. 0xfd, 0x58, 0x7c, 0x59, 0x8f, 0x00, 0x95, 0x1e,
  257. };
  258. static const struct drbg_kat_pr_false kat1680_prf_t = {
  259. 14, kat1680_prf_entropyin, kat1680_prf_nonce, kat1680_prf_persstr,
  260. kat1680_prf_entropyin_reseed, kat1680_prf_addin_reseed,
  261. kat1680_prf_addin0, kat1680_prf_addin1, kat1680_prf_retbytes
  262. };
  263. static const struct drbg_kat kat1680_prf = {
  264. PR_FALSE, USE_HMAC, NID_sha512_256, 32, 16, 32, 32, 128, &kat1680_prf_t
  265. };
  266. /* -------------------------------------------------------------------------- */
  267. const struct drbg_kat *drbg_hmac_test[] = {
  268. &kat1_nor, &kat1680_nor,
  269. &kat2_prt, &kat1680_prt,
  270. &kat7_prf, &kat1680_prf
  271. };
  272. const size_t drbg_hmac_nelem = OSSL_NELEM(drbg_hmac_test);