hkdf_test.cc
Go to the documentation of this file.
1 /* Copyright (c) 2014, Google Inc.
2  *
3  * Permission to use, copy, modify, and/or distribute this software for any
4  * purpose with or without fee is hereby granted, provided that the above
5  * copyright notice and this permission notice appear in all copies.
6  *
7  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
10  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
12  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
13  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
14 
15 #include <openssl/digest.h>
16 #include <openssl/err.h>
17 #include <openssl/hkdf.h>
18 
19 #include <gtest/gtest.h>
20 
21 #include "../test/file_test.h"
22 #include "../test/test_util.h"
23 #include "../test/wycheproof_util.h"
24 
25 
27  const EVP_MD *(*md_func)(void);
28  const uint8_t ikm[80];
29  const size_t ikm_len;
30  const uint8_t salt[80];
31  const size_t salt_len;
32  const uint8_t info[80];
33  const size_t info_len;
35  const size_t prk_len;
36  const size_t out_len;
37  const uint8_t out[82];
38 };
39 
40 // These test vectors are from RFC 5869.
41 static const HKDFTestVector kTests[] = {
42  {
43  EVP_sha256,
44  {
45  0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
46  0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
47  }, 22,
48  {
49  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
50  0x0c,
51  }, 13,
52  {
53  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9,
54  }, 10,
55  {
56  0x07, 0x77, 0x09, 0x36, 0x2c, 0x2e, 0x32, 0xdf, 0x0d, 0xdc, 0x3f, 0x0d,
57  0xc4, 0x7b, 0xba, 0x63, 0x90, 0xb6, 0xc7, 0x3b, 0xb5, 0x0f, 0x9c, 0x31,
58  0x22, 0xec, 0x84, 0x4a, 0xd7, 0xc2, 0xb3, 0xe5,
59  }, 32,
60  42, {
61  0x3c, 0xb2, 0x5f, 0x25, 0xfa, 0xac, 0xd5, 0x7a, 0x90, 0x43, 0x4f, 0x64,
62  0xd0, 0x36, 0x2f, 0x2a, 0x2d, 0x2d, 0x0a, 0x90, 0xcf, 0x1a, 0x5a, 0x4c,
63  0x5d, 0xb0, 0x2d, 0x56, 0xec, 0xc4, 0xc5, 0xbf, 0x34, 0x00, 0x72, 0x08,
64  0xd5, 0xb8, 0x87, 0x18, 0x58, 0x65
65  }
66  },
67  {
68  EVP_sha256,
69  {
70  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
71  0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
72  0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23,
73  0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
74  0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b,
75  0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
76  0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f
77  }, 80,
78  {
79  0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b,
80  0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
81  0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83,
82  0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
83  0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b,
84  0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
85  0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf
86  }, 80,
87  {
88  0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb,
89  0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
90  0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3,
91  0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
92  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb,
93  0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
94  0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
95  }, 80,
96  {
97  0x06, 0xa6, 0xb8, 0x8c, 0x58, 0x53, 0x36, 0x1a, 0x06, 0x10, 0x4c, 0x9c,
98  0xeb, 0x35, 0xb4, 0x5c, 0xef, 0x76, 0x00, 0x14, 0x90, 0x46, 0x71, 0x01,
99  0x4a, 0x19, 0x3f, 0x40, 0xc1, 0x5f, 0xc2, 0x44,
100  }, 32,
101  82, {
102  0xb1, 0x1e, 0x39, 0x8d, 0xc8, 0x03, 0x27, 0xa1, 0xc8, 0xe7, 0xf7, 0x8c,
103  0x59, 0x6a, 0x49, 0x34, 0x4f, 0x01, 0x2e, 0xda, 0x2d, 0x4e, 0xfa, 0xd8,
104  0xa0, 0x50, 0xcc, 0x4c, 0x19, 0xaf, 0xa9, 0x7c, 0x59, 0x04, 0x5a, 0x99,
105  0xca, 0xc7, 0x82, 0x72, 0x71, 0xcb, 0x41, 0xc6, 0x5e, 0x59, 0x0e, 0x09,
106  0xda, 0x32, 0x75, 0x60, 0x0c, 0x2f, 0x09, 0xb8, 0x36, 0x77, 0x93, 0xa9,
107  0xac, 0xa3, 0xdb, 0x71, 0xcc, 0x30, 0xc5, 0x81, 0x79, 0xec, 0x3e, 0x87,
108  0xc1, 0x4c, 0x01, 0xd5, 0xc1, 0xf3, 0x43, 0x4f, 0x1d, 0x87
109  }
110  },
111  {
112  EVP_sha256,
113  {
114  0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
115  0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
116  }, 22,
117  {
118  0,
119  }, 0,
120  {
121  0,
122  }, 0,
123  {
124  0x19, 0xef, 0x24, 0xa3, 0x2c, 0x71, 0x7b, 0x16, 0x7f, 0x33, 0xa9, 0x1d,
125  0x6f, 0x64, 0x8b, 0xdf, 0x96, 0x59, 0x67, 0x76, 0xaf, 0xdb, 0x63, 0x77,
126  0xac, 0x43, 0x4c, 0x1c, 0x29, 0x3c, 0xcb, 0x04
127  }, 32,
128  42, {
129  0x8d, 0xa4, 0xe7, 0x75, 0xa5, 0x63, 0xc1, 0x8f, 0x71, 0x5f, 0x80, 0x2a,
130  0x06, 0x3c, 0x5a, 0x31, 0xb8, 0xa1, 0x1f, 0x5c, 0x5e, 0xe1, 0x87, 0x9e,
131  0xc3, 0x45, 0x4e, 0x5f, 0x3c, 0x73, 0x8d, 0x2d, 0x9d, 0x20, 0x13, 0x95,
132  0xfa, 0xa4, 0xb6, 0x1a, 0x96, 0xc8
133  }
134  },
135  {
136  EVP_sha1,
137  {
138  0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
139  }, 11,
140  {
141  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
142  0x0c,
143  }, 13,
144  {
145  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9,
146  }, 10,
147  {
148  0x9b, 0x6c, 0x18, 0xc4, 0x32, 0xa7, 0xbf, 0x8f, 0x0e, 0x71, 0xc8, 0xeb,
149  0x88, 0xf4, 0xb3, 0x0b, 0xaa, 0x2b, 0xa2, 0x43
150  }, 20,
151  42, {
152  0x08, 0x5a, 0x01, 0xea, 0x1b, 0x10, 0xf3, 0x69, 0x33, 0x06, 0x8b, 0x56,
153  0xef, 0xa5, 0xad, 0x81, 0xa4, 0xf1, 0x4b, 0x82, 0x2f, 0x5b, 0x09, 0x15,
154  0x68, 0xa9, 0xcd, 0xd4, 0xf1, 0x55, 0xfd, 0xa2, 0xc2, 0x2e, 0x42, 0x24,
155  0x78, 0xd3, 0x05, 0xf3, 0xf8, 0x96
156  }
157  },
158  {
159  EVP_sha1,
160  {
161  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
162  0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
163  0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23,
164  0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
165  0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b,
166  0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
167  0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f
168  }, 80,
169  {
170  0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b,
171  0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
172  0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83,
173  0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
174  0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b,
175  0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
176  0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf
177  }, 80,
178  {
179  0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb,
180  0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
181  0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3,
182  0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
183  0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb,
184  0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
185  0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
186  }, 80,
187  {
188  0x8a, 0xda, 0xe0, 0x9a, 0x2a, 0x30, 0x70, 0x59, 0x47, 0x8d, 0x30, 0x9b,
189  0x26, 0xc4, 0x11, 0x5a, 0x22, 0x4c, 0xfa, 0xf6,
190  }, 20,
191  82, {
192  0x0b, 0xd7, 0x70, 0xa7, 0x4d, 0x11, 0x60, 0xf7, 0xc9, 0xf1, 0x2c, 0xd5,
193  0x91, 0x2a, 0x06, 0xeb, 0xff, 0x6a, 0xdc, 0xae, 0x89, 0x9d, 0x92, 0x19,
194  0x1f, 0xe4, 0x30, 0x56, 0x73, 0xba, 0x2f, 0xfe, 0x8f, 0xa3, 0xf1, 0xa4,
195  0xe5, 0xad, 0x79, 0xf3, 0xf3, 0x34, 0xb3, 0xb2, 0x02, 0xb2, 0x17, 0x3c,
196  0x48, 0x6e, 0xa3, 0x7c, 0xe3, 0xd3, 0x97, 0xed, 0x03, 0x4c, 0x7f, 0x9d,
197  0xfe, 0xb1, 0x5c, 0x5e, 0x92, 0x73, 0x36, 0xd0, 0x44, 0x1f, 0x4c, 0x43,
198  0x00, 0xe2, 0xcf, 0xf0, 0xd0, 0x90, 0x0b, 0x52, 0xd3, 0xb4
199  }
200  },
201  {
202  EVP_sha1,
203  {
204  0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
205  0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
206  }, 22,
207  {
208  0,
209  }, 0,
210  {
211  0,
212  }, 0,
213  {
214  0xda, 0x8c, 0x8a, 0x73, 0xc7, 0xfa, 0x77, 0x28, 0x8e, 0xc6, 0xf5, 0xe7,
215  0xc2, 0x97, 0x78, 0x6a, 0xa0, 0xd3, 0x2d, 0x01,
216  }, 20,
217  42, {
218  0x0a, 0xc1, 0xaf, 0x70, 0x02, 0xb3, 0xd7, 0x61, 0xd1, 0xe5, 0x52, 0x98,
219  0xda, 0x9d, 0x05, 0x06, 0xb9, 0xae, 0x52, 0x05, 0x72, 0x20, 0xa3, 0x06,
220  0xe0, 0x7b, 0x6b, 0x87, 0xe8, 0xdf, 0x21, 0xd0, 0xea, 0x00, 0x03, 0x3d,
221  0xe0, 0x39, 0x84, 0xd3, 0x49, 0x18
222  }
223  },
224  {
225  EVP_sha1,
226  {
227  0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
228  0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
229  }, 22,
230  {
231  0,
232  }, 0,
233  {
234  0,
235  }, 0,
236  {
237  0x2a, 0xdc, 0xca, 0xda, 0x18, 0x77, 0x9e, 0x7c, 0x20, 0x77, 0xad, 0x2e,
238  0xb1, 0x9d, 0x3f, 0x3e, 0x73, 0x13, 0x85, 0xdd,
239  }, 20,
240  42, {
241  0x2c, 0x91, 0x11, 0x72, 0x04, 0xd7, 0x45, 0xf3, 0x50, 0x0d, 0x63, 0x6a,
242  0x62, 0xf6, 0x4f, 0x0a, 0xb3, 0xba, 0xe5, 0x48, 0xaa, 0x53, 0xd4, 0x23,
243  0xb0, 0xd1, 0xf2, 0x7e, 0xbb, 0xa6, 0xf5, 0xe5, 0x67, 0x3a, 0x08, 0x1d,
244  0x70, 0xcc, 0xe7, 0xac, 0xfc, 0x48
245  }
246  },
247 };
248 
249 TEST(HKDFTest, TestVectors) {
250  for (size_t i = 0; i < OPENSSL_ARRAY_SIZE(kTests); i++) {
251  SCOPED_TRACE(i);
252  const HKDFTestVector *test = &kTests[i];
253 
255  size_t prk_len;
256  ASSERT_TRUE(HKDF_extract(prk, &prk_len, test->md_func(), test->ikm,
257  test->ikm_len, test->salt, test->salt_len));
258  EXPECT_EQ(Bytes(test->prk, test->prk_len), Bytes(prk, prk_len));
259 
260  uint8_t buf[82];
261  ASSERT_TRUE(HKDF_expand(buf, test->out_len, test->md_func(), prk, prk_len,
262  test->info, test->info_len));
263  EXPECT_EQ(Bytes(test->out, test->out_len), Bytes(buf, test->out_len));
264 
265  ASSERT_TRUE(HKDF(buf, test->out_len, test->md_func(), test->ikm,
266  test->ikm_len, test->salt, test->salt_len, test->info,
267  test->info_len));
268  EXPECT_EQ(Bytes(test->out, test->out_len), Bytes(buf, test->out_len));
269  }
270 }
271 
272 static void RunWycheproofTest(const char *path, const EVP_MD *md) {
274  FileTestGTest(path, [&](FileTest *t) {
275  t->IgnoreInstruction("keySize");
276  std::vector<uint8_t> ikm, info, okm, salt;
277  ASSERT_TRUE(t->GetBytes(&ikm, "ikm"));
278  ASSERT_TRUE(t->GetBytes(&info, "info"));
279  ASSERT_TRUE(t->GetBytes(&okm, "okm"));
280  ASSERT_TRUE(t->GetBytes(&salt, "salt"));
283  std::string size_str;
284  ASSERT_TRUE(t->GetAttribute(&size_str, "size"));
285 
286  std::vector<uint8_t> out(atoi(size_str.c_str()));
287  bool ret = HKDF(out.data(), out.size(), md, ikm.data(), ikm.size(),
288  salt.data(), salt.size(), info.data(), info.size());
289  EXPECT_EQ(result.IsValid(), ret);
290  if (result.IsValid()) {
291  EXPECT_EQ(Bytes(okm), Bytes(out));
292  }
293  });
294 }
295 
296 TEST(HKDFTest, WycheproofSHA1) {
297  RunWycheproofTest("third_party/wycheproof_testvectors/hkdf_sha1_test.txt",
298  EVP_sha1());
299 }
300 
301 TEST(HKDFTest, WycheproofSHA256) {
302  RunWycheproofTest("third_party/wycheproof_testvectors/hkdf_sha256_test.txt",
303  EVP_sha256());
304 }
305 
306 TEST(HKDFTest, WycheproofSHA384) {
307  RunWycheproofTest("third_party/wycheproof_testvectors/hkdf_sha384_test.txt",
308  EVP_sha384());
309 }
310 
311 TEST(HKDFTest, WycheproofSHA512) {
312  RunWycheproofTest("third_party/wycheproof_testvectors/hkdf_sha512_test.txt",
313  EVP_sha512());
314 }
_gevent_test_main.result
result
Definition: _gevent_test_main.py:96
gen_build_yaml.out
dictionary out
Definition: src/benchmark/gen_build_yaml.py:24
EVP_sha512
const OPENSSL_EXPORT EVP_MD * EVP_sha512(void)
Bytes
Definition: boringssl-with-bazel/src/crypto/test/test_util.h:38
env_md_st
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/internal.h:67
RunWycheproofTest
static void RunWycheproofTest(const char *path, const EVP_MD *md)
Definition: hkdf_test.cc:272
WycheproofResult
Definition: wycheproof_util.h:34
EVP_sha384
const OPENSSL_EXPORT EVP_MD * EVP_sha384(void)
test
Definition: spinlock_test.cc:36
OPENSSL_ARRAY_SIZE
#define OPENSSL_ARRAY_SIZE(array)
Definition: third_party/boringssl-with-bazel/src/crypto/internal.h:179
buf
voidpf void * buf
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
TEST
TEST(HKDFTest, TestVectors)
Definition: hkdf_test.cc:249
kTests
static const HKDFTestVector kTests[]
Definition: hkdf_test.cc:41
HKDFTestVector::salt_len
const size_t salt_len
Definition: hkdf_test.cc:31
HKDFTestVector::prk
const uint8_t prk[EVP_MAX_MD_SIZE]
Definition: hkdf_test.cc:34
check_documentation.path
path
Definition: check_documentation.py:57
EVP_sha256
const OPENSSL_EXPORT EVP_MD * EVP_sha256(void)
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
HKDF_extract
#define HKDF_extract
Definition: boringssl_prefix_symbols.h:1782
EXPECT_EQ
#define EXPECT_EQ(a, b)
Definition: iomgr/time_averaged_stats_test.cc:27
HKDFTestVector
Definition: hkdf_test.cc:26
HKDFTestVector::out
const uint8_t out[82]
Definition: hkdf_test.cc:37
FileTestGTest
void FileTestGTest(const char *path, std::function< void(FileTest *)> run_test)
Definition: file_test_gtest.cc:68
HKDFTestVector::info_len
const size_t info_len
Definition: hkdf_test.cc:33
HKDFTestVector::salt
const uint8_t salt[80]
Definition: hkdf_test.cc:30
SCOPED_TRACE
#define SCOPED_TRACE(message)
Definition: bloaty/third_party/googletest/googletest/include/gtest/gtest.h:2264
FileTest
Definition: file_test.h:90
GetWycheproofResult
bool GetWycheproofResult(FileTest *t, WycheproofResult *out)
Definition: wycheproof_util.cc:49
err.h
HKDFTestVector::prk_len
const size_t prk_len
Definition: hkdf_test.cc:35
benchmark.md
md
Definition: benchmark.py:86
HKDF
#define HKDF
Definition: boringssl_prefix_symbols.h:1780
digest.h
HKDFTestVector::ikm
const uint8_t ikm[80]
Definition: hkdf_test.cc:28
hkdf.h
ret
UniquePtr< SSL_SESSION > ret
Definition: ssl_x509.cc:1029
EVP_MAX_MD_SIZE
#define EVP_MAX_MD_SIZE
Definition: digest.h:156
ASSERT_TRUE
#define ASSERT_TRUE(condition)
Definition: bloaty/third_party/googletest/googletest/include/gtest/gtest.h:1973
EVP_sha1
const OPENSSL_EXPORT EVP_MD * EVP_sha1(void)
HKDFTestVector::info
const uint8_t info[80]
Definition: hkdf_test.cc:32
HKDFTestVector::out_len
const size_t out_len
Definition: hkdf_test.cc:36
HKDFTestVector::ikm_len
const size_t ikm_len
Definition: hkdf_test.cc:29
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
HKDF_expand
#define HKDF_expand
Definition: boringssl_prefix_symbols.h:1781


grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:01