/src/cryptofuzz/executor.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | #include "executor.h" |
2 | | #include "tests.h" |
3 | | #include "mutatorpool.h" |
4 | | #include "config.h" |
5 | | #include <cryptofuzz/util.h> |
6 | | #include <fuzzing/memory.hpp> |
7 | | #include <algorithm> |
8 | | #include <set> |
9 | | #include <boost/multiprecision/cpp_int.hpp> |
10 | | |
11 | | uint32_t PRNG(void); |
12 | | |
13 | 65.3k | #define RETURN_IF_DISABLED(option, id) if ( !option.Have(id) ) return std::nullopt; |
14 | | |
15 | | namespace cryptofuzz { |
16 | | |
17 | 0 | static std::string GxCoordMutate(const uint64_t curveID, std::string coord) { |
18 | 0 | if ( (PRNG()%10) != 0 ) { |
19 | 0 | return coord; |
20 | 0 | } |
21 | | |
22 | 0 | if ( curveID == CF_ECC_CURVE("BLS12_381") ) { |
23 | 0 | const static auto prime = boost::multiprecision::cpp_int("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"); |
24 | 0 | return boost::multiprecision::cpp_int(boost::multiprecision::cpp_int(coord) + prime).str(); |
25 | 0 | } else if ( curveID == CF_ECC_CURVE("alt_bn128") ) { |
26 | 0 | const static auto prime = boost::multiprecision::cpp_int("21888242871839275222246405745257275088696311157297823662689037894645226208583"); |
27 | 0 | return boost::multiprecision::cpp_int(boost::multiprecision::cpp_int(coord) + prime).str(); |
28 | 0 | } else { |
29 | 0 | return coord; |
30 | 0 | } |
31 | 0 | } |
32 | 0 | static void G1AddToPool(const uint64_t curveID, const std::string& g1_x, const std::string& g1_y) { |
33 | 0 | Pool_CurveBLSG1.Set({ curveID, GxCoordMutate(curveID, g1_x), GxCoordMutate(curveID, g1_y) }); |
34 | 0 | } |
35 | | |
36 | | static void G2AddToPool(const uint64_t curveID, |
37 | | const std::string& g2_v, |
38 | | const std::string& g2_w, |
39 | | const std::string& g2_x, |
40 | 0 | const std::string& g2_y) { |
41 | |
|
42 | 0 | Pool_CurveBLSG2.Set({ curveID, |
43 | 0 | GxCoordMutate(curveID, g2_v), |
44 | 0 | GxCoordMutate(curveID, g2_w), |
45 | 0 | GxCoordMutate(curveID, g2_x), |
46 | 0 | GxCoordMutate(curveID, g2_y) |
47 | 0 | }); |
48 | 0 | } |
49 | | |
50 | | /* Specialization for operation::Digest */ |
51 | 4.26k | template<> void ExecutorBase<component::Digest, operation::Digest>::postprocess(std::shared_ptr<Module> module, operation::Digest& op, const ExecutorBase<component::Digest, operation::Digest>::ResultPair& result) const { |
52 | 4.26k | (void)module; |
53 | 4.26k | (void)op; |
54 | | |
55 | 4.26k | if ( result.second != std::nullopt ) { |
56 | 2.01k | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
57 | 2.01k | } |
58 | 4.26k | } |
59 | | |
60 | 4.26k | template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const { |
61 | 4.26k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
62 | | |
63 | 4.26k | return module->OpDigest(op); |
64 | 4.26k | } |
65 | | |
66 | | /* Specialization for operation::HMAC */ |
67 | 1.62k | template<> void ExecutorBase<component::MAC, operation::HMAC>::postprocess(std::shared_ptr<Module> module, operation::HMAC& op, const ExecutorBase<component::MAC, operation::HMAC>::ResultPair& result) const { |
68 | 1.62k | (void)module; |
69 | 1.62k | (void)op; |
70 | | |
71 | 1.62k | if ( result.second != std::nullopt ) { |
72 | 954 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
73 | 954 | } |
74 | 1.62k | } |
75 | | |
76 | 1.62k | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const { |
77 | 1.62k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
78 | | |
79 | 1.62k | return module->OpHMAC(op); |
80 | 1.62k | } |
81 | | |
82 | | /* Specialization for operation::UMAC */ |
83 | 2.59k | template<> void ExecutorBase<component::MAC, operation::UMAC>::postprocess(std::shared_ptr<Module> module, operation::UMAC& op, const ExecutorBase<component::MAC, operation::UMAC>::ResultPair& result) const { |
84 | 2.59k | (void)module; |
85 | 2.59k | (void)op; |
86 | | |
87 | 2.59k | if ( result.second != std::nullopt ) { |
88 | 1.19k | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
89 | 1.19k | } |
90 | 2.59k | } |
91 | | |
92 | 2.59k | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const { |
93 | 2.59k | return module->OpUMAC(op); |
94 | 2.59k | } |
95 | | |
96 | | /* Specialization for operation::CMAC */ |
97 | 2.91k | template<> void ExecutorBase<component::MAC, operation::CMAC>::postprocess(std::shared_ptr<Module> module, operation::CMAC& op, const ExecutorBase<component::MAC, operation::CMAC>::ResultPair& result) const { |
98 | 2.91k | (void)module; |
99 | 2.91k | (void)op; |
100 | | |
101 | 2.91k | if ( result.second != std::nullopt ) { |
102 | 1.17k | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
103 | 1.17k | } |
104 | 2.91k | } |
105 | | |
106 | 2.91k | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const { |
107 | 2.91k | RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get()); |
108 | | |
109 | 2.91k | return module->OpCMAC(op); |
110 | 2.91k | } |
111 | | |
112 | | /* Specialization for operation::SymmetricEncrypt */ |
113 | 11.2k | template<> void ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::postprocess(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op, const ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::ResultPair& result) const { |
114 | 11.2k | if ( options.noDecrypt == true ) { |
115 | 0 | return; |
116 | 0 | } |
117 | | |
118 | 11.2k | if ( result.second != std::nullopt ) { |
119 | 3.24k | fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize()); |
120 | 3.24k | if ( result.second->tag != std::nullopt ) { |
121 | 1.35k | fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize()); |
122 | 1.35k | } |
123 | 3.24k | } |
124 | | |
125 | 11.2k | if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) { |
126 | 3.00k | using fuzzing::datasource::ID; |
127 | | |
128 | 3.00k | bool tryDecrypt = true; |
129 | | |
130 | 3.00k | if ( module->ID == CF_MODULE("OpenSSL") ) { |
131 | 0 | switch ( op.cipher.cipherType.Get() ) { |
132 | 0 | case ID("Cryptofuzz/Cipher/AES_128_OCB"): |
133 | 0 | case ID("Cryptofuzz/Cipher/AES_256_OCB"): |
134 | 0 | tryDecrypt = false; |
135 | 0 | break; |
136 | 0 | case ID("Cryptofuzz/Cipher/AES_128_GCM"): |
137 | 0 | case ID("Cryptofuzz/Cipher/AES_192_GCM"): |
138 | 0 | case ID("Cryptofuzz/Cipher/AES_256_GCM"): |
139 | 0 | case ID("Cryptofuzz/Cipher/AES_128_CCM"): |
140 | 0 | case ID("Cryptofuzz/Cipher/AES_192_CCM"): |
141 | 0 | case ID("Cryptofuzz/Cipher/AES_256_CCM"): |
142 | 0 | case ID("Cryptofuzz/Cipher/ARIA_128_CCM"): |
143 | 0 | case ID("Cryptofuzz/Cipher/ARIA_192_CCM"): |
144 | 0 | case ID("Cryptofuzz/Cipher/ARIA_256_CCM"): |
145 | 0 | case ID("Cryptofuzz/Cipher/ARIA_128_GCM"): |
146 | 0 | case ID("Cryptofuzz/Cipher/ARIA_192_GCM"): |
147 | 0 | case ID("Cryptofuzz/Cipher/ARIA_256_GCM"): |
148 | 0 | if ( op.tagSize == std::nullopt ) { |
149 | | /* OpenSSL fails to decrypt its own CCM and GCM ciphertexts if |
150 | | * a tag is not included |
151 | | */ |
152 | 0 | tryDecrypt = false; |
153 | 0 | } |
154 | 0 | break; |
155 | 0 | } |
156 | 0 | } |
157 | | |
158 | 3.00k | if ( tryDecrypt == true ) { |
159 | | /* Try to decrypt the encrypted data */ |
160 | | |
161 | | /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */ |
162 | 3.00k | auto opDecrypt = operation::SymmetricDecrypt( |
163 | | /* The SymmetricEncrypt instance */ |
164 | 3.00k | op, |
165 | | |
166 | | /* The ciphertext generated by OpSymmetricEncrypt */ |
167 | 3.00k | *(result.second), |
168 | | |
169 | | /* The size of the output buffer that OpSymmetricDecrypt() must use. */ |
170 | 3.00k | op.cleartext.GetSize() + 32, |
171 | | |
172 | 3.00k | op.aad, |
173 | | |
174 | | /* Empty modifier */ |
175 | 3.00k | {}); |
176 | | |
177 | 3.00k | const auto cleartext = module->OpSymmetricDecrypt(opDecrypt); |
178 | | |
179 | 3.00k | if ( cleartext == std::nullopt ) { |
180 | | /* Decryption failed, OpSymmetricDecrypt() returned std::nullopt */ |
181 | 0 | printf("Cannot decrypt ciphertext\n\n"); |
182 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); |
183 | 0 | printf("Ciphertext: %s\n", util::HexDump(result.second->ciphertext.Get()).c_str()); |
184 | 0 | printf("Tag: %s\n", result.second->tag ? util::HexDump(result.second->tag->Get()).c_str() : "nullopt"); |
185 | 0 | abort( |
186 | 0 | {module->name}, |
187 | 0 | op.Name(), |
188 | 0 | op.GetAlgorithmString(), |
189 | 0 | "cannot decrypt ciphertext" |
190 | 0 | ); |
191 | 3.00k | } else if ( cleartext->Get() != op.cleartext.Get() ) { |
192 | | /* Decryption ostensibly succeeded, but the cleartext returned by OpSymmetricDecrypt() |
193 | | * does not match to original cleartext */ |
194 | |
|
195 | 0 | printf("Cannot decrypt ciphertext (but decryption ostensibly succeeded)\n\n"); |
196 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); |
197 | 0 | printf("Ciphertext: %s\n", util::HexDump(result.second->ciphertext.Get()).c_str()); |
198 | 0 | printf("Tag: %s\n", result.second->tag ? util::HexDump(result.second->tag->Get()).c_str() : "nullopt"); |
199 | 0 | printf("Purported cleartext: %s\n", util::HexDump(cleartext->Get()).c_str()); |
200 | 0 | abort( |
201 | 0 | {module->name}, |
202 | 0 | op.Name(), |
203 | 0 | op.GetAlgorithmString(), |
204 | 0 | "cannot decrypt ciphertext" |
205 | 0 | ); |
206 | 0 | } |
207 | 3.00k | } |
208 | 3.00k | } |
209 | 11.2k | } |
210 | | |
211 | 11.2k | template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const { |
212 | 11.2k | RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get()); |
213 | | |
214 | 11.2k | return module->OpSymmetricEncrypt(op); |
215 | 11.2k | } |
216 | | |
217 | | /* Specialization for operation::SymmetricDecrypt */ |
218 | 7.70k | template<> void ExecutorBase<component::MAC, operation::SymmetricDecrypt>::postprocess(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op, const ExecutorBase<component::MAC, operation::SymmetricDecrypt>::ResultPair& result) const { |
219 | 7.70k | (void)module; |
220 | 7.70k | (void)op; |
221 | | |
222 | 7.70k | if ( result.second != std::nullopt ) { |
223 | 659 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
224 | 659 | } |
225 | 7.70k | } |
226 | | |
227 | 7.70k | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const { |
228 | 7.70k | RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get()); |
229 | | |
230 | 7.70k | return module->OpSymmetricDecrypt(op); |
231 | 7.70k | } |
232 | | |
233 | | /* Specialization for operation::KDF_SCRYPT */ |
234 | 683 | template<> void ExecutorBase<component::Key, operation::KDF_SCRYPT>::postprocess(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op, const ExecutorBase<component::Key, operation::KDF_SCRYPT>::ResultPair& result) const { |
235 | 683 | (void)module; |
236 | 683 | (void)op; |
237 | | |
238 | 683 | if ( result.second != std::nullopt ) { |
239 | 189 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
240 | 189 | } |
241 | 683 | } |
242 | | |
243 | 683 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const { |
244 | 683 | return module->OpKDF_SCRYPT(op); |
245 | 683 | } |
246 | | |
247 | | /* Specialization for operation::KDF_HKDF */ |
248 | 4.54k | template<> void ExecutorBase<component::Key, operation::KDF_HKDF>::postprocess(std::shared_ptr<Module> module, operation::KDF_HKDF& op, const ExecutorBase<component::Key, operation::KDF_HKDF>::ResultPair& result) const { |
249 | 4.54k | (void)module; |
250 | 4.54k | (void)op; |
251 | | |
252 | 4.54k | if ( result.second != std::nullopt ) { |
253 | 2.24k | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
254 | 2.24k | } |
255 | 4.54k | } |
256 | | |
257 | 4.54k | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const { |
258 | 4.54k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
259 | | |
260 | 4.54k | return module->OpKDF_HKDF(op); |
261 | 4.54k | } |
262 | | |
263 | | /* Specialization for operation::KDF_PBKDF */ |
264 | 303 | template<> void ExecutorBase<component::Key, operation::KDF_PBKDF>::postprocess(std::shared_ptr<Module> module, operation::KDF_PBKDF& op, const ExecutorBase<component::Key, operation::KDF_PBKDF>::ResultPair& result) const { |
265 | 303 | (void)module; |
266 | 303 | (void)op; |
267 | | |
268 | 303 | if ( result.second != std::nullopt ) { |
269 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
270 | 0 | } |
271 | 303 | } |
272 | | |
273 | 303 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const { |
274 | 303 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
275 | | |
276 | 303 | return module->OpKDF_PBKDF(op); |
277 | 303 | } |
278 | | |
279 | | /* Specialization for operation::KDF_PBKDF1 */ |
280 | 358 | template<> void ExecutorBase<component::Key, operation::KDF_PBKDF1>::postprocess(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op, const ExecutorBase<component::Key, operation::KDF_PBKDF1>::ResultPair& result) const { |
281 | 358 | (void)module; |
282 | 358 | (void)op; |
283 | | |
284 | 358 | if ( result.second != std::nullopt ) { |
285 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
286 | 0 | } |
287 | 358 | } |
288 | | |
289 | 358 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const { |
290 | 358 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
291 | | |
292 | 358 | return module->OpKDF_PBKDF1(op); |
293 | 358 | } |
294 | | |
295 | | /* Specialization for operation::KDF_PBKDF2 */ |
296 | 1.72k | template<> void ExecutorBase<component::Key, operation::KDF_PBKDF2>::postprocess(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op, const ExecutorBase<component::Key, operation::KDF_PBKDF2>::ResultPair& result) const { |
297 | 1.72k | (void)module; |
298 | 1.72k | (void)op; |
299 | | |
300 | 1.72k | if ( result.second != std::nullopt ) { |
301 | 826 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
302 | 826 | } |
303 | 1.72k | } |
304 | | |
305 | 1.72k | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const { |
306 | 1.72k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
307 | | |
308 | 1.72k | return module->OpKDF_PBKDF2(op); |
309 | 1.72k | } |
310 | | |
311 | | /* Specialization for operation::KDF_ARGON2 */ |
312 | 648 | template<> void ExecutorBase<component::Key, operation::KDF_ARGON2>::postprocess(std::shared_ptr<Module> module, operation::KDF_ARGON2& op, const ExecutorBase<component::Key, operation::KDF_ARGON2>::ResultPair& result) const { |
313 | 648 | (void)module; |
314 | 648 | (void)op; |
315 | | |
316 | 648 | if ( result.second != std::nullopt ) { |
317 | 320 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
318 | 320 | } |
319 | 648 | } |
320 | | |
321 | 648 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const { |
322 | 648 | return module->OpKDF_ARGON2(op); |
323 | 648 | } |
324 | | |
325 | | /* Specialization for operation::KDF_SSH */ |
326 | 253 | template<> void ExecutorBase<component::Key, operation::KDF_SSH>::postprocess(std::shared_ptr<Module> module, operation::KDF_SSH& op, const ExecutorBase<component::Key, operation::KDF_SSH>::ResultPair& result) const { |
327 | 253 | (void)module; |
328 | 253 | (void)op; |
329 | | |
330 | 253 | if ( result.second != std::nullopt ) { |
331 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
332 | 0 | } |
333 | 253 | } |
334 | | |
335 | 253 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const { |
336 | 253 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
337 | | |
338 | 253 | return module->OpKDF_SSH(op); |
339 | 253 | } |
340 | | |
341 | | /* Specialization for operation::KDF_TLS1_PRF */ |
342 | 419 | template<> void ExecutorBase<component::Key, operation::KDF_TLS1_PRF>::postprocess(std::shared_ptr<Module> module, operation::KDF_TLS1_PRF& op, const ExecutorBase<component::Key, operation::KDF_TLS1_PRF>::ResultPair& result) const { |
343 | 419 | (void)module; |
344 | 419 | (void)op; |
345 | | |
346 | 419 | if ( result.second != std::nullopt ) { |
347 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
348 | 0 | } |
349 | 419 | } |
350 | | |
351 | 419 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_TLS1_PRF>::callModule(std::shared_ptr<Module> module, operation::KDF_TLS1_PRF& op) const { |
352 | 419 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
353 | | |
354 | 419 | return module->OpKDF_TLS1_PRF(op); |
355 | 419 | } |
356 | | |
357 | | /* Specialization for operation::KDF_X963 */ |
358 | 399 | template<> void ExecutorBase<component::Key, operation::KDF_X963>::postprocess(std::shared_ptr<Module> module, operation::KDF_X963& op, const ExecutorBase<component::Key, operation::KDF_X963>::ResultPair& result) const { |
359 | 399 | (void)module; |
360 | 399 | (void)op; |
361 | | |
362 | 399 | if ( result.second != std::nullopt ) { |
363 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
364 | 0 | } |
365 | 399 | } |
366 | | |
367 | 399 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const { |
368 | 399 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
369 | | |
370 | 399 | return module->OpKDF_X963(op); |
371 | 399 | } |
372 | | |
373 | | /* Specialization for operation::KDF_BCRYPT */ |
374 | 103 | template<> void ExecutorBase<component::Key, operation::KDF_BCRYPT>::postprocess(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op, const ExecutorBase<component::Key, operation::KDF_BCRYPT>::ResultPair& result) const { |
375 | 103 | (void)module; |
376 | 103 | (void)op; |
377 | | |
378 | 103 | if ( result.second != std::nullopt ) { |
379 | 33 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
380 | 33 | } |
381 | 103 | } |
382 | | |
383 | 103 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const { |
384 | 103 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
385 | | |
386 | 103 | return module->OpKDF_BCRYPT(op); |
387 | 103 | } |
388 | | |
389 | | /* Specialization for operation::KDF_SP_800_108 */ |
390 | 1.27k | template<> void ExecutorBase<component::Key, operation::KDF_SP_800_108>::postprocess(std::shared_ptr<Module> module, operation::KDF_SP_800_108& op, const ExecutorBase<component::Key, operation::KDF_SP_800_108>::ResultPair& result) const { |
391 | 1.27k | (void)module; |
392 | 1.27k | (void)op; |
393 | | |
394 | 1.27k | if ( result.second != std::nullopt ) { |
395 | 578 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
396 | 578 | } |
397 | 1.27k | } |
398 | | |
399 | 1.27k | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SP_800_108>::callModule(std::shared_ptr<Module> module, operation::KDF_SP_800_108& op) const { |
400 | 1.27k | if ( op.mech.mode == true ) { |
401 | 751 | RETURN_IF_DISABLED(options.digests, op.mech.type.Get()); |
402 | 751 | } |
403 | | |
404 | 1.27k | return module->OpKDF_SP_800_108(op); |
405 | 1.27k | } |
406 | | |
407 | | /* Specialization for operation::KDF_SRTP */ |
408 | 360 | template<> void ExecutorBase<component::Key3, operation::KDF_SRTP>::postprocess(std::shared_ptr<Module> module, operation::KDF_SRTP& op, const ExecutorBase<component::Key3, operation::KDF_SRTP>::ResultPair& result) const { |
409 | 360 | (void)module; |
410 | 360 | (void)op; |
411 | 360 | (void)result; |
412 | 360 | } |
413 | | |
414 | 360 | template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const { |
415 | 360 | return module->OpKDF_SRTP(op); |
416 | 360 | } |
417 | | |
418 | | /* Specialization for operation::KDF_SRTCP */ |
419 | 303 | template<> void ExecutorBase<component::Key3, operation::KDF_SRTCP>::postprocess(std::shared_ptr<Module> module, operation::KDF_SRTCP& op, const ExecutorBase<component::Key3, operation::KDF_SRTCP>::ResultPair& result) const { |
420 | 303 | (void)module; |
421 | 303 | (void)op; |
422 | 303 | (void)result; |
423 | 303 | } |
424 | | |
425 | 303 | template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const { |
426 | 303 | return module->OpKDF_SRTCP(op); |
427 | 303 | } |
428 | | |
429 | | /* Specialization for operation::ECC_PrivateToPublic */ |
430 | 1.04k | template<> void ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op, const ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::ResultPair& result) const { |
431 | 1.04k | (void)module; |
432 | | |
433 | 1.04k | if ( result.second != std::nullopt ) { |
434 | 373 | const auto curveID = op.curveType.Get(); |
435 | 373 | const auto privkey = op.priv.ToTrimmedString(); |
436 | 373 | const auto pub_x = result.second->first.ToTrimmedString(); |
437 | 373 | const auto pub_y = result.second->second.ToTrimmedString(); |
438 | | |
439 | 373 | Pool_CurvePrivkey.Set({ curveID, privkey }); |
440 | 373 | Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y }); |
441 | 373 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
442 | | |
443 | 373 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
444 | 373 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
445 | 373 | } |
446 | 1.04k | } |
447 | | |
448 | 1.04k | template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op) const { |
449 | 1.04k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
450 | | |
451 | 1.04k | const size_t size = op.priv.ToTrimmedString().size(); |
452 | | |
453 | 1.04k | if ( size == 0 || size > 4096 ) { |
454 | 0 | return std::nullopt; |
455 | 0 | } |
456 | | |
457 | 1.04k | return module->OpECC_PrivateToPublic(op); |
458 | 1.04k | } |
459 | | |
460 | | /* Specialization for operation::ECC_ValidatePubkey */ |
461 | 1.32k | template<> void ExecutorBase<bool, operation::ECC_ValidatePubkey>::postprocess(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op, const ExecutorBase<bool, operation::ECC_ValidatePubkey>::ResultPair& result) const { |
462 | 1.32k | (void)module; |
463 | 1.32k | (void)op; |
464 | 1.32k | (void)result; |
465 | 1.32k | } |
466 | | |
467 | 1.32k | template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const { |
468 | 1.32k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
469 | | |
470 | 1.32k | return module->OpECC_ValidatePubkey(op); |
471 | 1.32k | } |
472 | | |
473 | | /* Specialization for operation::ECC_GenerateKeyPair */ |
474 | | |
475 | | /* Do not compare DH_GenerateKeyPair results, because the result can be produced indeterministically */ |
476 | | template <> |
477 | 38 | void ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DH_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { |
478 | 38 | (void)operations; |
479 | 38 | (void)results; |
480 | 38 | (void)data; |
481 | 38 | (void)size; |
482 | 38 | } |
483 | | |
484 | 1.52k | template<> void ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op, const ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::ResultPair& result) const { |
485 | 1.52k | (void)module; |
486 | | |
487 | 1.52k | if ( result.second != std::nullopt ) { |
488 | 523 | const auto curveID = op.curveType.Get(); |
489 | 523 | const auto privkey = result.second->priv.ToTrimmedString(); |
490 | 523 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
491 | 523 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
492 | | |
493 | 523 | Pool_CurvePrivkey.Set({ curveID, privkey }); |
494 | 523 | Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y }); |
495 | 523 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
496 | | |
497 | 523 | { |
498 | 523 | auto opValidate = operation::ECC_ValidatePubkey( |
499 | 523 | op.curveType, |
500 | 523 | result.second->pub, |
501 | 523 | op.modifier); |
502 | | |
503 | 523 | const auto validateResult = module->OpECC_ValidatePubkey(opValidate); |
504 | 523 | CF_ASSERT( |
505 | 523 | validateResult == std::nullopt || |
506 | 523 | *validateResult == true, |
507 | 523 | "Cannot validate generated public key"); |
508 | 523 | } |
509 | 523 | } |
510 | 1.52k | } |
511 | | |
512 | 1.52k | template<> std::optional<component::ECC_KeyPair> ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op) const { |
513 | 1.52k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
514 | | |
515 | 1.52k | return module->OpECC_GenerateKeyPair(op); |
516 | 1.52k | } |
517 | | |
518 | | /* Specialization for operation::ECCSI_Sign */ |
519 | 131 | template<> void ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECCSI_Sign& op, const ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::ResultPair& result) const { |
520 | 131 | (void)module; |
521 | | |
522 | 131 | if ( result.second != std::nullopt ) { |
523 | 0 | const auto curveID = op.curveType.Get(); |
524 | 0 | const auto cleartext = op.cleartext.ToHex(); |
525 | 0 | const auto id = op.id.ToHex(); |
526 | 0 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
527 | 0 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
528 | 0 | const auto pvt_x = result.second->pvt.first.ToTrimmedString(); |
529 | 0 | const auto pvt_y = result.second->pvt.second.ToTrimmedString(); |
530 | 0 | const auto sig_r = result.second->signature.first.ToTrimmedString(); |
531 | 0 | const auto sig_s = result.second->signature.second.ToTrimmedString(); |
532 | |
|
533 | 0 | Pool_CurveECCSISignature.Set({ |
534 | 0 | curveID, |
535 | 0 | cleartext, |
536 | 0 | id, |
537 | 0 | pub_x, pub_y, |
538 | 0 | pvt_x, pvt_y, |
539 | 0 | sig_r, sig_s}); |
540 | 0 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
541 | 0 | Pool_CurveECC_Point.Set({ curveID, pvt_x, pvt_y }); |
542 | 0 | Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s }); |
543 | |
|
544 | 0 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
545 | 0 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
546 | 0 | if ( pvt_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pvt_x); } |
547 | 0 | if ( pvt_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pvt_y); } |
548 | 0 | if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); } |
549 | 0 | if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); } |
550 | |
|
551 | 0 | { |
552 | 0 | auto opVerify = operation::ECCSI_Verify( |
553 | 0 | op, |
554 | 0 | *(result.second), |
555 | 0 | op.modifier); |
556 | |
|
557 | 0 | const auto verifyResult = module->OpECCSI_Verify(opVerify); |
558 | 0 | CF_ASSERT( |
559 | 0 | verifyResult == std::nullopt || |
560 | 0 | *verifyResult == true, |
561 | 0 | "Cannot verify generated signature"); |
562 | 0 | } |
563 | 0 | } |
564 | 131 | } |
565 | | |
566 | 131 | template<> std::optional<component::ECCSI_Signature> ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Sign& op) const { |
567 | 131 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
568 | 131 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
569 | | |
570 | 131 | const size_t size = op.priv.ToTrimmedString().size(); |
571 | | |
572 | 131 | if ( size == 0 || size > 4096 ) { |
573 | 2 | return std::nullopt; |
574 | 2 | } |
575 | | |
576 | 129 | return module->OpECCSI_Sign(op); |
577 | 131 | } |
578 | | |
579 | | /* Specialization for operation::ECDSA_Sign */ |
580 | 1.40k | template<> void ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Sign& op, const ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::ResultPair& result) const { |
581 | 1.40k | (void)module; |
582 | | |
583 | 1.40k | if ( result.second != std::nullopt ) { |
584 | 654 | const auto curveID = op.curveType.Get(); |
585 | 654 | const auto cleartext = op.cleartext.ToHex(); |
586 | 654 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
587 | 654 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
588 | 654 | const auto sig_r = result.second->signature.first.ToTrimmedString(); |
589 | 654 | const auto sig_s = result.second->signature.second.ToTrimmedString(); |
590 | | |
591 | 654 | Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s}); |
592 | 654 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
593 | 654 | Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s }); |
594 | | |
595 | 654 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
596 | 654 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
597 | 654 | if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); } |
598 | 654 | if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); } |
599 | | |
600 | 654 | { |
601 | 654 | auto opVerify = operation::ECDSA_Verify( |
602 | 654 | op, |
603 | 654 | *(result.second), |
604 | 654 | op.modifier); |
605 | | |
606 | 654 | const auto verifyResult = module->OpECDSA_Verify(opVerify); |
607 | 654 | CF_ASSERT( |
608 | 654 | verifyResult == std::nullopt || |
609 | 654 | *verifyResult == true, |
610 | 654 | "Cannot verify generated signature"); |
611 | 654 | } |
612 | 654 | } |
613 | 1.40k | } |
614 | | |
615 | 1.40k | template<> std::optional<component::ECDSA_Signature> ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Sign& op) const { |
616 | 1.40k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
617 | 1.40k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
618 | | |
619 | 1.40k | const size_t size = op.priv.ToTrimmedString().size(); |
620 | | |
621 | 1.40k | if ( size == 0 || size > 4096 ) { |
622 | 2 | return std::nullopt; |
623 | 2 | } |
624 | | |
625 | 1.39k | return module->OpECDSA_Sign(op); |
626 | 1.40k | } |
627 | | |
628 | | /* Specialization for operation::ECGDSA_Sign */ |
629 | 256 | template<> void ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECGDSA_Sign& op, const ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::ResultPair& result) const { |
630 | 256 | (void)module; |
631 | | |
632 | 256 | if ( result.second != std::nullopt ) { |
633 | 14 | const auto curveID = op.curveType.Get(); |
634 | 14 | const auto cleartext = op.cleartext.ToHex(); |
635 | 14 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
636 | 14 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
637 | 14 | const auto sig_r = result.second->signature.first.ToTrimmedString(); |
638 | 14 | const auto sig_s = result.second->signature.second.ToTrimmedString(); |
639 | | |
640 | 14 | Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s}); |
641 | 14 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
642 | 14 | Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s }); |
643 | | |
644 | 14 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
645 | 14 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
646 | 14 | if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); } |
647 | 14 | if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); } |
648 | 14 | } |
649 | 256 | } |
650 | | |
651 | 256 | template<> std::optional<component::ECGDSA_Signature> ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Sign& op) const { |
652 | 256 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
653 | 256 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
654 | | |
655 | 256 | const size_t size = op.priv.ToTrimmedString().size(); |
656 | | |
657 | 256 | if ( size == 0 || size > 4096 ) { |
658 | 0 | return std::nullopt; |
659 | 0 | } |
660 | | |
661 | 256 | return module->OpECGDSA_Sign(op); |
662 | 256 | } |
663 | | |
664 | | /* Specialization for operation::ECRDSA_Sign */ |
665 | 129 | template<> void ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECRDSA_Sign& op, const ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::ResultPair& result) const { |
666 | 129 | (void)module; |
667 | | |
668 | 129 | if ( result.second != std::nullopt ) { |
669 | 0 | const auto curveID = op.curveType.Get(); |
670 | 0 | const auto cleartext = op.cleartext.ToHex(); |
671 | 0 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
672 | 0 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
673 | 0 | const auto sig_r = result.second->signature.first.ToTrimmedString(); |
674 | 0 | const auto sig_s = result.second->signature.second.ToTrimmedString(); |
675 | |
|
676 | 0 | Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s}); |
677 | 0 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
678 | 0 | Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s }); |
679 | |
|
680 | 0 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
681 | 0 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
682 | 0 | if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); } |
683 | 0 | if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); } |
684 | 0 | } |
685 | 129 | } |
686 | | |
687 | 129 | template<> std::optional<component::ECRDSA_Signature> ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Sign& op) const { |
688 | 129 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
689 | 129 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
690 | | |
691 | 129 | const size_t size = op.priv.ToTrimmedString().size(); |
692 | | |
693 | 129 | if ( size == 0 || size > 4096 ) { |
694 | 0 | return std::nullopt; |
695 | 0 | } |
696 | | |
697 | 129 | return module->OpECRDSA_Sign(op); |
698 | 129 | } |
699 | | |
700 | | /* Specialization for operation::Schnorr_Sign */ |
701 | 132 | template<> void ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::postprocess(std::shared_ptr<Module> module, operation::Schnorr_Sign& op, const ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::ResultPair& result) const { |
702 | 132 | (void)module; |
703 | | |
704 | 132 | if ( result.second != std::nullopt ) { |
705 | 0 | const auto curveID = op.curveType.Get(); |
706 | 0 | const auto cleartext = op.cleartext.ToHex(); |
707 | 0 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
708 | 0 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
709 | 0 | const auto sig_r = result.second->signature.first.ToTrimmedString(); |
710 | 0 | const auto sig_s = result.second->signature.second.ToTrimmedString(); |
711 | |
|
712 | 0 | Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s}); |
713 | 0 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
714 | 0 | Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s }); |
715 | |
|
716 | 0 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
717 | 0 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
718 | 0 | if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); } |
719 | 0 | if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); } |
720 | 0 | } |
721 | 132 | } |
722 | | |
723 | 132 | template<> std::optional<component::Schnorr_Signature> ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Sign& op) const { |
724 | 132 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
725 | 132 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
726 | | |
727 | 132 | const size_t size = op.priv.ToTrimmedString().size(); |
728 | | |
729 | 132 | if ( size == 0 || size > 4096 ) { |
730 | 0 | return std::nullopt; |
731 | 0 | } |
732 | | |
733 | 132 | return module->OpSchnorr_Sign(op); |
734 | 132 | } |
735 | | |
736 | | /* Specialization for operation::ECCSI_Verify */ |
737 | 124 | template<> void ExecutorBase<bool, operation::ECCSI_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECCSI_Verify& op, const ExecutorBase<bool, operation::ECCSI_Verify>::ResultPair& result) const { |
738 | 124 | (void)module; |
739 | 124 | (void)op; |
740 | 124 | (void)result; |
741 | 124 | } |
742 | | |
743 | 124 | template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const { |
744 | 124 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
745 | 124 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
746 | | |
747 | 124 | return module->OpECCSI_Verify(op); |
748 | 124 | } |
749 | | |
750 | | /* Specialization for operation::ECDSA_Verify */ |
751 | 766 | template<> void ExecutorBase<bool, operation::ECDSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Verify& op, const ExecutorBase<bool, operation::ECDSA_Verify>::ResultPair& result) const { |
752 | 766 | (void)module; |
753 | 766 | (void)op; |
754 | 766 | (void)result; |
755 | 766 | } |
756 | | |
757 | 766 | template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const { |
758 | 766 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
759 | 766 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
760 | | |
761 | | /* Intentionally do not constrain the size of the public key or |
762 | | * signature (like we do for BignumCalc). |
763 | | * |
764 | | * If any large public key or signature causes a time-out (or |
765 | | * worse), this is something that needs attention; |
766 | | * because verifiers sometimes process untrusted public keys, |
767 | | * signatures or both, they should be resistant to bugs |
768 | | * arising from large inputs. |
769 | | */ |
770 | | |
771 | 766 | return module->OpECDSA_Verify(op); |
772 | 766 | } |
773 | | |
774 | | /* Specialization for operation::ECGDSA_Verify */ |
775 | 360 | template<> void ExecutorBase<bool, operation::ECGDSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op, const ExecutorBase<bool, operation::ECGDSA_Verify>::ResultPair& result) const { |
776 | 360 | (void)module; |
777 | 360 | (void)op; |
778 | 360 | (void)result; |
779 | 360 | } |
780 | | |
781 | 360 | template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const { |
782 | 360 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
783 | 360 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
784 | | |
785 | | /* Intentionally do not constrain the size of the public key or |
786 | | * signature (like we do for BignumCalc). |
787 | | * |
788 | | * If any large public key or signature causes a time-out (or |
789 | | * worse), this is something that needs attention; |
790 | | * because verifiers sometimes process untrusted public keys, |
791 | | * signatures or both, they should be resistant to bugs |
792 | | * arising from large inputs. |
793 | | */ |
794 | | |
795 | 360 | return module->OpECGDSA_Verify(op); |
796 | 360 | } |
797 | | |
798 | | /* Specialization for operation::ECRDSA_Verify */ |
799 | 107 | template<> void ExecutorBase<bool, operation::ECRDSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op, const ExecutorBase<bool, operation::ECRDSA_Verify>::ResultPair& result) const { |
800 | 107 | (void)module; |
801 | 107 | (void)op; |
802 | 107 | (void)result; |
803 | 107 | } |
804 | | |
805 | 107 | template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const { |
806 | 107 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
807 | 107 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
808 | | |
809 | | /* Intentionally do not constrain the size of the public key or |
810 | | * signature (like we do for BignumCalc). |
811 | | * |
812 | | * If any large public key or signature causes a time-out (or |
813 | | * worse), this is something that needs attention; |
814 | | * because verifiers sometimes process untrusted public keys, |
815 | | * signatures or both, they should be resistant to bugs |
816 | | * arising from large inputs. |
817 | | */ |
818 | | |
819 | 107 | return module->OpECRDSA_Verify(op); |
820 | 107 | } |
821 | | |
822 | | /* Specialization for operation::Schnorr_Verify */ |
823 | 135 | template<> void ExecutorBase<bool, operation::Schnorr_Verify>::postprocess(std::shared_ptr<Module> module, operation::Schnorr_Verify& op, const ExecutorBase<bool, operation::Schnorr_Verify>::ResultPair& result) const { |
824 | 135 | (void)module; |
825 | 135 | (void)op; |
826 | 135 | (void)result; |
827 | 135 | } |
828 | | |
829 | 135 | template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const { |
830 | 135 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
831 | 135 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
832 | | |
833 | | /* Intentionally do not constrain the size of the public key or |
834 | | * signature (like we do for BignumCalc). |
835 | | * |
836 | | * If any large public key or signature causes a time-out (or |
837 | | * worse), this is something that needs attention; |
838 | | * because verifiers sometimes process untrusted public keys, |
839 | | * signatures or both, they should be resistant to bugs |
840 | | * arising from large inputs. |
841 | | */ |
842 | | |
843 | 135 | return module->OpSchnorr_Verify(op); |
844 | 135 | } |
845 | | |
846 | 900 | template<> void ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Recover& op, const ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::ResultPair& result) const { |
847 | 900 | (void)module; |
848 | 900 | (void)op; |
849 | 900 | (void)result; |
850 | 900 | } |
851 | | |
852 | 900 | template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Recover& op) const { |
853 | 900 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
854 | 900 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
855 | | |
856 | 900 | return module->OpECDSA_Recover(op); |
857 | 900 | } |
858 | | |
859 | | /* Specialization for operation::DSA_Verify */ |
860 | 0 | template<> void ExecutorBase<bool, operation::DSA_Verify>::updateExtraCounters(const uint64_t moduleID, operation::DSA_Verify& op) const { |
861 | 0 | (void)moduleID; |
862 | 0 | (void)op; |
863 | | |
864 | | /* TODO */ |
865 | 0 | } |
866 | | |
867 | 498 | template<> void ExecutorBase<bool, operation::DSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::DSA_Verify& op, const ExecutorBase<bool, operation::DSA_Verify>::ResultPair& result) const { |
868 | 498 | (void)module; |
869 | 498 | (void)op; |
870 | 498 | (void)result; |
871 | 498 | } |
872 | | |
873 | 498 | template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const { |
874 | 498 | const std::vector<size_t> sizes = { |
875 | 498 | op.parameters.p.ToTrimmedString().size(), |
876 | 498 | op.parameters.q.ToTrimmedString().size(), |
877 | 498 | op.parameters.g.ToTrimmedString().size(), |
878 | 498 | op.pub.ToTrimmedString().size(), |
879 | 498 | op.signature.first.ToTrimmedString().size(), |
880 | 498 | op.signature.second.ToTrimmedString().size(), |
881 | 498 | }; |
882 | | |
883 | 2.98k | for (const auto& size : sizes) { |
884 | 2.98k | if ( size == 0 || size > 4096 ) { |
885 | 0 | return std::nullopt; |
886 | 0 | } |
887 | 2.98k | } |
888 | | |
889 | 498 | return module->OpDSA_Verify(op); |
890 | 498 | } |
891 | | |
892 | | /* Specialization for operation::DSA_Sign */ |
893 | | /* Do not compare DSA_Sign results, because the result can be produced indeterministically */ |
894 | | template <> |
895 | 44 | void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DSA_Sign> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { |
896 | 44 | (void)operations; |
897 | 44 | (void)results; |
898 | 44 | (void)data; |
899 | 44 | (void)size; |
900 | 44 | } |
901 | 0 | template<> void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::updateExtraCounters(const uint64_t moduleID, operation::DSA_Sign& op) const { |
902 | 0 | (void)moduleID; |
903 | 0 | (void)op; |
904 | | |
905 | | /* TODO */ |
906 | 0 | } |
907 | | |
908 | 141 | template<> void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::DSA_Sign& op, const ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::ResultPair& result) const { |
909 | 141 | (void)module; |
910 | 141 | (void)op; |
911 | 141 | if ( result.second != std::nullopt ) { |
912 | 0 | const auto cleartext = op.cleartext.ToHex(); |
913 | 0 | const auto p = op.parameters.p.ToTrimmedString(); |
914 | 0 | const auto q = op.parameters.q.ToTrimmedString(); |
915 | 0 | const auto g = op.parameters.g.ToTrimmedString(); |
916 | 0 | const auto r = result.second->signature.first.ToTrimmedString(); |
917 | 0 | const auto s = result.second->signature.second.ToTrimmedString(); |
918 | 0 | const auto pub = result.second->pub.ToTrimmedString(); |
919 | |
|
920 | 0 | Pool_DSASignature.Set({ |
921 | 0 | cleartext, |
922 | 0 | p, |
923 | 0 | q, |
924 | 0 | g, |
925 | 0 | pub, |
926 | 0 | r, |
927 | 0 | s |
928 | 0 | }); |
929 | |
|
930 | 0 | if ( r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(r); } |
931 | 0 | if ( s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(s); } |
932 | 0 | } |
933 | 141 | } |
934 | | |
935 | 141 | template<> std::optional<component::DSA_Signature> ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::callModule(std::shared_ptr<Module> module, operation::DSA_Sign& op) const { |
936 | 141 | const std::vector<size_t> sizes = { |
937 | 141 | op.parameters.p.ToTrimmedString().size(), |
938 | 141 | op.parameters.q.ToTrimmedString().size(), |
939 | 141 | op.parameters.g.ToTrimmedString().size(), |
940 | 141 | op.priv.ToTrimmedString().size(), |
941 | 141 | }; |
942 | | |
943 | 564 | for (const auto& size : sizes) { |
944 | 564 | if ( size == 0 || size > 4096 ) { |
945 | 0 | return std::nullopt; |
946 | 0 | } |
947 | 564 | } |
948 | | |
949 | 141 | return module->OpDSA_Sign(op); |
950 | 141 | } |
951 | | |
952 | | /* Specialization for operation::DSA_PrivateToPublic */ |
953 | | |
954 | 0 | template<> void ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::updateExtraCounters(const uint64_t moduleID, operation::DSA_PrivateToPublic& op) const { |
955 | 0 | (void)moduleID; |
956 | 0 | (void)op; |
957 | | |
958 | | /* TODO */ |
959 | 0 | } |
960 | | |
961 | 100 | template<> void ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op, const ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::ResultPair& result) const { |
962 | 100 | (void)result; |
963 | 100 | (void)module; |
964 | 100 | (void)op; |
965 | 100 | if ( result.second != std::nullopt ) { |
966 | | //Pool_DSA_PubPriv.Set({pub, priv}); |
967 | 0 | } |
968 | 100 | } |
969 | | |
970 | 100 | template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const { |
971 | 100 | return module->OpDSA_PrivateToPublic(op); |
972 | 100 | } |
973 | | |
974 | | /* Specialization for operation::DSA_GenerateKeyPair */ |
975 | | |
976 | | /* Do not compare DSA_GenerateKeyPair results, because the result can be produced indeterministically */ |
977 | | template <> |
978 | 42 | void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DSA_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { |
979 | 42 | (void)operations; |
980 | 42 | (void)results; |
981 | 42 | (void)data; |
982 | 42 | (void)size; |
983 | 42 | } |
984 | | |
985 | 0 | template<> void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateKeyPair& op) const { |
986 | 0 | (void)moduleID; |
987 | 0 | (void)op; |
988 | | |
989 | | /* TODO */ |
990 | 0 | } |
991 | | |
992 | 152 | template<> void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::DSA_GenerateKeyPair& op, const ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::ResultPair& result) const { |
993 | 152 | (void)result; |
994 | 152 | (void)module; |
995 | 152 | (void)op; |
996 | 152 | if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) { |
997 | 0 | const auto priv = result.second->first.ToTrimmedString(); |
998 | 0 | const auto pub = result.second->second.ToTrimmedString(); |
999 | |
|
1000 | 0 | Pool_DSA_PubPriv.Set({pub, priv}); |
1001 | 0 | } |
1002 | 152 | } |
1003 | | |
1004 | 152 | template<> std::optional<component::DSA_KeyPair> ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateKeyPair& op) const { |
1005 | 152 | const std::vector<size_t> sizes = { |
1006 | 152 | op.p.ToTrimmedString().size(), |
1007 | 152 | op.q.ToTrimmedString().size(), |
1008 | 152 | op.g.ToTrimmedString().size(), |
1009 | 152 | }; |
1010 | | |
1011 | 456 | for (const auto& size : sizes) { |
1012 | 456 | if ( size == 0 || size > 4096 ) { |
1013 | 0 | return std::nullopt; |
1014 | 0 | } |
1015 | 456 | } |
1016 | | |
1017 | 152 | return module->OpDSA_GenerateKeyPair(op); |
1018 | 152 | } |
1019 | | |
1020 | | /* Specialization for operation::DSA_GenerateParameters */ |
1021 | | |
1022 | | /* Do not compare DSA_GenerateParameters results, because the result can be produced indeterministically */ |
1023 | | template <> |
1024 | 36 | void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DSA_GenerateParameters> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { |
1025 | 36 | (void)operations; |
1026 | 36 | (void)results; |
1027 | 36 | (void)data; |
1028 | 36 | (void)size; |
1029 | 36 | } |
1030 | | |
1031 | 0 | template<> void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateParameters& op) const { |
1032 | 0 | (void)moduleID; |
1033 | 0 | (void)op; |
1034 | | |
1035 | | /* TODO */ |
1036 | 0 | } |
1037 | | |
1038 | 126 | template<> void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::postprocess(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op, const ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::ResultPair& result) const { |
1039 | 126 | (void)result; |
1040 | 126 | (void)module; |
1041 | 126 | (void)op; |
1042 | 126 | if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) { |
1043 | 0 | const auto P = result.second->p.ToTrimmedString(); |
1044 | 0 | const auto Q = result.second->q.ToTrimmedString(); |
1045 | 0 | const auto G = result.second->g.ToTrimmedString(); |
1046 | |
|
1047 | 0 | Pool_DSA_PQG.Set({P, Q, G}); |
1048 | |
|
1049 | 0 | if ( P.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(P); } |
1050 | 0 | if ( Q.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(Q); } |
1051 | 0 | if ( G.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(G); } |
1052 | 0 | } |
1053 | 126 | } |
1054 | | |
1055 | 126 | template<> std::optional<component::DSA_Parameters> ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op) const { |
1056 | 126 | return module->OpDSA_GenerateParameters(op); |
1057 | 126 | } |
1058 | | |
1059 | | /* Specialization for operation::ECDH_Derive */ |
1060 | 127 | template<> void ExecutorBase<component::Secret, operation::ECDH_Derive>::postprocess(std::shared_ptr<Module> module, operation::ECDH_Derive& op, const ExecutorBase<component::Secret, operation::ECDH_Derive>::ResultPair& result) const { |
1061 | 127 | (void)module; |
1062 | 127 | (void)op; |
1063 | 127 | (void)result; |
1064 | 127 | } |
1065 | | |
1066 | 127 | template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const { |
1067 | 127 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1068 | | |
1069 | 127 | return module->OpECDH_Derive(op); |
1070 | 127 | } |
1071 | | |
1072 | | /* Specialization for operation::ECIES_Encrypt */ |
1073 | | template <> |
1074 | 38 | void ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::ECIES_Encrypt> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { |
1075 | 38 | (void)operations; |
1076 | 38 | (void)results; |
1077 | 38 | (void)data; |
1078 | 38 | (void)size; |
1079 | 38 | } |
1080 | 148 | template<> void ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::postprocess(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op, const ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::ResultPair& result) const { |
1081 | 148 | (void)module; |
1082 | 148 | (void)op; |
1083 | 148 | (void)result; |
1084 | 148 | } |
1085 | | |
1086 | 148 | template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const { |
1087 | 148 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1088 | | |
1089 | 148 | return module->OpECIES_Encrypt(op); |
1090 | 148 | } |
1091 | | |
1092 | | /* Specialization for operation::ECIES_Decrypt */ |
1093 | 96 | template<> void ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::postprocess(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op, const ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::ResultPair& result) const { |
1094 | 96 | (void)module; |
1095 | 96 | (void)op; |
1096 | 96 | (void)result; |
1097 | 96 | } |
1098 | | |
1099 | 96 | template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const { |
1100 | 96 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1101 | | |
1102 | 96 | return module->OpECIES_Decrypt(op); |
1103 | 96 | } |
1104 | | |
1105 | | /* Specialization for operation::ECC_Point_Add */ |
1106 | 238 | template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Add& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>::ResultPair& result) const { |
1107 | 238 | (void)module; |
1108 | | |
1109 | 238 | if ( result.second != std::nullopt ) { |
1110 | 27 | const auto curveID = op.curveType.Get(); |
1111 | 27 | const auto x = result.second->first.ToTrimmedString(); |
1112 | 27 | const auto y = result.second->second.ToTrimmedString(); |
1113 | | |
1114 | 27 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1115 | | |
1116 | 27 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1117 | 27 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1118 | 27 | } |
1119 | 238 | } |
1120 | | |
1121 | 238 | template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Add& op) const { |
1122 | 238 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1123 | | |
1124 | 238 | return module->OpECC_Point_Add(op); |
1125 | 238 | } |
1126 | | |
1127 | | /* Specialization for operation::ECC_Point_Sub */ |
1128 | 254 | template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Sub& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>::ResultPair& result) const { |
1129 | 254 | (void)module; |
1130 | | |
1131 | 254 | if ( result.second != std::nullopt ) { |
1132 | 26 | const auto curveID = op.curveType.Get(); |
1133 | 26 | const auto x = result.second->first.ToTrimmedString(); |
1134 | 26 | const auto y = result.second->second.ToTrimmedString(); |
1135 | | |
1136 | 26 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1137 | | |
1138 | 26 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1139 | 26 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1140 | 26 | } |
1141 | 254 | } |
1142 | | |
1143 | 254 | template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Sub& op) const { |
1144 | 254 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1145 | | |
1146 | 254 | return module->OpECC_Point_Sub(op); |
1147 | 254 | } |
1148 | | |
1149 | | /* Specialization for operation::ECC_Point_Mul */ |
1150 | 537 | template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Mul& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::ResultPair& result) const { |
1151 | 537 | (void)module; |
1152 | | |
1153 | 537 | if ( result.second != std::nullopt ) { |
1154 | 165 | const auto curveID = op.curveType.Get(); |
1155 | 165 | const auto x = result.second->first.ToTrimmedString(); |
1156 | 165 | const auto y = result.second->second.ToTrimmedString(); |
1157 | | |
1158 | 165 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1159 | | |
1160 | 165 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1161 | 165 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1162 | 165 | } |
1163 | 537 | } |
1164 | | |
1165 | 537 | template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Mul& op) const { |
1166 | 537 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1167 | | |
1168 | 537 | return module->OpECC_Point_Mul(op); |
1169 | 537 | } |
1170 | | |
1171 | | /* Specialization for operation::ECC_Point_Neg */ |
1172 | 195 | template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Neg& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::ResultPair& result) const { |
1173 | 195 | (void)module; |
1174 | | |
1175 | 195 | if ( result.second != std::nullopt ) { |
1176 | 31 | const auto curveID = op.curveType.Get(); |
1177 | 31 | const auto x = result.second->first.ToTrimmedString(); |
1178 | 31 | const auto y = result.second->second.ToTrimmedString(); |
1179 | | |
1180 | 31 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1181 | | |
1182 | 31 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1183 | 31 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1184 | 31 | } |
1185 | 195 | } |
1186 | | |
1187 | 195 | template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Neg& op) const { |
1188 | 195 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1189 | | |
1190 | 195 | return module->OpECC_Point_Neg(op); |
1191 | 195 | } |
1192 | | |
1193 | | /* Specialization for operation::ECC_Point_Dbl */ |
1194 | 219 | template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Dbl& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>::ResultPair& result) const { |
1195 | 219 | (void)module; |
1196 | | |
1197 | 219 | if ( result.second != std::nullopt ) { |
1198 | 20 | const auto curveID = op.curveType.Get(); |
1199 | 20 | const auto x = result.second->first.ToTrimmedString(); |
1200 | 20 | const auto y = result.second->second.ToTrimmedString(); |
1201 | | |
1202 | 20 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1203 | | |
1204 | 20 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1205 | 20 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1206 | 20 | } |
1207 | 219 | } |
1208 | | |
1209 | 219 | template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Dbl& op) const { |
1210 | 219 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1211 | | |
1212 | 219 | return module->OpECC_Point_Dbl(op); |
1213 | 219 | } |
1214 | | |
1215 | | /* Specialization for operation::ECC_Point_Cmp */ |
1216 | 208 | template<> void ExecutorBase<bool, operation::ECC_Point_Cmp>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op, const ExecutorBase<bool, operation::ECC_Point_Cmp>::ResultPair& result) const { |
1217 | 208 | (void)module; |
1218 | 208 | (void)result; |
1219 | 208 | (void)op; |
1220 | 208 | } |
1221 | | |
1222 | 208 | template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const { |
1223 | 208 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1224 | | |
1225 | 208 | return module->OpECC_Point_Cmp(op); |
1226 | 208 | } |
1227 | | |
1228 | | /* Specialization for operation::DH_Derive */ |
1229 | 493 | template<> void ExecutorBase<component::Bignum, operation::DH_Derive>::postprocess(std::shared_ptr<Module> module, operation::DH_Derive& op, const ExecutorBase<component::Bignum, operation::DH_Derive>::ResultPair& result) const { |
1230 | 493 | (void)module; |
1231 | 493 | (void)op; |
1232 | 493 | (void)result; |
1233 | 493 | } |
1234 | | |
1235 | 493 | template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const { |
1236 | 493 | if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1237 | 493 | if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1238 | 484 | if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1239 | 473 | if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1240 | | |
1241 | 473 | return module->OpDH_Derive(op); |
1242 | 473 | } |
1243 | | |
1244 | | /* Specialization for operation::DH_GenerateKeyPair */ |
1245 | 125 | template<> void ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::DH_GenerateKeyPair& op, const ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::ResultPair& result) const { |
1246 | 125 | (void)result; |
1247 | 125 | (void)op; |
1248 | 125 | (void)module; |
1249 | | |
1250 | 125 | if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) { |
1251 | 0 | const auto priv = result.second->first.ToTrimmedString(); |
1252 | 0 | const auto pub = result.second->second.ToTrimmedString(); |
1253 | |
|
1254 | 0 | Pool_DH_PrivateKey.Set(priv); |
1255 | 0 | Pool_DH_PublicKey.Set(pub); |
1256 | 0 | } |
1257 | 125 | } |
1258 | | |
1259 | 125 | template<> std::optional<component::DH_KeyPair> ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DH_GenerateKeyPair& op) const { |
1260 | 125 | if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1261 | 125 | if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1262 | | |
1263 | 125 | return module->OpDH_GenerateKeyPair(op); |
1264 | 125 | } |
1265 | | |
1266 | | /* Specialization for operation::BignumCalc */ |
1267 | 10.8k | template<> void ExecutorBase<component::Bignum, operation::BignumCalc>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc& op, const ExecutorBase<component::Bignum, operation::BignumCalc>::ResultPair& result) const { |
1268 | 10.8k | (void)module; |
1269 | 10.8k | (void)op; |
1270 | | |
1271 | 10.8k | if ( result.second != std::nullopt ) { |
1272 | 3.24k | const auto bignum = result.second->ToTrimmedString(); |
1273 | | |
1274 | 3.24k | if ( bignum.size() <= config::kMaxBignumSize ) { |
1275 | 3.22k | Pool_Bignum.Set(bignum); |
1276 | 3.22k | if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) { |
1277 | 657 | Pool_Bignum_Primes.Set(bignum); |
1278 | 657 | } |
1279 | 3.22k | } |
1280 | 3.24k | if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) { |
1281 | 161 | if ( bignum == "1" ) { |
1282 | 86 | Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString()); |
1283 | 86 | } |
1284 | 161 | } |
1285 | 3.24k | } |
1286 | 10.8k | } |
1287 | | |
1288 | 10.8k | std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const { |
1289 | 10.8k | RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get()); |
1290 | | |
1291 | | /* Prevent timeouts */ |
1292 | 10.8k | if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1293 | 10.8k | if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1294 | 10.8k | if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1295 | 10.8k | if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1296 | | |
1297 | 10.8k | if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) { |
1298 | 1.01k | return std::nullopt; |
1299 | 1.01k | } |
1300 | | |
1301 | 9.81k | switch ( op.calcOp.Get() ) { |
1302 | 42 | case CF_CALCOP("SetBit(A,B)"): |
1303 | | /* Don't allow setting very high bit positions (risk of memory exhaustion) */ |
1304 | 42 | if ( op.bn1.GetSize() > 4 ) { |
1305 | 10 | return std::nullopt; |
1306 | 10 | } |
1307 | 32 | break; |
1308 | 82 | case CF_CALCOP("Exp(A,B)"): |
1309 | 82 | if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) { |
1310 | 20 | return std::nullopt; |
1311 | 20 | } |
1312 | 62 | break; |
1313 | 62 | case CF_CALCOP("ModLShift(A,B,C)"): |
1314 | 20 | if ( op.bn1.GetSize() > 4 ) { |
1315 | 10 | return std::nullopt; |
1316 | 10 | } |
1317 | 10 | break; |
1318 | 87 | case CF_CALCOP("Exp2(A)"): |
1319 | 87 | if ( op.bn0.GetSize() > 4 ) { |
1320 | 10 | return std::nullopt; |
1321 | 10 | } |
1322 | 77 | break; |
1323 | 9.81k | } |
1324 | | |
1325 | 9.76k | return module->OpBignumCalc(op); |
1326 | 9.81k | } |
1327 | | |
1328 | | /* Specialization for operation::BignumCalc_Fp2 */ |
1329 | 192 | template<> void ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op, const ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ResultPair& result) const { |
1330 | 192 | (void)module; |
1331 | 192 | (void)op; |
1332 | | |
1333 | 192 | if ( result.second != std::nullopt ) { |
1334 | 0 | const auto bignum_first = result.second->first.ToTrimmedString(); |
1335 | 0 | const auto bignum_second = result.second->second.ToTrimmedString(); |
1336 | |
|
1337 | 0 | if ( bignum_first.size() <= config::kMaxBignumSize ) { |
1338 | 0 | Pool_Bignum.Set(bignum_first); |
1339 | 0 | } |
1340 | 0 | if ( bignum_second.size() <= config::kMaxBignumSize ) { |
1341 | 0 | Pool_Bignum.Set(bignum_second); |
1342 | 0 | } |
1343 | 0 | } |
1344 | 192 | } |
1345 | | |
1346 | 192 | std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const { |
1347 | 192 | RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get()); |
1348 | | |
1349 | | /* Prevent timeouts */ |
1350 | 192 | if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1351 | 182 | if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1352 | 182 | if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1353 | 180 | if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1354 | 180 | if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1355 | 171 | if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1356 | 160 | if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1357 | 150 | if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1358 | | |
1359 | 141 | if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) { |
1360 | 0 | return std::nullopt; |
1361 | 0 | } |
1362 | | |
1363 | 141 | return module->OpBignumCalc_Fp2(op); |
1364 | 141 | } |
1365 | | |
1366 | | /* Specialization for operation::BignumCalc_Fp12 */ |
1367 | 703 | template<> void ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op, const ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ResultPair& result) const { |
1368 | 703 | (void)module; |
1369 | 703 | (void)op; |
1370 | | |
1371 | 703 | if ( result.second != std::nullopt ) { |
1372 | 0 | Pool_Fp12.Set({ |
1373 | 0 | result.second->bn1.ToTrimmedString(), |
1374 | 0 | result.second->bn2.ToTrimmedString(), |
1375 | 0 | result.second->bn3.ToTrimmedString(), |
1376 | 0 | result.second->bn4.ToTrimmedString(), |
1377 | 0 | result.second->bn5.ToTrimmedString(), |
1378 | 0 | result.second->bn6.ToTrimmedString(), |
1379 | 0 | result.second->bn7.ToTrimmedString(), |
1380 | 0 | result.second->bn8.ToTrimmedString(), |
1381 | 0 | result.second->bn9.ToTrimmedString(), |
1382 | 0 | result.second->bn10.ToTrimmedString(), |
1383 | 0 | result.second->bn11.ToTrimmedString(), |
1384 | 0 | result.second->bn12.ToTrimmedString() |
1385 | 0 | }); |
1386 | | /* TODO */ |
1387 | | #if 0 |
1388 | | const auto bignum_first = result.second->first.ToTrimmedString(); |
1389 | | const auto bignum_second = result.second->second.ToTrimmedString(); |
1390 | | |
1391 | | if ( bignum_first.size() <= config::kMaxBignumSize ) { |
1392 | | Pool_Bignum.Set(bignum_first); |
1393 | | } |
1394 | | if ( bignum_second.size() <= config::kMaxBignumSize ) { |
1395 | | Pool_Bignum.Set(bignum_second); |
1396 | | } |
1397 | | #endif |
1398 | 0 | } |
1399 | 703 | } |
1400 | | |
1401 | 703 | std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const { |
1402 | 703 | RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get()); |
1403 | | |
1404 | | /* Prevent timeouts */ |
1405 | 703 | if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1406 | 703 | if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1407 | 694 | if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1408 | 685 | if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1409 | 676 | if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1410 | 667 | if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1411 | 656 | if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1412 | 651 | if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1413 | 640 | if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1414 | 631 | if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1415 | 620 | if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1416 | 611 | if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1417 | | |
1418 | 602 | if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1419 | 592 | if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1420 | 583 | if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1421 | 574 | if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1422 | 565 | if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1423 | 554 | if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1424 | 545 | if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1425 | 536 | if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1426 | 527 | if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1427 | 518 | if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1428 | 509 | if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1429 | 500 | if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1430 | | |
1431 | 490 | if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1432 | 481 | if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1433 | 475 | if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1434 | 466 | if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1435 | 457 | if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1436 | 448 | if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1437 | 439 | if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1438 | 430 | if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1439 | 419 | if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1440 | 408 | if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1441 | 397 | if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1442 | 388 | if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1443 | | |
1444 | 379 | if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1445 | 370 | if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1446 | 353 | if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1447 | 342 | if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1448 | 333 | if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1449 | 328 | if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1450 | 319 | if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1451 | 310 | if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1452 | 301 | if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1453 | 292 | if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1454 | 287 | if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1455 | 278 | if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1456 | | |
1457 | 269 | if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) { |
1458 | 0 | return std::nullopt; |
1459 | 0 | } |
1460 | | |
1461 | 269 | return module->OpBignumCalc_Fp12(op); |
1462 | 269 | } |
1463 | | |
1464 | | /* Specialization for operation::BLS_PrivateToPublic */ |
1465 | 155 | template<> void ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic& op, const ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::ResultPair& result) const { |
1466 | 155 | (void)module; |
1467 | | |
1468 | 155 | if ( result.second != std::nullopt ) { |
1469 | 0 | const auto curveID = op.curveType.Get(); |
1470 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
1471 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
1472 | |
|
1473 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1474 | |
|
1475 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1476 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1477 | 0 | } |
1478 | 155 | } |
1479 | | |
1480 | 155 | template<> std::optional<component::BLS_PublicKey> ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic& op) const { |
1481 | 155 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1482 | | |
1483 | 155 | const size_t size = op.priv.ToTrimmedString().size(); |
1484 | | |
1485 | 155 | if ( size == 0 || size > 4096 ) { |
1486 | 0 | return std::nullopt; |
1487 | 0 | } |
1488 | | |
1489 | 155 | return module->OpBLS_PrivateToPublic(op); |
1490 | 155 | } |
1491 | | |
1492 | | /* Specialization for operation::BLS_PrivateToPublic_G2 */ |
1493 | 155 | template<> void ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic_G2& op, const ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::ResultPair& result) const { |
1494 | 155 | (void)module; |
1495 | 155 | if ( result.second != std::nullopt ) { |
1496 | 0 | const auto curveID = op.curveType.Get(); |
1497 | 0 | const auto g2_v = result.second->first.first.ToTrimmedString(); |
1498 | 0 | const auto g2_w = result.second->first.second.ToTrimmedString(); |
1499 | 0 | const auto g2_x = result.second->second.first.ToTrimmedString(); |
1500 | 0 | const auto g2_y = result.second->second.second.ToTrimmedString(); |
1501 | |
|
1502 | 0 | G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y); |
1503 | |
|
1504 | 0 | if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); } |
1505 | 0 | if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); } |
1506 | 0 | if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); } |
1507 | 0 | if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); } |
1508 | 0 | } |
1509 | 155 | } |
1510 | | |
1511 | 155 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic_G2& op) const { |
1512 | 155 | const size_t size = op.priv.ToTrimmedString().size(); |
1513 | | |
1514 | 155 | if ( size == 0 || size > 4096 ) { |
1515 | 0 | return std::nullopt; |
1516 | 0 | } |
1517 | | |
1518 | 155 | return module->OpBLS_PrivateToPublic_G2(op); |
1519 | 155 | } |
1520 | | |
1521 | | /* Specialization for operation::BLS_Sign */ |
1522 | 154 | template<> void ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::postprocess(std::shared_ptr<Module> module, operation::BLS_Sign& op, const ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::ResultPair& result) const { |
1523 | 154 | (void)module; |
1524 | | |
1525 | 154 | if ( result.second != std::nullopt ) { |
1526 | 0 | const auto curveID = op.curveType.Get(); |
1527 | 0 | const auto point_v = op.hashOrPoint ? op.point.first.first.ToTrimmedString() : ""; |
1528 | 0 | const auto point_w = op.hashOrPoint ? op.point.first.second.ToTrimmedString() : ""; |
1529 | 0 | const auto point_x = op.hashOrPoint ? op.point.second.first.ToTrimmedString() : ""; |
1530 | 0 | const auto point_y = op.hashOrPoint ? op.point.second.second.ToTrimmedString() : ""; |
1531 | 0 | const auto cleartext = op.hashOrPoint ? op.cleartext.ToHex() : ""; |
1532 | 0 | const auto dest = op.dest.ToHex(); |
1533 | 0 | const auto aug = op.aug.ToHex(); |
1534 | 0 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
1535 | 0 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
1536 | 0 | const auto sig_v = result.second->signature.first.first.ToTrimmedString(); |
1537 | 0 | const auto sig_w = result.second->signature.first.second.ToTrimmedString(); |
1538 | 0 | const auto sig_x = result.second->signature.second.first.ToTrimmedString(); |
1539 | 0 | const auto sig_y = result.second->signature.second.second.ToTrimmedString(); |
1540 | |
|
1541 | 0 | G1AddToPool(curveID, pub_x, pub_y); |
1542 | 0 | G2AddToPool(curveID, sig_v, sig_w, sig_x, sig_y); |
1543 | 0 | Pool_CurveBLSSignature.Set({ curveID, op.hashOrPoint, point_v, point_w, point_x, point_y, cleartext, dest, aug, pub_x, pub_y, sig_v, sig_w, sig_x, sig_y}); |
1544 | |
|
1545 | 0 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
1546 | 0 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
1547 | 0 | if ( sig_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_v); } |
1548 | 0 | if ( sig_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_w); } |
1549 | 0 | if ( sig_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_x); } |
1550 | 0 | if ( sig_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_y); } |
1551 | 0 | } |
1552 | 154 | } |
1553 | | |
1554 | 154 | template<> std::optional<component::BLS_Signature> ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::callModule(std::shared_ptr<Module> module, operation::BLS_Sign& op) const { |
1555 | 154 | const size_t size = op.priv.ToTrimmedString().size(); |
1556 | | |
1557 | 154 | if ( size == 0 || size > 4096 ) { |
1558 | 0 | return std::nullopt; |
1559 | 0 | } |
1560 | | |
1561 | 154 | return module->OpBLS_Sign(op); |
1562 | 154 | } |
1563 | | |
1564 | | /* Specialization for operation::BLS_Verify */ |
1565 | 127 | template<> void ExecutorBase<bool, operation::BLS_Verify>::postprocess(std::shared_ptr<Module> module, operation::BLS_Verify& op, const ExecutorBase<bool, operation::BLS_Verify>::ResultPair& result) const { |
1566 | 127 | (void)module; |
1567 | 127 | (void)op; |
1568 | 127 | (void)result; |
1569 | 127 | } |
1570 | | |
1571 | 127 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_Verify>::callModule(std::shared_ptr<Module> module, operation::BLS_Verify& op) const { |
1572 | | #if 0 |
1573 | | const std::vector<size_t> sizes = { |
1574 | | op.pub.first.ToTrimmedString().size(), |
1575 | | op.pub.second.ToTrimmedString().size(), |
1576 | | op.signature.first.ToTrimmedString().size(), |
1577 | | op.signature.second.ToTrimmedString().size(), |
1578 | | }; |
1579 | | |
1580 | | for (const auto& size : sizes) { |
1581 | | if ( size == 0 || size > 4096 ) { |
1582 | | return std::nullopt; |
1583 | | } |
1584 | | } |
1585 | | #endif |
1586 | | |
1587 | 127 | return module->OpBLS_Verify(op); |
1588 | 127 | } |
1589 | | |
1590 | | /* Specialization for operation::BLS_BatchSign */ |
1591 | 147 | template<> void ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::postprocess(std::shared_ptr<Module> module, operation::BLS_BatchSign& op, const ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::ResultPair& result) const { |
1592 | 147 | (void)module; |
1593 | 147 | (void)op; |
1594 | | |
1595 | 147 | if ( result.second != std::nullopt ) { |
1596 | 0 | std::vector< std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2> > msgpub; |
1597 | 0 | for (const auto& mp : result.second->msgpub) { |
1598 | 0 | msgpub.push_back( |
1599 | 0 | std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2>{ |
1600 | 0 | { |
1601 | 0 | mp.first.first.ToTrimmedString(), |
1602 | 0 | mp.first.second.ToTrimmedString() |
1603 | 0 | }, |
1604 | 0 | { |
1605 | 0 | mp.second.first.first.ToTrimmedString(), |
1606 | 0 | mp.second.first.second.ToTrimmedString(), |
1607 | 0 | mp.second.second.first.ToTrimmedString(), |
1608 | 0 | mp.second.second.second.ToTrimmedString() |
1609 | 0 | } |
1610 | 0 | } |
1611 | 0 | ); |
1612 | 0 | G1AddToPool(CF_ECC_CURVE("BLS12_381"), mp.first.first.ToTrimmedString(), mp.first.second.ToTrimmedString()); |
1613 | 0 | Pool_CurveBLSG2.Set({ |
1614 | 0 | CF_ECC_CURVE("BLS12_381"), |
1615 | 0 | mp.second.first.first.ToTrimmedString(), |
1616 | 0 | mp.second.first.second.ToTrimmedString(), |
1617 | 0 | mp.second.second.first.ToTrimmedString(), |
1618 | 0 | mp.second.second.second.ToTrimmedString() |
1619 | 0 | }); |
1620 | 0 | } |
1621 | 0 | Pool_BLS_BatchSignature.Set({msgpub}); |
1622 | 0 | } |
1623 | 147 | } |
1624 | | |
1625 | 147 | template<> std::optional<component::BLS_BatchSignature> ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchSign& op) const { |
1626 | 147 | return module->OpBLS_BatchSign(op); |
1627 | 147 | } |
1628 | | |
1629 | | /* Specialization for operation::BLS_BatchVerify */ |
1630 | 168 | template<> void ExecutorBase<bool, operation::BLS_BatchVerify>::postprocess(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op, const ExecutorBase<bool, operation::BLS_BatchVerify>::ResultPair& result) const { |
1631 | 168 | (void)module; |
1632 | 168 | (void)op; |
1633 | 168 | (void)result; |
1634 | 168 | } |
1635 | | |
1636 | 168 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const { |
1637 | 168 | return module->OpBLS_BatchVerify(op); |
1638 | 168 | } |
1639 | | |
1640 | | /* Specialization for operation::BLS_Aggregate_G1 */ |
1641 | 113 | template<> void ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::postprocess(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op, const ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::ResultPair& result) const { |
1642 | 113 | (void)module; |
1643 | 113 | (void)op; |
1644 | 113 | (void)result; |
1645 | 113 | } |
1646 | | |
1647 | 113 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op) const { |
1648 | 113 | return module->OpBLS_Aggregate_G1(op); |
1649 | 113 | } |
1650 | | |
1651 | | /* Specialization for operation::BLS_Aggregate_G2 */ |
1652 | 130 | template<> void ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op, const ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::ResultPair& result) const { |
1653 | 130 | (void)module; |
1654 | 130 | (void)op; |
1655 | 130 | (void)result; |
1656 | 130 | } |
1657 | | |
1658 | 130 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op) const { |
1659 | 130 | return module->OpBLS_Aggregate_G2(op); |
1660 | 130 | } |
1661 | | |
1662 | | /* Specialization for operation::BLS_Pairing */ |
1663 | 101 | template<> void ExecutorBase<component::Fp12, operation::BLS_Pairing>::postprocess(std::shared_ptr<Module> module, operation::BLS_Pairing& op, const ExecutorBase<component::Fp12, operation::BLS_Pairing>::ResultPair& result) const { |
1664 | 101 | (void)module; |
1665 | 101 | (void)op; |
1666 | | |
1667 | 101 | if ( result.second != std::nullopt ) { |
1668 | 0 | Pool_Fp12.Set({ |
1669 | 0 | result.second->bn1.ToTrimmedString(), |
1670 | 0 | result.second->bn2.ToTrimmedString(), |
1671 | 0 | result.second->bn3.ToTrimmedString(), |
1672 | 0 | result.second->bn4.ToTrimmedString(), |
1673 | 0 | result.second->bn5.ToTrimmedString(), |
1674 | 0 | result.second->bn6.ToTrimmedString(), |
1675 | 0 | result.second->bn7.ToTrimmedString(), |
1676 | 0 | result.second->bn8.ToTrimmedString(), |
1677 | 0 | result.second->bn9.ToTrimmedString(), |
1678 | 0 | result.second->bn10.ToTrimmedString(), |
1679 | 0 | result.second->bn11.ToTrimmedString(), |
1680 | 0 | result.second->bn12.ToTrimmedString() |
1681 | 0 | }); |
1682 | 0 | } |
1683 | 101 | } |
1684 | | |
1685 | 101 | template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const { |
1686 | 101 | return module->OpBLS_Pairing(op); |
1687 | 101 | } |
1688 | | |
1689 | | /* Specialization for operation::BLS_MillerLoop */ |
1690 | 118 | template<> void ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::postprocess(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op, const ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::ResultPair& result) const { |
1691 | 118 | (void)module; |
1692 | 118 | (void)op; |
1693 | | |
1694 | 118 | if ( result.second != std::nullopt ) { |
1695 | 0 | Pool_Fp12.Set({ |
1696 | 0 | result.second->bn1.ToTrimmedString(), |
1697 | 0 | result.second->bn2.ToTrimmedString(), |
1698 | 0 | result.second->bn3.ToTrimmedString(), |
1699 | 0 | result.second->bn4.ToTrimmedString(), |
1700 | 0 | result.second->bn5.ToTrimmedString(), |
1701 | 0 | result.second->bn6.ToTrimmedString(), |
1702 | 0 | result.second->bn7.ToTrimmedString(), |
1703 | 0 | result.second->bn8.ToTrimmedString(), |
1704 | 0 | result.second->bn9.ToTrimmedString(), |
1705 | 0 | result.second->bn10.ToTrimmedString(), |
1706 | 0 | result.second->bn11.ToTrimmedString(), |
1707 | 0 | result.second->bn12.ToTrimmedString() |
1708 | 0 | }); |
1709 | 0 | } |
1710 | 118 | } |
1711 | | |
1712 | 118 | template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const { |
1713 | 118 | return module->OpBLS_MillerLoop(op); |
1714 | 118 | } |
1715 | | |
1716 | | /* Specialization for operation::BLS_FinalExp */ |
1717 | 151 | template<> void ExecutorBase<component::Fp12, operation::BLS_FinalExp>::postprocess(std::shared_ptr<Module> module, operation::BLS_FinalExp& op, const ExecutorBase<component::Fp12, operation::BLS_FinalExp>::ResultPair& result) const { |
1718 | 151 | (void)module; |
1719 | 151 | (void)op; |
1720 | | |
1721 | 151 | if ( result.second != std::nullopt ) { |
1722 | 0 | Pool_Fp12.Set({ |
1723 | 0 | result.second->bn1.ToTrimmedString(), |
1724 | 0 | result.second->bn2.ToTrimmedString(), |
1725 | 0 | result.second->bn3.ToTrimmedString(), |
1726 | 0 | result.second->bn4.ToTrimmedString(), |
1727 | 0 | result.second->bn5.ToTrimmedString(), |
1728 | 0 | result.second->bn6.ToTrimmedString(), |
1729 | 0 | result.second->bn7.ToTrimmedString(), |
1730 | 0 | result.second->bn8.ToTrimmedString(), |
1731 | 0 | result.second->bn9.ToTrimmedString(), |
1732 | 0 | result.second->bn10.ToTrimmedString(), |
1733 | 0 | result.second->bn11.ToTrimmedString(), |
1734 | 0 | result.second->bn12.ToTrimmedString() |
1735 | 0 | }); |
1736 | 0 | } |
1737 | 151 | } |
1738 | | |
1739 | 151 | template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const { |
1740 | 151 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1741 | 151 | return module->OpBLS_FinalExp(op); |
1742 | 151 | } |
1743 | | |
1744 | | /* Specialization for operation::BLS_HashToG1 */ |
1745 | 117 | template<> void ExecutorBase<component::G1, operation::BLS_HashToG1>::postprocess(std::shared_ptr<Module> module, operation::BLS_HashToG1& op, const ExecutorBase<component::G1, operation::BLS_HashToG1>::ResultPair& result) const { |
1746 | 117 | (void)module; |
1747 | | |
1748 | 117 | if ( result.second != std::nullopt ) { |
1749 | 0 | const auto curveID = op.curveType.Get(); |
1750 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
1751 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
1752 | |
|
1753 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1754 | |
|
1755 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1756 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1757 | 0 | } |
1758 | 117 | } |
1759 | | |
1760 | 117 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const { |
1761 | 117 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1762 | 117 | return module->OpBLS_HashToG1(op); |
1763 | 117 | } |
1764 | | |
1765 | | /* Specialization for operation::BLS_MapToG1 */ |
1766 | 118 | template<> void ExecutorBase<component::G1, operation::BLS_MapToG1>::postprocess(std::shared_ptr<Module> module, operation::BLS_MapToG1& op, const ExecutorBase<component::G1, operation::BLS_MapToG1>::ResultPair& result) const { |
1767 | 118 | (void)module; |
1768 | | |
1769 | 118 | if ( result.second != std::nullopt ) { |
1770 | 0 | const auto curveID = op.curveType.Get(); |
1771 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
1772 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
1773 | |
|
1774 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1775 | |
|
1776 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1777 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1778 | 0 | } |
1779 | 118 | } |
1780 | | |
1781 | 118 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const { |
1782 | 118 | return module->OpBLS_MapToG1(op); |
1783 | 118 | } |
1784 | | |
1785 | | /* Specialization for operation::BLS_MapToG2 */ |
1786 | 133 | template<> void ExecutorBase<component::G2, operation::BLS_MapToG2>::postprocess(std::shared_ptr<Module> module, operation::BLS_MapToG2& op, const ExecutorBase<component::G2, operation::BLS_MapToG2>::ResultPair& result) const { |
1787 | 133 | (void)module; |
1788 | | |
1789 | 133 | if ( result.second != std::nullopt ) { |
1790 | 0 | const auto curveID = op.curveType.Get(); |
1791 | 0 | const auto g2_v = result.second->first.first.ToTrimmedString(); |
1792 | 0 | const auto g2_w = result.second->first.second.ToTrimmedString(); |
1793 | 0 | const auto g2_x = result.second->second.first.ToTrimmedString(); |
1794 | 0 | const auto g2_y = result.second->second.second.ToTrimmedString(); |
1795 | |
|
1796 | 0 | G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y); |
1797 | |
|
1798 | 0 | if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); } |
1799 | 0 | if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); } |
1800 | 0 | if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); } |
1801 | 0 | if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); } |
1802 | 0 | } |
1803 | 133 | } |
1804 | | |
1805 | 133 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const { |
1806 | 133 | return module->OpBLS_MapToG2(op); |
1807 | 133 | } |
1808 | | |
1809 | | /* Specialization for operation::BLS_IsG1OnCurve */ |
1810 | 149 | template<> void ExecutorBase<bool, operation::BLS_IsG1OnCurve>::postprocess(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op, const ExecutorBase<bool, operation::BLS_IsG1OnCurve>::ResultPair& result) const { |
1811 | 149 | (void)module; |
1812 | 149 | (void)op; |
1813 | 149 | (void)result; |
1814 | 149 | } |
1815 | | |
1816 | 149 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const { |
1817 | 149 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1818 | 149 | if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1819 | 149 | if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1820 | | |
1821 | 149 | return module->OpBLS_IsG1OnCurve(op); |
1822 | 149 | } |
1823 | | |
1824 | | /* Specialization for operation::BLS_IsG2OnCurve */ |
1825 | 155 | template<> void ExecutorBase<bool, operation::BLS_IsG2OnCurve>::postprocess(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op, const ExecutorBase<bool, operation::BLS_IsG2OnCurve>::ResultPair& result) const { |
1826 | 155 | (void)module; |
1827 | 155 | (void)op; |
1828 | 155 | (void)result; |
1829 | 155 | } |
1830 | | |
1831 | 155 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const { |
1832 | 155 | if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1833 | 155 | if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1834 | 155 | if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1835 | 155 | if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1836 | | |
1837 | 155 | return module->OpBLS_IsG2OnCurve(op); |
1838 | 155 | } |
1839 | | |
1840 | | /* Specialization for operation::BLS_GenerateKeyPair */ |
1841 | 121 | template<> void ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::BLS_GenerateKeyPair& op, const ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::ResultPair& result) const { |
1842 | 121 | (void)module; |
1843 | | |
1844 | 121 | if ( result.second != std::nullopt ) { |
1845 | 0 | const auto curveID = op.curveType.Get(); |
1846 | 0 | const auto priv = result.second->priv.ToTrimmedString(); |
1847 | 0 | const auto g1_x = result.second->pub.first.ToTrimmedString(); |
1848 | 0 | const auto g1_y = result.second->pub.second.ToTrimmedString(); |
1849 | |
|
1850 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1851 | |
|
1852 | 0 | if ( priv.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(priv); } |
1853 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1854 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1855 | 0 | } |
1856 | 121 | } |
1857 | | |
1858 | 121 | template<> std::optional<component::BLS_KeyPair> ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::BLS_GenerateKeyPair& op) const { |
1859 | 121 | return module->OpBLS_GenerateKeyPair(op); |
1860 | 121 | } |
1861 | | |
1862 | | /* Specialization for operation::BLS_Decompress_G1 */ |
1863 | 122 | template<> void ExecutorBase<component::G1, operation::BLS_Decompress_G1>::postprocess(std::shared_ptr<Module> module, operation::BLS_Decompress_G1& op, const ExecutorBase<component::G1, operation::BLS_Decompress_G1>::ResultPair& result) const { |
1864 | 122 | (void)module; |
1865 | | |
1866 | 122 | if ( result.second != std::nullopt ) { |
1867 | 0 | const auto curveID = op.curveType.Get(); |
1868 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
1869 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
1870 | |
|
1871 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1872 | |
|
1873 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1874 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1875 | 0 | } |
1876 | 122 | } |
1877 | | |
1878 | 122 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Decompress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G1& op) const { |
1879 | 122 | return module->OpBLS_Decompress_G1(op); |
1880 | 122 | } |
1881 | | |
1882 | | /* Specialization for operation::BLS_Compress_G1 */ |
1883 | 100 | template<> void ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::postprocess(std::shared_ptr<Module> module, operation::BLS_Compress_G1& op, const ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::ResultPair& result) const { |
1884 | 100 | (void)module; |
1885 | 100 | (void)op; |
1886 | | |
1887 | 100 | if ( result.second != std::nullopt ) { |
1888 | 0 | const auto compressed = result.second->ToTrimmedString(); |
1889 | |
|
1890 | 0 | if ( compressed.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(compressed); } |
1891 | 0 | } |
1892 | 100 | } |
1893 | | |
1894 | 100 | template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G1& op) const { |
1895 | 100 | return module->OpBLS_Compress_G1(op); |
1896 | 100 | } |
1897 | | |
1898 | | /* Specialization for operation::BLS_Decompress_G2 */ |
1899 | 95 | template<> void ExecutorBase<component::G2, operation::BLS_Decompress_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op, const ExecutorBase<component::G2, operation::BLS_Decompress_G2>::ResultPair& result) const { |
1900 | 95 | (void)module; |
1901 | | |
1902 | 95 | if ( result.second != std::nullopt ) { |
1903 | 0 | const auto curveID = op.curveType.Get(); |
1904 | 0 | const auto g2_v = result.second->first.first.ToTrimmedString(); |
1905 | 0 | const auto g2_w = result.second->first.second.ToTrimmedString(); |
1906 | 0 | const auto g2_x = result.second->second.first.ToTrimmedString(); |
1907 | 0 | const auto g2_y = result.second->second.second.ToTrimmedString(); |
1908 | |
|
1909 | 0 | G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y); |
1910 | |
|
1911 | 0 | if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); } |
1912 | 0 | if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); } |
1913 | 0 | if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); } |
1914 | 0 | if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); } |
1915 | 0 | } |
1916 | 95 | } |
1917 | | |
1918 | 95 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Decompress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op) const { |
1919 | 95 | return module->OpBLS_Decompress_G2(op); |
1920 | 95 | } |
1921 | | |
1922 | | /* Specialization for operation::BLS_Compress_G2 */ |
1923 | 108 | template<> void ExecutorBase<component::G1, operation::BLS_Compress_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_Compress_G2& op, const ExecutorBase<component::G1, operation::BLS_Compress_G2>::ResultPair& result) const { |
1924 | 108 | (void)module; |
1925 | | |
1926 | 108 | if ( result.second != std::nullopt ) { |
1927 | 0 | const auto curveID = op.curveType.Get(); |
1928 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
1929 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
1930 | |
|
1931 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1932 | |
|
1933 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1934 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1935 | 0 | } |
1936 | 108 | } |
1937 | | |
1938 | 108 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Compress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G2& op) const { |
1939 | 108 | return module->OpBLS_Compress_G2(op); |
1940 | 108 | } |
1941 | | |
1942 | | /* Specialization for operation::BLS_G1_Add */ |
1943 | 163 | template<> void ExecutorBase<component::G1, operation::BLS_G1_Add>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_Add& op, const ExecutorBase<component::G1, operation::BLS_G1_Add>::ResultPair& result) const { |
1944 | 163 | (void)module; |
1945 | | |
1946 | 163 | if ( result.second != std::nullopt ) { |
1947 | 0 | const auto curveID = op.curveType.Get(); |
1948 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
1949 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
1950 | |
|
1951 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1952 | |
|
1953 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1954 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1955 | 0 | } |
1956 | 163 | } |
1957 | | |
1958 | 163 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Add& op) const { |
1959 | 163 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1960 | 163 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1961 | 163 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1962 | 163 | if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1963 | 163 | if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1964 | | |
1965 | 163 | return module->OpBLS_G1_Add(op); |
1966 | 163 | } |
1967 | | |
1968 | | /* Specialization for operation::BLS_G1_Mul */ |
1969 | 131 | template<> void ExecutorBase<component::G1, operation::BLS_G1_Mul>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op, const ExecutorBase<component::G1, operation::BLS_G1_Mul>::ResultPair& result) const { |
1970 | 131 | (void)module; |
1971 | | |
1972 | 131 | if ( result.second != std::nullopt ) { |
1973 | 0 | const auto curveID = op.curveType.Get(); |
1974 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
1975 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
1976 | |
|
1977 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1978 | |
|
1979 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1980 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1981 | 0 | } |
1982 | 131 | } |
1983 | | |
1984 | 131 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op) const { |
1985 | 131 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1986 | 131 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1987 | 131 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1988 | 131 | if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1989 | | |
1990 | 131 | return module->OpBLS_G1_Mul(op); |
1991 | 131 | } |
1992 | | |
1993 | | /* Specialization for operation::BLS_G1_IsEq */ |
1994 | 179 | template<> void ExecutorBase<bool, operation::BLS_G1_IsEq>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op, const ExecutorBase<bool, operation::BLS_G1_IsEq>::ResultPair& result) const { |
1995 | 179 | (void)module; |
1996 | 179 | (void)op; |
1997 | 179 | (void)result; |
1998 | 179 | } |
1999 | | |
2000 | 179 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const { |
2001 | 179 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2002 | 179 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2003 | 179 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2004 | 168 | if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2005 | 159 | if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2006 | | |
2007 | 159 | return module->OpBLS_G1_IsEq(op); |
2008 | 159 | } |
2009 | | |
2010 | | /* Specialization for operation::BLS_G1_Neg */ |
2011 | 126 | template<> void ExecutorBase<component::G1, operation::BLS_G1_Neg>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_Neg& op, const ExecutorBase<component::G1, operation::BLS_G1_Neg>::ResultPair& result) const { |
2012 | 126 | (void)module; |
2013 | | |
2014 | 126 | if ( result.second != std::nullopt ) { |
2015 | 0 | const auto curveID = op.curveType.Get(); |
2016 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
2017 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
2018 | |
|
2019 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
2020 | |
|
2021 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
2022 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
2023 | 0 | } |
2024 | 126 | } |
2025 | | |
2026 | 126 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Neg& op) const { |
2027 | 126 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2028 | 126 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2029 | 126 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2030 | | |
2031 | 126 | return module->OpBLS_G1_Neg(op); |
2032 | 126 | } |
2033 | | |
2034 | | /* Specialization for operation::BLS_G2_Add */ |
2035 | 250 | template<> void ExecutorBase<component::G2, operation::BLS_G2_Add>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_Add& op, const ExecutorBase<component::G2, operation::BLS_G2_Add>::ResultPair& result) const { |
2036 | 250 | (void)module; |
2037 | | |
2038 | 250 | if ( result.second != std::nullopt ) { |
2039 | 0 | const auto curveID = op.curveType.Get(); |
2040 | 0 | const auto g2_v = result.second->first.first.ToTrimmedString(); |
2041 | 0 | const auto g2_w = result.second->first.second.ToTrimmedString(); |
2042 | 0 | const auto g2_x = result.second->second.first.ToTrimmedString(); |
2043 | 0 | const auto g2_y = result.second->second.second.ToTrimmedString(); |
2044 | |
|
2045 | 0 | G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y); |
2046 | |
|
2047 | 0 | if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); } |
2048 | 0 | if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); } |
2049 | 0 | if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); } |
2050 | 0 | if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); } |
2051 | 0 | } |
2052 | 250 | } |
2053 | | |
2054 | 250 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Add& op) const { |
2055 | 250 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2056 | 250 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2057 | 250 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2058 | 241 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2059 | 241 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2060 | 231 | if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2061 | 223 | if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2062 | 214 | if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2063 | 205 | if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2064 | | |
2065 | 205 | return module->OpBLS_G2_Add(op); |
2066 | 205 | } |
2067 | | |
2068 | | /* Specialization for operation::BLS_G2_Mul */ |
2069 | 148 | template<> void ExecutorBase<component::G2, operation::BLS_G2_Mul>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_Mul& op, const ExecutorBase<component::G2, operation::BLS_G2_Mul>::ResultPair& result) const { |
2070 | 148 | (void)module; |
2071 | | |
2072 | 148 | if ( result.second != std::nullopt ) { |
2073 | 0 | const auto curveID = op.curveType.Get(); |
2074 | 0 | const auto g2_v = result.second->first.first.ToTrimmedString(); |
2075 | 0 | const auto g2_w = result.second->first.second.ToTrimmedString(); |
2076 | 0 | const auto g2_x = result.second->second.first.ToTrimmedString(); |
2077 | 0 | const auto g2_y = result.second->second.second.ToTrimmedString(); |
2078 | |
|
2079 | 0 | G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y); |
2080 | |
|
2081 | 0 | if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); } |
2082 | 0 | if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); } |
2083 | 0 | if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); } |
2084 | 0 | if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); } |
2085 | 0 | } |
2086 | 148 | } |
2087 | | |
2088 | 148 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Mul& op) const { |
2089 | 148 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2090 | 148 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2091 | 148 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2092 | 148 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2093 | 148 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2094 | 148 | if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2095 | | |
2096 | 148 | return module->OpBLS_G2_Mul(op); |
2097 | 148 | } |
2098 | | |
2099 | | /* Specialization for operation::BLS_G2_IsEq */ |
2100 | 225 | template<> void ExecutorBase<bool, operation::BLS_G2_IsEq>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op, const ExecutorBase<bool, operation::BLS_G2_IsEq>::ResultPair& result) const { |
2101 | 225 | (void)module; |
2102 | 225 | (void)op; |
2103 | 225 | (void)result; |
2104 | 225 | } |
2105 | | |
2106 | 225 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const { |
2107 | 225 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2108 | 225 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2109 | 225 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2110 | 216 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2111 | 212 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2112 | 203 | if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2113 | 193 | if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2114 | 184 | if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2115 | 175 | if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2116 | | |
2117 | 166 | return module->OpBLS_G2_IsEq(op); |
2118 | 175 | } |
2119 | | |
2120 | | /* Specialization for operation::BLS_G2_Neg */ |
2121 | 146 | template<> void ExecutorBase<component::G2, operation::BLS_G2_Neg>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_Neg& op, const ExecutorBase<component::G2, operation::BLS_G2_Neg>::ResultPair& result) const { |
2122 | 146 | (void)module; |
2123 | | |
2124 | 146 | if ( result.second != std::nullopt ) { |
2125 | 0 | const auto curveID = op.curveType.Get(); |
2126 | 0 | const auto g2_v = result.second->first.first.ToTrimmedString(); |
2127 | 0 | const auto g2_w = result.second->first.second.ToTrimmedString(); |
2128 | 0 | const auto g2_x = result.second->second.first.ToTrimmedString(); |
2129 | 0 | const auto g2_y = result.second->second.second.ToTrimmedString(); |
2130 | |
|
2131 | 0 | G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y); |
2132 | |
|
2133 | 0 | if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); } |
2134 | 0 | if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); } |
2135 | 0 | if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); } |
2136 | 0 | if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); } |
2137 | 0 | } |
2138 | 146 | } |
2139 | | |
2140 | 146 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Neg& op) const { |
2141 | 146 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2142 | 146 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2143 | 146 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2144 | 141 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2145 | 141 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2146 | | |
2147 | 132 | return module->OpBLS_G2_Neg(op); |
2148 | 141 | } |
2149 | | |
2150 | | /* Specialization for operation::BLS_G1_MultiExp */ |
2151 | 196 | template<> void ExecutorBase<component::G1, operation::BLS_G1_MultiExp>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_MultiExp& op, const ExecutorBase<component::G1, operation::BLS_G1_MultiExp>::ResultPair& result) const { |
2152 | 196 | (void)module; |
2153 | | |
2154 | 196 | if ( result.second != std::nullopt ) { |
2155 | 0 | const auto curveID = op.curveType.Get(); |
2156 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
2157 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
2158 | |
|
2159 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
2160 | |
|
2161 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
2162 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
2163 | 0 | } |
2164 | 196 | } |
2165 | | |
2166 | 196 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_MultiExp>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_MultiExp& op) const { |
2167 | 196 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2168 | | |
2169 | 1.22k | for (const auto& point_scalar : op.points_scalars.points_scalars) { |
2170 | 1.22k | if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2171 | 1.21k | if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2172 | 1.20k | if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2173 | 1.20k | } |
2174 | | |
2175 | 178 | return module->OpBLS_G1_MultiExp(op); |
2176 | 196 | } |
2177 | | |
2178 | | /* Specialization for operation::Misc */ |
2179 | 115 | template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const { |
2180 | 115 | (void)module; |
2181 | 115 | (void)op; |
2182 | 115 | (void)result; |
2183 | 115 | } |
2184 | | |
2185 | 115 | template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const { |
2186 | 115 | return module->OpMisc(op); |
2187 | 115 | } |
2188 | | |
2189 | | /* Specialization for operation::BLS_HashToG2 */ |
2190 | 128 | template<> void ExecutorBase<component::G2, operation::BLS_HashToG2>::postprocess(std::shared_ptr<Module> module, operation::BLS_HashToG2& op, const ExecutorBase<component::G2, operation::BLS_HashToG2>::ResultPair& result) const { |
2191 | 128 | (void)module; |
2192 | | |
2193 | 128 | if ( result.second != std::nullopt ) { |
2194 | 0 | const auto curveID = op.curveType.Get(); |
2195 | 0 | const auto g2_v = result.second->first.first.ToTrimmedString(); |
2196 | 0 | const auto g2_w = result.second->first.second.ToTrimmedString(); |
2197 | 0 | const auto g2_x = result.second->second.first.ToTrimmedString(); |
2198 | 0 | const auto g2_y = result.second->second.second.ToTrimmedString(); |
2199 | |
|
2200 | 0 | G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y); |
2201 | |
|
2202 | 0 | if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); } |
2203 | 0 | if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); } |
2204 | 0 | if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); } |
2205 | 0 | if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); } |
2206 | 0 | } |
2207 | 128 | } |
2208 | | |
2209 | 128 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const { |
2210 | 128 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2211 | 128 | return module->OpBLS_HashToG2(op); |
2212 | 128 | } |
2213 | | |
2214 | | ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2215 | | ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options) |
2216 | 23 | { } |
2217 | 22 | void ExecutorBignumCalc::SetModulo(const std::string& modulo) { |
2218 | 22 | this->modulo = component::Bignum(modulo); |
2219 | 22 | } |
2220 | | |
2221 | | ExecutorBignumCalc_Mod_BLS12_381_R::ExecutorBignumCalc_Mod_BLS12_381_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2222 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2223 | 1 | CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513")); |
2224 | 1 | } |
2225 | | |
2226 | | ExecutorBignumCalc_Mod_BLS12_381_P::ExecutorBignumCalc_Mod_BLS12_381_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2227 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2228 | 1 | CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787")); |
2229 | 1 | } |
2230 | | |
2231 | | ExecutorBignumCalc_Mod_BLS12_377_R::ExecutorBignumCalc_Mod_BLS12_377_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2232 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2233 | 1 | CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041")); |
2234 | 1 | } |
2235 | | |
2236 | | ExecutorBignumCalc_Mod_BLS12_377_P::ExecutorBignumCalc_Mod_BLS12_377_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2237 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2238 | 1 | CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177")); |
2239 | 1 | } |
2240 | | |
2241 | | ExecutorBignumCalc_Mod_BN128_R::ExecutorBignumCalc_Mod_BN128_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2242 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2243 | 1 | CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617")); |
2244 | 1 | } |
2245 | | |
2246 | | ExecutorBignumCalc_Mod_BN128_P::ExecutorBignumCalc_Mod_BN128_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2247 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2248 | 1 | CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583")); |
2249 | 1 | } |
2250 | | |
2251 | | ExecutorBignumCalc_Mod_Vesta_R::ExecutorBignumCalc_Mod_Vesta_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2252 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2253 | 1 | CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337")); |
2254 | 1 | } |
2255 | | |
2256 | | ExecutorBignumCalc_Mod_Vesta_P::ExecutorBignumCalc_Mod_Vesta_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2257 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2258 | 1 | CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097")); |
2259 | 1 | } |
2260 | | |
2261 | | ExecutorBignumCalc_Mod_ED25519::ExecutorBignumCalc_Mod_ED25519(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2262 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2263 | 1 | CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949")); |
2264 | 1 | } |
2265 | | |
2266 | | ExecutorBignumCalc_Mod_Edwards_R::ExecutorBignumCalc_Mod_Edwards_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2267 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2268 | 1 | CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601")); |
2269 | 1 | } |
2270 | | |
2271 | | ExecutorBignumCalc_Mod_Edwards_P::ExecutorBignumCalc_Mod_Edwards_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2272 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2273 | 1 | CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001")); |
2274 | 1 | } |
2275 | | |
2276 | | ExecutorBignumCalc_Mod_Goldilocks::ExecutorBignumCalc_Mod_Goldilocks(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2277 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2278 | 1 | CF_NORET(SetModulo("18446744069414584321")); |
2279 | 1 | } |
2280 | | |
2281 | | ExecutorBignumCalc_Mod_MNT4_R::ExecutorBignumCalc_Mod_MNT4_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2282 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2283 | 1 | CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137")); |
2284 | 1 | } |
2285 | | |
2286 | | ExecutorBignumCalc_Mod_MNT4_P::ExecutorBignumCalc_Mod_MNT4_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2287 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2288 | 1 | CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081")); |
2289 | 1 | } |
2290 | | |
2291 | | ExecutorBignumCalc_Mod_MNT6_R::ExecutorBignumCalc_Mod_MNT6_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2292 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2293 | 1 | CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081")); |
2294 | 1 | } |
2295 | | |
2296 | | ExecutorBignumCalc_Mod_MNT6_P::ExecutorBignumCalc_Mod_MNT6_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2297 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2298 | 1 | CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040")); |
2299 | 1 | } |
2300 | | |
2301 | | ExecutorBignumCalc_Mod_2Exp64::ExecutorBignumCalc_Mod_2Exp64(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2302 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2303 | 1 | CF_NORET(SetModulo("18446744073709551616")); |
2304 | 1 | } |
2305 | | |
2306 | | ExecutorBignumCalc_Mod_2Exp128::ExecutorBignumCalc_Mod_2Exp128(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2307 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2308 | 1 | CF_NORET(SetModulo("340282366920938463463374607431768211456")); |
2309 | 1 | } |
2310 | | |
2311 | | ExecutorBignumCalc_Mod_2Exp256::ExecutorBignumCalc_Mod_2Exp256(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2312 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2313 | 1 | CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936")); |
2314 | 1 | } |
2315 | | |
2316 | | ExecutorBignumCalc_Mod_2Exp512::ExecutorBignumCalc_Mod_2Exp512(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2317 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2318 | 1 | CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096")); |
2319 | 1 | } |
2320 | | |
2321 | | ExecutorBignumCalc_Mod_SECP256K1::ExecutorBignumCalc_Mod_SECP256K1(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2322 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2323 | 1 | CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337")); |
2324 | 1 | } |
2325 | | |
2326 | | ExecutorBignumCalc_Mod_SECP256K1_P::ExecutorBignumCalc_Mod_SECP256K1_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2327 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2328 | 1 | CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663")); |
2329 | 1 | } |
2330 | | |
2331 | | ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2332 | | ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options) |
2333 | 1 | { } |
2334 | 0 | void ExecutorBignumCalc_Fp2::SetModulo(const std::string& modulo) { |
2335 | 0 | this->modulo = component::Bignum(modulo); |
2336 | 0 | } |
2337 | | |
2338 | | ExecutorBignumCalc_Fp12::ExecutorBignumCalc_Fp12(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2339 | | ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options) |
2340 | 1 | { } |
2341 | 0 | void ExecutorBignumCalc_Fp12::SetModulo(const std::string& modulo) { |
2342 | 0 | this->modulo = component::Bignum(modulo); |
2343 | 0 | } |
2344 | | |
2345 | | template <class ResultType, class OperationType> |
2346 | | ExecutorBase<ResultType, OperationType>::ExecutorBase(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2347 | | operationID(operationID), |
2348 | | modules(modules), |
2349 | | options(options) |
2350 | 107 | { |
2351 | 107 | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 23 | { | 2351 | 23 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 1 | { | 2351 | 1 | } |
|
2352 | | |
2353 | | /* Specialization for operation::SR25519_Verify */ |
2354 | 145 | template<> void ExecutorBase<bool, operation::SR25519_Verify>::postprocess(std::shared_ptr<Module> module, operation::SR25519_Verify& op, const ExecutorBase<bool, operation::SR25519_Verify>::ResultPair& result) const { |
2355 | 145 | (void)module; |
2356 | 145 | (void)op; |
2357 | 145 | (void)result; |
2358 | 145 | } |
2359 | | |
2360 | 145 | template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const { |
2361 | 145 | return module->OpSR25519_Verify(op); |
2362 | 145 | } |
2363 | | |
2364 | | template <class ResultType, class OperationType> |
2365 | 107 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { |
2366 | 107 | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase() Line | Count | Source | 2365 | 23 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 23 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 1 | } |
|
2367 | | |
2368 | | /* Filter away the values in the set that are std::nullopt */ |
2369 | | template <class ResultType, class OperationType> |
2370 | 19.9k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { |
2371 | 19.9k | ResultSet ret; |
2372 | | |
2373 | 67.8k | for (const auto& result : results) { |
2374 | 67.8k | if ( result.second == std::nullopt ) { |
2375 | 47.7k | continue; |
2376 | 47.7k | } |
2377 | | |
2378 | 20.1k | ret.push_back(result); |
2379 | 20.1k | } |
2380 | | |
2381 | 19.9k | return ret; |
2382 | 19.9k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 1.50k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 1.50k | ResultSet ret; | 2372 | | | 2373 | 4.26k | for (const auto& result : results) { | 2374 | 4.26k | if ( result.second == std::nullopt ) { | 2375 | 2.25k | continue; | 2376 | 2.25k | } | 2377 | | | 2378 | 2.01k | ret.push_back(result); | 2379 | 2.01k | } | 2380 | | | 2381 | 1.50k | return ret; | 2382 | 1.50k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 399 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 399 | ResultSet ret; | 2372 | | | 2373 | 1.62k | for (const auto& result : results) { | 2374 | 1.62k | if ( result.second == std::nullopt ) { | 2375 | 675 | continue; | 2376 | 675 | } | 2377 | | | 2378 | 954 | ret.push_back(result); | 2379 | 954 | } | 2380 | | | 2381 | 399 | return ret; | 2382 | 399 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 465 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 465 | ResultSet ret; | 2372 | | | 2373 | 2.59k | for (const auto& result : results) { | 2374 | 2.59k | if ( result.second == std::nullopt ) { | 2375 | 1.39k | continue; | 2376 | 1.39k | } | 2377 | | | 2378 | 1.19k | ret.push_back(result); | 2379 | 1.19k | } | 2380 | | | 2381 | 465 | return ret; | 2382 | 465 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 752 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 752 | ResultSet ret; | 2372 | | | 2373 | 2.91k | for (const auto& result : results) { | 2374 | 2.91k | if ( result.second == std::nullopt ) { | 2375 | 1.74k | continue; | 2376 | 1.74k | } | 2377 | | | 2378 | 1.17k | ret.push_back(result); | 2379 | 1.17k | } | 2380 | | | 2381 | 752 | return ret; | 2382 | 752 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> > > > const&) const Line | Count | Source | 2370 | 2.75k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 2.75k | ResultSet ret; | 2372 | | | 2373 | 11.2k | for (const auto& result : results) { | 2374 | 11.2k | if ( result.second == std::nullopt ) { | 2375 | 7.95k | continue; | 2376 | 7.95k | } | 2377 | | | 2378 | 3.24k | ret.push_back(result); | 2379 | 3.24k | } | 2380 | | | 2381 | 2.75k | return ret; | 2382 | 2.75k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 1.83k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 1.83k | ResultSet ret; | 2372 | | | 2373 | 7.70k | for (const auto& result : results) { | 2374 | 7.70k | if ( result.second == std::nullopt ) { | 2375 | 7.04k | continue; | 2376 | 7.04k | } | 2377 | | | 2378 | 659 | ret.push_back(result); | 2379 | 659 | } | 2380 | | | 2381 | 1.83k | return ret; | 2382 | 1.83k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 122 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 122 | ResultSet ret; | 2372 | | | 2373 | 683 | for (const auto& result : results) { | 2374 | 683 | if ( result.second == std::nullopt ) { | 2375 | 494 | continue; | 2376 | 494 | } | 2377 | | | 2378 | 189 | ret.push_back(result); | 2379 | 189 | } | 2380 | | | 2381 | 122 | return ret; | 2382 | 122 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 1.30k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 1.30k | ResultSet ret; | 2372 | | | 2373 | 4.54k | for (const auto& result : results) { | 2374 | 4.54k | if ( result.second == std::nullopt ) { | 2375 | 2.29k | continue; | 2376 | 2.29k | } | 2377 | | | 2378 | 2.24k | ret.push_back(result); | 2379 | 2.24k | } | 2380 | | | 2381 | 1.30k | return ret; | 2382 | 1.30k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 82 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 82 | ResultSet ret; | 2372 | | | 2373 | 419 | for (const auto& result : results) { | 2374 | 419 | if ( result.second == std::nullopt ) { | 2375 | 419 | continue; | 2376 | 419 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 82 | return ret; | 2382 | 82 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 50 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 50 | ResultSet ret; | 2372 | | | 2373 | 303 | for (const auto& result : results) { | 2374 | 303 | if ( result.second == std::nullopt ) { | 2375 | 303 | continue; | 2376 | 303 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 50 | return ret; | 2382 | 50 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 57 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 57 | ResultSet ret; | 2372 | | | 2373 | 358 | for (const auto& result : results) { | 2374 | 358 | if ( result.second == std::nullopt ) { | 2375 | 358 | continue; | 2376 | 358 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 57 | return ret; | 2382 | 57 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 508 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 508 | ResultSet ret; | 2372 | | | 2373 | 1.72k | for (const auto& result : results) { | 2374 | 1.72k | if ( result.second == std::nullopt ) { | 2375 | 900 | continue; | 2376 | 900 | } | 2377 | | | 2378 | 826 | ret.push_back(result); | 2379 | 826 | } | 2380 | | | 2381 | 508 | return ret; | 2382 | 508 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 261 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 261 | ResultSet ret; | 2372 | | | 2373 | 648 | for (const auto& result : results) { | 2374 | 648 | if ( result.second == std::nullopt ) { | 2375 | 328 | continue; | 2376 | 328 | } | 2377 | | | 2378 | 320 | ret.push_back(result); | 2379 | 320 | } | 2380 | | | 2381 | 261 | return ret; | 2382 | 261 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 41 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 41 | ResultSet ret; | 2372 | | | 2373 | 253 | for (const auto& result : results) { | 2374 | 253 | if ( result.second == std::nullopt ) { | 2375 | 253 | continue; | 2376 | 253 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 41 | return ret; | 2382 | 41 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 49 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 49 | ResultSet ret; | 2372 | | | 2373 | 399 | for (const auto& result : results) { | 2374 | 399 | if ( result.second == std::nullopt ) { | 2375 | 399 | continue; | 2376 | 399 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 49 | return ret; | 2382 | 49 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 44 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 44 | ResultSet ret; | 2372 | | | 2373 | 103 | for (const auto& result : results) { | 2374 | 103 | if ( result.second == std::nullopt ) { | 2375 | 70 | continue; | 2376 | 70 | } | 2377 | | | 2378 | 33 | ret.push_back(result); | 2379 | 33 | } | 2380 | | | 2381 | 44 | return ret; | 2382 | 44 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 304 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 304 | ResultSet ret; | 2372 | | | 2373 | 1.27k | for (const auto& result : results) { | 2374 | 1.27k | if ( result.second == std::nullopt ) { | 2375 | 695 | continue; | 2376 | 695 | } | 2377 | | | 2378 | 578 | ret.push_back(result); | 2379 | 578 | } | 2380 | | | 2381 | 304 | return ret; | 2382 | 304 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&) const Line | Count | Source | 2370 | 50 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 50 | ResultSet ret; | 2372 | | | 2373 | 360 | for (const auto& result : results) { | 2374 | 360 | if ( result.second == std::nullopt ) { | 2375 | 360 | continue; | 2376 | 360 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 50 | return ret; | 2382 | 50 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&) const Line | Count | Source | 2370 | 43 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 43 | ResultSet ret; | 2372 | | | 2373 | 303 | for (const auto& result : results) { | 2374 | 303 | if ( result.second == std::nullopt ) { | 2375 | 303 | continue; | 2376 | 303 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 43 | return ret; | 2382 | 43 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 424 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 424 | ResultSet ret; | 2372 | | | 2373 | 1.04k | for (const auto& result : results) { | 2374 | 1.04k | if ( result.second == std::nullopt ) { | 2375 | 668 | continue; | 2376 | 668 | } | 2377 | | | 2378 | 373 | ret.push_back(result); | 2379 | 373 | } | 2380 | | | 2381 | 424 | return ret; | 2382 | 424 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const Line | Count | Source | 2370 | 581 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 581 | ResultSet ret; | 2372 | | | 2373 | 1.32k | for (const auto& result : results) { | 2374 | 1.32k | if ( result.second == std::nullopt ) { | 2375 | 181 | continue; | 2376 | 181 | } | 2377 | | | 2378 | 1.14k | ret.push_back(result); | 2379 | 1.14k | } | 2380 | | | 2381 | 581 | return ret; | 2382 | 581 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECC_KeyPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECC_KeyPair> > > > const&) const cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> > > > const&) const Line | Count | Source | 2370 | 35 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 35 | ResultSet ret; | 2372 | | | 2373 | 131 | for (const auto& result : results) { | 2374 | 131 | if ( result.second == std::nullopt ) { | 2375 | 131 | continue; | 2376 | 131 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 35 | return ret; | 2382 | 35 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const Line | Count | Source | 2370 | 485 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 485 | ResultSet ret; | 2372 | | | 2373 | 1.40k | for (const auto& result : results) { | 2374 | 1.40k | if ( result.second == std::nullopt ) { | 2375 | 746 | continue; | 2376 | 746 | } | 2377 | | | 2378 | 654 | ret.push_back(result); | 2379 | 654 | } | 2380 | | | 2381 | 485 | return ret; | 2382 | 485 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const Line | Count | Source | 2370 | 75 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 75 | ResultSet ret; | 2372 | | | 2373 | 256 | for (const auto& result : results) { | 2374 | 256 | if ( result.second == std::nullopt ) { | 2375 | 242 | continue; | 2376 | 242 | } | 2377 | | | 2378 | 14 | ret.push_back(result); | 2379 | 14 | } | 2380 | | | 2381 | 75 | return ret; | 2382 | 75 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const Line | Count | Source | 2370 | 35 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 35 | ResultSet ret; | 2372 | | | 2373 | 129 | for (const auto& result : results) { | 2374 | 129 | if ( result.second == std::nullopt ) { | 2375 | 129 | continue; | 2376 | 129 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 35 | return ret; | 2382 | 35 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const Line | Count | Source | 2370 | 38 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 38 | ResultSet ret; | 2372 | | | 2373 | 132 | for (const auto& result : results) { | 2374 | 132 | if ( result.second == std::nullopt ) { | 2375 | 132 | continue; | 2376 | 132 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 38 | return ret; | 2382 | 38 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const Line | Count | Source | 2370 | 33 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 33 | ResultSet ret; | 2372 | | | 2373 | 124 | for (const auto& result : results) { | 2374 | 124 | if ( result.second == std::nullopt ) { | 2375 | 124 | continue; | 2376 | 124 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 33 | return ret; | 2382 | 33 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const Line | Count | Source | 2370 | 249 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 249 | ResultSet ret; | 2372 | | | 2373 | 766 | for (const auto& result : results) { | 2374 | 766 | if ( result.second == std::nullopt ) { | 2375 | 348 | continue; | 2376 | 348 | } | 2377 | | | 2378 | 418 | ret.push_back(result); | 2379 | 418 | } | 2380 | | | 2381 | 249 | return ret; | 2382 | 249 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const Line | Count | Source | 2370 | 116 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 116 | ResultSet ret; | 2372 | | | 2373 | 360 | for (const auto& result : results) { | 2374 | 360 | if ( result.second == std::nullopt ) { | 2375 | 227 | continue; | 2376 | 227 | } | 2377 | | | 2378 | 133 | ret.push_back(result); | 2379 | 133 | } | 2380 | | | 2381 | 116 | return ret; | 2382 | 116 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const Line | Count | Source | 2370 | 30 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 30 | ResultSet ret; | 2372 | | | 2373 | 107 | for (const auto& result : results) { | 2374 | 107 | if ( result.second == std::nullopt ) { | 2375 | 107 | continue; | 2376 | 107 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 30 | return ret; | 2382 | 30 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const Line | Count | Source | 2370 | 37 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 37 | ResultSet ret; | 2372 | | | 2373 | 135 | for (const auto& result : results) { | 2374 | 135 | if ( result.second == std::nullopt ) { | 2375 | 135 | continue; | 2376 | 135 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 37 | return ret; | 2382 | 37 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 337 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 337 | ResultSet ret; | 2372 | | | 2373 | 900 | for (const auto& result : results) { | 2374 | 900 | if ( result.second == std::nullopt ) { | 2375 | 620 | continue; | 2376 | 620 | } | 2377 | | | 2378 | 280 | ret.push_back(result); | 2379 | 280 | } | 2380 | | | 2381 | 337 | return ret; | 2382 | 337 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const Line | Count | Source | 2370 | 153 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 153 | ResultSet ret; | 2372 | | | 2373 | 498 | for (const auto& result : results) { | 2374 | 498 | if ( result.second == std::nullopt ) { | 2375 | 396 | continue; | 2376 | 396 | } | 2377 | | | 2378 | 102 | ret.push_back(result); | 2379 | 102 | } | 2380 | | | 2381 | 153 | return ret; | 2382 | 153 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Signature> > > > const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Parameters> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Parameters> > > > const&) const cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const Line | Count | Source | 2370 | 27 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 27 | ResultSet ret; | 2372 | | | 2373 | 100 | for (const auto& result : results) { | 2374 | 100 | if ( result.second == std::nullopt ) { | 2375 | 100 | continue; | 2376 | 100 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 27 | return ret; | 2382 | 27 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 36 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 36 | ResultSet ret; | 2372 | | | 2373 | 127 | for (const auto& result : results) { | 2374 | 127 | if ( result.second == std::nullopt ) { | 2375 | 127 | continue; | 2376 | 127 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 36 | return ret; | 2382 | 36 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> > > > const&) const cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 29 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 29 | ResultSet ret; | 2372 | | | 2373 | 96 | for (const auto& result : results) { | 2374 | 96 | if ( result.second == std::nullopt ) { | 2375 | 96 | continue; | 2376 | 96 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 29 | return ret; | 2382 | 29 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 67 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 67 | ResultSet ret; | 2372 | | | 2373 | 238 | for (const auto& result : results) { | 2374 | 238 | if ( result.second == std::nullopt ) { | 2375 | 211 | continue; | 2376 | 211 | } | 2377 | | | 2378 | 27 | ret.push_back(result); | 2379 | 27 | } | 2380 | | | 2381 | 67 | return ret; | 2382 | 67 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 74 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 74 | ResultSet ret; | 2372 | | | 2373 | 254 | for (const auto& result : results) { | 2374 | 254 | if ( result.second == std::nullopt ) { | 2375 | 228 | continue; | 2376 | 228 | } | 2377 | | | 2378 | 26 | ret.push_back(result); | 2379 | 26 | } | 2380 | | | 2381 | 74 | return ret; | 2382 | 74 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 187 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 187 | ResultSet ret; | 2372 | | | 2373 | 537 | for (const auto& result : results) { | 2374 | 537 | if ( result.second == std::nullopt ) { | 2375 | 372 | continue; | 2376 | 372 | } | 2377 | | | 2378 | 165 | ret.push_back(result); | 2379 | 165 | } | 2380 | | | 2381 | 187 | return ret; | 2382 | 187 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 55 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 55 | ResultSet ret; | 2372 | | | 2373 | 195 | for (const auto& result : results) { | 2374 | 195 | if ( result.second == std::nullopt ) { | 2375 | 164 | continue; | 2376 | 164 | } | 2377 | | | 2378 | 31 | ret.push_back(result); | 2379 | 31 | } | 2380 | | | 2381 | 55 | return ret; | 2382 | 55 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 64 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 64 | ResultSet ret; | 2372 | | | 2373 | 219 | for (const auto& result : results) { | 2374 | 219 | if ( result.second == std::nullopt ) { | 2375 | 199 | continue; | 2376 | 199 | } | 2377 | | | 2378 | 20 | ret.push_back(result); | 2379 | 20 | } | 2380 | | | 2381 | 64 | return ret; | 2382 | 64 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const Line | Count | Source | 2370 | 59 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 59 | ResultSet ret; | 2372 | | | 2373 | 208 | for (const auto& result : results) { | 2374 | 208 | if ( result.second == std::nullopt ) { | 2375 | 192 | continue; | 2376 | 192 | } | 2377 | | | 2378 | 16 | ret.push_back(result); | 2379 | 16 | } | 2380 | | | 2381 | 59 | return ret; | 2382 | 59 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const Line | Count | Source | 2370 | 161 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 161 | ResultSet ret; | 2372 | | | 2373 | 493 | for (const auto& result : results) { | 2374 | 493 | if ( result.second == std::nullopt ) { | 2375 | 462 | continue; | 2376 | 462 | } | 2377 | | | 2378 | 31 | ret.push_back(result); | 2379 | 31 | } | 2380 | | | 2381 | 161 | return ret; | 2382 | 161 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const Line | Count | Source | 2370 | 4.21k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 4.21k | ResultSet ret; | 2372 | | | 2373 | 10.8k | for (const auto& result : results) { | 2374 | 10.8k | if ( result.second == std::nullopt ) { | 2375 | 7.59k | continue; | 2376 | 7.59k | } | 2377 | | | 2378 | 3.24k | ret.push_back(result); | 2379 | 3.24k | } | 2380 | | | 2381 | 4.21k | return ret; | 2382 | 4.21k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 67 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 67 | ResultSet ret; | 2372 | | | 2373 | 192 | for (const auto& result : results) { | 2374 | 192 | if ( result.second == std::nullopt ) { | 2375 | 192 | continue; | 2376 | 192 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 67 | return ret; | 2382 | 67 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const Line | Count | Source | 2370 | 246 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 246 | ResultSet ret; | 2372 | | | 2373 | 703 | for (const auto& result : results) { | 2374 | 703 | if ( result.second == std::nullopt ) { | 2375 | 703 | continue; | 2376 | 703 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 246 | return ret; | 2382 | 246 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 51 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 51 | ResultSet ret; | 2372 | | | 2373 | 155 | for (const auto& result : results) { | 2374 | 155 | if ( result.second == std::nullopt ) { | 2375 | 155 | continue; | 2376 | 155 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 51 | return ret; | 2382 | 51 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const Line | Count | Source | 2370 | 49 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 49 | ResultSet ret; | 2372 | | | 2373 | 155 | for (const auto& result : results) { | 2374 | 155 | if ( result.second == std::nullopt ) { | 2375 | 155 | continue; | 2376 | 155 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 49 | return ret; | 2382 | 49 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> > > > const&) const Line | Count | Source | 2370 | 46 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 46 | ResultSet ret; | 2372 | | | 2373 | 154 | for (const auto& result : results) { | 2374 | 154 | if ( result.second == std::nullopt ) { | 2375 | 154 | continue; | 2376 | 154 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 46 | return ret; | 2382 | 46 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const Line | Count | Source | 2370 | 33 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 33 | ResultSet ret; | 2372 | | | 2373 | 127 | for (const auto& result : results) { | 2374 | 127 | if ( result.second == std::nullopt ) { | 2375 | 127 | continue; | 2376 | 127 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 33 | return ret; | 2382 | 33 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> > > > const&) const Line | Count | Source | 2370 | 42 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 42 | ResultSet ret; | 2372 | | | 2373 | 147 | for (const auto& result : results) { | 2374 | 147 | if ( result.second == std::nullopt ) { | 2375 | 147 | continue; | 2376 | 147 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 42 | return ret; | 2382 | 42 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const Line | Count | Source | 2370 | 46 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 46 | ResultSet ret; | 2372 | | | 2373 | 168 | for (const auto& result : results) { | 2374 | 168 | if ( result.second == std::nullopt ) { | 2375 | 168 | continue; | 2376 | 168 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 46 | return ret; | 2382 | 46 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 32 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 32 | ResultSet ret; | 2372 | | | 2373 | 113 | for (const auto& result : results) { | 2374 | 113 | if ( result.second == std::nullopt ) { | 2375 | 113 | continue; | 2376 | 113 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 32 | return ret; | 2382 | 32 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const Line | Count | Source | 2370 | 36 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 36 | ResultSet ret; | 2372 | | | 2373 | 130 | for (const auto& result : results) { | 2374 | 130 | if ( result.second == std::nullopt ) { | 2375 | 130 | continue; | 2376 | 130 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 36 | return ret; | 2382 | 36 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const Line | Count | Source | 2370 | 28 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 28 | ResultSet ret; | 2372 | | | 2373 | 101 | for (const auto& result : results) { | 2374 | 101 | if ( result.second == std::nullopt ) { | 2375 | 101 | continue; | 2376 | 101 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 28 | return ret; | 2382 | 28 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const Line | Count | Source | 2370 | 33 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 33 | ResultSet ret; | 2372 | | | 2373 | 118 | for (const auto& result : results) { | 2374 | 118 | if ( result.second == std::nullopt ) { | 2375 | 118 | continue; | 2376 | 118 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 33 | return ret; | 2382 | 33 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const Line | Count | Source | 2370 | 46 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 46 | ResultSet ret; | 2372 | | | 2373 | 151 | for (const auto& result : results) { | 2374 | 151 | if ( result.second == std::nullopt ) { | 2375 | 151 | continue; | 2376 | 151 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 46 | return ret; | 2382 | 46 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 30 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 30 | ResultSet ret; | 2372 | | | 2373 | 117 | for (const auto& result : results) { | 2374 | 117 | if ( result.second == std::nullopt ) { | 2375 | 117 | continue; | 2376 | 117 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 30 | return ret; | 2382 | 30 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const Line | Count | Source | 2370 | 34 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 34 | ResultSet ret; | 2372 | | | 2373 | 128 | for (const auto& result : results) { | 2374 | 128 | if ( result.second == std::nullopt ) { | 2375 | 128 | continue; | 2376 | 128 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 34 | return ret; | 2382 | 34 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 31 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 31 | ResultSet ret; | 2372 | | | 2373 | 118 | for (const auto& result : results) { | 2374 | 118 | if ( result.second == std::nullopt ) { | 2375 | 118 | continue; | 2376 | 118 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 31 | return ret; | 2382 | 31 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const Line | Count | Source | 2370 | 37 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 37 | ResultSet ret; | 2372 | | | 2373 | 133 | for (const auto& result : results) { | 2374 | 133 | if ( result.second == std::nullopt ) { | 2375 | 133 | continue; | 2376 | 133 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 37 | return ret; | 2382 | 37 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const Line | Count | Source | 2370 | 47 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 47 | ResultSet ret; | 2372 | | | 2373 | 149 | for (const auto& result : results) { | 2374 | 149 | if ( result.second == std::nullopt ) { | 2375 | 149 | continue; | 2376 | 149 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 47 | return ret; | 2382 | 47 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const Line | Count | Source | 2370 | 46 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 46 | ResultSet ret; | 2372 | | | 2373 | 155 | for (const auto& result : results) { | 2374 | 155 | if ( result.second == std::nullopt ) { | 2375 | 155 | continue; | 2376 | 155 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 46 | return ret; | 2382 | 46 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> > > > const&) const Line | Count | Source | 2370 | 34 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 34 | ResultSet ret; | 2372 | | | 2373 | 121 | for (const auto& result : results) { | 2374 | 121 | if ( result.second == std::nullopt ) { | 2375 | 121 | continue; | 2376 | 121 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 34 | return ret; | 2382 | 34 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 32 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 32 | ResultSet ret; | 2372 | | | 2373 | 122 | for (const auto& result : results) { | 2374 | 122 | if ( result.second == std::nullopt ) { | 2375 | 122 | continue; | 2376 | 122 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 32 | return ret; | 2382 | 32 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const Line | Count | Source | 2370 | 30 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 30 | ResultSet ret; | 2372 | | | 2373 | 100 | for (const auto& result : results) { | 2374 | 100 | if ( result.second == std::nullopt ) { | 2375 | 100 | continue; | 2376 | 100 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 30 | return ret; | 2382 | 30 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const Line | Count | Source | 2370 | 27 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 27 | ResultSet ret; | 2372 | | | 2373 | 95 | for (const auto& result : results) { | 2374 | 95 | if ( result.second == std::nullopt ) { | 2375 | 95 | continue; | 2376 | 95 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 27 | return ret; | 2382 | 27 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 32 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 32 | ResultSet ret; | 2372 | | | 2373 | 108 | for (const auto& result : results) { | 2374 | 108 | if ( result.second == std::nullopt ) { | 2375 | 108 | continue; | 2376 | 108 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 32 | return ret; | 2382 | 32 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 50 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 50 | ResultSet ret; | 2372 | | | 2373 | 163 | for (const auto& result : results) { | 2374 | 163 | if ( result.second == std::nullopt ) { | 2375 | 163 | continue; | 2376 | 163 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 50 | return ret; | 2382 | 50 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 42 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 42 | ResultSet ret; | 2372 | | | 2373 | 131 | for (const auto& result : results) { | 2374 | 131 | if ( result.second == std::nullopt ) { | 2375 | 131 | continue; | 2376 | 131 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 42 | return ret; | 2382 | 42 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const Line | Count | Source | 2370 | 59 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 59 | ResultSet ret; | 2372 | | | 2373 | 179 | for (const auto& result : results) { | 2374 | 179 | if ( result.second == std::nullopt ) { | 2375 | 179 | continue; | 2376 | 179 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 59 | return ret; | 2382 | 59 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 37 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 37 | ResultSet ret; | 2372 | | | 2373 | 126 | for (const auto& result : results) { | 2374 | 126 | if ( result.second == std::nullopt ) { | 2375 | 126 | continue; | 2376 | 126 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 37 | return ret; | 2382 | 37 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const Line | Count | Source | 2370 | 81 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 81 | ResultSet ret; | 2372 | | | 2373 | 250 | for (const auto& result : results) { | 2374 | 250 | if ( result.second == std::nullopt ) { | 2375 | 250 | continue; | 2376 | 250 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 81 | return ret; | 2382 | 81 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const Line | Count | Source | 2370 | 50 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 50 | ResultSet ret; | 2372 | | | 2373 | 148 | for (const auto& result : results) { | 2374 | 148 | if ( result.second == std::nullopt ) { | 2375 | 148 | continue; | 2376 | 148 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 50 | return ret; | 2382 | 50 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const Line | Count | Source | 2370 | 71 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 71 | ResultSet ret; | 2372 | | | 2373 | 225 | for (const auto& result : results) { | 2374 | 225 | if ( result.second == std::nullopt ) { | 2375 | 225 | continue; | 2376 | 225 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 71 | return ret; | 2382 | 71 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const Line | Count | Source | 2370 | 45 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 45 | ResultSet ret; | 2372 | | | 2373 | 146 | for (const auto& result : results) { | 2374 | 146 | if ( result.second == std::nullopt ) { | 2375 | 146 | continue; | 2376 | 146 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 45 | return ret; | 2382 | 45 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 62 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 62 | ResultSet ret; | 2372 | | | 2373 | 196 | for (const auto& result : results) { | 2374 | 196 | if ( result.second == std::nullopt ) { | 2375 | 196 | continue; | 2376 | 196 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 62 | return ret; | 2382 | 62 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 29 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 29 | ResultSet ret; | 2372 | | | 2373 | 115 | for (const auto& result : results) { | 2374 | 115 | if ( result.second == std::nullopt ) { | 2375 | 115 | continue; | 2376 | 115 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 29 | return ret; | 2382 | 29 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const Line | Count | Source | 2370 | 40 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 40 | ResultSet ret; | 2372 | | | 2373 | 145 | for (const auto& result : results) { | 2374 | 145 | if ( result.second == std::nullopt ) { | 2375 | 145 | continue; | 2376 | 145 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 40 | return ret; | 2382 | 40 | } |
|
2383 | | |
2384 | | /* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */ |
2385 | | template <> |
2386 | 685 | void ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::ECC_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { |
2387 | 685 | (void)operations; |
2388 | 685 | (void)results; |
2389 | 685 | (void)data; |
2390 | 685 | (void)size; |
2391 | 685 | } |
2392 | | |
2393 | | template <class ResultType, class OperationType> |
2394 | 2.44k | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { |
2395 | 2.44k | (void)operation; |
2396 | | |
2397 | 2.44k | return false; |
2398 | 2.44k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const Line | Count | Source | 2394 | 492 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 492 | (void)operation; | 2396 | | | 2397 | 492 | return false; | 2398 | 492 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const Line | Count | Source | 2394 | 186 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 186 | (void)operation; | 2396 | | | 2397 | 186 | return false; | 2398 | 186 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const Line | Count | Source | 2394 | 20 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 20 | (void)operation; | 2396 | | | 2397 | 20 | return false; | 2398 | 20 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const Line | Count | Source | 2394 | 520 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 520 | (void)operation; | 2396 | | | 2397 | 520 | return false; | 2398 | 520 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::dontCompare(cryptofuzz::operation::KDF_TLS1_PRF const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::dontCompare(cryptofuzz::operation::KDF_PBKDF const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::dontCompare(cryptofuzz::operation::KDF_PBKDF1 const&) const cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::dontCompare(cryptofuzz::operation::KDF_PBKDF2 const&) const Line | Count | Source | 2394 | 171 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 171 | (void)operation; | 2396 | | | 2397 | 171 | return false; | 2398 | 171 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const Line | Count | Source | 2394 | 58 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 58 | (void)operation; | 2396 | | | 2397 | 58 | return false; | 2398 | 58 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::dontCompare(cryptofuzz::operation::KDF_SSH const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::dontCompare(cryptofuzz::operation::KDF_X963 const&) const cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::dontCompare(cryptofuzz::operation::KDF_BCRYPT const&) const Line | Count | Source | 2394 | 6 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 6 | (void)operation; | 2396 | | | 2397 | 6 | return false; | 2398 | 6 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const Line | Count | Source | 2394 | 77 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 77 | (void)operation; | 2396 | | | 2397 | 77 | return false; | 2398 | 77 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::dontCompare(cryptofuzz::operation::KDF_SRTP const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::dontCompare(cryptofuzz::operation::KDF_SRTCP const&) const cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::dontCompare(cryptofuzz::operation::ECC_PrivateToPublic const&) const Line | Count | Source | 2394 | 108 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 108 | (void)operation; | 2396 | | | 2397 | 108 | return false; | 2398 | 108 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const Line | Count | Source | 2394 | 505 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 505 | (void)operation; | 2396 | | | 2397 | 505 | return false; | 2398 | 505 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::dontCompare(cryptofuzz::operation::ECC_GenerateKeyPair const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::dontCompare(cryptofuzz::operation::Schnorr_Sign const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::dontCompare(cryptofuzz::operation::ECCSI_Verify const&) const cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::dontCompare(cryptofuzz::operation::ECDSA_Verify const&) const Line | Count | Source | 2394 | 118 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 118 | (void)operation; | 2396 | | | 2397 | 118 | return false; | 2398 | 118 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const Line | Count | Source | 2394 | 30 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 30 | (void)operation; | 2396 | | | 2397 | 30 | return false; | 2398 | 30 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::dontCompare(cryptofuzz::operation::ECRDSA_Verify const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::dontCompare(cryptofuzz::operation::Schnorr_Verify const&) const cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::dontCompare(cryptofuzz::operation::ECDSA_Recover const&) const Line | Count | Source | 2394 | 49 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 49 | (void)operation; | 2396 | | | 2397 | 49 | return false; | 2398 | 49 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const Line | Count | Source | 2394 | 30 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 30 | (void)operation; | 2396 | | | 2397 | 30 | return false; | 2398 | 30 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::dontCompare(cryptofuzz::operation::DSA_Sign const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::dontCompare(cryptofuzz::operation::DSA_GenerateParameters const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::dontCompare(cryptofuzz::operation::DSA_PrivateToPublic const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DSA_GenerateKeyPair const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::dontCompare(cryptofuzz::operation::ECDH_Derive const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::dontCompare(cryptofuzz::operation::ECIES_Encrypt const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::dontCompare(cryptofuzz::operation::ECIES_Decrypt const&) const cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::dontCompare(cryptofuzz::operation::ECC_Point_Add const&) const Line | Count | Source | 2394 | 7 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 7 | (void)operation; | 2396 | | | 2397 | 7 | return false; | 2398 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::dontCompare(cryptofuzz::operation::ECC_Point_Sub const&) const Line | Count | Source | 2394 | 7 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 7 | (void)operation; | 2396 | | | 2397 | 7 | return false; | 2398 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const Line | Count | Source | 2394 | 44 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 44 | (void)operation; | 2396 | | | 2397 | 44 | return false; | 2398 | 44 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const Line | Count | Source | 2394 | 7 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 7 | (void)operation; | 2396 | | | 2397 | 7 | return false; | 2398 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const Line | Count | Source | 2394 | 4 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 4 | (void)operation; | 2396 | | | 2397 | 4 | return false; | 2398 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const Line | Count | Source | 2394 | 4 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 4 | (void)operation; | 2396 | | | 2397 | 4 | return false; | 2398 | 4 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DH_GenerateKeyPair const&) const cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::dontCompare(cryptofuzz::operation::DH_Derive const&) const Line | Count | Source | 2394 | 5 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 5 | (void)operation; | 2396 | | | 2397 | 5 | return false; | 2398 | 5 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::dontCompare(cryptofuzz::operation::BignumCalc_Fp2 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::dontCompare(cryptofuzz::operation::BignumCalc_Fp12 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic_G2 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::dontCompare(cryptofuzz::operation::BLS_Sign const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::dontCompare(cryptofuzz::operation::BLS_Verify const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::dontCompare(cryptofuzz::operation::BLS_BatchSign const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::dontCompare(cryptofuzz::operation::BLS_BatchVerify const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G1 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G2 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::dontCompare(cryptofuzz::operation::BLS_Pairing const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::dontCompare(cryptofuzz::operation::BLS_MillerLoop const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::dontCompare(cryptofuzz::operation::BLS_FinalExp const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::dontCompare(cryptofuzz::operation::BLS_HashToG1 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::dontCompare(cryptofuzz::operation::BLS_HashToG2 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::dontCompare(cryptofuzz::operation::BLS_MapToG1 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::dontCompare(cryptofuzz::operation::BLS_MapToG2 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG1OnCurve const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG2OnCurve const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::dontCompare(cryptofuzz::operation::BLS_GenerateKeyPair const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::dontCompare(cryptofuzz::operation::BLS_Decompress_G1 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::dontCompare(cryptofuzz::operation::BLS_Compress_G1 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::dontCompare(cryptofuzz::operation::BLS_Decompress_G2 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::dontCompare(cryptofuzz::operation::BLS_Compress_G2 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::dontCompare(cryptofuzz::operation::BLS_G1_Add const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::dontCompare(cryptofuzz::operation::BLS_G1_Mul const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::dontCompare(cryptofuzz::operation::BLS_G1_IsEq const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::dontCompare(cryptofuzz::operation::BLS_G1_Neg const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::dontCompare(cryptofuzz::operation::BLS_G2_Add const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::dontCompare(cryptofuzz::operation::BLS_G2_Mul const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::dontCompare(cryptofuzz::operation::BLS_G2_IsEq const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::dontCompare(cryptofuzz::operation::BLS_G2_Neg const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::dontCompare(cryptofuzz::operation::BLS_G1_MultiExp const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::dontCompare(cryptofuzz::operation::Misc const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::dontCompare(cryptofuzz::operation::SR25519_Verify const&) const |
2399 | | |
2400 | | template <> |
2401 | 724 | bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const { |
2402 | 724 | if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; } |
2403 | 724 | if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; } |
2404 | 724 | if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; } |
2405 | 577 | if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; } |
2406 | | |
2407 | 573 | return false; |
2408 | 577 | } |
2409 | | |
2410 | | template <> |
2411 | 0 | bool ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::dontCompare(const operation::ECCSI_Sign& operation) const { |
2412 | 0 | (void)operation; |
2413 | 0 | return true; |
2414 | 0 | } |
2415 | | |
2416 | | template <> |
2417 | 132 | bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const { |
2418 | 132 | if ( |
2419 | 132 | operation.curveType.Get() != CF_ECC_CURVE("ed25519") && |
2420 | 132 | operation.curveType.Get() != CF_ECC_CURVE("ed448") ) { |
2421 | 80 | if ( operation.UseRandomNonce() ) { |
2422 | | /* Don't compare ECDSA signatures comptued from a randomly generated nonce */ |
2423 | 66 | return true; |
2424 | 66 | } |
2425 | 80 | } |
2426 | | |
2427 | 66 | return false; |
2428 | 132 | } |
2429 | | |
2430 | | template <> |
2431 | 1 | bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const { |
2432 | 1 | if ( |
2433 | 1 | operation.curveType.Get() != CF_ECC_CURVE("ed25519") && |
2434 | 1 | operation.curveType.Get() != CF_ECC_CURVE("ed448") ) { |
2435 | 1 | if ( operation.UseRandomNonce() ) { |
2436 | | /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */ |
2437 | 1 | return true; |
2438 | 1 | } |
2439 | 1 | } |
2440 | | |
2441 | 0 | return false; |
2442 | 1 | } |
2443 | | |
2444 | | template <> |
2445 | 0 | bool ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::dontCompare(const operation::ECRDSA_Sign& operation) const { |
2446 | 0 | if ( |
2447 | 0 | operation.curveType.Get() != CF_ECC_CURVE("ed25519") && |
2448 | 0 | operation.curveType.Get() != CF_ECC_CURVE("ed448") ) { |
2449 | 0 | if ( operation.UseRandomNonce() ) { |
2450 | | /* Don't compare ECRDSA signatures comptued from a randomly generated nonce */ |
2451 | 0 | return true; |
2452 | 0 | } |
2453 | 0 | } |
2454 | | |
2455 | 0 | return false; |
2456 | 0 | } |
2457 | | |
2458 | | /* OpenSSL DES_EDE3_WRAP randomizes the IV, result is different each time */ |
2459 | | template <> |
2460 | 536 | bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const { |
2461 | 536 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; } |
2462 | | |
2463 | 536 | return false; |
2464 | 536 | } |
2465 | | |
2466 | | template <> |
2467 | 87 | bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const { |
2468 | 87 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true; |
2469 | | |
2470 | 87 | return false; |
2471 | 87 | } |
2472 | | |
2473 | | template <> |
2474 | 179 | bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const { |
2475 | 179 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true; |
2476 | | |
2477 | 179 | return false; |
2478 | 179 | } |
2479 | | |
2480 | | template <> |
2481 | 215 | bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const { |
2482 | 215 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true; |
2483 | | |
2484 | 213 | return false; |
2485 | 215 | } |
2486 | | |
2487 | | template <class ResultType, class OperationType> |
2488 | 19.9k | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { |
2489 | 19.9k | if ( results.size() < 2 ) { |
2490 | | /* Nothing to compare. Don't even bother filtering. */ |
2491 | 0 | return; |
2492 | 0 | } |
2493 | | |
2494 | 19.9k | const auto filtered = filter(results); |
2495 | | |
2496 | 19.9k | if ( filtered.size() < 2 ) { |
2497 | | /* Nothing to compare */ |
2498 | 15.5k | return; |
2499 | 15.5k | } |
2500 | | |
2501 | 4.32k | if ( dontCompare(operations[0].second) == true ) { |
2502 | 220 | return; |
2503 | 220 | } |
2504 | | |
2505 | 16.1k | for (size_t i = 1; i < filtered.size(); i++) { |
2506 | 12.0k | const std::optional<ResultType>& prev = filtered[i-1].second; |
2507 | 12.0k | const std::optional<ResultType>& cur = filtered[i].second; |
2508 | | |
2509 | 12.0k | const bool equal = *prev == *cur; |
2510 | | |
2511 | 12.0k | if ( !equal ) { |
2512 | | /* Reconstruct operation */ |
2513 | 0 | const auto op = getOp(nullptr, data, size); |
2514 | |
|
2515 | 0 | printf("Difference detected\n\n"); |
2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); |
2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); |
2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); |
2519 | |
|
2520 | 0 | abort( |
2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, |
2522 | 0 | op.Name(), |
2523 | 0 | op.GetAlgorithmString(), |
2524 | 0 | "difference" |
2525 | 0 | ); |
2526 | 0 | } |
2527 | 12.0k | } |
2528 | 4.10k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Digest>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Digest> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 1.50k | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 1.50k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 1.50k | const auto filtered = filter(results); | 2495 | | | 2496 | 1.50k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 1.01k | return; | 2499 | 1.01k | } | 2500 | | | 2501 | 492 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 1.80k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 1.31k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 1.31k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 1.31k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 1.31k | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 1.31k | } | 2528 | 492 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::HMAC>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::HMAC> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 399 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 399 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 399 | const auto filtered = filter(results); | 2495 | | | 2496 | 399 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 184 | return; | 2499 | 184 | } | 2500 | | | 2501 | 215 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 2 | return; | 2503 | 2 | } | 2504 | | | 2505 | 872 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 659 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 659 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 659 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 659 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 659 | } | 2528 | 213 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::UMAC>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::UMAC> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 465 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 465 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 465 | const auto filtered = filter(results); | 2495 | | | 2496 | 465 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 279 | return; | 2499 | 279 | } | 2500 | | | 2501 | 186 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 1.07k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 890 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 890 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 890 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 890 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 890 | } | 2528 | 186 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::CMAC>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::CMAC> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 752 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 752 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 752 | const auto filtered = filter(results); | 2495 | | | 2496 | 752 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 573 | return; | 2499 | 573 | } | 2500 | | | 2501 | 179 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 1.02k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 847 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 847 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 847 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 847 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 847 | } | 2528 | 179 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricEncrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricEncrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 2.75k | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 2.75k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 2.75k | const auto filtered = filter(results); | 2495 | | | 2496 | 2.75k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 2.21k | return; | 2499 | 2.21k | } | 2500 | | | 2501 | 536 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 3.04k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 2.50k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 2.50k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 2.50k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 2.50k | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 2.50k | } | 2528 | 536 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricDecrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricDecrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 1.83k | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 1.83k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 1.83k | const auto filtered = filter(results); | 2495 | | | 2496 | 1.83k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 1.74k | return; | 2499 | 1.74k | } | 2500 | | | 2501 | 87 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 586 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 499 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 499 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 499 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 499 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 499 | } | 2528 | 87 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SCRYPT>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SCRYPT> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 122 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 122 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 122 | const auto filtered = filter(results); | 2495 | | | 2496 | 122 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 102 | return; | 2499 | 102 | } | 2500 | | | 2501 | 20 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 149 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 129 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 129 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 129 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 129 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 129 | } | 2528 | 20 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_HKDF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_HKDF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 1.30k | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 1.30k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 1.30k | const auto filtered = filter(results); | 2495 | | | 2496 | 1.30k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 780 | return; | 2499 | 780 | } | 2500 | | | 2501 | 520 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 2.07k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 1.55k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 1.55k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 1.55k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 1.55k | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 1.55k | } | 2528 | 520 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_TLS1_PRF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_TLS1_PRF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 82 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 82 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 82 | const auto filtered = filter(results); | 2495 | | | 2496 | 82 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 82 | return; | 2499 | 82 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 50 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 50 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 50 | const auto filtered = filter(results); | 2495 | | | 2496 | 50 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 50 | return; | 2499 | 50 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 57 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 57 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 57 | const auto filtered = filter(results); | 2495 | | | 2496 | 57 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 57 | return; | 2499 | 57 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 508 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 508 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 508 | const auto filtered = filter(results); | 2495 | | | 2496 | 508 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 337 | return; | 2499 | 337 | } | 2500 | | | 2501 | 171 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 678 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 507 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 507 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 507 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 507 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 507 | } | 2528 | 171 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_ARGON2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_ARGON2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 261 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 261 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 261 | const auto filtered = filter(results); | 2495 | | | 2496 | 261 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 203 | return; | 2499 | 203 | } | 2500 | | | 2501 | 58 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 153 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 95 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 95 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 95 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 95 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 95 | } | 2528 | 58 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SSH>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SSH> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 41 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 41 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 41 | const auto filtered = filter(results); | 2495 | | | 2496 | 41 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 41 | return; | 2499 | 41 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_X963>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_X963> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 49 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 49 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 49 | const auto filtered = filter(results); | 2495 | | | 2496 | 49 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 49 | return; | 2499 | 49 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_BCRYPT>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_BCRYPT> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 44 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 44 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 44 | const auto filtered = filter(results); | 2495 | | | 2496 | 44 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 38 | return; | 2499 | 38 | } | 2500 | | | 2501 | 6 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 12 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 6 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 6 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 6 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 6 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 6 | } | 2528 | 6 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 304 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 304 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 304 | const auto filtered = filter(results); | 2495 | | | 2496 | 304 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 227 | return; | 2499 | 227 | } | 2500 | | | 2501 | 77 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 417 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 340 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 340 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 340 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 340 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 340 | } | 2528 | 77 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTP>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTP> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 50 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 50 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 50 | const auto filtered = filter(results); | 2495 | | | 2496 | 50 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 50 | return; | 2499 | 50 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTCP>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTCP> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 43 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 43 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 43 | const auto filtered = filter(results); | 2495 | | | 2496 | 43 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 43 | return; | 2499 | 43 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_PrivateToPublic>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_PrivateToPublic> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 424 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 424 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 424 | const auto filtered = filter(results); | 2495 | | | 2496 | 424 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 316 | return; | 2499 | 316 | } | 2500 | | | 2501 | 108 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 280 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 172 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 172 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 172 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 172 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 172 | } | 2528 | 108 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_ValidatePubkey>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_ValidatePubkey> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 581 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 581 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 581 | const auto filtered = filter(results); | 2495 | | | 2496 | 581 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 76 | return; | 2499 | 76 | } | 2500 | | | 2501 | 505 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 1.11k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 614 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 614 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 614 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 614 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 614 | } | 2528 | 505 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 35 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 35 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 35 | const auto filtered = filter(results); | 2495 | | | 2496 | 35 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 35 | return; | 2499 | 35 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 485 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 485 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 485 | const auto filtered = filter(results); | 2495 | | | 2496 | 485 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 353 | return; | 2499 | 353 | } | 2500 | | | 2501 | 132 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 66 | return; | 2503 | 66 | } | 2504 | | | 2505 | 218 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 152 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 152 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 152 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 152 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 152 | } | 2528 | 66 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 75 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 75 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 75 | const auto filtered = filter(results); | 2495 | | | 2496 | 75 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 74 | return; | 2499 | 74 | } | 2500 | | | 2501 | 1 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 1 | return; | 2503 | 1 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 35 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 35 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 35 | const auto filtered = filter(results); | 2495 | | | 2496 | 35 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 35 | return; | 2499 | 35 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 38 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 38 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 38 | const auto filtered = filter(results); | 2495 | | | 2496 | 38 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 38 | return; | 2499 | 38 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 33 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 33 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 33 | const auto filtered = filter(results); | 2495 | | | 2496 | 33 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 33 | return; | 2499 | 33 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 249 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 249 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 249 | const auto filtered = filter(results); | 2495 | | | 2496 | 249 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 131 | return; | 2499 | 131 | } | 2500 | | | 2501 | 118 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 353 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 235 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 235 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 235 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 235 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 235 | } | 2528 | 118 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 116 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 116 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 116 | const auto filtered = filter(results); | 2495 | | | 2496 | 116 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 86 | return; | 2499 | 86 | } | 2500 | | | 2501 | 30 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 98 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 68 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 68 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 68 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 68 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 68 | } | 2528 | 30 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 30 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 30 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 30 | const auto filtered = filter(results); | 2495 | | | 2496 | 30 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 30 | return; | 2499 | 30 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 37 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 37 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 37 | const auto filtered = filter(results); | 2495 | | | 2496 | 37 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 37 | return; | 2499 | 37 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Recover>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Recover> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 337 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 337 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 337 | const auto filtered = filter(results); | 2495 | | | 2496 | 337 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 288 | return; | 2499 | 288 | } | 2500 | | | 2501 | 49 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 139 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 90 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 90 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 90 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 90 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 90 | } | 2528 | 49 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 153 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 153 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 153 | const auto filtered = filter(results); | 2495 | | | 2496 | 153 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 123 | return; | 2499 | 123 | } | 2500 | | | 2501 | 30 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 90 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 60 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 60 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 60 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 60 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 60 | } | 2528 | 30 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_PrivateToPublic>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_PrivateToPublic> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 27 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 27 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 27 | const auto filtered = filter(results); | 2495 | | | 2496 | 27 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 27 | return; | 2499 | 27 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDH_Derive>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDH_Derive> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 36 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 36 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 36 | const auto filtered = filter(results); | 2495 | | | 2496 | 36 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 36 | return; | 2499 | 36 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Decrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Decrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 29 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 29 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 29 | const auto filtered = filter(results); | 2495 | | | 2496 | 29 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 29 | return; | 2499 | 29 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 67 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 67 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 67 | const auto filtered = filter(results); | 2495 | | | 2496 | 67 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 60 | return; | 2499 | 60 | } | 2500 | | | 2501 | 7 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 23 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 16 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 16 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 16 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 16 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 16 | } | 2528 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 74 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 74 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 74 | const auto filtered = filter(results); | 2495 | | | 2496 | 74 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 67 | return; | 2499 | 67 | } | 2500 | | | 2501 | 7 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 21 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 14 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 14 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 14 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 14 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 14 | } | 2528 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Mul>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Mul> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 187 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 187 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 187 | const auto filtered = filter(results); | 2495 | | | 2496 | 187 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 143 | return; | 2499 | 143 | } | 2500 | | | 2501 | 44 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 143 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 99 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 99 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 99 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 99 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 99 | } | 2528 | 44 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Neg>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Neg> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 55 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 55 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 55 | const auto filtered = filter(results); | 2495 | | | 2496 | 55 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 48 | return; | 2499 | 48 | } | 2500 | | | 2501 | 7 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 23 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 16 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 16 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 16 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 16 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 16 | } | 2528 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 64 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 64 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 64 | const auto filtered = filter(results); | 2495 | | | 2496 | 64 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 60 | return; | 2499 | 60 | } | 2500 | | | 2501 | 4 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 14 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 10 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 10 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 10 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 10 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 10 | } | 2528 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Cmp>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Cmp> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 59 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 59 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 59 | const auto filtered = filter(results); | 2495 | | | 2496 | 59 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 55 | return; | 2499 | 55 | } | 2500 | | | 2501 | 4 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 14 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 10 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 10 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 10 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 10 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 10 | } | 2528 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DH_Derive>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DH_Derive> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 161 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 161 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 161 | const auto filtered = filter(results); | 2495 | | | 2496 | 161 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 156 | return; | 2499 | 156 | } | 2500 | | | 2501 | 5 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 16 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 11 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 11 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 11 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 11 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 11 | } | 2528 | 5 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 4.21k | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 4.21k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 4.21k | const auto filtered = filter(results); | 2495 | | | 2496 | 4.21k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 3.48k | return; | 2499 | 3.48k | } | 2500 | | | 2501 | 724 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 151 | return; | 2503 | 151 | } | 2504 | | | 2505 | 1.72k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 1.14k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 1.14k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 1.14k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 1.14k | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 1.14k | } | 2528 | 573 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 67 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 67 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 67 | const auto filtered = filter(results); | 2495 | | | 2496 | 67 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 67 | return; | 2499 | 67 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp12>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp12> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 246 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 246 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 246 | const auto filtered = filter(results); | 2495 | | | 2496 | 246 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 246 | return; | 2499 | 246 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 51 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 51 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 51 | const auto filtered = filter(results); | 2495 | | | 2496 | 51 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 51 | return; | 2499 | 51 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 49 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 49 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 49 | const auto filtered = filter(results); | 2495 | | | 2496 | 49 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 49 | return; | 2499 | 49 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 46 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 46 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 46 | const auto filtered = filter(results); | 2495 | | | 2496 | 46 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 46 | return; | 2499 | 46 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 33 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 33 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 33 | const auto filtered = filter(results); | 2495 | | | 2496 | 33 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 33 | return; | 2499 | 33 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchSign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchSign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 42 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 42 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 42 | const auto filtered = filter(results); | 2495 | | | 2496 | 42 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 42 | return; | 2499 | 42 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchVerify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchVerify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 46 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 46 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 46 | const auto filtered = filter(results); | 2495 | | | 2496 | 46 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 46 | return; | 2499 | 46 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 32 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 32 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 32 | const auto filtered = filter(results); | 2495 | | | 2496 | 32 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 32 | return; | 2499 | 32 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 36 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 36 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 36 | const auto filtered = filter(results); | 2495 | | | 2496 | 36 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 36 | return; | 2499 | 36 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Pairing>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Pairing> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 28 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 28 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 28 | const auto filtered = filter(results); | 2495 | | | 2496 | 28 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 28 | return; | 2499 | 28 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MillerLoop>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MillerLoop> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 33 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 33 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 33 | const auto filtered = filter(results); | 2495 | | | 2496 | 33 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 33 | return; | 2499 | 33 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_FinalExp>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_FinalExp> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 46 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 46 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 46 | const auto filtered = filter(results); | 2495 | | | 2496 | 46 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 46 | return; | 2499 | 46 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 30 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 30 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 30 | const auto filtered = filter(results); | 2495 | | | 2496 | 30 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 30 | return; | 2499 | 30 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 34 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 34 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 34 | const auto filtered = filter(results); | 2495 | | | 2496 | 34 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 34 | return; | 2499 | 34 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 31 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 31 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 31 | const auto filtered = filter(results); | 2495 | | | 2496 | 31 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 31 | return; | 2499 | 31 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 37 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 37 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 37 | const auto filtered = filter(results); | 2495 | | | 2496 | 37 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 37 | return; | 2499 | 37 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG1OnCurve>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG1OnCurve> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 47 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 47 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 47 | const auto filtered = filter(results); | 2495 | | | 2496 | 47 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 47 | return; | 2499 | 47 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG2OnCurve>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG2OnCurve> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 46 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 46 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 46 | const auto filtered = filter(results); | 2495 | | | 2496 | 46 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 46 | return; | 2499 | 46 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_GenerateKeyPair>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_GenerateKeyPair> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 34 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 34 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 34 | const auto filtered = filter(results); | 2495 | | | 2496 | 34 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 34 | return; | 2499 | 34 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 32 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 32 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 32 | const auto filtered = filter(results); | 2495 | | | 2496 | 32 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 32 | return; | 2499 | 32 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 30 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 30 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 30 | const auto filtered = filter(results); | 2495 | | | 2496 | 30 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 30 | return; | 2499 | 30 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 27 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 27 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 27 | const auto filtered = filter(results); | 2495 | | | 2496 | 27 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 27 | return; | 2499 | 27 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 32 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 32 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 32 | const auto filtered = filter(results); | 2495 | | | 2496 | 32 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 32 | return; | 2499 | 32 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 50 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 50 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 50 | const auto filtered = filter(results); | 2495 | | | 2496 | 50 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 50 | return; | 2499 | 50 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Mul>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Mul> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 42 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 42 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 42 | const auto filtered = filter(results); | 2495 | | | 2496 | 42 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 42 | return; | 2499 | 42 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_IsEq>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_IsEq> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 59 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 59 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 59 | const auto filtered = filter(results); | 2495 | | | 2496 | 59 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 59 | return; | 2499 | 59 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Neg>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Neg> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 37 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 37 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 37 | const auto filtered = filter(results); | 2495 | | | 2496 | 37 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 37 | return; | 2499 | 37 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 81 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 81 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 81 | const auto filtered = filter(results); | 2495 | | | 2496 | 81 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 81 | return; | 2499 | 81 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Mul>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Mul> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 50 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 50 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 50 | const auto filtered = filter(results); | 2495 | | | 2496 | 50 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 50 | return; | 2499 | 50 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_IsEq>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_IsEq> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 71 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 71 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 71 | const auto filtered = filter(results); | 2495 | | | 2496 | 71 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 71 | return; | 2499 | 71 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Neg>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Neg> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 45 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 45 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 45 | const auto filtered = filter(results); | 2495 | | | 2496 | 45 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 45 | return; | 2499 | 45 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_MultiExp>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_MultiExp> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 62 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 62 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 62 | const auto filtered = filter(results); | 2495 | | | 2496 | 62 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 62 | return; | 2499 | 62 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Misc>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Misc> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 29 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 29 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 29 | const auto filtered = filter(results); | 2495 | | | 2496 | 29 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 29 | return; | 2499 | 29 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SR25519_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SR25519_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 40 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 40 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 40 | const auto filtered = filter(results); | 2495 | | | 2496 | 40 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 40 | return; | 2499 | 40 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
|
2529 | | |
2530 | | template <class ResultType, class OperationType> |
2531 | 0 | void ExecutorBase<ResultType, OperationType>::abort(std::vector<std::string> moduleNames, const std::string operation, const std::string algorithm, const std::string reason) const { |
2532 | 0 | std::sort(moduleNames.begin(), moduleNames.end()); |
2533 | |
|
2534 | 0 | printf("CPU:\n"); |
2535 | 0 | system("cat /proc/cpuinfo | grep '^model name' | head -n1"); |
2536 | 0 | system("cat /proc/cpuinfo | grep '^flags' | head -n1"); |
2537 | |
|
2538 | 0 | printf("Assertion failure: "); |
2539 | 0 | for (const auto& moduleName : moduleNames) { |
2540 | 0 | printf("%s-", moduleName.c_str()); |
2541 | 0 | } |
2542 | 0 | printf("%s-%s-%s\n", operation.c_str(), algorithm.c_str(), reason.c_str()); |
2543 | 0 | fflush(stdout); |
2544 | |
|
2545 | 0 | ::abort(); |
2546 | 0 | } Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const |
2547 | | |
2548 | | template <class ResultType, class OperationType> |
2549 | 219k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { |
2550 | 219k | (void)parentDs; |
2551 | 219k | return op; |
2552 | 219k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const Line | Count | Source | 2549 | 4.84k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.84k | (void)parentDs; | 2551 | 4.84k | return op; | 2552 | 4.84k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const Line | Count | Source | 2549 | 3.73k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.73k | (void)parentDs; | 2551 | 3.73k | return op; | 2552 | 3.73k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const Line | Count | Source | 2549 | 5.10k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 5.10k | (void)parentDs; | 2551 | 5.10k | return op; | 2552 | 5.10k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const Line | Count | Source | 2549 | 5.44k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 5.44k | (void)parentDs; | 2551 | 5.44k | return op; | 2552 | 5.44k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const Line | Count | Source | 2549 | 14.8k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 14.8k | (void)parentDs; | 2551 | 14.8k | return op; | 2552 | 14.8k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const Line | Count | Source | 2549 | 9.86k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 9.86k | (void)parentDs; | 2551 | 9.86k | return op; | 2552 | 9.86k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const Line | Count | Source | 2549 | 2.45k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.45k | (void)parentDs; | 2551 | 2.45k | return op; | 2552 | 2.45k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const Line | Count | Source | 2549 | 6.94k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 6.94k | (void)parentDs; | 2551 | 6.94k | return op; | 2552 | 6.94k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const Line | Count | Source | 2549 | 2.73k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.73k | (void)parentDs; | 2551 | 2.73k | return op; | 2552 | 2.73k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const Line | Count | Source | 2549 | 2.10k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.10k | (void)parentDs; | 2551 | 2.10k | return op; | 2552 | 2.10k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const Line | Count | Source | 2549 | 2.52k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.52k | (void)parentDs; | 2551 | 2.52k | return op; | 2552 | 2.52k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const Line | Count | Source | 2549 | 3.43k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.43k | (void)parentDs; | 2551 | 3.43k | return op; | 2552 | 3.43k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const Line | Count | Source | 2549 | 2.40k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.40k | (void)parentDs; | 2551 | 2.40k | return op; | 2552 | 2.40k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const Line | Count | Source | 2549 | 2.20k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.20k | (void)parentDs; | 2551 | 2.20k | return op; | 2552 | 2.20k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const Line | Count | Source | 2549 | 2.37k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.37k | (void)parentDs; | 2551 | 2.37k | return op; | 2552 | 2.37k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const Line | Count | Source | 2549 | 2.54k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.54k | (void)parentDs; | 2551 | 2.54k | return op; | 2552 | 2.54k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SP_800_108) const Line | Count | Source | 2549 | 3.44k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.44k | (void)parentDs; | 2551 | 3.44k | return op; | 2552 | 3.44k | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SRTP) const Line | Count | Source | 2549 | 1.93k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.93k | (void)parentDs; | 2551 | 1.93k | return op; | 2552 | 1.93k | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SRTCP) const Line | Count | Source | 2549 | 2.31k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.31k | (void)parentDs; | 2551 | 2.31k | return op; | 2552 | 2.31k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const Line | Count | Source | 2549 | 2.11k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.11k | (void)parentDs; | 2551 | 2.11k | return op; | 2552 | 2.11k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const Line | Count | Source | 2549 | 2.45k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.45k | (void)parentDs; | 2551 | 2.45k | return op; | 2552 | 2.45k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const Line | Count | Source | 2549 | 2.38k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.38k | (void)parentDs; | 2551 | 2.38k | return op; | 2552 | 2.38k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const Line | Count | Source | 2549 | 2.09k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.09k | (void)parentDs; | 2551 | 2.09k | return op; | 2552 | 2.09k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const Line | Count | Source | 2549 | 3.01k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.01k | (void)parentDs; | 2551 | 3.01k | return op; | 2552 | 3.01k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const Line | Count | Source | 2549 | 2.11k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.11k | (void)parentDs; | 2551 | 2.11k | return op; | 2552 | 2.11k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const Line | Count | Source | 2549 | 2.27k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.27k | (void)parentDs; | 2551 | 2.27k | return op; | 2552 | 2.27k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const Line | Count | Source | 2549 | 2.16k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.16k | (void)parentDs; | 2551 | 2.16k | return op; | 2552 | 2.16k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const Line | Count | Source | 2549 | 2.40k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.40k | (void)parentDs; | 2551 | 2.40k | return op; | 2552 | 2.40k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const Line | Count | Source | 2549 | 2.32k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.32k | (void)parentDs; | 2551 | 2.32k | return op; | 2552 | 2.32k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const Line | Count | Source | 2549 | 2.19k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.19k | (void)parentDs; | 2551 | 2.19k | return op; | 2552 | 2.19k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const Line | Count | Source | 2549 | 1.96k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.96k | (void)parentDs; | 2551 | 1.96k | return op; | 2552 | 1.96k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const Line | Count | Source | 2549 | 2.22k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.22k | (void)parentDs; | 2551 | 2.22k | return op; | 2552 | 2.22k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const Line | Count | Source | 2549 | 2.61k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.61k | (void)parentDs; | 2551 | 2.61k | return op; | 2552 | 2.61k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const Line | Count | Source | 2549 | 1.95k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.95k | (void)parentDs; | 2551 | 1.95k | return op; | 2552 | 1.95k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const Line | Count | Source | 2549 | 2.13k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.13k | (void)parentDs; | 2551 | 2.13k | return op; | 2552 | 2.13k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const Line | Count | Source | 2549 | 1.54k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.54k | (void)parentDs; | 2551 | 1.54k | return op; | 2552 | 1.54k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const Line | Count | Source | 2549 | 2.18k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.18k | (void)parentDs; | 2551 | 2.18k | return op; | 2552 | 2.18k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const Line | Count | Source | 2549 | 2.18k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.18k | (void)parentDs; | 2551 | 2.18k | return op; | 2552 | 2.18k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const Line | Count | Source | 2549 | 2.23k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.23k | (void)parentDs; | 2551 | 2.23k | return op; | 2552 | 2.23k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const Line | Count | Source | 2549 | 2.27k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.27k | (void)parentDs; | 2551 | 2.27k | return op; | 2552 | 2.27k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const Line | Count | Source | 2549 | 2.52k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.52k | (void)parentDs; | 2551 | 2.52k | return op; | 2552 | 2.52k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const Line | Count | Source | 2549 | 1.67k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.67k | (void)parentDs; | 2551 | 1.67k | return op; | 2552 | 1.67k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const Line | Count | Source | 2549 | 1.77k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.77k | (void)parentDs; | 2551 | 1.77k | return op; | 2552 | 1.77k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const Line | Count | Source | 2549 | 2.70k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.70k | (void)parentDs; | 2551 | 2.70k | return op; | 2552 | 2.70k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const Line | Count | Source | 2549 | 1.55k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.55k | (void)parentDs; | 2551 | 1.55k | return op; | 2552 | 1.55k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const Line | Count | Source | 2549 | 1.63k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.63k | (void)parentDs; | 2551 | 1.63k | return op; | 2552 | 1.63k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const Line | Count | Source | 2549 | 1.84k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.84k | (void)parentDs; | 2551 | 1.84k | return op; | 2552 | 1.84k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const Line | Count | Source | 2549 | 2.18k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.18k | (void)parentDs; | 2551 | 2.18k | return op; | 2552 | 2.18k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const Line | Count | Source | 2549 | 2.78k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.78k | (void)parentDs; | 2551 | 2.78k | return op; | 2552 | 2.78k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const Line | Count | Source | 2549 | 7.09k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 7.09k | (void)parentDs; | 2551 | 7.09k | return op; | 2552 | 7.09k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const Line | Count | Source | 2549 | 2.19k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.19k | (void)parentDs; | 2551 | 2.19k | return op; | 2552 | 2.19k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const Line | Count | Source | 2549 | 2.24k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.24k | (void)parentDs; | 2551 | 2.24k | return op; | 2552 | 2.24k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const Line | Count | Source | 2549 | 1.49k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.49k | (void)parentDs; | 2551 | 1.49k | return op; | 2552 | 1.49k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const Line | Count | Source | 2549 | 1.45k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.45k | (void)parentDs; | 2551 | 1.45k | return op; | 2552 | 1.45k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const Line | Count | Source | 2549 | 2.19k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.19k | (void)parentDs; | 2551 | 2.19k | return op; | 2552 | 2.19k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const Line | Count | Source | 2549 | 2.34k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.34k | (void)parentDs; | 2551 | 2.34k | return op; | 2552 | 2.34k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const Line | Count | Source | 2549 | 2.20k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.20k | (void)parentDs; | 2551 | 2.20k | return op; | 2552 | 2.20k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const Line | Count | Source | 2549 | 2.01k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.01k | (void)parentDs; | 2551 | 2.01k | return op; | 2552 | 2.01k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const Line | Count | Source | 2549 | 1.64k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.64k | (void)parentDs; | 2551 | 1.64k | return op; | 2552 | 1.64k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const Line | Count | Source | 2549 | 1.92k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.92k | (void)parentDs; | 2551 | 1.92k | return op; | 2552 | 1.92k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const Line | Count | Source | 2549 | 1.40k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.40k | (void)parentDs; | 2551 | 1.40k | return op; | 2552 | 1.40k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const Line | Count | Source | 2549 | 1.71k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.71k | (void)parentDs; | 2551 | 1.71k | return op; | 2552 | 1.71k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const Line | Count | Source | 2549 | 1.82k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.82k | (void)parentDs; | 2551 | 1.82k | return op; | 2552 | 1.82k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const Line | Count | Source | 2549 | 1.72k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.72k | (void)parentDs; | 2551 | 1.72k | return op; | 2552 | 1.72k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const Line | Count | Source | 2549 | 2.26k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.26k | (void)parentDs; | 2551 | 2.26k | return op; | 2552 | 2.26k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const Line | Count | Source | 2549 | 2.45k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.45k | (void)parentDs; | 2551 | 2.45k | return op; | 2552 | 2.45k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const Line | Count | Source | 2549 | 1.30k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.30k | (void)parentDs; | 2551 | 1.30k | return op; | 2552 | 1.30k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const Line | Count | Source | 2549 | 1.42k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.42k | (void)parentDs; | 2551 | 1.42k | return op; | 2552 | 1.42k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const Line | Count | Source | 2549 | 1.86k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.86k | (void)parentDs; | 2551 | 1.86k | return op; | 2552 | 1.86k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const Line | Count | Source | 2549 | 2.60k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.60k | (void)parentDs; | 2551 | 2.60k | return op; | 2552 | 2.60k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const Line | Count | Source | 2549 | 1.30k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.30k | (void)parentDs; | 2551 | 1.30k | return op; | 2552 | 1.30k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const Line | Count | Source | 2549 | 1.29k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.29k | (void)parentDs; | 2551 | 1.29k | return op; | 2552 | 1.29k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const Line | Count | Source | 2549 | 1.29k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.29k | (void)parentDs; | 2551 | 1.29k | return op; | 2552 | 1.29k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const Line | Count | Source | 2549 | 1.95k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.95k | (void)parentDs; | 2551 | 1.95k | return op; | 2552 | 1.95k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const Line | Count | Source | 2549 | 2.05k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.05k | (void)parentDs; | 2551 | 2.05k | return op; | 2552 | 2.05k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const Line | Count | Source | 2549 | 2.01k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.01k | (void)parentDs; | 2551 | 2.01k | return op; | 2552 | 2.01k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const Line | Count | Source | 2549 | 1.84k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.84k | (void)parentDs; | 2551 | 1.84k | return op; | 2552 | 1.84k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const Line | Count | Source | 2549 | 1.03k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.03k | (void)parentDs; | 2551 | 1.03k | return op; | 2552 | 1.03k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const Line | Count | Source | 2549 | 2.33k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.33k | (void)parentDs; | 2551 | 2.33k | return op; | 2552 | 2.33k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const Line | Count | Source | 2549 | 2.15k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.15k | (void)parentDs; | 2551 | 2.15k | return op; | 2552 | 2.15k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const Line | Count | Source | 2549 | 2.42k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.42k | (void)parentDs; | 2551 | 2.42k | return op; | 2552 | 2.42k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const Line | Count | Source | 2549 | 1.61k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.61k | (void)parentDs; | 2551 | 1.61k | return op; | 2552 | 1.61k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const Line | Count | Source | 2549 | 2.22k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.22k | (void)parentDs; | 2551 | 2.22k | return op; | 2552 | 2.22k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const Line | Count | Source | 2549 | 1.04k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.04k | (void)parentDs; | 2551 | 1.04k | return op; | 2552 | 1.04k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const Line | Count | Source | 2549 | 2.51k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.51k | (void)parentDs; | 2551 | 2.51k | return op; | 2552 | 2.51k | } |
|
2553 | | |
2554 | 264 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2555 | 264 | (void)parentDs; |
2556 | 264 | op.modulo = modulo; |
2557 | 264 | return op; |
2558 | 264 | } |
2559 | | |
2560 | 557 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2561 | 557 | (void)parentDs; |
2562 | 557 | op.modulo = modulo; |
2563 | 557 | return op; |
2564 | 557 | } |
2565 | | |
2566 | 218 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2567 | 218 | (void)parentDs; |
2568 | 218 | op.modulo = modulo; |
2569 | 218 | return op; |
2570 | 218 | } |
2571 | | |
2572 | 431 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2573 | 431 | (void)parentDs; |
2574 | 431 | op.modulo = modulo; |
2575 | 431 | return op; |
2576 | 431 | } |
2577 | | |
2578 | 229 | operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2579 | 229 | (void)parentDs; |
2580 | 229 | op.modulo = modulo; |
2581 | 229 | return op; |
2582 | 229 | } |
2583 | | |
2584 | 261 | operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2585 | 261 | (void)parentDs; |
2586 | 261 | op.modulo = modulo; |
2587 | 261 | return op; |
2588 | 261 | } |
2589 | | |
2590 | 445 | operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2591 | 445 | (void)parentDs; |
2592 | 445 | op.modulo = modulo; |
2593 | 445 | return op; |
2594 | 445 | } |
2595 | | |
2596 | 247 | operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2597 | 247 | (void)parentDs; |
2598 | 247 | op.modulo = modulo; |
2599 | 247 | return op; |
2600 | 247 | } |
2601 | | |
2602 | 298 | operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2603 | 298 | (void)parentDs; |
2604 | 298 | op.modulo = modulo; |
2605 | 298 | return op; |
2606 | 298 | } |
2607 | | |
2608 | 352 | operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2609 | 352 | (void)parentDs; |
2610 | 352 | op.modulo = modulo; |
2611 | 352 | return op; |
2612 | 352 | } |
2613 | | |
2614 | 249 | operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2615 | 249 | (void)parentDs; |
2616 | 249 | op.modulo = modulo; |
2617 | 249 | return op; |
2618 | 249 | } |
2619 | | |
2620 | 486 | operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2621 | 486 | (void)parentDs; |
2622 | 486 | op.modulo = modulo; |
2623 | 486 | return op; |
2624 | 486 | } |
2625 | | |
2626 | 321 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2627 | 321 | (void)parentDs; |
2628 | 321 | op.modulo = modulo; |
2629 | 321 | return op; |
2630 | 321 | } |
2631 | | |
2632 | 218 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2633 | 218 | (void)parentDs; |
2634 | 218 | op.modulo = modulo; |
2635 | 218 | return op; |
2636 | 218 | } |
2637 | | |
2638 | 375 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2639 | 375 | (void)parentDs; |
2640 | 375 | op.modulo = modulo; |
2641 | 375 | return op; |
2642 | 375 | } |
2643 | | |
2644 | 300 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2645 | 300 | (void)parentDs; |
2646 | 300 | op.modulo = modulo; |
2647 | 300 | return op; |
2648 | 300 | } |
2649 | | |
2650 | 231 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2651 | 231 | (void)parentDs; |
2652 | 231 | op.modulo = modulo; |
2653 | 231 | return op; |
2654 | 231 | } |
2655 | | |
2656 | 491 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2657 | 491 | (void)parentDs; |
2658 | 491 | op.modulo = modulo; |
2659 | 491 | return op; |
2660 | 491 | } |
2661 | | |
2662 | 282 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2663 | 282 | (void)parentDs; |
2664 | 282 | op.modulo = modulo; |
2665 | 282 | return op; |
2666 | 282 | } |
2667 | | |
2668 | 400 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2669 | 400 | (void)parentDs; |
2670 | 400 | op.modulo = modulo; |
2671 | 400 | return op; |
2672 | 400 | } |
2673 | | |
2674 | 347 | operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2675 | 347 | (void)parentDs; |
2676 | 347 | op.modulo = modulo; |
2677 | 347 | return op; |
2678 | 347 | } |
2679 | | |
2680 | 256 | operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2681 | 256 | (void)parentDs; |
2682 | 256 | op.modulo = modulo; |
2683 | 256 | return op; |
2684 | 256 | } |
2685 | | |
2686 | | template <class ResultType, class OperationType> |
2687 | 228k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { |
2688 | 228k | Datasource ds(data, size); |
2689 | 228k | if ( parentDs != nullptr ) { |
2690 | 228k | auto modifier = parentDs->GetData(0); |
2691 | 228k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); |
2692 | 228k | } else { |
2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); |
2694 | 0 | } |
2695 | 228k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.86k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.86k | Datasource ds(data, size); | 2689 | 4.86k | if ( parentDs != nullptr ) { | 2690 | 4.86k | auto modifier = parentDs->GetData(0); | 2691 | 4.86k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.86k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.86k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.76k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.76k | Datasource ds(data, size); | 2689 | 3.76k | if ( parentDs != nullptr ) { | 2690 | 3.76k | auto modifier = parentDs->GetData(0); | 2691 | 3.76k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.76k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.76k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.13k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.13k | Datasource ds(data, size); | 2689 | 5.13k | if ( parentDs != nullptr ) { | 2690 | 5.13k | auto modifier = parentDs->GetData(0); | 2691 | 5.13k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.13k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.13k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.46k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.46k | Datasource ds(data, size); | 2689 | 5.46k | if ( parentDs != nullptr ) { | 2690 | 5.46k | auto modifier = parentDs->GetData(0); | 2691 | 5.46k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.46k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.46k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 14.8k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 14.8k | Datasource ds(data, size); | 2689 | 14.8k | if ( parentDs != nullptr ) { | 2690 | 14.8k | auto modifier = parentDs->GetData(0); | 2691 | 14.8k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 14.8k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 14.8k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 9.89k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 9.89k | Datasource ds(data, size); | 2689 | 9.89k | if ( parentDs != nullptr ) { | 2690 | 9.89k | auto modifier = parentDs->GetData(0); | 2691 | 9.89k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 9.89k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 9.89k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.48k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.48k | Datasource ds(data, size); | 2689 | 2.48k | if ( parentDs != nullptr ) { | 2690 | 2.48k | auto modifier = parentDs->GetData(0); | 2691 | 2.48k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.48k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.48k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 6.98k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 6.98k | Datasource ds(data, size); | 2689 | 6.98k | if ( parentDs != nullptr ) { | 2690 | 6.98k | auto modifier = parentDs->GetData(0); | 2691 | 6.98k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 6.98k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 6.98k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.76k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.76k | Datasource ds(data, size); | 2689 | 2.76k | if ( parentDs != nullptr ) { | 2690 | 2.76k | auto modifier = parentDs->GetData(0); | 2691 | 2.76k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.76k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.76k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.12k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.12k | Datasource ds(data, size); | 2689 | 2.12k | if ( parentDs != nullptr ) { | 2690 | 2.12k | auto modifier = parentDs->GetData(0); | 2691 | 2.12k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.12k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.12k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.56k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.56k | Datasource ds(data, size); | 2689 | 2.56k | if ( parentDs != nullptr ) { | 2690 | 2.56k | auto modifier = parentDs->GetData(0); | 2691 | 2.56k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.56k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.56k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.45k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.45k | Datasource ds(data, size); | 2689 | 3.45k | if ( parentDs != nullptr ) { | 2690 | 3.45k | auto modifier = parentDs->GetData(0); | 2691 | 3.45k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.45k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.45k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.42k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.42k | Datasource ds(data, size); | 2689 | 2.42k | if ( parentDs != nullptr ) { | 2690 | 2.42k | auto modifier = parentDs->GetData(0); | 2691 | 2.42k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.42k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.42k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.22k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.22k | Datasource ds(data, size); | 2689 | 2.22k | if ( parentDs != nullptr ) { | 2690 | 2.22k | auto modifier = parentDs->GetData(0); | 2691 | 2.22k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.22k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.22k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.39k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.39k | Datasource ds(data, size); | 2689 | 2.39k | if ( parentDs != nullptr ) { | 2690 | 2.39k | auto modifier = parentDs->GetData(0); | 2691 | 2.39k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.39k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.39k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.56k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.56k | Datasource ds(data, size); | 2689 | 2.56k | if ( parentDs != nullptr ) { | 2690 | 2.56k | auto modifier = parentDs->GetData(0); | 2691 | 2.56k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.56k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.56k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.46k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.46k | Datasource ds(data, size); | 2689 | 3.46k | if ( parentDs != nullptr ) { | 2690 | 3.46k | auto modifier = parentDs->GetData(0); | 2691 | 3.46k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.46k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.46k | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.95k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.95k | Datasource ds(data, size); | 2689 | 1.95k | if ( parentDs != nullptr ) { | 2690 | 1.95k | auto modifier = parentDs->GetData(0); | 2691 | 1.95k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.95k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.95k | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.33k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.33k | Datasource ds(data, size); | 2689 | 2.33k | if ( parentDs != nullptr ) { | 2690 | 2.33k | auto modifier = parentDs->GetData(0); | 2691 | 2.33k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.33k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.33k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.13k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.13k | Datasource ds(data, size); | 2689 | 2.13k | if ( parentDs != nullptr ) { | 2690 | 2.13k | auto modifier = parentDs->GetData(0); | 2691 | 2.13k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.13k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.13k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.46k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.46k | Datasource ds(data, size); | 2689 | 2.46k | if ( parentDs != nullptr ) { | 2690 | 2.46k | auto modifier = parentDs->GetData(0); | 2691 | 2.46k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.46k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.46k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.40k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.40k | Datasource ds(data, size); | 2689 | 2.40k | if ( parentDs != nullptr ) { | 2690 | 2.40k | auto modifier = parentDs->GetData(0); | 2691 | 2.40k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.40k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.40k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.12k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.12k | Datasource ds(data, size); | 2689 | 2.12k | if ( parentDs != nullptr ) { | 2690 | 2.12k | auto modifier = parentDs->GetData(0); | 2691 | 2.12k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.12k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.12k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.02k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.02k | Datasource ds(data, size); | 2689 | 3.02k | if ( parentDs != nullptr ) { | 2690 | 3.02k | auto modifier = parentDs->GetData(0); | 2691 | 3.02k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.02k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.02k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.14k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.14k | Datasource ds(data, size); | 2689 | 2.14k | if ( parentDs != nullptr ) { | 2690 | 2.14k | auto modifier = parentDs->GetData(0); | 2691 | 2.14k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.14k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.14k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.30k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.30k | Datasource ds(data, size); | 2689 | 2.30k | if ( parentDs != nullptr ) { | 2690 | 2.30k | auto modifier = parentDs->GetData(0); | 2691 | 2.30k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.30k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.30k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.18k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.18k | Datasource ds(data, size); | 2689 | 2.18k | if ( parentDs != nullptr ) { | 2690 | 2.18k | auto modifier = parentDs->GetData(0); | 2691 | 2.18k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.18k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.18k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.43k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.43k | Datasource ds(data, size); | 2689 | 2.43k | if ( parentDs != nullptr ) { | 2690 | 2.43k | auto modifier = parentDs->GetData(0); | 2691 | 2.43k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.43k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.43k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.34k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.34k | Datasource ds(data, size); | 2689 | 2.34k | if ( parentDs != nullptr ) { | 2690 | 2.34k | auto modifier = parentDs->GetData(0); | 2691 | 2.34k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.34k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.34k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.21k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.21k | Datasource ds(data, size); | 2689 | 2.21k | if ( parentDs != nullptr ) { | 2690 | 2.21k | auto modifier = parentDs->GetData(0); | 2691 | 2.21k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.21k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.21k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.98k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.98k | Datasource ds(data, size); | 2689 | 1.98k | if ( parentDs != nullptr ) { | 2690 | 1.98k | auto modifier = parentDs->GetData(0); | 2691 | 1.98k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.98k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.98k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.24k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.24k | Datasource ds(data, size); | 2689 | 2.24k | if ( parentDs != nullptr ) { | 2690 | 2.24k | auto modifier = parentDs->GetData(0); | 2691 | 2.24k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.24k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.24k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.63k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.63k | Datasource ds(data, size); | 2689 | 2.63k | if ( parentDs != nullptr ) { | 2690 | 2.63k | auto modifier = parentDs->GetData(0); | 2691 | 2.63k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.63k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.63k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.97k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.97k | Datasource ds(data, size); | 2689 | 1.97k | if ( parentDs != nullptr ) { | 2690 | 1.97k | auto modifier = parentDs->GetData(0); | 2691 | 1.97k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.97k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.97k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.15k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.15k | Datasource ds(data, size); | 2689 | 2.15k | if ( parentDs != nullptr ) { | 2690 | 2.15k | auto modifier = parentDs->GetData(0); | 2691 | 2.15k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.15k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.15k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.56k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.56k | Datasource ds(data, size); | 2689 | 1.56k | if ( parentDs != nullptr ) { | 2690 | 1.56k | auto modifier = parentDs->GetData(0); | 2691 | 1.56k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.56k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.56k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.20k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.20k | Datasource ds(data, size); | 2689 | 2.20k | if ( parentDs != nullptr ) { | 2690 | 2.20k | auto modifier = parentDs->GetData(0); | 2691 | 2.20k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.20k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.20k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.20k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.20k | Datasource ds(data, size); | 2689 | 2.20k | if ( parentDs != nullptr ) { | 2690 | 2.20k | auto modifier = parentDs->GetData(0); | 2691 | 2.20k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.20k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.20k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.26k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.26k | Datasource ds(data, size); | 2689 | 2.26k | if ( parentDs != nullptr ) { | 2690 | 2.26k | auto modifier = parentDs->GetData(0); | 2691 | 2.26k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.26k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.26k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.29k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.29k | Datasource ds(data, size); | 2689 | 2.29k | if ( parentDs != nullptr ) { | 2690 | 2.29k | auto modifier = parentDs->GetData(0); | 2691 | 2.29k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.29k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.29k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.54k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.54k | Datasource ds(data, size); | 2689 | 2.54k | if ( parentDs != nullptr ) { | 2690 | 2.54k | auto modifier = parentDs->GetData(0); | 2691 | 2.54k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.54k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.54k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.69k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.69k | Datasource ds(data, size); | 2689 | 1.69k | if ( parentDs != nullptr ) { | 2690 | 1.69k | auto modifier = parentDs->GetData(0); | 2691 | 1.69k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.69k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.69k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.80k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.80k | Datasource ds(data, size); | 2689 | 1.80k | if ( parentDs != nullptr ) { | 2690 | 1.80k | auto modifier = parentDs->GetData(0); | 2691 | 1.80k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.80k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.80k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.72k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.72k | Datasource ds(data, size); | 2689 | 2.72k | if ( parentDs != nullptr ) { | 2690 | 2.72k | auto modifier = parentDs->GetData(0); | 2691 | 2.72k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.72k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.72k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.56k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.56k | Datasource ds(data, size); | 2689 | 1.56k | if ( parentDs != nullptr ) { | 2690 | 1.56k | auto modifier = parentDs->GetData(0); | 2691 | 1.56k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.56k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.56k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.65k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.65k | Datasource ds(data, size); | 2689 | 1.65k | if ( parentDs != nullptr ) { | 2690 | 1.65k | auto modifier = parentDs->GetData(0); | 2691 | 1.65k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.65k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.65k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.85k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.85k | Datasource ds(data, size); | 2689 | 1.85k | if ( parentDs != nullptr ) { | 2690 | 1.85k | auto modifier = parentDs->GetData(0); | 2691 | 1.85k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.85k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.85k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.22k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.22k | Datasource ds(data, size); | 2689 | 2.22k | if ( parentDs != nullptr ) { | 2690 | 2.22k | auto modifier = parentDs->GetData(0); | 2691 | 2.22k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.22k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.22k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.80k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.80k | Datasource ds(data, size); | 2689 | 2.80k | if ( parentDs != nullptr ) { | 2690 | 2.80k | auto modifier = parentDs->GetData(0); | 2691 | 2.80k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.80k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.80k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 14.4k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 14.4k | Datasource ds(data, size); | 2689 | 14.4k | if ( parentDs != nullptr ) { | 2690 | 14.4k | auto modifier = parentDs->GetData(0); | 2691 | 14.4k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 14.4k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 14.4k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.22k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.22k | Datasource ds(data, size); | 2689 | 2.22k | if ( parentDs != nullptr ) { | 2690 | 2.22k | auto modifier = parentDs->GetData(0); | 2691 | 2.22k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.22k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.22k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.28k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.28k | Datasource ds(data, size); | 2689 | 2.28k | if ( parentDs != nullptr ) { | 2690 | 2.28k | auto modifier = parentDs->GetData(0); | 2691 | 2.28k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.28k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.28k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.52k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.52k | Datasource ds(data, size); | 2689 | 1.52k | if ( parentDs != nullptr ) { | 2690 | 1.52k | auto modifier = parentDs->GetData(0); | 2691 | 1.52k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.52k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.52k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.47k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.47k | Datasource ds(data, size); | 2689 | 1.47k | if ( parentDs != nullptr ) { | 2690 | 1.47k | auto modifier = parentDs->GetData(0); | 2691 | 1.47k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.47k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.47k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.22k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.22k | Datasource ds(data, size); | 2689 | 2.22k | if ( parentDs != nullptr ) { | 2690 | 2.22k | auto modifier = parentDs->GetData(0); | 2691 | 2.22k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.22k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.22k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.37k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.37k | Datasource ds(data, size); | 2689 | 2.37k | if ( parentDs != nullptr ) { | 2690 | 2.37k | auto modifier = parentDs->GetData(0); | 2691 | 2.37k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.37k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.37k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.24k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.24k | Datasource ds(data, size); | 2689 | 2.24k | if ( parentDs != nullptr ) { | 2690 | 2.24k | auto modifier = parentDs->GetData(0); | 2691 | 2.24k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.24k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.24k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.07k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.07k | Datasource ds(data, size); | 2689 | 2.07k | if ( parentDs != nullptr ) { | 2690 | 2.07k | auto modifier = parentDs->GetData(0); | 2691 | 2.07k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.07k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.07k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.69k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.69k | Datasource ds(data, size); | 2689 | 1.69k | if ( parentDs != nullptr ) { | 2690 | 1.69k | auto modifier = parentDs->GetData(0); | 2691 | 1.69k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.69k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.69k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.96k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.96k | Datasource ds(data, size); | 2689 | 1.96k | if ( parentDs != nullptr ) { | 2690 | 1.96k | auto modifier = parentDs->GetData(0); | 2691 | 1.96k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.96k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.96k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.43k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.43k | Datasource ds(data, size); | 2689 | 1.43k | if ( parentDs != nullptr ) { | 2690 | 1.43k | auto modifier = parentDs->GetData(0); | 2691 | 1.43k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.43k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.43k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.73k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.73k | Datasource ds(data, size); | 2689 | 1.73k | if ( parentDs != nullptr ) { | 2690 | 1.73k | auto modifier = parentDs->GetData(0); | 2691 | 1.73k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.73k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.73k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.86k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.86k | Datasource ds(data, size); | 2689 | 1.86k | if ( parentDs != nullptr ) { | 2690 | 1.86k | auto modifier = parentDs->GetData(0); | 2691 | 1.86k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.86k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.86k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.74k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.74k | Datasource ds(data, size); | 2689 | 1.74k | if ( parentDs != nullptr ) { | 2690 | 1.74k | auto modifier = parentDs->GetData(0); | 2691 | 1.74k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.74k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.74k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.28k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.28k | Datasource ds(data, size); | 2689 | 2.28k | if ( parentDs != nullptr ) { | 2690 | 2.28k | auto modifier = parentDs->GetData(0); | 2691 | 2.28k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.28k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.28k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.48k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.48k | Datasource ds(data, size); | 2689 | 2.48k | if ( parentDs != nullptr ) { | 2690 | 2.48k | auto modifier = parentDs->GetData(0); | 2691 | 2.48k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.48k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.48k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.31k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.31k | Datasource ds(data, size); | 2689 | 1.31k | if ( parentDs != nullptr ) { | 2690 | 1.31k | auto modifier = parentDs->GetData(0); | 2691 | 1.31k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.31k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.31k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.44k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.44k | Datasource ds(data, size); | 2689 | 1.44k | if ( parentDs != nullptr ) { | 2690 | 1.44k | auto modifier = parentDs->GetData(0); | 2691 | 1.44k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.44k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.44k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.88k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.88k | Datasource ds(data, size); | 2689 | 1.88k | if ( parentDs != nullptr ) { | 2690 | 1.88k | auto modifier = parentDs->GetData(0); | 2691 | 1.88k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.88k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.88k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.63k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.63k | Datasource ds(data, size); | 2689 | 2.63k | if ( parentDs != nullptr ) { | 2690 | 2.63k | auto modifier = parentDs->GetData(0); | 2691 | 2.63k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.63k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.63k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.32k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.32k | Datasource ds(data, size); | 2689 | 1.32k | if ( parentDs != nullptr ) { | 2690 | 1.32k | auto modifier = parentDs->GetData(0); | 2691 | 1.32k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.32k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.32k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.31k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.31k | Datasource ds(data, size); | 2689 | 1.31k | if ( parentDs != nullptr ) { | 2690 | 1.31k | auto modifier = parentDs->GetData(0); | 2691 | 1.31k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.31k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.31k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.30k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.30k | Datasource ds(data, size); | 2689 | 1.30k | if ( parentDs != nullptr ) { | 2690 | 1.30k | auto modifier = parentDs->GetData(0); | 2691 | 1.30k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.30k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.30k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.99k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.99k | Datasource ds(data, size); | 2689 | 1.99k | if ( parentDs != nullptr ) { | 2690 | 1.99k | auto modifier = parentDs->GetData(0); | 2691 | 1.99k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.99k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.99k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.08k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.08k | Datasource ds(data, size); | 2689 | 2.08k | if ( parentDs != nullptr ) { | 2690 | 2.08k | auto modifier = parentDs->GetData(0); | 2691 | 2.08k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.08k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.08k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.03k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.03k | Datasource ds(data, size); | 2689 | 2.03k | if ( parentDs != nullptr ) { | 2690 | 2.03k | auto modifier = parentDs->GetData(0); | 2691 | 2.03k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.03k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.03k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.85k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.85k | Datasource ds(data, size); | 2689 | 1.85k | if ( parentDs != nullptr ) { | 2690 | 1.85k | auto modifier = parentDs->GetData(0); | 2691 | 1.85k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.85k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.85k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.04k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.04k | Datasource ds(data, size); | 2689 | 1.04k | if ( parentDs != nullptr ) { | 2690 | 1.04k | auto modifier = parentDs->GetData(0); | 2691 | 1.04k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.04k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.04k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.36k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.36k | Datasource ds(data, size); | 2689 | 2.36k | if ( parentDs != nullptr ) { | 2690 | 2.36k | auto modifier = parentDs->GetData(0); | 2691 | 2.36k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.36k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.36k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.17k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.17k | Datasource ds(data, size); | 2689 | 2.17k | if ( parentDs != nullptr ) { | 2690 | 2.17k | auto modifier = parentDs->GetData(0); | 2691 | 2.17k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.17k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.17k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.44k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.44k | Datasource ds(data, size); | 2689 | 2.44k | if ( parentDs != nullptr ) { | 2690 | 2.44k | auto modifier = parentDs->GetData(0); | 2691 | 2.44k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.44k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.44k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.63k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.63k | Datasource ds(data, size); | 2689 | 1.63k | if ( parentDs != nullptr ) { | 2690 | 1.63k | auto modifier = parentDs->GetData(0); | 2691 | 1.63k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.63k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.63k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.28k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.28k | Datasource ds(data, size); | 2689 | 2.28k | if ( parentDs != nullptr ) { | 2690 | 2.28k | auto modifier = parentDs->GetData(0); | 2691 | 2.28k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.28k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.28k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.06k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.06k | Datasource ds(data, size); | 2689 | 1.06k | if ( parentDs != nullptr ) { | 2690 | 1.06k | auto modifier = parentDs->GetData(0); | 2691 | 1.06k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.06k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.06k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.54k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.54k | Datasource ds(data, size); | 2689 | 2.54k | if ( parentDs != nullptr ) { | 2690 | 2.54k | auto modifier = parentDs->GetData(0); | 2691 | 2.54k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.54k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.54k | } |
|
2696 | | |
2697 | | template <class ResultType, class OperationType> |
2698 | 226k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { |
2699 | 226k | auto moduleID = ds.Get<uint64_t>(); |
2700 | | |
2701 | | /* Override the extracted module ID with the preferred one, if specified */ |
2702 | 226k | if ( options.forceModule != std::nullopt ) { |
2703 | 0 | moduleID = *options.forceModule; |
2704 | 0 | } |
2705 | | |
2706 | | /* Skip if this is a disabled module */ |
2707 | 226k | if ( options.disableModules.HaveExplicit(moduleID) ) { |
2708 | 0 | return nullptr; |
2709 | 0 | } |
2710 | | |
2711 | 226k | if ( modules.find(moduleID) == modules.end() ) { |
2712 | 170k | return nullptr; |
2713 | 170k | } |
2714 | | |
2715 | 56.3k | return modules.at(moduleID); |
2716 | 226k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.84k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.84k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.84k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.84k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.84k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.95k | return nullptr; | 2713 | 1.95k | } | 2714 | | | 2715 | 2.88k | return modules.at(moduleID); | 2716 | 4.84k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.73k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.73k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.73k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.73k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.73k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.42k | return nullptr; | 2713 | 2.42k | } | 2714 | | | 2715 | 1.31k | return modules.at(moduleID); | 2716 | 3.73k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 5.10k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 5.10k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 5.10k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 5.10k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 5.10k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.72k | return nullptr; | 2713 | 2.72k | } | 2714 | | | 2715 | 2.37k | return modules.at(moduleID); | 2716 | 5.10k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 5.44k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 5.44k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 5.44k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 5.44k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 5.44k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.16k | return nullptr; | 2713 | 3.16k | } | 2714 | | | 2715 | 2.27k | return modules.at(moduleID); | 2716 | 5.44k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 14.8k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 14.8k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 14.8k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 14.8k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 14.8k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 6.18k | return nullptr; | 2713 | 6.18k | } | 2714 | | | 2715 | 8.67k | return modules.at(moduleID); | 2716 | 14.8k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 9.86k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 9.86k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 9.86k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 9.86k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 9.86k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.78k | return nullptr; | 2713 | 3.78k | } | 2714 | | | 2715 | 6.08k | return modules.at(moduleID); | 2716 | 9.86k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.45k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.45k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.45k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.45k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.45k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.76k | return nullptr; | 2713 | 1.76k | } | 2714 | | | 2715 | 692 | return modules.at(moduleID); | 2716 | 2.45k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 6.94k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 6.94k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 6.94k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 6.94k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 6.94k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.51k | return nullptr; | 2713 | 3.51k | } | 2714 | | | 2715 | 3.43k | return modules.at(moduleID); | 2716 | 6.94k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.73k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.73k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.73k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.73k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.73k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.22k | return nullptr; | 2713 | 2.22k | } | 2714 | | | 2715 | 509 | return modules.at(moduleID); | 2716 | 2.73k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.10k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.10k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.10k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.10k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.10k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.72k | return nullptr; | 2713 | 1.72k | } | 2714 | | | 2715 | 383 | return modules.at(moduleID); | 2716 | 2.10k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.52k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.52k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.52k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.52k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.52k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.00k | return nullptr; | 2713 | 2.00k | } | 2714 | | | 2715 | 519 | return modules.at(moduleID); | 2716 | 2.52k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.43k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.43k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.43k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.43k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.43k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.06k | return nullptr; | 2713 | 2.06k | } | 2714 | | | 2715 | 1.37k | return modules.at(moduleID); | 2716 | 3.43k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.40k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.40k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.40k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.40k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.40k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.95k | return nullptr; | 2713 | 1.95k | } | 2714 | | | 2715 | 448 | return modules.at(moduleID); | 2716 | 2.40k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.20k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.20k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.20k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.20k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.20k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.81k | return nullptr; | 2713 | 1.81k | } | 2714 | | | 2715 | 383 | return modules.at(moduleID); | 2716 | 2.20k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.37k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.37k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.37k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.37k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.37k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.81k | return nullptr; | 2713 | 1.81k | } | 2714 | | | 2715 | 566 | return modules.at(moduleID); | 2716 | 2.37k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.54k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.54k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.54k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.54k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.54k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.46k | return nullptr; | 2713 | 2.46k | } | 2714 | | | 2715 | 82 | return modules.at(moduleID); | 2716 | 2.54k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.44k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.44k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.44k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.44k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.44k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.30k | return nullptr; | 2713 | 2.30k | } | 2714 | | | 2715 | 1.13k | return modules.at(moduleID); | 2716 | 3.44k | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.93k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.93k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.93k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.93k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.93k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.47k | return nullptr; | 2713 | 1.47k | } | 2714 | | | 2715 | 456 | return modules.at(moduleID); | 2716 | 1.93k | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.31k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.31k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.31k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.31k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.31k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.91k | return nullptr; | 2713 | 1.91k | } | 2714 | | | 2715 | 398 | return modules.at(moduleID); | 2716 | 2.31k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.11k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.11k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.11k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.11k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.11k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.41k | return nullptr; | 2713 | 1.41k | } | 2714 | | | 2715 | 694 | return modules.at(moduleID); | 2716 | 2.11k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.45k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.45k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.45k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.45k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.45k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.65k | return nullptr; | 2713 | 1.65k | } | 2714 | | | 2715 | 802 | return modules.at(moduleID); | 2716 | 2.45k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.38k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.38k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.38k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.38k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.38k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.51k | return nullptr; | 2713 | 1.51k | } | 2714 | | | 2715 | 872 | return modules.at(moduleID); | 2716 | 2.38k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.09k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.09k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.09k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.09k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.09k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.95k | return nullptr; | 2713 | 1.95k | } | 2714 | | | 2715 | 141 | return modules.at(moduleID); | 2716 | 2.09k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.01k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.01k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.01k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.01k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.01k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.05k | return nullptr; | 2713 | 2.05k | } | 2714 | | | 2715 | 964 | return modules.at(moduleID); | 2716 | 3.01k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.11k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.11k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.11k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.11k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.11k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.89k | return nullptr; | 2713 | 1.89k | } | 2714 | | | 2715 | 225 | return modules.at(moduleID); | 2716 | 2.11k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.27k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.27k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.27k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.27k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.27k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.13k | return nullptr; | 2713 | 2.13k | } | 2714 | | | 2715 | 138 | return modules.at(moduleID); | 2716 | 2.27k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.16k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.16k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.16k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.16k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.16k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.03k | return nullptr; | 2713 | 2.03k | } | 2714 | | | 2715 | 128 | return modules.at(moduleID); | 2716 | 2.16k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.40k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.40k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.40k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.40k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.40k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.24k | return nullptr; | 2713 | 2.24k | } | 2714 | | | 2715 | 159 | return modules.at(moduleID); | 2716 | 2.40k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.32k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.32k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.32k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.32k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.32k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.75k | return nullptr; | 2713 | 1.75k | } | 2714 | | | 2715 | 569 | return modules.at(moduleID); | 2716 | 2.32k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.19k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.19k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.19k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.19k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.19k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.92k | return nullptr; | 2713 | 1.92k | } | 2714 | | | 2715 | 267 | return modules.at(moduleID); | 2716 | 2.19k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.96k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.96k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.96k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.96k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.96k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.84k | return nullptr; | 2713 | 1.84k | } | 2714 | | | 2715 | 116 | return modules.at(moduleID); | 2716 | 1.96k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.22k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.22k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.22k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.22k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.22k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.07k | return nullptr; | 2713 | 2.07k | } | 2714 | | | 2715 | 151 | return modules.at(moduleID); | 2716 | 2.22k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.61k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.61k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.61k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.61k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.61k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.01k | return nullptr; | 2713 | 2.01k | } | 2714 | | | 2715 | 599 | return modules.at(moduleID); | 2716 | 2.61k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.95k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.95k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.95k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.95k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.95k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.56k | return nullptr; | 2713 | 1.56k | } | 2714 | | | 2715 | 393 | return modules.at(moduleID); | 2716 | 1.95k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.13k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.13k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.13k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.13k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.13k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.98k | return nullptr; | 2713 | 1.98k | } | 2714 | | | 2715 | 151 | return modules.at(moduleID); | 2716 | 2.13k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.54k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.54k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.54k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.54k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.54k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.38k | return nullptr; | 2713 | 1.38k | } | 2714 | | | 2715 | 154 | return modules.at(moduleID); | 2716 | 1.54k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.18k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.18k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.18k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.18k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.18k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.03k | return nullptr; | 2713 | 2.03k | } | 2714 | | | 2715 | 146 | return modules.at(moduleID); | 2716 | 2.18k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.18k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.18k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.18k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.18k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.18k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.01k | return nullptr; | 2713 | 2.01k | } | 2714 | | | 2715 | 164 | return modules.at(moduleID); | 2716 | 2.18k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.23k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.23k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.23k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.23k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.23k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.07k | return nullptr; | 2713 | 2.07k | } | 2714 | | | 2715 | 162 | return modules.at(moduleID); | 2716 | 2.23k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.27k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.27k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.27k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.27k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.27k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.09k | return nullptr; | 2713 | 2.09k | } | 2714 | | | 2715 | 178 | return modules.at(moduleID); | 2716 | 2.27k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.52k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.52k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.52k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.52k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.52k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.35k | return nullptr; | 2713 | 2.35k | } | 2714 | | | 2715 | 169 | return modules.at(moduleID); | 2716 | 2.52k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.67k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.67k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.67k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.67k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.67k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.44k | return nullptr; | 2713 | 1.44k | } | 2714 | | | 2715 | 223 | return modules.at(moduleID); | 2716 | 1.67k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.77k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.77k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.77k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.77k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.77k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.51k | return nullptr; | 2713 | 1.51k | } | 2714 | | | 2715 | 264 | return modules.at(moduleID); | 2716 | 1.77k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.70k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.70k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.70k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.70k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.70k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.28k | return nullptr; | 2713 | 2.28k | } | 2714 | | | 2715 | 414 | return modules.at(moduleID); | 2716 | 2.70k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.55k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.55k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.55k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.55k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.55k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.36k | return nullptr; | 2713 | 1.36k | } | 2714 | | | 2715 | 188 | return modules.at(moduleID); | 2716 | 1.55k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.63k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.63k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.63k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.63k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.63k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.45k | return nullptr; | 2713 | 1.45k | } | 2714 | | | 2715 | 189 | return modules.at(moduleID); | 2716 | 1.63k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.84k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.84k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.84k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.84k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.84k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.64k | return nullptr; | 2713 | 1.64k | } | 2714 | | | 2715 | 199 | return modules.at(moduleID); | 2716 | 1.84k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.18k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.18k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.18k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.18k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.18k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.03k | return nullptr; | 2713 | 2.03k | } | 2714 | | | 2715 | 149 | return modules.at(moduleID); | 2716 | 2.18k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.78k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.78k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.78k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.78k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.78k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.36k | return nullptr; | 2713 | 2.36k | } | 2714 | | | 2715 | 412 | return modules.at(moduleID); | 2716 | 2.78k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 14.3k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 14.3k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 14.3k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 14.3k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 14.3k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 7.49k | return nullptr; | 2713 | 7.49k | } | 2714 | | | 2715 | 6.86k | return modules.at(moduleID); | 2716 | 14.3k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.19k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.19k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.19k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.19k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.19k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.02k | return nullptr; | 2713 | 2.02k | } | 2714 | | | 2715 | 172 | return modules.at(moduleID); | 2716 | 2.19k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.24k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.24k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.24k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.24k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.24k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.75k | return nullptr; | 2713 | 1.75k | } | 2714 | | | 2715 | 494 | return modules.at(moduleID); | 2716 | 2.24k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.49k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.49k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.49k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.49k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.49k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.34k | return nullptr; | 2713 | 1.34k | } | 2714 | | | 2715 | 155 | return modules.at(moduleID); | 2716 | 1.49k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.45k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.45k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.45k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.45k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.45k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.30k | return nullptr; | 2713 | 1.30k | } | 2714 | | | 2715 | 146 | return modules.at(moduleID); | 2716 | 1.45k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.19k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.19k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.19k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.19k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.19k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.02k | return nullptr; | 2713 | 2.02k | } | 2714 | | | 2715 | 164 | return modules.at(moduleID); | 2716 | 2.19k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.34k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.34k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.34k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.34k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.34k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.19k | return nullptr; | 2713 | 2.19k | } | 2714 | | | 2715 | 151 | return modules.at(moduleID); | 2716 | 2.34k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.20k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.20k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.20k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.20k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.20k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.01k | return nullptr; | 2713 | 2.01k | } | 2714 | | | 2715 | 185 | return modules.at(moduleID); | 2716 | 2.20k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.01k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.01k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.01k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.01k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.01k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.80k | return nullptr; | 2713 | 1.80k | } | 2714 | | | 2715 | 211 | return modules.at(moduleID); | 2716 | 2.01k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.64k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.64k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.64k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.64k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.64k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.49k | return nullptr; | 2713 | 1.49k | } | 2714 | | | 2715 | 148 | return modules.at(moduleID); | 2716 | 1.64k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.92k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.92k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.92k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.92k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.92k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.75k | return nullptr; | 2713 | 1.75k | } | 2714 | | | 2715 | 171 | return modules.at(moduleID); | 2716 | 1.92k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.40k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.40k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.40k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.40k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.40k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.27k | return nullptr; | 2713 | 1.27k | } | 2714 | | | 2715 | 132 | return modules.at(moduleID); | 2716 | 1.40k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.71k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.71k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.71k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.71k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.71k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.56k | return nullptr; | 2713 | 1.56k | } | 2714 | | | 2715 | 147 | return modules.at(moduleID); | 2716 | 1.71k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.82k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.82k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.82k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.82k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.82k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.62k | return nullptr; | 2713 | 1.62k | } | 2714 | | | 2715 | 193 | return modules.at(moduleID); | 2716 | 1.82k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.72k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.72k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.72k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.72k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.72k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.59k | return nullptr; | 2713 | 1.59k | } | 2714 | | | 2715 | 134 | return modules.at(moduleID); | 2716 | 1.72k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.26k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.26k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.26k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.26k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.26k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.09k | return nullptr; | 2713 | 2.09k | } | 2714 | | | 2715 | 165 | return modules.at(moduleID); | 2716 | 2.26k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.45k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.45k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.45k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.45k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.45k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.31k | return nullptr; | 2713 | 2.31k | } | 2714 | | | 2715 | 143 | return modules.at(moduleID); | 2716 | 2.45k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.30k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.30k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.30k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.30k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.30k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.12k | return nullptr; | 2713 | 1.12k | } | 2714 | | | 2715 | 175 | return modules.at(moduleID); | 2716 | 1.30k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.42k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.42k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.42k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.42k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.42k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.26k | return nullptr; | 2713 | 1.26k | } | 2714 | | | 2715 | 157 | return modules.at(moduleID); | 2716 | 1.42k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.86k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.86k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.86k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.86k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.86k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.68k | return nullptr; | 2713 | 1.68k | } | 2714 | | | 2715 | 181 | return modules.at(moduleID); | 2716 | 1.86k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.60k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.60k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.60k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.60k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.60k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.46k | return nullptr; | 2713 | 2.46k | } | 2714 | | | 2715 | 140 | return modules.at(moduleID); | 2716 | 2.60k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.30k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.30k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.30k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.30k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.30k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.15k | return nullptr; | 2713 | 1.15k | } | 2714 | | | 2715 | 151 | return modules.at(moduleID); | 2716 | 1.30k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.29k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.29k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.29k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.29k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.29k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.16k | return nullptr; | 2713 | 1.16k | } | 2714 | | | 2715 | 132 | return modules.at(moduleID); | 2716 | 1.29k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.29k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.29k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.29k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.29k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.29k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.17k | return nullptr; | 2713 | 1.17k | } | 2714 | | | 2715 | 118 | return modules.at(moduleID); | 2716 | 1.29k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.95k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.95k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.95k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.95k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.95k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.82k | return nullptr; | 2713 | 1.82k | } | 2714 | | | 2715 | 135 | return modules.at(moduleID); | 2716 | 1.95k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.05k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.05k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.05k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.05k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.05k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.87k | return nullptr; | 2713 | 1.87k | } | 2714 | | | 2715 | 182 | return modules.at(moduleID); | 2716 | 2.05k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.01k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.01k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.01k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.01k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.01k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.87k | return nullptr; | 2713 | 1.87k | } | 2714 | | | 2715 | 141 | return modules.at(moduleID); | 2716 | 2.01k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.84k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.84k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.84k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.84k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.84k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.64k | return nullptr; | 2713 | 1.64k | } | 2714 | | | 2715 | 196 | return modules.at(moduleID); | 2716 | 1.84k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.03k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.03k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.03k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.03k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.03k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 897 | return nullptr; | 2713 | 897 | } | 2714 | | | 2715 | 135 | return modules.at(moduleID); | 2716 | 1.03k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.33k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.33k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.33k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.33k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.33k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.04k | return nullptr; | 2713 | 2.04k | } | 2714 | | | 2715 | 284 | return modules.at(moduleID); | 2716 | 2.33k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.15k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.15k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.15k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.15k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.15k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.01k | return nullptr; | 2713 | 2.01k | } | 2714 | | | 2715 | 141 | return modules.at(moduleID); | 2716 | 2.15k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.42k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.42k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.42k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.42k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.42k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.18k | return nullptr; | 2713 | 2.18k | } | 2714 | | | 2715 | 243 | return modules.at(moduleID); | 2716 | 2.42k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.61k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.61k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.61k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.61k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.61k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.44k | return nullptr; | 2713 | 1.44k | } | 2714 | | | 2715 | 172 | return modules.at(moduleID); | 2716 | 1.61k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.22k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.22k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.22k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.22k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.22k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.00k | return nullptr; | 2713 | 2.00k | } | 2714 | | | 2715 | 222 | return modules.at(moduleID); | 2716 | 2.22k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.04k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.04k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.04k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.04k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.04k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 917 | return nullptr; | 2713 | 917 | } | 2714 | | | 2715 | 132 | return modules.at(moduleID); | 2716 | 1.04k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.51k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.51k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.51k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.51k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.51k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.34k | return nullptr; | 2713 | 2.34k | } | 2714 | | | 2715 | 174 | return modules.at(moduleID); | 2716 | 2.51k | } |
|
2717 | | |
2718 | | template <class ResultType, class OperationType> |
2719 | 27.5k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { |
2720 | 27.5k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; |
2721 | | |
2722 | 27.5k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; |
2723 | | |
2724 | 228k | do { |
2725 | 228k | auto op = getOp(&parentDs, data, size); |
2726 | 228k | auto module = getModule(parentDs); |
2727 | 228k | if ( module == nullptr ) { |
2728 | 170k | continue; |
2729 | 170k | } |
2730 | | |
2731 | 58.5k | operations.push_back( {module, op} ); |
2732 | | |
2733 | | /* Limit number of operations per run to prevent time-outs */ |
2734 | 58.5k | if ( operations.size() == OperationType::MaxOperations() ) { |
2735 | 870 | break; |
2736 | 870 | } |
2737 | 227k | } while ( parentDs.Get<bool>() == true ); |
2738 | | |
2739 | 27.5k | if ( operations.empty() == true ) { |
2740 | 1.32k | return; |
2741 | 1.32k | } |
2742 | | |
2743 | | /* Enable this to run every operation on every loaded module */ |
2744 | 26.1k | #if 1 |
2745 | 26.1k | { |
2746 | 26.1k | std::set<uint64_t> moduleIDs; |
2747 | 41.6k | for (const auto& m : modules ) { |
2748 | 41.6k | const auto moduleID = m.first; |
2749 | | |
2750 | | /* Skip if this is a disabled module */ |
2751 | 41.6k | if ( options.disableModules.HaveExplicit(moduleID) ) { |
2752 | 0 | continue; |
2753 | 0 | } |
2754 | | |
2755 | 41.6k | moduleIDs.insert(moduleID); |
2756 | 41.6k | } |
2757 | | |
2758 | 26.1k | std::set<uint64_t> operationModuleIDs; |
2759 | 50.5k | for (const auto& op : operations) { |
2760 | 50.5k | operationModuleIDs.insert(op.first->ID); |
2761 | 50.5k | } |
2762 | | |
2763 | 26.1k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); |
2764 | 26.1k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); |
2765 | 26.1k | addModuleIDs.resize(it - addModuleIDs.begin()); |
2766 | | |
2767 | 26.1k | for (const auto& id : addModuleIDs) { |
2768 | 19.5k | operations.push_back({ modules.at(id), operations[0].second}); |
2769 | 19.5k | } |
2770 | 26.1k | } |
2771 | 26.1k | #endif |
2772 | | |
2773 | 26.1k | if ( operations.size() < options.minModules ) { |
2774 | 0 | return; |
2775 | 0 | } |
2776 | | |
2777 | 26.1k | if ( options.debug == true && !operations.empty() ) { |
2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); |
2779 | 0 | } |
2780 | 96.2k | for (size_t i = 0; i < operations.size(); i++) { |
2781 | 70.0k | auto& operation = operations[i]; |
2782 | | |
2783 | 70.0k | auto& module = operation.first; |
2784 | 70.0k | auto& op = operation.second; |
2785 | | |
2786 | 70.0k | if ( i > 0 ) { |
2787 | 49.2k | auto& prevModule = operations[i-1].first; |
2788 | 49.2k | auto& prevOp = operations[i].second; |
2789 | | |
2790 | 49.2k | if ( prevModule == module && prevOp.modifier == op.modifier ) { |
2791 | 27.1k | auto& curModifier = op.modifier.GetVectorPtr(); |
2792 | 27.1k | if ( curModifier.size() == 0 ) { |
2793 | 9.58M | for (size_t j = 0; j < 512; j++) { |
2794 | 9.57M | curModifier.push_back(1); |
2795 | 9.57M | } |
2796 | 18.6k | } else { |
2797 | 444k | for (auto& c : curModifier) { |
2798 | 444k | c++; |
2799 | 444k | } |
2800 | 8.41k | } |
2801 | 27.1k | } |
2802 | 49.2k | } |
2803 | | |
2804 | 70.0k | if ( options.debug == true ) { |
2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); |
2806 | 0 | } |
2807 | | |
2808 | 70.0k | results.push_back( {module, std::move(callModule(module, op))} ); |
2809 | | |
2810 | 70.0k | const auto& result = results.back(); |
2811 | | |
2812 | 70.0k | if ( result.second != std::nullopt ) { |
2813 | 20.6k | if ( options.jsonDumpFP != std::nullopt ) { |
2814 | 0 | nlohmann::json j; |
2815 | 0 | j["operation"] = op.ToJSON(); |
2816 | 0 | j["result"] = util::ToJSON(*result.second); |
2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); |
2818 | 0 | } |
2819 | 20.6k | } |
2820 | | |
2821 | 70.0k | if ( options.debug == true ) { |
2822 | 0 | printf("Module %s result:\n\n%s\n\n", |
2823 | 0 | result.first->name.c_str(), |
2824 | 0 | result.second == std::nullopt ? |
2825 | 0 | "(empty)" : |
2826 | 0 | util::ToString(*result.second).c_str()); |
2827 | 0 | } |
2828 | | |
2829 | 70.0k | if ( options.disableTests == false ) { |
2830 | 70.0k | tests::test(op, result.second); |
2831 | 70.0k | } |
2832 | | |
2833 | 70.0k | postprocess(module, op, result); |
2834 | 70.0k | } |
2835 | | |
2836 | 26.1k | if ( options.noCompare == false ) { |
2837 | 20.8k | compare(operations, results, data, size); |
2838 | 20.8k | } |
2839 | 26.1k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.61k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.61k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.61k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.86k | do { | 2725 | 4.86k | auto op = getOp(&parentDs, data, size); | 2726 | 4.86k | auto module = getModule(parentDs); | 2727 | 4.86k | if ( module == nullptr ) { | 2728 | 1.95k | continue; | 2729 | 1.95k | } | 2730 | | | 2731 | 2.90k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 2.90k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 4.85k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.61k | if ( operations.empty() == true ) { | 2740 | 25 | return; | 2741 | 25 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 1.58k | #if 1 | 2745 | 1.58k | { | 2746 | 1.58k | std::set<uint64_t> moduleIDs; | 2747 | 3.00k | for (const auto& m : modules ) { | 2748 | 3.00k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 3.00k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 3.00k | moduleIDs.insert(moduleID); | 2756 | 3.00k | } | 2757 | | | 2758 | 1.58k | std::set<uint64_t> operationModuleIDs; | 2759 | 2.78k | for (const auto& op : operations) { | 2760 | 2.78k | operationModuleIDs.insert(op.first->ID); | 2761 | 2.78k | } | 2762 | | | 2763 | 1.58k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 1.58k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 1.58k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 1.58k | for (const auto& id : addModuleIDs) { | 2768 | 1.48k | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 1.48k | } | 2770 | 1.58k | } | 2771 | 1.58k | #endif | 2772 | | | 2773 | 1.58k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 1.58k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 5.85k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 4.26k | auto& operation = operations[i]; | 2782 | | | 2783 | 4.26k | auto& module = operation.first; | 2784 | 4.26k | auto& op = operation.second; | 2785 | | | 2786 | 4.26k | if ( i > 0 ) { | 2787 | 2.76k | auto& prevModule = operations[i-1].first; | 2788 | 2.76k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 2.76k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 1.20k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 1.20k | if ( curModifier.size() == 0 ) { | 2793 | 499k | for (size_t j = 0; j < 512; j++) { | 2794 | 498k | curModifier.push_back(1); | 2795 | 498k | } | 2796 | 974 | } else { | 2797 | 4.40k | for (auto& c : curModifier) { | 2798 | 4.40k | c++; | 2799 | 4.40k | } | 2800 | 233 | } | 2801 | 1.20k | } | 2802 | 2.76k | } | 2803 | | | 2804 | 4.26k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 4.26k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 4.26k | const auto& result = results.back(); | 2811 | | | 2812 | 4.26k | if ( result.second != std::nullopt ) { | 2813 | 2.01k | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 2.01k | } | 2820 | | | 2821 | 4.26k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 4.26k | if ( options.disableTests == false ) { | 2830 | 4.26k | tests::test(op, result.second); | 2831 | 4.26k | } | 2832 | | | 2833 | 4.26k | postprocess(module, op, result); | 2834 | 4.26k | } | 2835 | | | 2836 | 1.58k | if ( options.noCompare == false ) { | 2837 | 1.50k | compare(operations, results, data, size); | 2838 | 1.50k | } | 2839 | 1.58k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 475 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 475 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 475 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.76k | do { | 2725 | 3.76k | auto op = getOp(&parentDs, data, size); | 2726 | 3.76k | auto module = getModule(parentDs); | 2727 | 3.76k | if ( module == nullptr ) { | 2728 | 2.42k | continue; | 2729 | 2.42k | } | 2730 | | | 2731 | 1.33k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.33k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 3.75k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 475 | if ( operations.empty() == true ) { | 2740 | 19 | return; | 2741 | 19 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 456 | #if 1 | 2745 | 456 | { | 2746 | 456 | std::set<uint64_t> moduleIDs; | 2747 | 798 | for (const auto& m : modules ) { | 2748 | 798 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 798 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 798 | moduleIDs.insert(moduleID); | 2756 | 798 | } | 2757 | | | 2758 | 456 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.26k | for (const auto& op : operations) { | 2760 | 1.26k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.26k | } | 2762 | | | 2763 | 456 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 456 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 456 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 456 | for (const auto& id : addModuleIDs) { | 2768 | 361 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 361 | } | 2770 | 456 | } | 2771 | 456 | #endif | 2772 | | | 2773 | 456 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 456 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 2.08k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.62k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.62k | auto& module = operation.first; | 2784 | 1.62k | auto& op = operation.second; | 2785 | | | 2786 | 1.62k | if ( i > 0 ) { | 2787 | 1.23k | auto& prevModule = operations[i-1].first; | 2788 | 1.23k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 1.23k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 768 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 768 | if ( curModifier.size() == 0 ) { | 2793 | 285k | for (size_t j = 0; j < 512; j++) { | 2794 | 285k | curModifier.push_back(1); | 2795 | 285k | } | 2796 | 557 | } else { | 2797 | 49.5k | for (auto& c : curModifier) { | 2798 | 49.5k | c++; | 2799 | 49.5k | } | 2800 | 211 | } | 2801 | 768 | } | 2802 | 1.23k | } | 2803 | | | 2804 | 1.62k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.62k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.62k | const auto& result = results.back(); | 2811 | | | 2812 | 1.62k | if ( result.second != std::nullopt ) { | 2813 | 954 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 954 | } | 2820 | | | 2821 | 1.62k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 1.62k | if ( options.disableTests == false ) { | 2830 | 1.62k | tests::test(op, result.second); | 2831 | 1.62k | } | 2832 | | | 2833 | 1.62k | postprocess(module, op, result); | 2834 | 1.62k | } | 2835 | | | 2836 | 456 | if ( options.noCompare == false ) { | 2837 | 399 | compare(operations, results, data, size); | 2838 | 399 | } | 2839 | 456 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 537 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 537 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 537 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.13k | do { | 2725 | 5.13k | auto op = getOp(&parentDs, data, size); | 2726 | 5.13k | auto module = getModule(parentDs); | 2727 | 5.13k | if ( module == nullptr ) { | 2728 | 2.72k | continue; | 2729 | 2.72k | } | 2730 | | | 2731 | 2.40k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 2.40k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 5.13k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 537 | if ( operations.empty() == true ) { | 2740 | 14 | return; | 2741 | 14 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 523 | #if 1 | 2745 | 523 | { | 2746 | 523 | std::set<uint64_t> moduleIDs; | 2747 | 930 | for (const auto& m : modules ) { | 2748 | 930 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 930 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 930 | moduleIDs.insert(moduleID); | 2756 | 930 | } | 2757 | | | 2758 | 523 | std::set<uint64_t> operationModuleIDs; | 2759 | 2.14k | for (const auto& op : operations) { | 2760 | 2.14k | operationModuleIDs.insert(op.first->ID); | 2761 | 2.14k | } | 2762 | | | 2763 | 523 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 523 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 523 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 523 | for (const auto& id : addModuleIDs) { | 2768 | 445 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 445 | } | 2770 | 523 | } | 2771 | 523 | #endif | 2772 | | | 2773 | 523 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 523 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 3.11k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 2.59k | auto& operation = operations[i]; | 2782 | | | 2783 | 2.59k | auto& module = operation.first; | 2784 | 2.59k | auto& op = operation.second; | 2785 | | | 2786 | 2.59k | if ( i > 0 ) { | 2787 | 2.12k | auto& prevModule = operations[i-1].first; | 2788 | 2.12k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 2.12k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 1.62k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 1.62k | if ( curModifier.size() == 0 ) { | 2793 | 656k | for (size_t j = 0; j < 512; j++) { | 2794 | 654k | curModifier.push_back(1); | 2795 | 654k | } | 2796 | 1.27k | } else { | 2797 | 7.43k | for (auto& c : curModifier) { | 2798 | 7.43k | c++; | 2799 | 7.43k | } | 2800 | 350 | } | 2801 | 1.62k | } | 2802 | 2.12k | } | 2803 | | | 2804 | 2.59k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 2.59k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 2.59k | const auto& result = results.back(); | 2811 | | | 2812 | 2.59k | if ( result.second != std::nullopt ) { | 2813 | 1.19k | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 1.19k | } | 2820 | | | 2821 | 2.59k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 2.59k | if ( options.disableTests == false ) { | 2830 | 2.59k | tests::test(op, result.second); | 2831 | 2.59k | } | 2832 | | | 2833 | 2.59k | postprocess(module, op, result); | 2834 | 2.59k | } | 2835 | | | 2836 | 523 | if ( options.noCompare == false ) { | 2837 | 465 | compare(operations, results, data, size); | 2838 | 465 | } | 2839 | 523 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 845 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 845 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 845 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.46k | do { | 2725 | 5.46k | auto op = getOp(&parentDs, data, size); | 2726 | 5.46k | auto module = getModule(parentDs); | 2727 | 5.46k | if ( module == nullptr ) { | 2728 | 3.16k | continue; | 2729 | 3.16k | } | 2730 | | | 2731 | 2.29k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 2.29k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 5.45k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 845 | if ( operations.empty() == true ) { | 2740 | 28 | return; | 2741 | 28 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 817 | #if 1 | 2745 | 817 | { | 2746 | 817 | std::set<uint64_t> moduleIDs; | 2747 | 1.50k | for (const auto& m : modules ) { | 2748 | 1.50k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.50k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.50k | moduleIDs.insert(moduleID); | 2756 | 1.50k | } | 2757 | | | 2758 | 817 | std::set<uint64_t> operationModuleIDs; | 2759 | 2.19k | for (const auto& op : operations) { | 2760 | 2.19k | operationModuleIDs.insert(op.first->ID); | 2761 | 2.19k | } | 2762 | | | 2763 | 817 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 817 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 817 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 817 | for (const auto& id : addModuleIDs) { | 2768 | 721 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 721 | } | 2770 | 817 | } | 2771 | 817 | #endif | 2772 | | | 2773 | 817 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 817 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 3.73k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 2.91k | auto& operation = operations[i]; | 2782 | | | 2783 | 2.91k | auto& module = operation.first; | 2784 | 2.91k | auto& op = operation.second; | 2785 | | | 2786 | 2.91k | if ( i > 0 ) { | 2787 | 2.16k | auto& prevModule = operations[i-1].first; | 2788 | 2.16k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 2.16k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 1.36k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 1.36k | if ( curModifier.size() == 0 ) { | 2793 | 466k | for (size_t j = 0; j < 512; j++) { | 2794 | 465k | curModifier.push_back(1); | 2795 | 465k | } | 2796 | 910 | } else { | 2797 | 1.57k | for (auto& c : curModifier) { | 2798 | 1.57k | c++; | 2799 | 1.57k | } | 2800 | 459 | } | 2801 | 1.36k | } | 2802 | 2.16k | } | 2803 | | | 2804 | 2.91k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 2.91k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 2.91k | const auto& result = results.back(); | 2811 | | | 2812 | 2.91k | if ( result.second != std::nullopt ) { | 2813 | 1.17k | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 1.17k | } | 2820 | | | 2821 | 2.91k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 2.91k | if ( options.disableTests == false ) { | 2830 | 2.91k | tests::test(op, result.second); | 2831 | 2.91k | } | 2832 | | | 2833 | 2.91k | postprocess(module, op, result); | 2834 | 2.91k | } | 2835 | | | 2836 | 817 | if ( options.noCompare == false ) { | 2837 | 752 | compare(operations, results, data, size); | 2838 | 752 | } | 2839 | 817 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 2.83k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 2.83k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 2.83k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 14.8k | do { | 2725 | 14.8k | auto op = getOp(&parentDs, data, size); | 2726 | 14.8k | auto module = getModule(parentDs); | 2727 | 14.8k | if ( module == nullptr ) { | 2728 | 6.18k | continue; | 2729 | 6.18k | } | 2730 | | | 2731 | 8.70k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 8.70k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 14.8k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 2.83k | if ( operations.empty() == true ) { | 2740 | 19 | return; | 2741 | 19 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 2.81k | #if 1 | 2745 | 2.81k | { | 2746 | 2.81k | std::set<uint64_t> moduleIDs; | 2747 | 5.50k | for (const auto& m : modules ) { | 2748 | 5.50k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 5.50k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 5.50k | moduleIDs.insert(moduleID); | 2756 | 5.50k | } | 2757 | | | 2758 | 2.81k | std::set<uint64_t> operationModuleIDs; | 2759 | 8.50k | for (const auto& op : operations) { | 2760 | 8.50k | operationModuleIDs.insert(op.first->ID); | 2761 | 8.50k | } | 2762 | | | 2763 | 2.81k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 2.81k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 2.81k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 2.81k | for (const auto& id : addModuleIDs) { | 2768 | 2.69k | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 2.69k | } | 2770 | 2.81k | } | 2771 | 2.81k | #endif | 2772 | | | 2773 | 2.81k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 2.81k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 14.0k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 11.2k | auto& operation = operations[i]; | 2782 | | | 2783 | 11.2k | auto& module = operation.first; | 2784 | 11.2k | auto& op = operation.second; | 2785 | | | 2786 | 11.2k | if ( i > 0 ) { | 2787 | 8.45k | auto& prevModule = operations[i-1].first; | 2788 | 8.45k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 8.45k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 5.59k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 5.59k | if ( curModifier.size() == 0 ) { | 2793 | 2.20M | for (size_t j = 0; j < 512; j++) { | 2794 | 2.20M | curModifier.push_back(1); | 2795 | 2.20M | } | 2796 | 4.29k | } else { | 2797 | 18.1k | for (auto& c : curModifier) { | 2798 | 18.1k | c++; | 2799 | 18.1k | } | 2800 | 1.29k | } | 2801 | 5.59k | } | 2802 | 8.45k | } | 2803 | | | 2804 | 11.2k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 11.2k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 11.2k | const auto& result = results.back(); | 2811 | | | 2812 | 11.2k | if ( result.second != std::nullopt ) { | 2813 | 3.24k | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 3.24k | } | 2820 | | | 2821 | 11.2k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 11.2k | if ( options.disableTests == false ) { | 2830 | 11.2k | tests::test(op, result.second); | 2831 | 11.2k | } | 2832 | | | 2833 | 11.2k | postprocess(module, op, result); | 2834 | 11.2k | } | 2835 | | | 2836 | 2.81k | if ( options.noCompare == false ) { | 2837 | 2.75k | compare(operations, results, data, size); | 2838 | 2.75k | } | 2839 | 2.81k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.90k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.90k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.90k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 9.89k | do { | 2725 | 9.89k | auto op = getOp(&parentDs, data, size); | 2726 | 9.89k | auto module = getModule(parentDs); | 2727 | 9.89k | if ( module == nullptr ) { | 2728 | 3.78k | continue; | 2729 | 3.78k | } | 2730 | | | 2731 | 6.10k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 6.10k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 9.88k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.90k | if ( operations.empty() == true ) { | 2740 | 11 | return; | 2741 | 11 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 1.89k | #if 1 | 2745 | 1.89k | { | 2746 | 1.89k | std::set<uint64_t> moduleIDs; | 2747 | 3.67k | for (const auto& m : modules ) { | 2748 | 3.67k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 3.67k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 3.67k | moduleIDs.insert(moduleID); | 2756 | 3.67k | } | 2757 | | | 2758 | 1.89k | std::set<uint64_t> operationModuleIDs; | 2759 | 5.93k | for (const auto& op : operations) { | 2760 | 5.93k | operationModuleIDs.insert(op.first->ID); | 2761 | 5.93k | } | 2762 | | | 2763 | 1.89k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 1.89k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 1.89k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 1.89k | for (const auto& id : addModuleIDs) { | 2768 | 1.77k | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 1.77k | } | 2770 | 1.89k | } | 2771 | 1.89k | #endif | 2772 | | | 2773 | 1.89k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 1.89k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 9.60k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 7.70k | auto& operation = operations[i]; | 2782 | | | 2783 | 7.70k | auto& module = operation.first; | 2784 | 7.70k | auto& op = operation.second; | 2785 | | | 2786 | 7.70k | if ( i > 0 ) { | 2787 | 5.86k | auto& prevModule = operations[i-1].first; | 2788 | 5.86k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 5.86k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 3.97k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 3.97k | if ( curModifier.size() == 0 ) { | 2793 | 1.53M | for (size_t j = 0; j < 512; j++) { | 2794 | 1.53M | curModifier.push_back(1); | 2795 | 1.53M | } | 2796 | 2.99k | } else { | 2797 | 10.2k | for (auto& c : curModifier) { | 2798 | 10.2k | c++; | 2799 | 10.2k | } | 2800 | 974 | } | 2801 | 3.97k | } | 2802 | 5.86k | } | 2803 | | | 2804 | 7.70k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 7.70k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 7.70k | const auto& result = results.back(); | 2811 | | | 2812 | 7.70k | if ( result.second != std::nullopt ) { | 2813 | 659 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 659 | } | 2820 | | | 2821 | 7.70k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 7.70k | if ( options.disableTests == false ) { | 2830 | 7.70k | tests::test(op, result.second); | 2831 | 7.70k | } | 2832 | | | 2833 | 7.70k | postprocess(module, op, result); | 2834 | 7.70k | } | 2835 | | | 2836 | 1.89k | if ( options.noCompare == false ) { | 2837 | 1.83k | compare(operations, results, data, size); | 2838 | 1.83k | } | 2839 | 1.89k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 193 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 193 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 193 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.48k | do { | 2725 | 2.48k | auto op = getOp(&parentDs, data, size); | 2726 | 2.48k | auto module = getModule(parentDs); | 2727 | 2.48k | if ( module == nullptr ) { | 2728 | 1.76k | continue; | 2729 | 1.76k | } | 2730 | | | 2731 | 721 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 721 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 2.48k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 193 | if ( operations.empty() == true ) { | 2740 | 14 | return; | 2741 | 14 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 179 | #if 1 | 2745 | 179 | { | 2746 | 179 | std::set<uint64_t> moduleIDs; | 2747 | 244 | for (const auto& m : modules ) { | 2748 | 244 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 244 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 244 | moduleIDs.insert(moduleID); | 2756 | 244 | } | 2757 | | | 2758 | 179 | std::set<uint64_t> operationModuleIDs; | 2759 | 577 | for (const auto& op : operations) { | 2760 | 577 | operationModuleIDs.insert(op.first->ID); | 2761 | 577 | } | 2762 | | | 2763 | 179 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 179 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 179 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 179 | for (const auto& id : addModuleIDs) { | 2768 | 106 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 106 | } | 2770 | 179 | } | 2771 | 179 | #endif | 2772 | | | 2773 | 179 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 179 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 862 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 683 | auto& operation = operations[i]; | 2782 | | | 2783 | 683 | auto& module = operation.first; | 2784 | 683 | auto& op = operation.second; | 2785 | | | 2786 | 683 | if ( i > 0 ) { | 2787 | 561 | auto& prevModule = operations[i-1].first; | 2788 | 561 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 561 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 419 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 419 | if ( curModifier.size() == 0 ) { | 2793 | 163k | for (size_t j = 0; j < 512; j++) { | 2794 | 163k | curModifier.push_back(1); | 2795 | 163k | } | 2796 | 319 | } else { | 2797 | 361 | for (auto& c : curModifier) { | 2798 | 361 | c++; | 2799 | 361 | } | 2800 | 100 | } | 2801 | 419 | } | 2802 | 561 | } | 2803 | | | 2804 | 683 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 683 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 683 | const auto& result = results.back(); | 2811 | | | 2812 | 683 | if ( result.second != std::nullopt ) { | 2813 | 189 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 189 | } | 2820 | | | 2821 | 683 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 683 | if ( options.disableTests == false ) { | 2830 | 683 | tests::test(op, result.second); | 2831 | 683 | } | 2832 | | | 2833 | 683 | postprocess(module, op, result); | 2834 | 683 | } | 2835 | | | 2836 | 179 | if ( options.noCompare == false ) { | 2837 | 122 | compare(operations, results, data, size); | 2838 | 122 | } | 2839 | 179 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.45k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.45k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.45k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 6.98k | do { | 2725 | 6.98k | auto op = getOp(&parentDs, data, size); | 2726 | 6.98k | auto module = getModule(parentDs); | 2727 | 6.98k | if ( module == nullptr ) { | 2728 | 3.51k | continue; | 2729 | 3.51k | } | 2730 | | | 2731 | 3.47k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 3.47k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 6.98k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.45k | if ( operations.empty() == true ) { | 2740 | 57 | return; | 2741 | 57 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 1.39k | #if 1 | 2745 | 1.39k | { | 2746 | 1.39k | std::set<uint64_t> moduleIDs; | 2747 | 2.60k | for (const auto& m : modules ) { | 2748 | 2.60k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 2.60k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 2.60k | moduleIDs.insert(moduleID); | 2756 | 2.60k | } | 2757 | | | 2758 | 1.39k | std::set<uint64_t> operationModuleIDs; | 2759 | 3.27k | for (const auto& op : operations) { | 2760 | 3.27k | operationModuleIDs.insert(op.first->ID); | 2761 | 3.27k | } | 2762 | | | 2763 | 1.39k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 1.39k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 1.39k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 1.39k | for (const auto& id : addModuleIDs) { | 2768 | 1.26k | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 1.26k | } | 2770 | 1.39k | } | 2771 | 1.39k | #endif | 2772 | | | 2773 | 1.39k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 1.39k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 5.93k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 4.54k | auto& operation = operations[i]; | 2782 | | | 2783 | 4.54k | auto& module = operation.first; | 2784 | 4.54k | auto& op = operation.second; | 2785 | | | 2786 | 4.54k | if ( i > 0 ) { | 2787 | 3.24k | auto& prevModule = operations[i-1].first; | 2788 | 3.24k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 3.24k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 1.90k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 1.90k | if ( curModifier.size() == 0 ) { | 2793 | 705k | for (size_t j = 0; j < 512; j++) { | 2794 | 704k | curModifier.push_back(1); | 2795 | 704k | } | 2796 | 1.37k | } else { | 2797 | 2.55k | for (auto& c : curModifier) { | 2798 | 2.55k | c++; | 2799 | 2.55k | } | 2800 | 526 | } | 2801 | 1.90k | } | 2802 | 3.24k | } | 2803 | | | 2804 | 4.54k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 4.54k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 4.54k | const auto& result = results.back(); | 2811 | | | 2812 | 4.54k | if ( result.second != std::nullopt ) { | 2813 | 2.24k | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 2.24k | } | 2820 | | | 2821 | 4.54k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 4.54k | if ( options.disableTests == false ) { | 2830 | 4.54k | tests::test(op, result.second); | 2831 | 4.54k | } | 2832 | | | 2833 | 4.54k | postprocess(module, op, result); | 2834 | 4.54k | } | 2835 | | | 2836 | 1.39k | if ( options.noCompare == false ) { | 2837 | 1.30k | compare(operations, results, data, size); | 2838 | 1.30k | } | 2839 | 1.39k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 165 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 165 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 165 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.76k | do { | 2725 | 2.76k | auto op = getOp(&parentDs, data, size); | 2726 | 2.76k | auto module = getModule(parentDs); | 2727 | 2.76k | if ( module == nullptr ) { | 2728 | 2.22k | continue; | 2729 | 2.22k | } | 2730 | | | 2731 | 538 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 538 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 2.75k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 165 | if ( operations.empty() == true ) { | 2740 | 19 | return; | 2741 | 19 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 146 | #if 1 | 2745 | 146 | { | 2746 | 146 | std::set<uint64_t> moduleIDs; | 2747 | 164 | for (const auto& m : modules ) { | 2748 | 164 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 164 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 164 | moduleIDs.insert(moduleID); | 2756 | 164 | } | 2757 | | | 2758 | 146 | std::set<uint64_t> operationModuleIDs; | 2759 | 358 | for (const auto& op : operations) { | 2760 | 358 | operationModuleIDs.insert(op.first->ID); | 2761 | 358 | } | 2762 | | | 2763 | 146 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 146 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 146 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 146 | for (const auto& id : addModuleIDs) { | 2768 | 61 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 61 | } | 2770 | 146 | } | 2771 | 146 | #endif | 2772 | | | 2773 | 146 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 146 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 565 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 419 | auto& operation = operations[i]; | 2782 | | | 2783 | 419 | auto& module = operation.first; | 2784 | 419 | auto& op = operation.second; | 2785 | | | 2786 | 419 | if ( i > 0 ) { | 2787 | 337 | auto& prevModule = operations[i-1].first; | 2788 | 337 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 337 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 198 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 198 | if ( curModifier.size() == 0 ) { | 2793 | 56.9k | for (size_t j = 0; j < 512; j++) { | 2794 | 56.8k | curModifier.push_back(1); | 2795 | 56.8k | } | 2796 | 111 | } else { | 2797 | 650 | for (auto& c : curModifier) { | 2798 | 650 | c++; | 2799 | 650 | } | 2800 | 87 | } | 2801 | 198 | } | 2802 | 337 | } | 2803 | | | 2804 | 419 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 419 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 419 | const auto& result = results.back(); | 2811 | | | 2812 | 419 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 419 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 419 | if ( options.disableTests == false ) { | 2830 | 419 | tests::test(op, result.second); | 2831 | 419 | } | 2832 | | | 2833 | 419 | postprocess(module, op, result); | 2834 | 419 | } | 2835 | | | 2836 | 146 | if ( options.noCompare == false ) { | 2837 | 82 | compare(operations, results, data, size); | 2838 | 82 | } | 2839 | 146 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 109 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 109 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 109 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.12k | do { | 2725 | 2.12k | auto op = getOp(&parentDs, data, size); | 2726 | 2.12k | auto module = getModule(parentDs); | 2727 | 2.12k | if ( module == nullptr ) { | 2728 | 1.72k | continue; | 2729 | 1.72k | } | 2730 | | | 2731 | 405 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 405 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 2.12k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 109 | if ( operations.empty() == true ) { | 2740 | 12 | return; | 2741 | 12 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 97 | #if 1 | 2745 | 97 | { | 2746 | 97 | std::set<uint64_t> moduleIDs; | 2747 | 100 | for (const auto& m : modules ) { | 2748 | 100 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 100 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 100 | moduleIDs.insert(moduleID); | 2756 | 100 | } | 2757 | | | 2758 | 97 | std::set<uint64_t> operationModuleIDs; | 2759 | 279 | for (const auto& op : operations) { | 2760 | 279 | operationModuleIDs.insert(op.first->ID); | 2761 | 279 | } | 2762 | | | 2763 | 97 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 97 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 97 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 97 | for (const auto& id : addModuleIDs) { | 2768 | 24 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 24 | } | 2770 | 97 | } | 2771 | 97 | #endif | 2772 | | | 2773 | 97 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 97 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 400 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 303 | auto& operation = operations[i]; | 2782 | | | 2783 | 303 | auto& module = operation.first; | 2784 | 303 | auto& op = operation.second; | 2785 | | | 2786 | 303 | if ( i > 0 ) { | 2787 | 253 | auto& prevModule = operations[i-1].first; | 2788 | 253 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 253 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 185 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 185 | if ( curModifier.size() == 0 ) { | 2793 | 47.7k | for (size_t j = 0; j < 512; j++) { | 2794 | 47.6k | curModifier.push_back(1); | 2795 | 47.6k | } | 2796 | 93 | } else { | 2797 | 973 | for (auto& c : curModifier) { | 2798 | 973 | c++; | 2799 | 973 | } | 2800 | 92 | } | 2801 | 185 | } | 2802 | 253 | } | 2803 | | | 2804 | 303 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 303 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 303 | const auto& result = results.back(); | 2811 | | | 2812 | 303 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 303 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 303 | if ( options.disableTests == false ) { | 2830 | 303 | tests::test(op, result.second); | 2831 | 303 | } | 2832 | | | 2833 | 303 | postprocess(module, op, result); | 2834 | 303 | } | 2835 | | | 2836 | 97 | if ( options.noCompare == false ) { | 2837 | 50 | compare(operations, results, data, size); | 2838 | 50 | } | 2839 | 97 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 153 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 153 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 153 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.56k | do { | 2725 | 2.56k | auto op = getOp(&parentDs, data, size); | 2726 | 2.56k | auto module = getModule(parentDs); | 2727 | 2.56k | if ( module == nullptr ) { | 2728 | 2.00k | continue; | 2729 | 2.00k | } | 2730 | | | 2731 | 558 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 558 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 2.55k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 153 | if ( operations.empty() == true ) { | 2740 | 24 | return; | 2741 | 24 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 129 | #if 1 | 2745 | 129 | { | 2746 | 129 | std::set<uint64_t> moduleIDs; | 2747 | 129 | for (const auto& m : modules ) { | 2748 | 114 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 114 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 114 | moduleIDs.insert(moduleID); | 2756 | 114 | } | 2757 | | | 2758 | 129 | std::set<uint64_t> operationModuleIDs; | 2759 | 321 | for (const auto& op : operations) { | 2760 | 321 | operationModuleIDs.insert(op.first->ID); | 2761 | 321 | } | 2762 | | | 2763 | 129 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 129 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 129 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 129 | for (const auto& id : addModuleIDs) { | 2768 | 37 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 37 | } | 2770 | 129 | } | 2771 | 129 | #endif | 2772 | | | 2773 | 129 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 129 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 487 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 358 | auto& operation = operations[i]; | 2782 | | | 2783 | 358 | auto& module = operation.first; | 2784 | 358 | auto& op = operation.second; | 2785 | | | 2786 | 358 | if ( i > 0 ) { | 2787 | 301 | auto& prevModule = operations[i-1].first; | 2788 | 301 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 301 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 213 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 213 | if ( curModifier.size() == 0 ) { | 2793 | 50.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 50.1k | curModifier.push_back(1); | 2795 | 50.1k | } | 2796 | 115 | } else { | 2797 | 954 | for (auto& c : curModifier) { | 2798 | 954 | c++; | 2799 | 954 | } | 2800 | 115 | } | 2801 | 213 | } | 2802 | 301 | } | 2803 | | | 2804 | 358 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 358 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 358 | const auto& result = results.back(); | 2811 | | | 2812 | 358 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 358 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 358 | if ( options.disableTests == false ) { | 2830 | 358 | tests::test(op, result.second); | 2831 | 358 | } | 2832 | | | 2833 | 358 | postprocess(module, op, result); | 2834 | 358 | } | 2835 | | | 2836 | 129 | if ( options.noCompare == false ) { | 2837 | 57 | compare(operations, results, data, size); | 2838 | 57 | } | 2839 | 129 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 588 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 588 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 588 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.45k | do { | 2725 | 3.45k | auto op = getOp(&parentDs, data, size); | 2726 | 3.45k | auto module = getModule(parentDs); | 2727 | 3.45k | if ( module == nullptr ) { | 2728 | 2.06k | continue; | 2729 | 2.06k | } | 2730 | | | 2731 | 1.39k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.39k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 3.45k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 588 | if ( operations.empty() == true ) { | 2740 | 17 | return; | 2741 | 17 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 571 | #if 1 | 2745 | 571 | { | 2746 | 571 | std::set<uint64_t> moduleIDs; | 2747 | 1.01k | for (const auto& m : modules ) { | 2748 | 1.01k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.01k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.01k | moduleIDs.insert(moduleID); | 2756 | 1.01k | } | 2757 | | | 2758 | 571 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.24k | for (const auto& op : operations) { | 2760 | 1.24k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.24k | } | 2762 | | | 2763 | 571 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 571 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 571 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 571 | for (const auto& id : addModuleIDs) { | 2768 | 485 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 485 | } | 2770 | 571 | } | 2771 | 571 | #endif | 2772 | | | 2773 | 571 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 571 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 2.29k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.72k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.72k | auto& module = operation.first; | 2784 | 1.72k | auto& op = operation.second; | 2785 | | | 2786 | 1.72k | if ( i > 0 ) { | 2787 | 1.21k | auto& prevModule = operations[i-1].first; | 2788 | 1.21k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 1.21k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 639 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 639 | if ( curModifier.size() == 0 ) { | 2793 | 238k | for (size_t j = 0; j < 512; j++) { | 2794 | 237k | curModifier.push_back(1); | 2795 | 237k | } | 2796 | 464 | } else { | 2797 | 49.1k | for (auto& c : curModifier) { | 2798 | 49.1k | c++; | 2799 | 49.1k | } | 2800 | 175 | } | 2801 | 639 | } | 2802 | 1.21k | } | 2803 | | | 2804 | 1.72k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.72k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.72k | const auto& result = results.back(); | 2811 | | | 2812 | 1.72k | if ( result.second != std::nullopt ) { | 2813 | 826 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 826 | } | 2820 | | | 2821 | 1.72k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 1.72k | if ( options.disableTests == false ) { | 2830 | 1.72k | tests::test(op, result.second); | 2831 | 1.72k | } | 2832 | | | 2833 | 1.72k | postprocess(module, op, result); | 2834 | 1.72k | } | 2835 | | | 2836 | 571 | if ( options.noCompare == false ) { | 2837 | 508 | compare(operations, results, data, size); | 2838 | 508 | } | 2839 | 571 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 336 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 336 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 336 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.42k | do { | 2725 | 2.42k | auto op = getOp(&parentDs, data, size); | 2726 | 2.42k | auto module = getModule(parentDs); | 2727 | 2.42k | if ( module == nullptr ) { | 2728 | 1.95k | continue; | 2729 | 1.95k | } | 2730 | | | 2731 | 472 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 472 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 48 | break; | 2736 | 48 | } | 2737 | 2.37k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 336 | if ( operations.empty() == true ) { | 2740 | 18 | return; | 2741 | 18 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 318 | #if 1 | 2745 | 318 | { | 2746 | 318 | std::set<uint64_t> moduleIDs; | 2747 | 522 | for (const auto& m : modules ) { | 2748 | 522 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 522 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 522 | moduleIDs.insert(moduleID); | 2756 | 522 | } | 2757 | | | 2758 | 318 | std::set<uint64_t> operationModuleIDs; | 2759 | 392 | for (const auto& op : operations) { | 2760 | 392 | operationModuleIDs.insert(op.first->ID); | 2761 | 392 | } | 2762 | | | 2763 | 318 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 318 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 318 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 318 | for (const auto& id : addModuleIDs) { | 2768 | 256 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 256 | } | 2770 | 318 | } | 2771 | 318 | #endif | 2772 | | | 2773 | 318 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 318 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 966 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 648 | auto& operation = operations[i]; | 2782 | | | 2783 | 648 | auto& module = operation.first; | 2784 | 648 | auto& op = operation.second; | 2785 | | | 2786 | 648 | if ( i > 0 ) { | 2787 | 387 | auto& prevModule = operations[i-1].first; | 2788 | 387 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 387 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 125 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 125 | if ( curModifier.size() == 0 ) { | 2793 | 55.9k | for (size_t j = 0; j < 512; j++) { | 2794 | 55.8k | curModifier.push_back(1); | 2795 | 55.8k | } | 2796 | 109 | } else { | 2797 | 683 | for (auto& c : curModifier) { | 2798 | 683 | c++; | 2799 | 683 | } | 2800 | 16 | } | 2801 | 125 | } | 2802 | 387 | } | 2803 | | | 2804 | 648 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 648 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 648 | const auto& result = results.back(); | 2811 | | | 2812 | 648 | if ( result.second != std::nullopt ) { | 2813 | 320 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 320 | } | 2820 | | | 2821 | 648 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 648 | if ( options.disableTests == false ) { | 2830 | 648 | tests::test(op, result.second); | 2831 | 648 | } | 2832 | | | 2833 | 648 | postprocess(module, op, result); | 2834 | 648 | } | 2835 | | | 2836 | 318 | if ( options.noCompare == false ) { | 2837 | 261 | compare(operations, results, data, size); | 2838 | 261 | } | 2839 | 318 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 109 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 109 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 109 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.22k | do { | 2725 | 2.22k | auto op = getOp(&parentDs, data, size); | 2726 | 2.22k | auto module = getModule(parentDs); | 2727 | 2.22k | if ( module == nullptr ) { | 2728 | 1.81k | continue; | 2729 | 1.81k | } | 2730 | | | 2731 | 406 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 406 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 2.22k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 109 | if ( operations.empty() == true ) { | 2740 | 4 | return; | 2741 | 4 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 105 | #if 1 | 2745 | 105 | { | 2746 | 105 | std::set<uint64_t> moduleIDs; | 2747 | 105 | for (const auto& m : modules ) { | 2748 | 82 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 82 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 82 | moduleIDs.insert(moduleID); | 2756 | 82 | } | 2757 | | | 2758 | 105 | std::set<uint64_t> operationModuleIDs; | 2759 | 227 | for (const auto& op : operations) { | 2760 | 227 | operationModuleIDs.insert(op.first->ID); | 2761 | 227 | } | 2762 | | | 2763 | 105 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 105 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 105 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 105 | for (const auto& id : addModuleIDs) { | 2768 | 26 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 26 | } | 2770 | 105 | } | 2771 | 105 | #endif | 2772 | | | 2773 | 105 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 105 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 358 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 253 | auto& operation = operations[i]; | 2782 | | | 2783 | 253 | auto& module = operation.first; | 2784 | 253 | auto& op = operation.second; | 2785 | | | 2786 | 253 | if ( i > 0 ) { | 2787 | 212 | auto& prevModule = operations[i-1].first; | 2788 | 212 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 212 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 142 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 142 | if ( curModifier.size() == 0 ) { | 2793 | 40.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 39.9k | curModifier.push_back(1); | 2795 | 39.9k | } | 2796 | 78 | } else { | 2797 | 913 | for (auto& c : curModifier) { | 2798 | 913 | c++; | 2799 | 913 | } | 2800 | 64 | } | 2801 | 142 | } | 2802 | 212 | } | 2803 | | | 2804 | 253 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 253 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 253 | const auto& result = results.back(); | 2811 | | | 2812 | 253 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 253 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 253 | if ( options.disableTests == false ) { | 2830 | 253 | tests::test(op, result.second); | 2831 | 253 | } | 2832 | | | 2833 | 253 | postprocess(module, op, result); | 2834 | 253 | } | 2835 | | | 2836 | 105 | if ( options.noCompare == false ) { | 2837 | 41 | compare(operations, results, data, size); | 2838 | 41 | } | 2839 | 105 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 116 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 116 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 116 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.39k | do { | 2725 | 2.39k | auto op = getOp(&parentDs, data, size); | 2726 | 2.39k | auto module = getModule(parentDs); | 2727 | 2.39k | if ( module == nullptr ) { | 2728 | 1.81k | continue; | 2729 | 1.81k | } | 2730 | | | 2731 | 586 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 586 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 2.39k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 116 | if ( operations.empty() == true ) { | 2740 | 7 | return; | 2741 | 7 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 109 | #if 1 | 2745 | 109 | { | 2746 | 109 | std::set<uint64_t> moduleIDs; | 2747 | 109 | for (const auto& m : modules ) { | 2748 | 98 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 98 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 98 | moduleIDs.insert(moduleID); | 2756 | 98 | } | 2757 | | | 2758 | 109 | std::set<uint64_t> operationModuleIDs; | 2759 | 370 | for (const auto& op : operations) { | 2760 | 370 | operationModuleIDs.insert(op.first->ID); | 2761 | 370 | } | 2762 | | | 2763 | 109 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 109 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 109 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 109 | for (const auto& id : addModuleIDs) { | 2768 | 29 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 29 | } | 2770 | 109 | } | 2771 | 109 | #endif | 2772 | | | 2773 | 109 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 109 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 508 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 399 | auto& operation = operations[i]; | 2782 | | | 2783 | 399 | auto& module = operation.first; | 2784 | 399 | auto& op = operation.second; | 2785 | | | 2786 | 399 | if ( i > 0 ) { | 2787 | 350 | auto& prevModule = operations[i-1].first; | 2788 | 350 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 350 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 236 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 236 | if ( curModifier.size() == 0 ) { | 2793 | 76.9k | for (size_t j = 0; j < 512; j++) { | 2794 | 76.8k | curModifier.push_back(1); | 2795 | 76.8k | } | 2796 | 150 | } else { | 2797 | 650 | for (auto& c : curModifier) { | 2798 | 650 | c++; | 2799 | 650 | } | 2800 | 86 | } | 2801 | 236 | } | 2802 | 350 | } | 2803 | | | 2804 | 399 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 399 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 399 | const auto& result = results.back(); | 2811 | | | 2812 | 399 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 399 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 399 | if ( options.disableTests == false ) { | 2830 | 399 | tests::test(op, result.second); | 2831 | 399 | } | 2832 | | | 2833 | 399 | postprocess(module, op, result); | 2834 | 399 | } | 2835 | | | 2836 | 109 | if ( options.noCompare == false ) { | 2837 | 49 | compare(operations, results, data, size); | 2838 | 49 | } | 2839 | 109 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 103 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 103 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 103 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.56k | do { | 2725 | 2.56k | auto op = getOp(&parentDs, data, size); | 2726 | 2.56k | auto module = getModule(parentDs); | 2727 | 2.56k | if ( module == nullptr ) { | 2728 | 2.46k | continue; | 2729 | 2.46k | } | 2730 | | | 2731 | 100 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 100 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 17 | break; | 2736 | 17 | } | 2737 | 2.55k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 103 | if ( operations.empty() == true ) { | 2740 | 13 | return; | 2741 | 13 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 90 | #if 1 | 2745 | 90 | { | 2746 | 90 | std::set<uint64_t> moduleIDs; | 2747 | 90 | for (const auto& m : modules ) { | 2748 | 88 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 88 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 88 | moduleIDs.insert(moduleID); | 2756 | 88 | } | 2757 | | | 2758 | 90 | std::set<uint64_t> operationModuleIDs; | 2759 | 90 | for (const auto& op : operations) { | 2760 | 61 | operationModuleIDs.insert(op.first->ID); | 2761 | 61 | } | 2762 | | | 2763 | 90 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 90 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 90 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 90 | for (const auto& id : addModuleIDs) { | 2768 | 42 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 42 | } | 2770 | 90 | } | 2771 | 90 | #endif | 2772 | | | 2773 | 90 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 90 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 193 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 103 | auto& operation = operations[i]; | 2782 | | | 2783 | 103 | auto& module = operation.first; | 2784 | 103 | auto& op = operation.second; | 2785 | | | 2786 | 103 | if ( i > 0 ) { | 2787 | 59 | auto& prevModule = operations[i-1].first; | 2788 | 59 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 59 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 15 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 15 | if ( curModifier.size() == 0 ) { | 2793 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.07k | curModifier.push_back(1); | 2795 | 3.07k | } | 2796 | 9 | } else { | 2797 | 371 | for (auto& c : curModifier) { | 2798 | 371 | c++; | 2799 | 371 | } | 2800 | 9 | } | 2801 | 15 | } | 2802 | 59 | } | 2803 | | | 2804 | 103 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 103 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 103 | const auto& result = results.back(); | 2811 | | | 2812 | 103 | if ( result.second != std::nullopt ) { | 2813 | 33 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 33 | } | 2820 | | | 2821 | 103 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 103 | if ( options.disableTests == false ) { | 2830 | 103 | tests::test(op, result.second); | 2831 | 103 | } | 2832 | | | 2833 | 103 | postprocess(module, op, result); | 2834 | 103 | } | 2835 | | | 2836 | 90 | if ( options.noCompare == false ) { | 2837 | 44 | compare(operations, results, data, size); | 2838 | 44 | } | 2839 | 90 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 379 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 379 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 379 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.46k | do { | 2725 | 3.46k | auto op = getOp(&parentDs, data, size); | 2726 | 3.46k | auto module = getModule(parentDs); | 2727 | 3.46k | if ( module == nullptr ) { | 2728 | 2.30k | continue; | 2729 | 2.30k | } | 2730 | | | 2731 | 1.16k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.16k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 3.46k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 379 | if ( operations.empty() == true ) { | 2740 | 15 | return; | 2741 | 15 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 364 | #if 1 | 2745 | 364 | { | 2746 | 364 | std::set<uint64_t> moduleIDs; | 2747 | 608 | for (const auto& m : modules ) { | 2748 | 608 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 608 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 608 | moduleIDs.insert(moduleID); | 2756 | 608 | } | 2757 | | | 2758 | 364 | std::set<uint64_t> operationModuleIDs; | 2759 | 985 | for (const auto& op : operations) { | 2760 | 985 | operationModuleIDs.insert(op.first->ID); | 2761 | 985 | } | 2762 | | | 2763 | 364 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 364 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 364 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 364 | for (const auto& id : addModuleIDs) { | 2768 | 288 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 288 | } | 2770 | 364 | } | 2771 | 364 | #endif | 2772 | | | 2773 | 364 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 364 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.63k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.27k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.27k | auto& module = operation.first; | 2784 | 1.27k | auto& op = operation.second; | 2785 | | | 2786 | 1.27k | if ( i > 0 ) { | 2787 | 969 | auto& prevModule = operations[i-1].first; | 2788 | 969 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 969 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 636 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 636 | if ( curModifier.size() == 0 ) { | 2793 | 255k | for (size_t j = 0; j < 512; j++) { | 2794 | 254k | curModifier.push_back(1); | 2795 | 254k | } | 2796 | 498 | } else { | 2797 | 38.2k | for (auto& c : curModifier) { | 2798 | 38.2k | c++; | 2799 | 38.2k | } | 2800 | 138 | } | 2801 | 636 | } | 2802 | 969 | } | 2803 | | | 2804 | 1.27k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.27k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.27k | const auto& result = results.back(); | 2811 | | | 2812 | 1.27k | if ( result.second != std::nullopt ) { | 2813 | 578 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 578 | } | 2820 | | | 2821 | 1.27k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 1.27k | if ( options.disableTests == false ) { | 2830 | 1.27k | tests::test(op, result.second); | 2831 | 1.27k | } | 2832 | | | 2833 | 1.27k | postprocess(module, op, result); | 2834 | 1.27k | } | 2835 | | | 2836 | 364 | if ( options.noCompare == false ) { | 2837 | 304 | compare(operations, results, data, size); | 2838 | 304 | } | 2839 | 364 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 117 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 117 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 117 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.95k | do { | 2725 | 1.95k | auto op = getOp(&parentDs, data, size); | 2726 | 1.95k | auto module = getModule(parentDs); | 2727 | 1.95k | if ( module == nullptr ) { | 2728 | 1.47k | continue; | 2729 | 1.47k | } | 2730 | | | 2731 | 480 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 480 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 1.95k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 117 | if ( operations.empty() == true ) { | 2740 | 9 | return; | 2741 | 9 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 108 | #if 1 | 2745 | 108 | { | 2746 | 108 | std::set<uint64_t> moduleIDs; | 2747 | 108 | for (const auto& m : modules ) { | 2748 | 100 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 100 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 100 | moduleIDs.insert(moduleID); | 2756 | 100 | } | 2757 | | | 2758 | 108 | std::set<uint64_t> operationModuleIDs; | 2759 | 328 | for (const auto& op : operations) { | 2760 | 328 | operationModuleIDs.insert(op.first->ID); | 2761 | 328 | } | 2762 | | | 2763 | 108 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 108 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 108 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 108 | for (const auto& id : addModuleIDs) { | 2768 | 32 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 32 | } | 2770 | 108 | } | 2771 | 108 | #endif | 2772 | | | 2773 | 108 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 108 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 468 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 360 | auto& operation = operations[i]; | 2782 | | | 2783 | 360 | auto& module = operation.first; | 2784 | 360 | auto& op = operation.second; | 2785 | | | 2786 | 360 | if ( i > 0 ) { | 2787 | 310 | auto& prevModule = operations[i-1].first; | 2788 | 310 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 310 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 159 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 159 | if ( curModifier.size() == 0 ) { | 2793 | 42.5k | for (size_t j = 0; j < 512; j++) { | 2794 | 42.4k | curModifier.push_back(1); | 2795 | 42.4k | } | 2796 | 83 | } else { | 2797 | 673 | for (auto& c : curModifier) { | 2798 | 673 | c++; | 2799 | 673 | } | 2800 | 76 | } | 2801 | 159 | } | 2802 | 310 | } | 2803 | | | 2804 | 360 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 360 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 360 | const auto& result = results.back(); | 2811 | | | 2812 | 360 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 360 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 360 | if ( options.disableTests == false ) { | 2830 | 360 | tests::test(op, result.second); | 2831 | 360 | } | 2832 | | | 2833 | 360 | postprocess(module, op, result); | 2834 | 360 | } | 2835 | | | 2836 | 108 | if ( options.noCompare == false ) { | 2837 | 50 | compare(operations, results, data, size); | 2838 | 50 | } | 2839 | 108 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 106 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 106 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 106 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.33k | do { | 2725 | 2.33k | auto op = getOp(&parentDs, data, size); | 2726 | 2.33k | auto module = getModule(parentDs); | 2727 | 2.33k | if ( module == nullptr ) { | 2728 | 1.91k | continue; | 2729 | 1.91k | } | 2730 | | | 2731 | 418 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 418 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 2.33k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 106 | if ( operations.empty() == true ) { | 2740 | 11 | return; | 2741 | 11 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 95 | #if 1 | 2745 | 95 | { | 2746 | 95 | std::set<uint64_t> moduleIDs; | 2747 | 95 | for (const auto& m : modules ) { | 2748 | 86 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 86 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 86 | moduleIDs.insert(moduleID); | 2756 | 86 | } | 2757 | | | 2758 | 95 | std::set<uint64_t> operationModuleIDs; | 2759 | 276 | for (const auto& op : operations) { | 2760 | 276 | operationModuleIDs.insert(op.first->ID); | 2761 | 276 | } | 2762 | | | 2763 | 95 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 95 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 95 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 95 | for (const auto& id : addModuleIDs) { | 2768 | 27 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 27 | } | 2770 | 95 | } | 2771 | 95 | #endif | 2772 | | | 2773 | 95 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 95 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 398 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 303 | auto& operation = operations[i]; | 2782 | | | 2783 | 303 | auto& module = operation.first; | 2784 | 303 | auto& op = operation.second; | 2785 | | | 2786 | 303 | if ( i > 0 ) { | 2787 | 260 | auto& prevModule = operations[i-1].first; | 2788 | 260 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 260 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 171 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 171 | if ( curModifier.size() == 0 ) { | 2793 | 61.5k | for (size_t j = 0; j < 512; j++) { | 2794 | 61.4k | curModifier.push_back(1); | 2795 | 61.4k | } | 2796 | 120 | } else { | 2797 | 353 | for (auto& c : curModifier) { | 2798 | 353 | c++; | 2799 | 353 | } | 2800 | 51 | } | 2801 | 171 | } | 2802 | 260 | } | 2803 | | | 2804 | 303 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 303 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 303 | const auto& result = results.back(); | 2811 | | | 2812 | 303 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 303 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 303 | if ( options.disableTests == false ) { | 2830 | 303 | tests::test(op, result.second); | 2831 | 303 | } | 2832 | | | 2833 | 303 | postprocess(module, op, result); | 2834 | 303 | } | 2835 | | | 2836 | 95 | if ( options.noCompare == false ) { | 2837 | 43 | compare(operations, results, data, size); | 2838 | 43 | } | 2839 | 95 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 534 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 534 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 534 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.13k | do { | 2725 | 2.13k | auto op = getOp(&parentDs, data, size); | 2726 | 2.13k | auto module = getModule(parentDs); | 2727 | 2.13k | if ( module == nullptr ) { | 2728 | 1.41k | continue; | 2729 | 1.41k | } | 2730 | | | 2731 | 714 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 714 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 13 | break; | 2736 | 13 | } | 2737 | 2.11k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 534 | if ( operations.empty() == true ) { | 2740 | 42 | return; | 2741 | 42 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 492 | #if 1 | 2745 | 492 | { | 2746 | 492 | std::set<uint64_t> moduleIDs; | 2747 | 848 | for (const auto& m : modules ) { | 2748 | 848 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 848 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 848 | moduleIDs.insert(moduleID); | 2756 | 848 | } | 2757 | | | 2758 | 492 | std::set<uint64_t> operationModuleIDs; | 2759 | 631 | for (const auto& op : operations) { | 2760 | 631 | operationModuleIDs.insert(op.first->ID); | 2761 | 631 | } | 2762 | | | 2763 | 492 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 492 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 492 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 492 | for (const auto& id : addModuleIDs) { | 2768 | 410 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 410 | } | 2770 | 492 | } | 2771 | 492 | #endif | 2772 | | | 2773 | 492 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 492 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.53k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.04k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.04k | auto& module = operation.first; | 2784 | 1.04k | auto& op = operation.second; | 2785 | | | 2786 | 1.04k | if ( i > 0 ) { | 2787 | 617 | auto& prevModule = operations[i-1].first; | 2788 | 617 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 617 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 187 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 187 | if ( curModifier.size() == 0 ) { | 2793 | 55.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 55.2k | curModifier.push_back(1); | 2795 | 55.2k | } | 2796 | 108 | } else { | 2797 | 31.7k | for (auto& c : curModifier) { | 2798 | 31.7k | c++; | 2799 | 31.7k | } | 2800 | 79 | } | 2801 | 187 | } | 2802 | 617 | } | 2803 | | | 2804 | 1.04k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.04k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.04k | const auto& result = results.back(); | 2811 | | | 2812 | 1.04k | if ( result.second != std::nullopt ) { | 2813 | 373 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 373 | } | 2820 | | | 2821 | 1.04k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 1.04k | if ( options.disableTests == false ) { | 2830 | 1.04k | tests::test(op, result.second); | 2831 | 1.04k | } | 2832 | | | 2833 | 1.04k | postprocess(module, op, result); | 2834 | 1.04k | } | 2835 | | | 2836 | 492 | if ( options.noCompare == false ) { | 2837 | 424 | compare(operations, results, data, size); | 2838 | 424 | } | 2839 | 492 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 640 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 640 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 640 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.46k | do { | 2725 | 2.46k | auto op = getOp(&parentDs, data, size); | 2726 | 2.46k | auto module = getModule(parentDs); | 2727 | 2.46k | if ( module == nullptr ) { | 2728 | 1.65k | continue; | 2729 | 1.65k | } | 2730 | | | 2731 | 815 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 815 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 10 | break; | 2736 | 10 | } | 2737 | 2.45k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 640 | if ( operations.empty() == true ) { | 2740 | 10 | return; | 2741 | 10 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 630 | #if 1 | 2745 | 630 | { | 2746 | 630 | std::set<uint64_t> moduleIDs; | 2747 | 1.16k | for (const auto& m : modules ) { | 2748 | 1.16k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.16k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.16k | moduleIDs.insert(moduleID); | 2756 | 1.16k | } | 2757 | | | 2758 | 630 | std::set<uint64_t> operationModuleIDs; | 2759 | 756 | for (const auto& op : operations) { | 2760 | 756 | operationModuleIDs.insert(op.first->ID); | 2761 | 756 | } | 2762 | | | 2763 | 630 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 630 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 630 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 630 | for (const auto& id : addModuleIDs) { | 2768 | 567 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 567 | } | 2770 | 630 | } | 2771 | 630 | #endif | 2772 | | | 2773 | 630 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 630 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.95k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.32k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.32k | auto& module = operation.first; | 2784 | 1.32k | auto& op = operation.second; | 2785 | | | 2786 | 1.32k | if ( i > 0 ) { | 2787 | 742 | auto& prevModule = operations[i-1].first; | 2788 | 742 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 742 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 155 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 155 | if ( curModifier.size() == 0 ) { | 2793 | 48.7k | for (size_t j = 0; j < 512; j++) { | 2794 | 48.6k | curModifier.push_back(1); | 2795 | 48.6k | } | 2796 | 95 | } else { | 2797 | 524 | for (auto& c : curModifier) { | 2798 | 524 | c++; | 2799 | 524 | } | 2800 | 60 | } | 2801 | 155 | } | 2802 | 742 | } | 2803 | | | 2804 | 1.32k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.32k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.32k | const auto& result = results.back(); | 2811 | | | 2812 | 1.32k | if ( result.second != std::nullopt ) { | 2813 | 1.14k | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 1.14k | } | 2820 | | | 2821 | 1.32k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 1.32k | if ( options.disableTests == false ) { | 2830 | 1.32k | tests::test(op, result.second); | 2831 | 1.32k | } | 2832 | | | 2833 | 1.32k | postprocess(module, op, result); | 2834 | 1.32k | } | 2835 | | | 2836 | 630 | if ( options.noCompare == false ) { | 2837 | 581 | compare(operations, results, data, size); | 2838 | 581 | } | 2839 | 630 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 818 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 818 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 818 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.40k | do { | 2725 | 2.40k | auto op = getOp(&parentDs, data, size); | 2726 | 2.40k | auto module = getModule(parentDs); | 2727 | 2.40k | if ( module == nullptr ) { | 2728 | 1.51k | continue; | 2729 | 1.51k | } | 2730 | | | 2731 | 889 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 889 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 16 | break; | 2736 | 16 | } | 2737 | 2.38k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 818 | if ( operations.empty() == true ) { | 2740 | 63 | return; | 2741 | 63 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 755 | #if 1 | 2745 | 755 | { | 2746 | 755 | std::set<uint64_t> moduleIDs; | 2747 | 1.37k | for (const auto& m : modules ) { | 2748 | 1.37k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.37k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.37k | moduleIDs.insert(moduleID); | 2756 | 1.37k | } | 2757 | | | 2758 | 755 | std::set<uint64_t> operationModuleIDs; | 2759 | 849 | for (const auto& op : operations) { | 2760 | 849 | operationModuleIDs.insert(op.first->ID); | 2761 | 849 | } | 2762 | | | 2763 | 755 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 755 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 755 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 755 | for (const auto& id : addModuleIDs) { | 2768 | 674 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 674 | } | 2770 | 755 | } | 2771 | 755 | #endif | 2772 | | | 2773 | 755 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 755 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 2.27k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.52k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.52k | auto& module = operation.first; | 2784 | 1.52k | auto& op = operation.second; | 2785 | | | 2786 | 1.52k | if ( i > 0 ) { | 2787 | 838 | auto& prevModule = operations[i-1].first; | 2788 | 838 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 838 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 145 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 145 | if ( curModifier.size() == 0 ) { | 2793 | 52.8k | for (size_t j = 0; j < 512; j++) { | 2794 | 52.7k | curModifier.push_back(1); | 2795 | 52.7k | } | 2796 | 103 | } else { | 2797 | 20.9k | for (auto& c : curModifier) { | 2798 | 20.9k | c++; | 2799 | 20.9k | } | 2800 | 42 | } | 2801 | 145 | } | 2802 | 838 | } | 2803 | | | 2804 | 1.52k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.52k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.52k | const auto& result = results.back(); | 2811 | | | 2812 | 1.52k | if ( result.second != std::nullopt ) { | 2813 | 523 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 523 | } | 2820 | | | 2821 | 1.52k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 1.52k | if ( options.disableTests == false ) { | 2830 | 1.52k | tests::test(op, result.second); | 2831 | 1.52k | } | 2832 | | | 2833 | 1.52k | postprocess(module, op, result); | 2834 | 1.52k | } | 2835 | | | 2836 | 755 | if ( options.noCompare == false ) { | 2837 | 685 | compare(operations, results, data, size); | 2838 | 685 | } | 2839 | 755 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 94 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 94 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 94 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.12k | do { | 2725 | 2.12k | auto op = getOp(&parentDs, data, size); | 2726 | 2.12k | auto module = getModule(parentDs); | 2727 | 2.12k | if ( module == nullptr ) { | 2728 | 1.95k | continue; | 2729 | 1.95k | } | 2730 | | | 2731 | 166 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 166 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 2.11k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 94 | if ( operations.empty() == true ) { | 2740 | 11 | return; | 2741 | 11 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 83 | #if 1 | 2745 | 83 | { | 2746 | 83 | std::set<uint64_t> moduleIDs; | 2747 | 83 | for (const auto& m : modules ) { | 2748 | 70 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 70 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 70 | moduleIDs.insert(moduleID); | 2756 | 70 | } | 2757 | | | 2758 | 83 | std::set<uint64_t> operationModuleIDs; | 2759 | 107 | for (const auto& op : operations) { | 2760 | 107 | operationModuleIDs.insert(op.first->ID); | 2761 | 107 | } | 2762 | | | 2763 | 83 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 83 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 83 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 83 | for (const auto& id : addModuleIDs) { | 2768 | 24 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 24 | } | 2770 | 83 | } | 2771 | 83 | #endif | 2772 | | | 2773 | 83 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 83 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 214 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 131 | auto& operation = operations[i]; | 2782 | | | 2783 | 131 | auto& module = operation.first; | 2784 | 131 | auto& op = operation.second; | 2785 | | | 2786 | 131 | if ( i > 0 ) { | 2787 | 96 | auto& prevModule = operations[i-1].first; | 2788 | 96 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 96 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 54 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 54 | if ( curModifier.size() == 0 ) { | 2793 | 14.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 14.3k | curModifier.push_back(1); | 2795 | 14.3k | } | 2796 | 28 | } else { | 2797 | 496 | for (auto& c : curModifier) { | 2798 | 496 | c++; | 2799 | 496 | } | 2800 | 26 | } | 2801 | 54 | } | 2802 | 96 | } | 2803 | | | 2804 | 131 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 131 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 131 | const auto& result = results.back(); | 2811 | | | 2812 | 131 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 131 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 131 | if ( options.disableTests == false ) { | 2830 | 131 | tests::test(op, result.second); | 2831 | 131 | } | 2832 | | | 2833 | 131 | postprocess(module, op, result); | 2834 | 131 | } | 2835 | | | 2836 | 83 | if ( options.noCompare == false ) { | 2837 | 35 | compare(operations, results, data, size); | 2838 | 35 | } | 2839 | 83 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 538 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 538 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 538 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.02k | do { | 2725 | 3.02k | auto op = getOp(&parentDs, data, size); | 2726 | 3.02k | auto module = getModule(parentDs); | 2727 | 3.02k | if ( module == nullptr ) { | 2728 | 2.05k | continue; | 2729 | 2.05k | } | 2730 | | | 2731 | 977 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 977 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 46 | break; | 2736 | 46 | } | 2737 | 2.98k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 538 | if ( operations.empty() == true ) { | 2740 | 13 | return; | 2741 | 13 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 525 | #if 1 | 2745 | 525 | { | 2746 | 525 | std::set<uint64_t> moduleIDs; | 2747 | 970 | for (const auto& m : modules ) { | 2748 | 970 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 970 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 970 | moduleIDs.insert(moduleID); | 2756 | 970 | } | 2757 | | | 2758 | 525 | std::set<uint64_t> operationModuleIDs; | 2759 | 925 | for (const auto& op : operations) { | 2760 | 925 | operationModuleIDs.insert(op.first->ID); | 2761 | 925 | } | 2762 | | | 2763 | 525 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 525 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 525 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 525 | for (const auto& id : addModuleIDs) { | 2768 | 475 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 475 | } | 2770 | 525 | } | 2771 | 525 | #endif | 2772 | | | 2773 | 525 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 525 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.92k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.40k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.40k | auto& module = operation.first; | 2784 | 1.40k | auto& op = operation.second; | 2785 | | | 2786 | 1.40k | if ( i > 0 ) { | 2787 | 915 | auto& prevModule = operations[i-1].first; | 2788 | 915 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 915 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 424 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 424 | if ( curModifier.size() == 0 ) { | 2793 | 154k | for (size_t j = 0; j < 512; j++) { | 2794 | 154k | curModifier.push_back(1); | 2795 | 154k | } | 2796 | 301 | } else { | 2797 | 7.35k | for (auto& c : curModifier) { | 2798 | 7.35k | c++; | 2799 | 7.35k | } | 2800 | 123 | } | 2801 | 424 | } | 2802 | 915 | } | 2803 | | | 2804 | 1.40k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.40k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.40k | const auto& result = results.back(); | 2811 | | | 2812 | 1.40k | if ( result.second != std::nullopt ) { | 2813 | 654 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 654 | } | 2820 | | | 2821 | 1.40k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 1.40k | if ( options.disableTests == false ) { | 2830 | 1.40k | tests::test(op, result.second); | 2831 | 1.40k | } | 2832 | | | 2833 | 1.40k | postprocess(module, op, result); | 2834 | 1.40k | } | 2835 | | | 2836 | 525 | if ( options.noCompare == false ) { | 2837 | 485 | compare(operations, results, data, size); | 2838 | 485 | } | 2839 | 525 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 137 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 137 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 137 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.14k | do { | 2725 | 2.14k | auto op = getOp(&parentDs, data, size); | 2726 | 2.14k | auto module = getModule(parentDs); | 2727 | 2.14k | if ( module == nullptr ) { | 2728 | 1.89k | continue; | 2729 | 1.89k | } | 2730 | | | 2731 | 254 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 254 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 13 | break; | 2736 | 13 | } | 2737 | 2.13k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 137 | if ( operations.empty() == true ) { | 2740 | 11 | return; | 2741 | 11 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 126 | #if 1 | 2745 | 126 | { | 2746 | 126 | std::set<uint64_t> moduleIDs; | 2747 | 150 | for (const auto& m : modules ) { | 2748 | 150 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 150 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 150 | moduleIDs.insert(moduleID); | 2756 | 150 | } | 2757 | | | 2758 | 126 | std::set<uint64_t> operationModuleIDs; | 2759 | 192 | for (const auto& op : operations) { | 2760 | 192 | operationModuleIDs.insert(op.first->ID); | 2761 | 192 | } | 2762 | | | 2763 | 126 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 126 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 126 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 126 | for (const auto& id : addModuleIDs) { | 2768 | 64 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 64 | } | 2770 | 126 | } | 2771 | 126 | #endif | 2772 | | | 2773 | 126 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 126 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 382 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 256 | auto& operation = operations[i]; | 2782 | | | 2783 | 256 | auto& module = operation.first; | 2784 | 256 | auto& op = operation.second; | 2785 | | | 2786 | 256 | if ( i > 0 ) { | 2787 | 181 | auto& prevModule = operations[i-1].first; | 2788 | 181 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 181 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 97 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 97 | if ( curModifier.size() == 0 ) { | 2793 | 28.7k | for (size_t j = 0; j < 512; j++) { | 2794 | 28.6k | curModifier.push_back(1); | 2795 | 28.6k | } | 2796 | 56 | } else { | 2797 | 1.19k | for (auto& c : curModifier) { | 2798 | 1.19k | c++; | 2799 | 1.19k | } | 2800 | 41 | } | 2801 | 97 | } | 2802 | 181 | } | 2803 | | | 2804 | 256 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 256 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 256 | const auto& result = results.back(); | 2811 | | | 2812 | 256 | if ( result.second != std::nullopt ) { | 2813 | 14 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 14 | } | 2820 | | | 2821 | 256 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 256 | if ( options.disableTests == false ) { | 2830 | 256 | tests::test(op, result.second); | 2831 | 256 | } | 2832 | | | 2833 | 256 | postprocess(module, op, result); | 2834 | 256 | } | 2835 | | | 2836 | 126 | if ( options.noCompare == false ) { | 2837 | 75 | compare(operations, results, data, size); | 2838 | 75 | } | 2839 | 126 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 110 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 110 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 110 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.30k | do { | 2725 | 2.30k | auto op = getOp(&parentDs, data, size); | 2726 | 2.30k | auto module = getModule(parentDs); | 2727 | 2.30k | if ( module == nullptr ) { | 2728 | 2.13k | continue; | 2729 | 2.13k | } | 2730 | | | 2731 | 176 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 176 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 9 | break; | 2736 | 9 | } | 2737 | 2.30k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 110 | if ( operations.empty() == true ) { | 2740 | 16 | return; | 2741 | 16 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 94 | #if 1 | 2745 | 94 | { | 2746 | 94 | std::set<uint64_t> moduleIDs; | 2747 | 94 | for (const auto& m : modules ) { | 2748 | 70 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 70 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 70 | moduleIDs.insert(moduleID); | 2756 | 70 | } | 2757 | | | 2758 | 94 | std::set<uint64_t> operationModuleIDs; | 2759 | 105 | for (const auto& op : operations) { | 2760 | 105 | operationModuleIDs.insert(op.first->ID); | 2761 | 105 | } | 2762 | | | 2763 | 94 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 94 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 94 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 94 | for (const auto& id : addModuleIDs) { | 2768 | 24 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 24 | } | 2770 | 94 | } | 2771 | 94 | #endif | 2772 | | | 2773 | 94 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 94 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 223 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 129 | auto& operation = operations[i]; | 2782 | | | 2783 | 129 | auto& module = operation.first; | 2784 | 129 | auto& op = operation.second; | 2785 | | | 2786 | 129 | if ( i > 0 ) { | 2787 | 94 | auto& prevModule = operations[i-1].first; | 2788 | 94 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 94 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 49 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 49 | if ( curModifier.size() == 0 ) { | 2793 | 11.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 11.2k | curModifier.push_back(1); | 2795 | 11.2k | } | 2796 | 27 | } else { | 2797 | 768 | for (auto& c : curModifier) { | 2798 | 768 | c++; | 2799 | 768 | } | 2800 | 27 | } | 2801 | 49 | } | 2802 | 94 | } | 2803 | | | 2804 | 129 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 129 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 129 | const auto& result = results.back(); | 2811 | | | 2812 | 129 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 129 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 129 | if ( options.disableTests == false ) { | 2830 | 129 | tests::test(op, result.second); | 2831 | 129 | } | 2832 | | | 2833 | 129 | postprocess(module, op, result); | 2834 | 129 | } | 2835 | | | 2836 | 94 | if ( options.noCompare == false ) { | 2837 | 35 | compare(operations, results, data, size); | 2838 | 35 | } | 2839 | 94 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 98 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 98 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 98 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.18k | do { | 2725 | 2.18k | auto op = getOp(&parentDs, data, size); | 2726 | 2.18k | auto module = getModule(parentDs); | 2727 | 2.18k | if ( module == nullptr ) { | 2728 | 2.03k | continue; | 2729 | 2.03k | } | 2730 | | | 2731 | 150 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 150 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 2.18k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 98 | if ( operations.empty() == true ) { | 2740 | 13 | return; | 2741 | 13 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 85 | #if 1 | 2745 | 85 | { | 2746 | 85 | std::set<uint64_t> moduleIDs; | 2747 | 85 | for (const auto& m : modules ) { | 2748 | 76 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 76 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 76 | moduleIDs.insert(moduleID); | 2756 | 76 | } | 2757 | | | 2758 | 85 | std::set<uint64_t> operationModuleIDs; | 2759 | 105 | for (const auto& op : operations) { | 2760 | 105 | operationModuleIDs.insert(op.first->ID); | 2761 | 105 | } | 2762 | | | 2763 | 85 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 85 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 85 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 85 | for (const auto& id : addModuleIDs) { | 2768 | 27 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 27 | } | 2770 | 85 | } | 2771 | 85 | #endif | 2772 | | | 2773 | 85 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 85 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 217 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 132 | auto& operation = operations[i]; | 2782 | | | 2783 | 132 | auto& module = operation.first; | 2784 | 132 | auto& op = operation.second; | 2785 | | | 2786 | 132 | if ( i > 0 ) { | 2787 | 94 | auto& prevModule = operations[i-1].first; | 2788 | 94 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 94 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 46 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 46 | if ( curModifier.size() == 0 ) { | 2793 | 9.74k | for (size_t j = 0; j < 512; j++) { | 2794 | 9.72k | curModifier.push_back(1); | 2795 | 9.72k | } | 2796 | 27 | } else { | 2797 | 895 | for (auto& c : curModifier) { | 2798 | 895 | c++; | 2799 | 895 | } | 2800 | 27 | } | 2801 | 46 | } | 2802 | 94 | } | 2803 | | | 2804 | 132 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 132 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 132 | const auto& result = results.back(); | 2811 | | | 2812 | 132 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 132 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 132 | if ( options.disableTests == false ) { | 2830 | 132 | tests::test(op, result.second); | 2831 | 132 | } | 2832 | | | 2833 | 132 | postprocess(module, op, result); | 2834 | 132 | } | 2835 | | | 2836 | 85 | if ( options.noCompare == false ) { | 2837 | 38 | compare(operations, results, data, size); | 2838 | 38 | } | 2839 | 85 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 93 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 93 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 93 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.43k | do { | 2725 | 2.43k | auto op = getOp(&parentDs, data, size); | 2726 | 2.43k | auto module = getModule(parentDs); | 2727 | 2.43k | if ( module == nullptr ) { | 2728 | 2.24k | continue; | 2729 | 2.24k | } | 2730 | | | 2731 | 181 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 181 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 2.42k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 93 | if ( operations.empty() == true ) { | 2740 | 10 | return; | 2741 | 10 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 83 | #if 1 | 2745 | 83 | { | 2746 | 83 | std::set<uint64_t> moduleIDs; | 2747 | 83 | for (const auto& m : modules ) { | 2748 | 66 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 66 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 66 | moduleIDs.insert(moduleID); | 2756 | 66 | } | 2757 | | | 2758 | 83 | std::set<uint64_t> operationModuleIDs; | 2759 | 101 | for (const auto& op : operations) { | 2760 | 101 | operationModuleIDs.insert(op.first->ID); | 2761 | 101 | } | 2762 | | | 2763 | 83 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 83 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 83 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 83 | for (const auto& id : addModuleIDs) { | 2768 | 23 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 23 | } | 2770 | 83 | } | 2771 | 83 | #endif | 2772 | | | 2773 | 83 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 83 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 207 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 124 | auto& operation = operations[i]; | 2782 | | | 2783 | 124 | auto& module = operation.first; | 2784 | 124 | auto& op = operation.second; | 2785 | | | 2786 | 124 | if ( i > 0 ) { | 2787 | 91 | auto& prevModule = operations[i-1].first; | 2788 | 91 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 91 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 52 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 52 | if ( curModifier.size() == 0 ) { | 2793 | 12.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 12.2k | curModifier.push_back(1); | 2795 | 12.2k | } | 2796 | 28 | } else { | 2797 | 358 | for (auto& c : curModifier) { | 2798 | 358 | c++; | 2799 | 358 | } | 2800 | 28 | } | 2801 | 52 | } | 2802 | 91 | } | 2803 | | | 2804 | 124 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 124 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 124 | const auto& result = results.back(); | 2811 | | | 2812 | 124 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 124 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 124 | if ( options.disableTests == false ) { | 2830 | 124 | tests::test(op, result.second); | 2831 | 124 | } | 2832 | | | 2833 | 124 | postprocess(module, op, result); | 2834 | 124 | } | 2835 | | | 2836 | 83 | if ( options.noCompare == false ) { | 2837 | 33 | compare(operations, results, data, size); | 2838 | 33 | } | 2839 | 83 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 295 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 295 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 295 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.34k | do { | 2725 | 2.34k | auto op = getOp(&parentDs, data, size); | 2726 | 2.34k | auto module = getModule(parentDs); | 2727 | 2.34k | if ( module == nullptr ) { | 2728 | 1.75k | continue; | 2729 | 1.75k | } | 2730 | | | 2731 | 592 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 592 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 22 | break; | 2736 | 22 | } | 2737 | 2.32k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 295 | if ( operations.empty() == true ) { | 2740 | 6 | return; | 2741 | 6 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 289 | #if 1 | 2745 | 289 | { | 2746 | 289 | std::set<uint64_t> moduleIDs; | 2747 | 498 | for (const auto& m : modules ) { | 2748 | 498 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 498 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 498 | moduleIDs.insert(moduleID); | 2756 | 498 | } | 2757 | | | 2758 | 289 | std::set<uint64_t> operationModuleIDs; | 2759 | 534 | for (const auto& op : operations) { | 2760 | 534 | operationModuleIDs.insert(op.first->ID); | 2761 | 534 | } | 2762 | | | 2763 | 289 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 289 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 289 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 289 | for (const auto& id : addModuleIDs) { | 2768 | 232 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 232 | } | 2770 | 289 | } | 2771 | 289 | #endif | 2772 | | | 2773 | 289 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 289 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.05k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 766 | auto& operation = operations[i]; | 2782 | | | 2783 | 766 | auto& module = operation.first; | 2784 | 766 | auto& op = operation.second; | 2785 | | | 2786 | 766 | if ( i > 0 ) { | 2787 | 517 | auto& prevModule = operations[i-1].first; | 2788 | 517 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 517 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 258 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 258 | if ( curModifier.size() == 0 ) { | 2793 | 93.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 93.1k | curModifier.push_back(1); | 2795 | 93.1k | } | 2796 | 182 | } else { | 2797 | 626 | for (auto& c : curModifier) { | 2798 | 626 | c++; | 2799 | 626 | } | 2800 | 76 | } | 2801 | 258 | } | 2802 | 517 | } | 2803 | | | 2804 | 766 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 766 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 766 | const auto& result = results.back(); | 2811 | | | 2812 | 766 | if ( result.second != std::nullopt ) { | 2813 | 418 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 418 | } | 2820 | | | 2821 | 766 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 766 | if ( options.disableTests == false ) { | 2830 | 766 | tests::test(op, result.second); | 2831 | 766 | } | 2832 | | | 2833 | 766 | postprocess(module, op, result); | 2834 | 766 | } | 2835 | | | 2836 | 289 | if ( options.noCompare == false ) { | 2837 | 249 | compare(operations, results, data, size); | 2838 | 249 | } | 2839 | 289 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 166 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 166 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 166 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.21k | do { | 2725 | 2.21k | auto op = getOp(&parentDs, data, size); | 2726 | 2.21k | auto module = getModule(parentDs); | 2727 | 2.21k | if ( module == nullptr ) { | 2728 | 1.92k | continue; | 2729 | 1.92k | } | 2730 | | | 2731 | 285 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 285 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 10 | break; | 2736 | 10 | } | 2737 | 2.20k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 166 | if ( operations.empty() == true ) { | 2740 | 15 | return; | 2741 | 15 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 151 | #if 1 | 2745 | 151 | { | 2746 | 151 | std::set<uint64_t> moduleIDs; | 2747 | 232 | for (const auto& m : modules ) { | 2748 | 232 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 232 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 232 | moduleIDs.insert(moduleID); | 2756 | 232 | } | 2757 | | | 2758 | 151 | std::set<uint64_t> operationModuleIDs; | 2759 | 254 | for (const auto& op : operations) { | 2760 | 254 | operationModuleIDs.insert(op.first->ID); | 2761 | 254 | } | 2762 | | | 2763 | 151 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 151 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 151 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 151 | for (const auto& id : addModuleIDs) { | 2768 | 106 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 106 | } | 2770 | 151 | } | 2771 | 151 | #endif | 2772 | | | 2773 | 151 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 151 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 511 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 360 | auto& operation = operations[i]; | 2782 | | | 2783 | 360 | auto& module = operation.first; | 2784 | 360 | auto& op = operation.second; | 2785 | | | 2786 | 360 | if ( i > 0 ) { | 2787 | 244 | auto& prevModule = operations[i-1].first; | 2788 | 244 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 244 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 122 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 122 | if ( curModifier.size() == 0 ) { | 2793 | 36.9k | for (size_t j = 0; j < 512; j++) { | 2794 | 36.8k | curModifier.push_back(1); | 2795 | 36.8k | } | 2796 | 72 | } else { | 2797 | 778 | for (auto& c : curModifier) { | 2798 | 778 | c++; | 2799 | 778 | } | 2800 | 50 | } | 2801 | 122 | } | 2802 | 244 | } | 2803 | | | 2804 | 360 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 360 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 360 | const auto& result = results.back(); | 2811 | | | 2812 | 360 | if ( result.second != std::nullopt ) { | 2813 | 133 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 133 | } | 2820 | | | 2821 | 360 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 360 | if ( options.disableTests == false ) { | 2830 | 360 | tests::test(op, result.second); | 2831 | 360 | } | 2832 | | | 2833 | 360 | postprocess(module, op, result); | 2834 | 360 | } | 2835 | | | 2836 | 151 | if ( options.noCompare == false ) { | 2837 | 116 | compare(operations, results, data, size); | 2838 | 116 | } | 2839 | 151 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 76 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 76 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 76 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.98k | do { | 2725 | 1.98k | auto op = getOp(&parentDs, data, size); | 2726 | 1.98k | auto module = getModule(parentDs); | 2727 | 1.98k | if ( module == nullptr ) { | 2728 | 1.84k | continue; | 2729 | 1.84k | } | 2730 | | | 2731 | 137 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 137 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 1.97k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 76 | if ( operations.empty() == true ) { | 2740 | 10 | return; | 2741 | 10 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 66 | #if 1 | 2745 | 66 | { | 2746 | 66 | std::set<uint64_t> moduleIDs; | 2747 | 66 | for (const auto& m : modules ) { | 2748 | 60 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 60 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 60 | moduleIDs.insert(moduleID); | 2756 | 60 | } | 2757 | | | 2758 | 66 | std::set<uint64_t> operationModuleIDs; | 2759 | 88 | for (const auto& op : operations) { | 2760 | 88 | operationModuleIDs.insert(op.first->ID); | 2761 | 88 | } | 2762 | | | 2763 | 66 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 66 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 66 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 66 | for (const auto& id : addModuleIDs) { | 2768 | 19 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 19 | } | 2770 | 66 | } | 2771 | 66 | #endif | 2772 | | | 2773 | 66 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 66 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 173 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 107 | auto& operation = operations[i]; | 2782 | | | 2783 | 107 | auto& module = operation.first; | 2784 | 107 | auto& op = operation.second; | 2785 | | | 2786 | 107 | if ( i > 0 ) { | 2787 | 77 | auto& prevModule = operations[i-1].first; | 2788 | 77 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 77 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 36 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 36 | if ( curModifier.size() == 0 ) { | 2793 | 8.72k | for (size_t j = 0; j < 512; j++) { | 2794 | 8.70k | curModifier.push_back(1); | 2795 | 8.70k | } | 2796 | 19 | } else { | 2797 | 360 | for (auto& c : curModifier) { | 2798 | 360 | c++; | 2799 | 360 | } | 2800 | 19 | } | 2801 | 36 | } | 2802 | 77 | } | 2803 | | | 2804 | 107 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 107 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 107 | const auto& result = results.back(); | 2811 | | | 2812 | 107 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 107 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 107 | if ( options.disableTests == false ) { | 2830 | 107 | tests::test(op, result.second); | 2831 | 107 | } | 2832 | | | 2833 | 107 | postprocess(module, op, result); | 2834 | 107 | } | 2835 | | | 2836 | 66 | if ( options.noCompare == false ) { | 2837 | 30 | compare(operations, results, data, size); | 2838 | 30 | } | 2839 | 66 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 86 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 86 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 86 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.24k | do { | 2725 | 2.24k | auto op = getOp(&parentDs, data, size); | 2726 | 2.24k | auto module = getModule(parentDs); | 2727 | 2.24k | if ( module == nullptr ) { | 2728 | 2.07k | continue; | 2729 | 2.07k | } | 2730 | | | 2731 | 174 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 174 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 2.23k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 86 | if ( operations.empty() == true ) { | 2740 | 6 | return; | 2741 | 6 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 80 | #if 1 | 2745 | 80 | { | 2746 | 80 | std::set<uint64_t> moduleIDs; | 2747 | 80 | for (const auto& m : modules ) { | 2748 | 74 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 74 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 74 | moduleIDs.insert(moduleID); | 2756 | 74 | } | 2757 | | | 2758 | 80 | std::set<uint64_t> operationModuleIDs; | 2759 | 111 | for (const auto& op : operations) { | 2760 | 111 | operationModuleIDs.insert(op.first->ID); | 2761 | 111 | } | 2762 | | | 2763 | 80 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 80 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 80 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 80 | for (const auto& id : addModuleIDs) { | 2768 | 24 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 24 | } | 2770 | 80 | } | 2771 | 80 | #endif | 2772 | | | 2773 | 80 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 80 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 215 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 135 | auto& operation = operations[i]; | 2782 | | | 2783 | 135 | auto& module = operation.first; | 2784 | 135 | auto& op = operation.second; | 2785 | | | 2786 | 135 | if ( i > 0 ) { | 2787 | 98 | auto& prevModule = operations[i-1].first; | 2788 | 98 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 98 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 55 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 55 | if ( curModifier.size() == 0 ) { | 2793 | 16.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 16.3k | curModifier.push_back(1); | 2795 | 16.3k | } | 2796 | 32 | } else { | 2797 | 588 | for (auto& c : curModifier) { | 2798 | 588 | c++; | 2799 | 588 | } | 2800 | 23 | } | 2801 | 55 | } | 2802 | 98 | } | 2803 | | | 2804 | 135 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 135 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 135 | const auto& result = results.back(); | 2811 | | | 2812 | 135 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 135 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 135 | if ( options.disableTests == false ) { | 2830 | 135 | tests::test(op, result.second); | 2831 | 135 | } | 2832 | | | 2833 | 135 | postprocess(module, op, result); | 2834 | 135 | } | 2835 | | | 2836 | 80 | if ( options.noCompare == false ) { | 2837 | 37 | compare(operations, results, data, size); | 2838 | 37 | } | 2839 | 80 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 390 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 390 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 390 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.63k | do { | 2725 | 2.63k | auto op = getOp(&parentDs, data, size); | 2726 | 2.63k | auto module = getModule(parentDs); | 2727 | 2.63k | if ( module == nullptr ) { | 2728 | 2.01k | continue; | 2729 | 2.01k | } | 2730 | | | 2731 | 617 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 617 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 16 | break; | 2736 | 16 | } | 2737 | 2.61k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 390 | if ( operations.empty() == true ) { | 2740 | 16 | return; | 2741 | 16 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 374 | #if 1 | 2745 | 374 | { | 2746 | 374 | std::set<uint64_t> moduleIDs; | 2747 | 674 | for (const auto& m : modules ) { | 2748 | 674 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 674 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 674 | moduleIDs.insert(moduleID); | 2756 | 674 | } | 2757 | | | 2758 | 374 | std::set<uint64_t> operationModuleIDs; | 2759 | 575 | for (const auto& op : operations) { | 2760 | 575 | operationModuleIDs.insert(op.first->ID); | 2761 | 575 | } | 2762 | | | 2763 | 374 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 374 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 374 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 374 | for (const auto& id : addModuleIDs) { | 2768 | 325 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 325 | } | 2770 | 374 | } | 2771 | 374 | #endif | 2772 | | | 2773 | 374 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 374 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.27k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 900 | auto& operation = operations[i]; | 2782 | | | 2783 | 900 | auto& module = operation.first; | 2784 | 900 | auto& op = operation.second; | 2785 | | | 2786 | 900 | if ( i > 0 ) { | 2787 | 563 | auto& prevModule = operations[i-1].first; | 2788 | 563 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 563 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 220 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 220 | if ( curModifier.size() == 0 ) { | 2793 | 74.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 74.2k | curModifier.push_back(1); | 2795 | 74.2k | } | 2796 | 145 | } else { | 2797 | 1.85k | for (auto& c : curModifier) { | 2798 | 1.85k | c++; | 2799 | 1.85k | } | 2800 | 75 | } | 2801 | 220 | } | 2802 | 563 | } | 2803 | | | 2804 | 900 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 900 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 900 | const auto& result = results.back(); | 2811 | | | 2812 | 900 | if ( result.second != std::nullopt ) { | 2813 | 280 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 280 | } | 2820 | | | 2821 | 900 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 900 | if ( options.disableTests == false ) { | 2830 | 900 | tests::test(op, result.second); | 2831 | 900 | } | 2832 | | | 2833 | 900 | postprocess(module, op, result); | 2834 | 900 | } | 2835 | | | 2836 | 374 | if ( options.noCompare == false ) { | 2837 | 337 | compare(operations, results, data, size); | 2838 | 337 | } | 2839 | 374 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 205 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 205 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 205 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.97k | do { | 2725 | 1.97k | auto op = getOp(&parentDs, data, size); | 2726 | 1.97k | auto module = getModule(parentDs); | 2727 | 1.97k | if ( module == nullptr ) { | 2728 | 1.56k | continue; | 2729 | 1.56k | } | 2730 | | | 2731 | 413 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 413 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 1.96k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 205 | if ( operations.empty() == true ) { | 2740 | 8 | return; | 2741 | 8 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 197 | #if 1 | 2745 | 197 | { | 2746 | 197 | std::set<uint64_t> moduleIDs; | 2747 | 306 | for (const auto& m : modules ) { | 2748 | 306 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 306 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 306 | moduleIDs.insert(moduleID); | 2756 | 306 | } | 2757 | | | 2758 | 197 | std::set<uint64_t> operationModuleIDs; | 2759 | 358 | for (const auto& op : operations) { | 2760 | 358 | operationModuleIDs.insert(op.first->ID); | 2761 | 358 | } | 2762 | | | 2763 | 197 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 197 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 197 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 197 | for (const auto& id : addModuleIDs) { | 2768 | 140 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 140 | } | 2770 | 197 | } | 2771 | 197 | #endif | 2772 | | | 2773 | 197 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 197 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 695 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 498 | auto& operation = operations[i]; | 2782 | | | 2783 | 498 | auto& module = operation.first; | 2784 | 498 | auto& op = operation.second; | 2785 | | | 2786 | 498 | if ( i > 0 ) { | 2787 | 345 | auto& prevModule = operations[i-1].first; | 2788 | 345 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 345 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 184 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 184 | if ( curModifier.size() == 0 ) { | 2793 | 69.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 69.1k | curModifier.push_back(1); | 2795 | 69.1k | } | 2796 | 135 | } else { | 2797 | 5.63k | for (auto& c : curModifier) { | 2798 | 5.63k | c++; | 2799 | 5.63k | } | 2800 | 49 | } | 2801 | 184 | } | 2802 | 345 | } | 2803 | | | 2804 | 498 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 498 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 498 | const auto& result = results.back(); | 2811 | | | 2812 | 498 | if ( result.second != std::nullopt ) { | 2813 | 102 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 102 | } | 2820 | | | 2821 | 498 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 498 | if ( options.disableTests == false ) { | 2830 | 498 | tests::test(op, result.second); | 2831 | 498 | } | 2832 | | | 2833 | 498 | postprocess(module, op, result); | 2834 | 498 | } | 2835 | | | 2836 | 197 | if ( options.noCompare == false ) { | 2837 | 153 | compare(operations, results, data, size); | 2838 | 153 | } | 2839 | 197 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 117 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 117 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 117 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.15k | do { | 2725 | 2.15k | auto op = getOp(&parentDs, data, size); | 2726 | 2.15k | auto module = getModule(parentDs); | 2727 | 2.15k | if ( module == nullptr ) { | 2728 | 1.98k | continue; | 2729 | 1.98k | } | 2730 | | | 2731 | 170 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 170 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 2.15k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 117 | if ( operations.empty() == true ) { | 2740 | 10 | return; | 2741 | 10 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 107 | #if 1 | 2745 | 107 | { | 2746 | 107 | std::set<uint64_t> moduleIDs; | 2747 | 107 | for (const auto& m : modules ) { | 2748 | 88 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 88 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 88 | moduleIDs.insert(moduleID); | 2756 | 88 | } | 2757 | | | 2758 | 107 | std::set<uint64_t> operationModuleIDs; | 2759 | 109 | for (const auto& op : operations) { | 2760 | 109 | operationModuleIDs.insert(op.first->ID); | 2761 | 109 | } | 2762 | | | 2763 | 107 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 107 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 107 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 107 | for (const auto& id : addModuleIDs) { | 2768 | 32 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 32 | } | 2770 | 107 | } | 2771 | 107 | #endif | 2772 | | | 2773 | 107 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 107 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 248 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 141 | auto& operation = operations[i]; | 2782 | | | 2783 | 141 | auto& module = operation.first; | 2784 | 141 | auto& op = operation.second; | 2785 | | | 2786 | 141 | if ( i > 0 ) { | 2787 | 97 | auto& prevModule = operations[i-1].first; | 2788 | 97 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 97 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 45 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 45 | if ( curModifier.size() == 0 ) { | 2793 | 10.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 10.2k | curModifier.push_back(1); | 2795 | 10.2k | } | 2796 | 25 | } else { | 2797 | 1.75k | for (auto& c : curModifier) { | 2798 | 1.75k | c++; | 2799 | 1.75k | } | 2800 | 25 | } | 2801 | 45 | } | 2802 | 97 | } | 2803 | | | 2804 | 141 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 141 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 141 | const auto& result = results.back(); | 2811 | | | 2812 | 141 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 141 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 141 | if ( options.disableTests == false ) { | 2830 | 141 | tests::test(op, result.second); | 2831 | 141 | } | 2832 | | | 2833 | 141 | postprocess(module, op, result); | 2834 | 141 | } | 2835 | | | 2836 | 107 | if ( options.noCompare == false ) { | 2837 | 44 | compare(operations, results, data, size); | 2838 | 44 | } | 2839 | 107 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 167 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 167 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 167 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.56k | do { | 2725 | 1.56k | auto op = getOp(&parentDs, data, size); | 2726 | 1.56k | auto module = getModule(parentDs); | 2727 | 1.56k | if ( module == nullptr ) { | 2728 | 1.38k | continue; | 2729 | 1.38k | } | 2730 | | | 2731 | 181 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 181 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 1.56k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 167 | if ( operations.empty() == true ) { | 2740 | 17 | return; | 2741 | 17 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 150 | #if 1 | 2745 | 150 | { | 2746 | 150 | std::set<uint64_t> moduleIDs; | 2747 | 150 | for (const auto& m : modules ) { | 2748 | 72 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 72 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 72 | moduleIDs.insert(moduleID); | 2756 | 72 | } | 2757 | | | 2758 | 150 | std::set<uint64_t> operationModuleIDs; | 2759 | 150 | for (const auto& op : operations) { | 2760 | 103 | operationModuleIDs.insert(op.first->ID); | 2761 | 103 | } | 2762 | | | 2763 | 150 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 150 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 150 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 150 | for (const auto& id : addModuleIDs) { | 2768 | 23 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 23 | } | 2770 | 150 | } | 2771 | 150 | #endif | 2772 | | | 2773 | 150 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 150 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 276 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 126 | auto& operation = operations[i]; | 2782 | | | 2783 | 126 | auto& module = operation.first; | 2784 | 126 | auto& op = operation.second; | 2785 | | | 2786 | 126 | if ( i > 0 ) { | 2787 | 90 | auto& prevModule = operations[i-1].first; | 2788 | 90 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 90 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 48 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 48 | if ( curModifier.size() == 0 ) { | 2793 | 12.8k | for (size_t j = 0; j < 512; j++) { | 2794 | 12.8k | curModifier.push_back(1); | 2795 | 12.8k | } | 2796 | 25 | } else { | 2797 | 257 | for (auto& c : curModifier) { | 2798 | 257 | c++; | 2799 | 257 | } | 2800 | 23 | } | 2801 | 48 | } | 2802 | 90 | } | 2803 | | | 2804 | 126 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 126 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 126 | const auto& result = results.back(); | 2811 | | | 2812 | 126 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 126 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 126 | if ( options.disableTests == false ) { | 2830 | 126 | tests::test(op, result.second); | 2831 | 126 | } | 2832 | | | 2833 | 126 | postprocess(module, op, result); | 2834 | 126 | } | 2835 | | | 2836 | 150 | if ( options.noCompare == false ) { | 2837 | 36 | compare(operations, results, data, size); | 2838 | 36 | } | 2839 | 150 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 115 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 115 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 115 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.20k | do { | 2725 | 2.20k | auto op = getOp(&parentDs, data, size); | 2726 | 2.20k | auto module = getModule(parentDs); | 2727 | 2.20k | if ( module == nullptr ) { | 2728 | 2.03k | continue; | 2729 | 2.03k | } | 2730 | | | 2731 | 166 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 166 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 2.19k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 115 | if ( operations.empty() == true ) { | 2740 | 11 | return; | 2741 | 11 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 104 | #if 1 | 2745 | 104 | { | 2746 | 104 | std::set<uint64_t> moduleIDs; | 2747 | 104 | for (const auto& m : modules ) { | 2748 | 54 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 54 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 54 | moduleIDs.insert(moduleID); | 2756 | 54 | } | 2757 | | | 2758 | 104 | std::set<uint64_t> operationModuleIDs; | 2759 | 104 | for (const auto& op : operations) { | 2760 | 84 | operationModuleIDs.insert(op.first->ID); | 2761 | 84 | } | 2762 | | | 2763 | 104 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 104 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 104 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 104 | for (const auto& id : addModuleIDs) { | 2768 | 16 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 16 | } | 2770 | 104 | } | 2771 | 104 | #endif | 2772 | | | 2773 | 104 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 104 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 204 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 100 | auto& operation = operations[i]; | 2782 | | | 2783 | 100 | auto& module = operation.first; | 2784 | 100 | auto& op = operation.second; | 2785 | | | 2786 | 100 | if ( i > 0 ) { | 2787 | 73 | auto& prevModule = operations[i-1].first; | 2788 | 73 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 73 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 37 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 37 | if ( curModifier.size() == 0 ) { | 2793 | 8.72k | for (size_t j = 0; j < 512; j++) { | 2794 | 8.70k | curModifier.push_back(1); | 2795 | 8.70k | } | 2796 | 20 | } else { | 2797 | 580 | for (auto& c : curModifier) { | 2798 | 580 | c++; | 2799 | 580 | } | 2800 | 20 | } | 2801 | 37 | } | 2802 | 73 | } | 2803 | | | 2804 | 100 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 100 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 100 | const auto& result = results.back(); | 2811 | | | 2812 | 100 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 100 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 100 | if ( options.disableTests == false ) { | 2830 | 100 | tests::test(op, result.second); | 2831 | 100 | } | 2832 | | | 2833 | 100 | postprocess(module, op, result); | 2834 | 100 | } | 2835 | | | 2836 | 104 | if ( options.noCompare == false ) { | 2837 | 27 | compare(operations, results, data, size); | 2838 | 27 | } | 2839 | 104 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 114 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 114 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 114 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.20k | do { | 2725 | 2.20k | auto op = getOp(&parentDs, data, size); | 2726 | 2.20k | auto module = getModule(parentDs); | 2727 | 2.20k | if ( module == nullptr ) { | 2728 | 2.01k | continue; | 2729 | 2.01k | } | 2730 | | | 2731 | 190 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 190 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 9 | break; | 2736 | 9 | } | 2737 | 2.19k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 114 | if ( operations.empty() == true ) { | 2740 | 9 | return; | 2741 | 9 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 105 | #if 1 | 2745 | 105 | { | 2746 | 105 | std::set<uint64_t> moduleIDs; | 2747 | 105 | for (const auto& m : modules ) { | 2748 | 84 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 84 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 84 | moduleIDs.insert(moduleID); | 2756 | 84 | } | 2757 | | | 2758 | 105 | std::set<uint64_t> operationModuleIDs; | 2759 | 120 | for (const auto& op : operations) { | 2760 | 120 | operationModuleIDs.insert(op.first->ID); | 2761 | 120 | } | 2762 | | | 2763 | 105 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 105 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 105 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 105 | for (const auto& id : addModuleIDs) { | 2768 | 32 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 32 | } | 2770 | 105 | } | 2771 | 105 | #endif | 2772 | | | 2773 | 105 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 105 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 257 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 152 | auto& operation = operations[i]; | 2782 | | | 2783 | 152 | auto& module = operation.first; | 2784 | 152 | auto& op = operation.second; | 2785 | | | 2786 | 152 | if ( i > 0 ) { | 2787 | 110 | auto& prevModule = operations[i-1].first; | 2788 | 110 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 110 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 60 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 60 | if ( curModifier.size() == 0 ) { | 2793 | 14.8k | for (size_t j = 0; j < 512; j++) { | 2794 | 14.8k | curModifier.push_back(1); | 2795 | 14.8k | } | 2796 | 31 | } else { | 2797 | 2.48k | for (auto& c : curModifier) { | 2798 | 2.48k | c++; | 2799 | 2.48k | } | 2800 | 31 | } | 2801 | 60 | } | 2802 | 110 | } | 2803 | | | 2804 | 152 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 152 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 152 | const auto& result = results.back(); | 2811 | | | 2812 | 152 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 152 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 152 | if ( options.disableTests == false ) { | 2830 | 152 | tests::test(op, result.second); | 2831 | 152 | } | 2832 | | | 2833 | 152 | postprocess(module, op, result); | 2834 | 152 | } | 2835 | | | 2836 | 105 | if ( options.noCompare == false ) { | 2837 | 42 | compare(operations, results, data, size); | 2838 | 42 | } | 2839 | 105 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 134 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 134 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 134 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.26k | do { | 2725 | 2.26k | auto op = getOp(&parentDs, data, size); | 2726 | 2.26k | auto module = getModule(parentDs); | 2727 | 2.26k | if ( module == nullptr ) { | 2728 | 2.07k | continue; | 2729 | 2.07k | } | 2730 | | | 2731 | 188 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 188 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 2.25k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 134 | if ( operations.empty() == true ) { | 2740 | 37 | return; | 2741 | 37 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 97 | #if 1 | 2745 | 97 | { | 2746 | 97 | std::set<uint64_t> moduleIDs; | 2747 | 97 | for (const auto& m : modules ) { | 2748 | 72 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 72 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 72 | moduleIDs.insert(moduleID); | 2756 | 72 | } | 2757 | | | 2758 | 97 | std::set<uint64_t> operationModuleIDs; | 2759 | 104 | for (const auto& op : operations) { | 2760 | 104 | operationModuleIDs.insert(op.first->ID); | 2761 | 104 | } | 2762 | | | 2763 | 97 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 97 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 97 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 97 | for (const auto& id : addModuleIDs) { | 2768 | 23 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 23 | } | 2770 | 97 | } | 2771 | 97 | #endif | 2772 | | | 2773 | 97 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 97 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 224 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 127 | auto& operation = operations[i]; | 2782 | | | 2783 | 127 | auto& module = operation.first; | 2784 | 127 | auto& op = operation.second; | 2785 | | | 2786 | 127 | if ( i > 0 ) { | 2787 | 91 | auto& prevModule = operations[i-1].first; | 2788 | 91 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 91 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 48 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 48 | if ( curModifier.size() == 0 ) { | 2793 | 10.7k | for (size_t j = 0; j < 512; j++) { | 2794 | 10.7k | curModifier.push_back(1); | 2795 | 10.7k | } | 2796 | 27 | } else { | 2797 | 1.29k | for (auto& c : curModifier) { | 2798 | 1.29k | c++; | 2799 | 1.29k | } | 2800 | 27 | } | 2801 | 48 | } | 2802 | 91 | } | 2803 | | | 2804 | 127 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 127 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 127 | const auto& result = results.back(); | 2811 | | | 2812 | 127 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 127 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 127 | if ( options.disableTests == false ) { | 2830 | 127 | tests::test(op, result.second); | 2831 | 127 | } | 2832 | | | 2833 | 127 | postprocess(module, op, result); | 2834 | 127 | } | 2835 | | | 2836 | 97 | if ( options.noCompare == false ) { | 2837 | 36 | compare(operations, results, data, size); | 2838 | 36 | } | 2839 | 97 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 95 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 95 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 95 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.29k | do { | 2725 | 2.29k | auto op = getOp(&parentDs, data, size); | 2726 | 2.29k | auto module = getModule(parentDs); | 2727 | 2.29k | if ( module == nullptr ) { | 2728 | 2.09k | continue; | 2729 | 2.09k | } | 2730 | | | 2731 | 204 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 204 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 9 | break; | 2736 | 9 | } | 2737 | 2.28k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 95 | if ( operations.empty() == true ) { | 2740 | 9 | return; | 2741 | 9 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 86 | #if 1 | 2745 | 86 | { | 2746 | 86 | std::set<uint64_t> moduleIDs; | 2747 | 86 | for (const auto& m : modules ) { | 2748 | 76 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 76 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 76 | moduleIDs.insert(moduleID); | 2756 | 76 | } | 2757 | | | 2758 | 86 | std::set<uint64_t> operationModuleIDs; | 2759 | 119 | for (const auto& op : operations) { | 2760 | 119 | operationModuleIDs.insert(op.first->ID); | 2761 | 119 | } | 2762 | | | 2763 | 86 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 86 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 86 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 86 | for (const auto& id : addModuleIDs) { | 2768 | 29 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 29 | } | 2770 | 86 | } | 2771 | 86 | #endif | 2772 | | | 2773 | 86 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 86 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 234 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 148 | auto& operation = operations[i]; | 2782 | | | 2783 | 148 | auto& module = operation.first; | 2784 | 148 | auto& op = operation.second; | 2785 | | | 2786 | 148 | if ( i > 0 ) { | 2787 | 110 | auto& prevModule = operations[i-1].first; | 2788 | 110 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 110 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 64 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 64 | if ( curModifier.size() == 0 ) { | 2793 | 19.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 19.4k | curModifier.push_back(1); | 2795 | 19.4k | } | 2796 | 38 | } else { | 2797 | 1.16k | for (auto& c : curModifier) { | 2798 | 1.16k | c++; | 2799 | 1.16k | } | 2800 | 26 | } | 2801 | 64 | } | 2802 | 110 | } | 2803 | | | 2804 | 148 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 148 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 148 | const auto& result = results.back(); | 2811 | | | 2812 | 148 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 148 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 148 | if ( options.disableTests == false ) { | 2830 | 148 | tests::test(op, result.second); | 2831 | 148 | } | 2832 | | | 2833 | 148 | postprocess(module, op, result); | 2834 | 148 | } | 2835 | | | 2836 | 86 | if ( options.noCompare == false ) { | 2837 | 38 | compare(operations, results, data, size); | 2838 | 38 | } | 2839 | 86 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 108 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 108 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 108 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.54k | do { | 2725 | 2.54k | auto op = getOp(&parentDs, data, size); | 2726 | 2.54k | auto module = getModule(parentDs); | 2727 | 2.54k | if ( module == nullptr ) { | 2728 | 2.35k | continue; | 2729 | 2.35k | } | 2730 | | | 2731 | 195 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 195 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 2.54k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 108 | if ( operations.empty() == true ) { | 2740 | 11 | return; | 2741 | 11 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 97 | #if 1 | 2745 | 97 | { | 2746 | 97 | std::set<uint64_t> moduleIDs; | 2747 | 97 | for (const auto& m : modules ) { | 2748 | 58 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 58 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 58 | moduleIDs.insert(moduleID); | 2756 | 58 | } | 2757 | | | 2758 | 97 | std::set<uint64_t> operationModuleIDs; | 2759 | 97 | for (const auto& op : operations) { | 2760 | 80 | operationModuleIDs.insert(op.first->ID); | 2761 | 80 | } | 2762 | | | 2763 | 97 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 97 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 97 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 97 | for (const auto& id : addModuleIDs) { | 2768 | 16 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 16 | } | 2770 | 97 | } | 2771 | 97 | #endif | 2772 | | | 2773 | 97 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 97 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 193 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 96 | auto& operation = operations[i]; | 2782 | | | 2783 | 96 | auto& module = operation.first; | 2784 | 96 | auto& op = operation.second; | 2785 | | | 2786 | 96 | if ( i > 0 ) { | 2787 | 67 | auto& prevModule = operations[i-1].first; | 2788 | 67 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 67 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 31 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 31 | if ( curModifier.size() == 0 ) { | 2793 | 6.15k | for (size_t j = 0; j < 512; j++) { | 2794 | 6.14k | curModifier.push_back(1); | 2795 | 6.14k | } | 2796 | 19 | } else { | 2797 | 867 | for (auto& c : curModifier) { | 2798 | 867 | c++; | 2799 | 867 | } | 2800 | 19 | } | 2801 | 31 | } | 2802 | 67 | } | 2803 | | | 2804 | 96 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 96 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 96 | const auto& result = results.back(); | 2811 | | | 2812 | 96 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 96 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 96 | if ( options.disableTests == false ) { | 2830 | 96 | tests::test(op, result.second); | 2831 | 96 | } | 2832 | | | 2833 | 96 | postprocess(module, op, result); | 2834 | 96 | } | 2835 | | | 2836 | 97 | if ( options.noCompare == false ) { | 2837 | 29 | compare(operations, results, data, size); | 2838 | 29 | } | 2839 | 97 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 129 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 129 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 129 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.69k | do { | 2725 | 1.69k | auto op = getOp(&parentDs, data, size); | 2726 | 1.69k | auto module = getModule(parentDs); | 2727 | 1.69k | if ( module == nullptr ) { | 2728 | 1.44k | continue; | 2729 | 1.44k | } | 2730 | | | 2731 | 246 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 246 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 13 | break; | 2736 | 13 | } | 2737 | 1.68k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 129 | if ( operations.empty() == true ) { | 2740 | 12 | return; | 2741 | 12 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 117 | #if 1 | 2745 | 117 | { | 2746 | 117 | std::set<uint64_t> moduleIDs; | 2747 | 134 | for (const auto& m : modules ) { | 2748 | 134 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 134 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 134 | moduleIDs.insert(moduleID); | 2756 | 134 | } | 2757 | | | 2758 | 117 | std::set<uint64_t> operationModuleIDs; | 2759 | 181 | for (const auto& op : operations) { | 2760 | 181 | operationModuleIDs.insert(op.first->ID); | 2761 | 181 | } | 2762 | | | 2763 | 117 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 117 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 117 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 117 | for (const auto& id : addModuleIDs) { | 2768 | 57 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 57 | } | 2770 | 117 | } | 2771 | 117 | #endif | 2772 | | | 2773 | 117 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 117 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 355 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 238 | auto& operation = operations[i]; | 2782 | | | 2783 | 238 | auto& module = operation.first; | 2784 | 238 | auto& op = operation.second; | 2785 | | | 2786 | 238 | if ( i > 0 ) { | 2787 | 171 | auto& prevModule = operations[i-1].first; | 2788 | 171 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 171 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 93 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 93 | if ( curModifier.size() == 0 ) { | 2793 | 21.5k | for (size_t j = 0; j < 512; j++) { | 2794 | 21.5k | curModifier.push_back(1); | 2795 | 21.5k | } | 2796 | 51 | } else { | 2797 | 575 | for (auto& c : curModifier) { | 2798 | 575 | c++; | 2799 | 575 | } | 2800 | 51 | } | 2801 | 93 | } | 2802 | 171 | } | 2803 | | | 2804 | 238 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 238 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 238 | const auto& result = results.back(); | 2811 | | | 2812 | 238 | if ( result.second != std::nullopt ) { | 2813 | 27 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 27 | } | 2820 | | | 2821 | 238 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 238 | if ( options.disableTests == false ) { | 2830 | 238 | tests::test(op, result.second); | 2831 | 238 | } | 2832 | | | 2833 | 238 | postprocess(module, op, result); | 2834 | 238 | } | 2835 | | | 2836 | 117 | if ( options.noCompare == false ) { | 2837 | 67 | compare(operations, results, data, size); | 2838 | 67 | } | 2839 | 117 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 142 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 142 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 142 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.80k | do { | 2725 | 1.80k | auto op = getOp(&parentDs, data, size); | 2726 | 1.80k | auto module = getModule(parentDs); | 2727 | 1.80k | if ( module == nullptr ) { | 2728 | 1.51k | continue; | 2729 | 1.51k | } | 2730 | | | 2731 | 287 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 287 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 1.79k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 142 | if ( operations.empty() == true ) { | 2740 | 12 | return; | 2741 | 12 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 130 | #if 1 | 2745 | 130 | { | 2746 | 130 | std::set<uint64_t> moduleIDs; | 2747 | 148 | for (const auto& m : modules ) { | 2748 | 148 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 148 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 148 | moduleIDs.insert(moduleID); | 2756 | 148 | } | 2757 | | | 2758 | 130 | std::set<uint64_t> operationModuleIDs; | 2759 | 194 | for (const auto& op : operations) { | 2760 | 194 | operationModuleIDs.insert(op.first->ID); | 2761 | 194 | } | 2762 | | | 2763 | 130 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 130 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 130 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 130 | for (const auto& id : addModuleIDs) { | 2768 | 60 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 60 | } | 2770 | 130 | } | 2771 | 130 | #endif | 2772 | | | 2773 | 130 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 130 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 384 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 254 | auto& operation = operations[i]; | 2782 | | | 2783 | 254 | auto& module = operation.first; | 2784 | 254 | auto& op = operation.second; | 2785 | | | 2786 | 254 | if ( i > 0 ) { | 2787 | 180 | auto& prevModule = operations[i-1].first; | 2788 | 180 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 180 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 98 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 98 | if ( curModifier.size() == 0 ) { | 2793 | 31.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 31.2k | curModifier.push_back(1); | 2795 | 31.2k | } | 2796 | 61 | } else { | 2797 | 1.05k | for (auto& c : curModifier) { | 2798 | 1.05k | c++; | 2799 | 1.05k | } | 2800 | 37 | } | 2801 | 98 | } | 2802 | 180 | } | 2803 | | | 2804 | 254 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 254 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 254 | const auto& result = results.back(); | 2811 | | | 2812 | 254 | if ( result.second != std::nullopt ) { | 2813 | 26 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 26 | } | 2820 | | | 2821 | 254 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 254 | if ( options.disableTests == false ) { | 2830 | 254 | tests::test(op, result.second); | 2831 | 254 | } | 2832 | | | 2833 | 254 | postprocess(module, op, result); | 2834 | 254 | } | 2835 | | | 2836 | 130 | if ( options.noCompare == false ) { | 2837 | 74 | compare(operations, results, data, size); | 2838 | 74 | } | 2839 | 130 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 251 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 251 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 251 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.72k | do { | 2725 | 2.72k | auto op = getOp(&parentDs, data, size); | 2726 | 2.72k | auto module = getModule(parentDs); | 2727 | 2.72k | if ( module == nullptr ) { | 2728 | 2.28k | continue; | 2729 | 2.28k | } | 2730 | | | 2731 | 435 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 435 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 15 | break; | 2736 | 15 | } | 2737 | 2.70k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 251 | if ( operations.empty() == true ) { | 2740 | 15 | return; | 2741 | 15 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 236 | #if 1 | 2745 | 236 | { | 2746 | 236 | std::set<uint64_t> moduleIDs; | 2747 | 374 | for (const auto& m : modules ) { | 2748 | 374 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 374 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 374 | moduleIDs.insert(moduleID); | 2756 | 374 | } | 2757 | | | 2758 | 236 | std::set<uint64_t> operationModuleIDs; | 2759 | 366 | for (const auto& op : operations) { | 2760 | 366 | operationModuleIDs.insert(op.first->ID); | 2761 | 366 | } | 2762 | | | 2763 | 236 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 236 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 236 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 236 | for (const auto& id : addModuleIDs) { | 2768 | 171 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 171 | } | 2770 | 236 | } | 2771 | 236 | #endif | 2772 | | | 2773 | 236 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 236 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 773 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 537 | auto& operation = operations[i]; | 2782 | | | 2783 | 537 | auto& module = operation.first; | 2784 | 537 | auto& op = operation.second; | 2785 | | | 2786 | 537 | if ( i > 0 ) { | 2787 | 350 | auto& prevModule = operations[i-1].first; | 2788 | 350 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 350 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 150 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 150 | if ( curModifier.size() == 0 ) { | 2793 | 43.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 43.0k | curModifier.push_back(1); | 2795 | 43.0k | } | 2796 | 84 | } else { | 2797 | 4.67k | for (auto& c : curModifier) { | 2798 | 4.67k | c++; | 2799 | 4.67k | } | 2800 | 66 | } | 2801 | 150 | } | 2802 | 350 | } | 2803 | | | 2804 | 537 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 537 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 537 | const auto& result = results.back(); | 2811 | | | 2812 | 537 | if ( result.second != std::nullopt ) { | 2813 | 165 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 165 | } | 2820 | | | 2821 | 537 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 537 | if ( options.disableTests == false ) { | 2830 | 537 | tests::test(op, result.second); | 2831 | 537 | } | 2832 | | | 2833 | 537 | postprocess(module, op, result); | 2834 | 537 | } | 2835 | | | 2836 | 236 | if ( options.noCompare == false ) { | 2837 | 187 | compare(operations, results, data, size); | 2838 | 187 | } | 2839 | 236 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 143 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 143 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 143 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.56k | do { | 2725 | 1.56k | auto op = getOp(&parentDs, data, size); | 2726 | 1.56k | auto module = getModule(parentDs); | 2727 | 1.56k | if ( module == nullptr ) { | 2728 | 1.36k | continue; | 2729 | 1.36k | } | 2730 | | | 2731 | 204 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 204 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 9 | break; | 2736 | 9 | } | 2737 | 1.55k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 143 | if ( operations.empty() == true ) { | 2740 | 33 | return; | 2741 | 33 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 110 | #if 1 | 2745 | 110 | { | 2746 | 110 | std::set<uint64_t> moduleIDs; | 2747 | 110 | for (const auto& m : modules ) { | 2748 | 110 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 110 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 110 | moduleIDs.insert(moduleID); | 2756 | 110 | } | 2757 | | | 2758 | 110 | std::set<uint64_t> operationModuleIDs; | 2759 | 150 | for (const auto& op : operations) { | 2760 | 150 | operationModuleIDs.insert(op.first->ID); | 2761 | 150 | } | 2762 | | | 2763 | 110 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 110 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 110 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 110 | for (const auto& id : addModuleIDs) { | 2768 | 45 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 45 | } | 2770 | 110 | } | 2771 | 110 | #endif | 2772 | | | 2773 | 110 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 110 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 305 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 195 | auto& operation = operations[i]; | 2782 | | | 2783 | 195 | auto& module = operation.first; | 2784 | 195 | auto& op = operation.second; | 2785 | | | 2786 | 195 | if ( i > 0 ) { | 2787 | 140 | auto& prevModule = operations[i-1].first; | 2788 | 140 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 140 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 78 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 78 | if ( curModifier.size() == 0 ) { | 2793 | 22.5k | for (size_t j = 0; j < 512; j++) { | 2794 | 22.5k | curModifier.push_back(1); | 2795 | 22.5k | } | 2796 | 44 | } else { | 2797 | 579 | for (auto& c : curModifier) { | 2798 | 579 | c++; | 2799 | 579 | } | 2800 | 34 | } | 2801 | 78 | } | 2802 | 140 | } | 2803 | | | 2804 | 195 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 195 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 195 | const auto& result = results.back(); | 2811 | | | 2812 | 195 | if ( result.second != std::nullopt ) { | 2813 | 31 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 31 | } | 2820 | | | 2821 | 195 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 195 | if ( options.disableTests == false ) { | 2830 | 195 | tests::test(op, result.second); | 2831 | 195 | } | 2832 | | | 2833 | 195 | postprocess(module, op, result); | 2834 | 195 | } | 2835 | | | 2836 | 110 | if ( options.noCompare == false ) { | 2837 | 55 | compare(operations, results, data, size); | 2838 | 55 | } | 2839 | 110 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 143 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 143 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 143 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.65k | do { | 2725 | 1.65k | auto op = getOp(&parentDs, data, size); | 2726 | 1.65k | auto module = getModule(parentDs); | 2727 | 1.65k | if ( module == nullptr ) { | 2728 | 1.45k | continue; | 2729 | 1.45k | } | 2730 | | | 2731 | 204 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 204 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 1.64k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 143 | if ( operations.empty() == true ) { | 2740 | 28 | return; | 2741 | 28 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 115 | #if 1 | 2745 | 115 | { | 2746 | 115 | std::set<uint64_t> moduleIDs; | 2747 | 128 | for (const auto& m : modules ) { | 2748 | 128 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 128 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 128 | moduleIDs.insert(moduleID); | 2756 | 128 | } | 2757 | | | 2758 | 115 | std::set<uint64_t> operationModuleIDs; | 2759 | 165 | for (const auto& op : operations) { | 2760 | 165 | operationModuleIDs.insert(op.first->ID); | 2761 | 165 | } | 2762 | | | 2763 | 115 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 115 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 115 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 115 | for (const auto& id : addModuleIDs) { | 2768 | 54 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 54 | } | 2770 | 115 | } | 2771 | 115 | #endif | 2772 | | | 2773 | 115 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 115 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 334 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 219 | auto& operation = operations[i]; | 2782 | | | 2783 | 219 | auto& module = operation.first; | 2784 | 219 | auto& op = operation.second; | 2785 | | | 2786 | 219 | if ( i > 0 ) { | 2787 | 155 | auto& prevModule = operations[i-1].first; | 2788 | 155 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 155 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 83 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 83 | if ( curModifier.size() == 0 ) { | 2793 | 13.8k | for (size_t j = 0; j < 512; j++) { | 2794 | 13.8k | curModifier.push_back(1); | 2795 | 13.8k | } | 2796 | 56 | } else { | 2797 | 583 | for (auto& c : curModifier) { | 2798 | 583 | c++; | 2799 | 583 | } | 2800 | 56 | } | 2801 | 83 | } | 2802 | 155 | } | 2803 | | | 2804 | 219 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 219 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 219 | const auto& result = results.back(); | 2811 | | | 2812 | 219 | if ( result.second != std::nullopt ) { | 2813 | 20 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 20 | } | 2820 | | | 2821 | 219 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 219 | if ( options.disableTests == false ) { | 2830 | 219 | tests::test(op, result.second); | 2831 | 219 | } | 2832 | | | 2833 | 219 | postprocess(module, op, result); | 2834 | 219 | } | 2835 | | | 2836 | 115 | if ( options.noCompare == false ) { | 2837 | 64 | compare(operations, results, data, size); | 2838 | 64 | } | 2839 | 115 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 110 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 110 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 110 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.85k | do { | 2725 | 1.85k | auto op = getOp(&parentDs, data, size); | 2726 | 1.85k | auto module = getModule(parentDs); | 2727 | 1.85k | if ( module == nullptr ) { | 2728 | 1.64k | continue; | 2729 | 1.64k | } | 2730 | | | 2731 | 218 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 218 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 1.85k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 110 | if ( operations.empty() == true ) { | 2740 | 4 | return; | 2741 | 4 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 106 | #if 1 | 2745 | 106 | { | 2746 | 106 | std::set<uint64_t> moduleIDs; | 2747 | 118 | for (const auto& m : modules ) { | 2748 | 118 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 118 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 118 | moduleIDs.insert(moduleID); | 2756 | 118 | } | 2757 | | | 2758 | 106 | std::set<uint64_t> operationModuleIDs; | 2759 | 161 | for (const auto& op : operations) { | 2760 | 161 | operationModuleIDs.insert(op.first->ID); | 2761 | 161 | } | 2762 | | | 2763 | 106 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 106 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 106 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 106 | for (const auto& id : addModuleIDs) { | 2768 | 47 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 47 | } | 2770 | 106 | } | 2771 | 106 | #endif | 2772 | | | 2773 | 106 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 106 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 314 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 208 | auto& operation = operations[i]; | 2782 | | | 2783 | 208 | auto& module = operation.first; | 2784 | 208 | auto& op = operation.second; | 2785 | | | 2786 | 208 | if ( i > 0 ) { | 2787 | 149 | auto& prevModule = operations[i-1].first; | 2788 | 149 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 149 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 84 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 84 | if ( curModifier.size() == 0 ) { | 2793 | 26.1k | for (size_t j = 0; j < 512; j++) { | 2794 | 26.1k | curModifier.push_back(1); | 2795 | 26.1k | } | 2796 | 51 | } else { | 2797 | 315 | for (auto& c : curModifier) { | 2798 | 315 | c++; | 2799 | 315 | } | 2800 | 33 | } | 2801 | 84 | } | 2802 | 149 | } | 2803 | | | 2804 | 208 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 208 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 208 | const auto& result = results.back(); | 2811 | | | 2812 | 208 | if ( result.second != std::nullopt ) { | 2813 | 16 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 16 | } | 2820 | | | 2821 | 208 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 208 | if ( options.disableTests == false ) { | 2830 | 208 | tests::test(op, result.second); | 2831 | 208 | } | 2832 | | | 2833 | 208 | postprocess(module, op, result); | 2834 | 208 | } | 2835 | | | 2836 | 106 | if ( options.noCompare == false ) { | 2837 | 59 | compare(operations, results, data, size); | 2838 | 59 | } | 2839 | 106 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 131 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 131 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 131 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.22k | do { | 2725 | 2.22k | auto op = getOp(&parentDs, data, size); | 2726 | 2.22k | auto module = getModule(parentDs); | 2727 | 2.22k | if ( module == nullptr ) { | 2728 | 2.03k | continue; | 2729 | 2.03k | } | 2730 | | | 2731 | 181 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 181 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 2.21k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 131 | if ( operations.empty() == true ) { | 2740 | 15 | return; | 2741 | 15 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 116 | #if 1 | 2745 | 116 | { | 2746 | 116 | std::set<uint64_t> moduleIDs; | 2747 | 116 | for (const auto& m : modules ) { | 2748 | 76 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 76 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 76 | moduleIDs.insert(moduleID); | 2756 | 76 | } | 2757 | | | 2758 | 116 | std::set<uint64_t> operationModuleIDs; | 2759 | 116 | for (const auto& op : operations) { | 2760 | 98 | operationModuleIDs.insert(op.first->ID); | 2761 | 98 | } | 2762 | | | 2763 | 116 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 116 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 116 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 116 | for (const auto& id : addModuleIDs) { | 2768 | 27 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 27 | } | 2770 | 116 | } | 2771 | 116 | #endif | 2772 | | | 2773 | 116 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 116 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 241 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 125 | auto& operation = operations[i]; | 2782 | | | 2783 | 125 | auto& module = operation.first; | 2784 | 125 | auto& op = operation.second; | 2785 | | | 2786 | 125 | if ( i > 0 ) { | 2787 | 87 | auto& prevModule = operations[i-1].first; | 2788 | 87 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 87 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 43 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 43 | if ( curModifier.size() == 0 ) { | 2793 | 10.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 10.2k | curModifier.push_back(1); | 2795 | 10.2k | } | 2796 | 23 | } else { | 2797 | 555 | for (auto& c : curModifier) { | 2798 | 555 | c++; | 2799 | 555 | } | 2800 | 23 | } | 2801 | 43 | } | 2802 | 87 | } | 2803 | | | 2804 | 125 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 125 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 125 | const auto& result = results.back(); | 2811 | | | 2812 | 125 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 125 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 125 | if ( options.disableTests == false ) { | 2830 | 125 | tests::test(op, result.second); | 2831 | 125 | } | 2832 | | | 2833 | 125 | postprocess(module, op, result); | 2834 | 125 | } | 2835 | | | 2836 | 116 | if ( options.noCompare == false ) { | 2837 | 38 | compare(operations, results, data, size); | 2838 | 38 | } | 2839 | 116 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 240 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 240 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 240 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.80k | do { | 2725 | 2.80k | auto op = getOp(&parentDs, data, size); | 2726 | 2.80k | auto module = getModule(parentDs); | 2727 | 2.80k | if ( module == nullptr ) { | 2728 | 2.36k | continue; | 2729 | 2.36k | } | 2730 | | | 2731 | 438 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 438 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 12 | break; | 2736 | 12 | } | 2737 | 2.79k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 240 | if ( operations.empty() == true ) { | 2740 | 3 | return; | 2741 | 3 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 237 | #if 1 | 2745 | 237 | { | 2746 | 237 | std::set<uint64_t> moduleIDs; | 2747 | 322 | for (const auto& m : modules ) { | 2748 | 322 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 322 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 322 | moduleIDs.insert(moduleID); | 2756 | 322 | } | 2757 | | | 2758 | 237 | std::set<uint64_t> operationModuleIDs; | 2759 | 347 | for (const auto& op : operations) { | 2760 | 347 | operationModuleIDs.insert(op.first->ID); | 2761 | 347 | } | 2762 | | | 2763 | 237 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 237 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 237 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 237 | for (const auto& id : addModuleIDs) { | 2768 | 146 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 146 | } | 2770 | 237 | } | 2771 | 237 | #endif | 2772 | | | 2773 | 237 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 237 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 730 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 493 | auto& operation = operations[i]; | 2782 | | | 2783 | 493 | auto& module = operation.first; | 2784 | 493 | auto& op = operation.second; | 2785 | | | 2786 | 493 | if ( i > 0 ) { | 2787 | 332 | auto& prevModule = operations[i-1].first; | 2788 | 332 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 332 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 163 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 163 | if ( curModifier.size() == 0 ) { | 2793 | 44.1k | for (size_t j = 0; j < 512; j++) { | 2794 | 44.0k | curModifier.push_back(1); | 2795 | 44.0k | } | 2796 | 86 | } else { | 2797 | 3.11k | for (auto& c : curModifier) { | 2798 | 3.11k | c++; | 2799 | 3.11k | } | 2800 | 77 | } | 2801 | 163 | } | 2802 | 332 | } | 2803 | | | 2804 | 493 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 493 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 493 | const auto& result = results.back(); | 2811 | | | 2812 | 493 | if ( result.second != std::nullopt ) { | 2813 | 31 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 31 | } | 2820 | | | 2821 | 493 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 493 | if ( options.disableTests == false ) { | 2830 | 493 | tests::test(op, result.second); | 2831 | 493 | } | 2832 | | | 2833 | 493 | postprocess(module, op, result); | 2834 | 493 | } | 2835 | | | 2836 | 237 | if ( options.noCompare == false ) { | 2837 | 161 | compare(operations, results, data, size); | 2838 | 161 | } | 2839 | 237 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 4.54k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 4.54k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 4.54k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 14.4k | do { | 2725 | 14.4k | auto op = getOp(&parentDs, data, size); | 2726 | 14.4k | auto module = getModule(parentDs); | 2727 | 14.4k | if ( module == nullptr ) { | 2728 | 7.49k | continue; | 2729 | 7.49k | } | 2730 | | | 2731 | 6.94k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 6.94k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 147 | break; | 2736 | 147 | } | 2737 | 14.2k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 4.54k | if ( operations.empty() == true ) { | 2740 | 69 | return; | 2741 | 69 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 4.47k | #if 1 | 2745 | 4.47k | { | 2746 | 4.47k | std::set<uint64_t> moduleIDs; | 2747 | 8.42k | for (const auto& m : modules ) { | 2748 | 8.42k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 8.42k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 8.42k | moduleIDs.insert(moduleID); | 2756 | 8.42k | } | 2757 | | | 2758 | 4.47k | std::set<uint64_t> operationModuleIDs; | 2759 | 6.65k | for (const auto& op : operations) { | 2760 | 6.65k | operationModuleIDs.insert(op.first->ID); | 2761 | 6.65k | } | 2762 | | | 2763 | 4.47k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 4.47k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 4.47k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 4.47k | for (const auto& id : addModuleIDs) { | 2768 | 4.19k | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 4.19k | } | 2770 | 4.47k | } | 2771 | 4.47k | #endif | 2772 | | | 2773 | 4.47k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 4.47k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 15.3k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 10.8k | auto& operation = operations[i]; | 2782 | | | 2783 | 10.8k | auto& module = operation.first; | 2784 | 10.8k | auto& op = operation.second; | 2785 | | | 2786 | 10.8k | if ( i > 0 ) { | 2787 | 6.63k | auto& prevModule = operations[i-1].first; | 2788 | 6.63k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 6.63k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 2.40k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 2.40k | if ( curModifier.size() == 0 ) { | 2793 | 645k | for (size_t j = 0; j < 512; j++) { | 2794 | 644k | curModifier.push_back(1); | 2795 | 644k | } | 2796 | 1.25k | } else { | 2797 | 68.3k | for (auto& c : curModifier) { | 2798 | 68.3k | c++; | 2799 | 68.3k | } | 2800 | 1.15k | } | 2801 | 2.40k | } | 2802 | 6.63k | } | 2803 | | | 2804 | 10.8k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 10.8k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 10.8k | const auto& result = results.back(); | 2811 | | | 2812 | 10.8k | if ( result.second != std::nullopt ) { | 2813 | 3.24k | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 3.24k | } | 2820 | | | 2821 | 10.8k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 10.8k | if ( options.disableTests == false ) { | 2830 | 10.8k | tests::test(op, result.second); | 2831 | 10.8k | } | 2832 | | | 2833 | 10.8k | postprocess(module, op, result); | 2834 | 10.8k | } | 2835 | | | 2836 | 4.47k | if ( options.noCompare == false ) { | 2837 | 4.21k | compare(operations, results, data, size); | 2838 | 4.21k | } | 2839 | 4.47k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 116 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 116 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 116 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.22k | do { | 2725 | 2.22k | auto op = getOp(&parentDs, data, size); | 2726 | 2.22k | auto module = getModule(parentDs); | 2727 | 2.22k | if ( module == nullptr ) { | 2728 | 2.02k | continue; | 2729 | 2.02k | } | 2730 | | | 2731 | 200 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 200 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 2.21k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 116 | if ( operations.empty() == true ) { | 2740 | 6 | return; | 2741 | 6 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 110 | #if 1 | 2745 | 110 | { | 2746 | 110 | std::set<uint64_t> moduleIDs; | 2747 | 134 | for (const auto& m : modules ) { | 2748 | 134 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 134 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 134 | moduleIDs.insert(moduleID); | 2756 | 134 | } | 2757 | | | 2758 | 110 | std::set<uint64_t> operationModuleIDs; | 2759 | 137 | for (const auto& op : operations) { | 2760 | 137 | operationModuleIDs.insert(op.first->ID); | 2761 | 137 | } | 2762 | | | 2763 | 110 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 110 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 110 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 110 | for (const auto& id : addModuleIDs) { | 2768 | 55 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 55 | } | 2770 | 110 | } | 2771 | 110 | #endif | 2772 | | | 2773 | 110 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 110 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 302 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 192 | auto& operation = operations[i]; | 2782 | | | 2783 | 192 | auto& module = operation.first; | 2784 | 192 | auto& op = operation.second; | 2785 | | | 2786 | 192 | if ( i > 0 ) { | 2787 | 125 | auto& prevModule = operations[i-1].first; | 2788 | 125 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 125 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 52 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 52 | if ( curModifier.size() == 0 ) { | 2793 | 15.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 15.3k | curModifier.push_back(1); | 2795 | 15.3k | } | 2796 | 30 | } else { | 2797 | 1.04k | for (auto& c : curModifier) { | 2798 | 1.04k | c++; | 2799 | 1.04k | } | 2800 | 22 | } | 2801 | 52 | } | 2802 | 125 | } | 2803 | | | 2804 | 192 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 192 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 192 | const auto& result = results.back(); | 2811 | | | 2812 | 192 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 192 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 192 | if ( options.disableTests == false ) { | 2830 | 192 | tests::test(op, result.second); | 2831 | 192 | } | 2832 | | | 2833 | 192 | postprocess(module, op, result); | 2834 | 192 | } | 2835 | | | 2836 | 110 | if ( options.noCompare == false ) { | 2837 | 67 | compare(operations, results, data, size); | 2838 | 67 | } | 2839 | 110 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 301 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 301 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 301 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.28k | do { | 2725 | 2.28k | auto op = getOp(&parentDs, data, size); | 2726 | 2.28k | auto module = getModule(parentDs); | 2727 | 2.28k | if ( module == nullptr ) { | 2728 | 1.75k | continue; | 2729 | 1.75k | } | 2730 | | | 2731 | 532 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 532 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 16 | break; | 2736 | 16 | } | 2737 | 2.26k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 301 | if ( operations.empty() == true ) { | 2740 | 8 | return; | 2741 | 8 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 293 | #if 1 | 2745 | 293 | { | 2746 | 293 | std::set<uint64_t> moduleIDs; | 2747 | 492 | for (const auto& m : modules ) { | 2748 | 492 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 492 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 492 | moduleIDs.insert(moduleID); | 2756 | 492 | } | 2757 | | | 2758 | 293 | std::set<uint64_t> operationModuleIDs; | 2759 | 470 | for (const auto& op : operations) { | 2760 | 470 | operationModuleIDs.insert(op.first->ID); | 2761 | 470 | } | 2762 | | | 2763 | 293 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 293 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 293 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 293 | for (const auto& id : addModuleIDs) { | 2768 | 233 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 233 | } | 2770 | 293 | } | 2771 | 293 | #endif | 2772 | | | 2773 | 293 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 293 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 996 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 703 | auto& operation = operations[i]; | 2782 | | | 2783 | 703 | auto& module = operation.first; | 2784 | 703 | auto& op = operation.second; | 2785 | | | 2786 | 703 | if ( i > 0 ) { | 2787 | 457 | auto& prevModule = operations[i-1].first; | 2788 | 457 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 457 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 205 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 205 | if ( curModifier.size() == 0 ) { | 2793 | 85.1k | for (size_t j = 0; j < 512; j++) { | 2794 | 84.9k | curModifier.push_back(1); | 2795 | 84.9k | } | 2796 | 166 | } else { | 2797 | 2.80k | for (auto& c : curModifier) { | 2798 | 2.80k | c++; | 2799 | 2.80k | } | 2800 | 39 | } | 2801 | 205 | } | 2802 | 457 | } | 2803 | | | 2804 | 703 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 703 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 703 | const auto& result = results.back(); | 2811 | | | 2812 | 703 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 703 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 703 | if ( options.disableTests == false ) { | 2830 | 703 | tests::test(op, result.second); | 2831 | 703 | } | 2832 | | | 2833 | 703 | postprocess(module, op, result); | 2834 | 703 | } | 2835 | | | 2836 | 293 | if ( options.noCompare == false ) { | 2837 | 246 | compare(operations, results, data, size); | 2838 | 246 | } | 2839 | 293 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 123 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 123 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 123 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.52k | do { | 2725 | 1.52k | auto op = getOp(&parentDs, data, size); | 2726 | 1.52k | auto module = getModule(parentDs); | 2727 | 1.52k | if ( module == nullptr ) { | 2728 | 1.34k | continue; | 2729 | 1.34k | } | 2730 | | | 2731 | 178 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 178 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 1.51k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 123 | if ( operations.empty() == true ) { | 2740 | 13 | return; | 2741 | 13 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 110 | #if 1 | 2745 | 110 | { | 2746 | 110 | std::set<uint64_t> moduleIDs; | 2747 | 110 | for (const auto& m : modules ) { | 2748 | 102 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 102 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 102 | moduleIDs.insert(moduleID); | 2756 | 102 | } | 2757 | | | 2758 | 110 | std::set<uint64_t> operationModuleIDs; | 2759 | 115 | for (const auto& op : operations) { | 2760 | 115 | operationModuleIDs.insert(op.first->ID); | 2761 | 115 | } | 2762 | | | 2763 | 110 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 110 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 110 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 110 | for (const auto& id : addModuleIDs) { | 2768 | 40 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 40 | } | 2770 | 110 | } | 2771 | 110 | #endif | 2772 | | | 2773 | 110 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 110 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 265 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 155 | auto& operation = operations[i]; | 2782 | | | 2783 | 155 | auto& module = operation.first; | 2784 | 155 | auto& op = operation.second; | 2785 | | | 2786 | 155 | if ( i > 0 ) { | 2787 | 104 | auto& prevModule = operations[i-1].first; | 2788 | 104 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 104 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 47 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 47 | if ( curModifier.size() == 0 ) { | 2793 | 8.20k | for (size_t j = 0; j < 512; j++) { | 2794 | 8.19k | curModifier.push_back(1); | 2795 | 8.19k | } | 2796 | 31 | } else { | 2797 | 25.1k | for (auto& c : curModifier) { | 2798 | 25.1k | c++; | 2799 | 25.1k | } | 2800 | 31 | } | 2801 | 47 | } | 2802 | 104 | } | 2803 | | | 2804 | 155 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 155 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 155 | const auto& result = results.back(); | 2811 | | | 2812 | 155 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 155 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 155 | if ( options.disableTests == false ) { | 2830 | 155 | tests::test(op, result.second); | 2831 | 155 | } | 2832 | | | 2833 | 155 | postprocess(module, op, result); | 2834 | 155 | } | 2835 | | | 2836 | 110 | if ( options.noCompare == false ) { | 2837 | 51 | compare(operations, results, data, size); | 2838 | 51 | } | 2839 | 110 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 102 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 102 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 102 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.47k | do { | 2725 | 1.47k | auto op = getOp(&parentDs, data, size); | 2726 | 1.47k | auto module = getModule(parentDs); | 2727 | 1.47k | if ( module == nullptr ) { | 2728 | 1.30k | continue; | 2729 | 1.30k | } | 2730 | | | 2731 | 163 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 163 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 1.46k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 102 | if ( operations.empty() == true ) { | 2740 | 8 | return; | 2741 | 8 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 94 | #if 1 | 2745 | 94 | { | 2746 | 94 | std::set<uint64_t> moduleIDs; | 2747 | 98 | for (const auto& m : modules ) { | 2748 | 98 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 98 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 98 | moduleIDs.insert(moduleID); | 2756 | 98 | } | 2757 | | | 2758 | 94 | std::set<uint64_t> operationModuleIDs; | 2759 | 116 | for (const auto& op : operations) { | 2760 | 116 | operationModuleIDs.insert(op.first->ID); | 2761 | 116 | } | 2762 | | | 2763 | 94 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 94 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 94 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 94 | for (const auto& id : addModuleIDs) { | 2768 | 39 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 39 | } | 2770 | 94 | } | 2771 | 94 | #endif | 2772 | | | 2773 | 94 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 94 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 249 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 155 | auto& operation = operations[i]; | 2782 | | | 2783 | 155 | auto& module = operation.first; | 2784 | 155 | auto& op = operation.second; | 2785 | | | 2786 | 155 | if ( i > 0 ) { | 2787 | 106 | auto& prevModule = operations[i-1].first; | 2788 | 106 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 106 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 49 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 49 | if ( curModifier.size() == 0 ) { | 2793 | 11.7k | for (size_t j = 0; j < 512; j++) { | 2794 | 11.7k | curModifier.push_back(1); | 2795 | 11.7k | } | 2796 | 26 | } else { | 2797 | 1.03k | for (auto& c : curModifier) { | 2798 | 1.03k | c++; | 2799 | 1.03k | } | 2800 | 26 | } | 2801 | 49 | } | 2802 | 106 | } | 2803 | | | 2804 | 155 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 155 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 155 | const auto& result = results.back(); | 2811 | | | 2812 | 155 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 155 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 155 | if ( options.disableTests == false ) { | 2830 | 155 | tests::test(op, result.second); | 2831 | 155 | } | 2832 | | | 2833 | 155 | postprocess(module, op, result); | 2834 | 155 | } | 2835 | | | 2836 | 94 | if ( options.noCompare == false ) { | 2837 | 49 | compare(operations, results, data, size); | 2838 | 49 | } | 2839 | 94 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 150 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 150 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 150 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.22k | do { | 2725 | 2.22k | auto op = getOp(&parentDs, data, size); | 2726 | 2.22k | auto module = getModule(parentDs); | 2727 | 2.22k | if ( module == nullptr ) { | 2728 | 2.02k | continue; | 2729 | 2.02k | } | 2730 | | | 2731 | 202 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 202 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 2.22k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 150 | if ( operations.empty() == true ) { | 2740 | 33 | return; | 2741 | 33 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 117 | #if 1 | 2745 | 117 | { | 2746 | 117 | std::set<uint64_t> moduleIDs; | 2747 | 117 | for (const auto& m : modules ) { | 2748 | 92 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 92 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 92 | moduleIDs.insert(moduleID); | 2756 | 92 | } | 2757 | | | 2758 | 117 | std::set<uint64_t> operationModuleIDs; | 2759 | 118 | for (const auto& op : operations) { | 2760 | 118 | operationModuleIDs.insert(op.first->ID); | 2761 | 118 | } | 2762 | | | 2763 | 117 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 117 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 117 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 117 | for (const auto& id : addModuleIDs) { | 2768 | 36 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 36 | } | 2770 | 117 | } | 2771 | 117 | #endif | 2772 | | | 2773 | 117 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 117 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 271 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 154 | auto& operation = operations[i]; | 2782 | | | 2783 | 154 | auto& module = operation.first; | 2784 | 154 | auto& op = operation.second; | 2785 | | | 2786 | 154 | if ( i > 0 ) { | 2787 | 108 | auto& prevModule = operations[i-1].first; | 2788 | 108 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 108 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 54 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 54 | if ( curModifier.size() == 0 ) { | 2793 | 11.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 11.2k | curModifier.push_back(1); | 2795 | 11.2k | } | 2796 | 32 | } else { | 2797 | 325 | for (auto& c : curModifier) { | 2798 | 325 | c++; | 2799 | 325 | } | 2800 | 32 | } | 2801 | 54 | } | 2802 | 108 | } | 2803 | | | 2804 | 154 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 154 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 154 | const auto& result = results.back(); | 2811 | | | 2812 | 154 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 154 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 154 | if ( options.disableTests == false ) { | 2830 | 154 | tests::test(op, result.second); | 2831 | 154 | } | 2832 | | | 2833 | 154 | postprocess(module, op, result); | 2834 | 154 | } | 2835 | | | 2836 | 117 | if ( options.noCompare == false ) { | 2837 | 46 | compare(operations, results, data, size); | 2838 | 46 | } | 2839 | 117 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 97 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 97 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 97 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.37k | do { | 2725 | 2.37k | auto op = getOp(&parentDs, data, size); | 2726 | 2.37k | auto module = getModule(parentDs); | 2727 | 2.37k | if ( module == nullptr ) { | 2728 | 2.19k | continue; | 2729 | 2.19k | } | 2730 | | | 2731 | 180 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 180 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 11 | break; | 2736 | 11 | } | 2737 | 2.35k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 97 | if ( operations.empty() == true ) { | 2740 | 6 | return; | 2741 | 6 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 91 | #if 1 | 2745 | 91 | { | 2746 | 91 | std::set<uint64_t> moduleIDs; | 2747 | 91 | for (const auto& m : modules ) { | 2748 | 66 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 66 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 66 | moduleIDs.insert(moduleID); | 2756 | 66 | } | 2757 | | | 2758 | 91 | std::set<uint64_t> operationModuleIDs; | 2759 | 104 | for (const auto& op : operations) { | 2760 | 104 | operationModuleIDs.insert(op.first->ID); | 2761 | 104 | } | 2762 | | | 2763 | 91 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 91 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 91 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 91 | for (const auto& id : addModuleIDs) { | 2768 | 23 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 23 | } | 2770 | 91 | } | 2771 | 91 | #endif | 2772 | | | 2773 | 91 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 91 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 218 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 127 | auto& operation = operations[i]; | 2782 | | | 2783 | 127 | auto& module = operation.first; | 2784 | 127 | auto& op = operation.second; | 2785 | | | 2786 | 127 | if ( i > 0 ) { | 2787 | 94 | auto& prevModule = operations[i-1].first; | 2788 | 94 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 94 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 53 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 53 | if ( curModifier.size() == 0 ) { | 2793 | 10.7k | for (size_t j = 0; j < 512; j++) { | 2794 | 10.7k | curModifier.push_back(1); | 2795 | 10.7k | } | 2796 | 32 | } else { | 2797 | 3.61k | for (auto& c : curModifier) { | 2798 | 3.61k | c++; | 2799 | 3.61k | } | 2800 | 32 | } | 2801 | 53 | } | 2802 | 94 | } | 2803 | | | 2804 | 127 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 127 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 127 | const auto& result = results.back(); | 2811 | | | 2812 | 127 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 127 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 127 | if ( options.disableTests == false ) { | 2830 | 127 | tests::test(op, result.second); | 2831 | 127 | } | 2832 | | | 2833 | 127 | postprocess(module, op, result); | 2834 | 127 | } | 2835 | | | 2836 | 91 | if ( options.noCompare == false ) { | 2837 | 33 | compare(operations, results, data, size); | 2838 | 33 | } | 2839 | 91 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 151 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 151 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 151 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.24k | do { | 2725 | 2.24k | auto op = getOp(&parentDs, data, size); | 2726 | 2.24k | auto module = getModule(parentDs); | 2727 | 2.24k | if ( module == nullptr ) { | 2728 | 2.01k | continue; | 2729 | 2.01k | } | 2730 | | | 2731 | 230 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 230 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 10 | break; | 2736 | 10 | } | 2737 | 2.23k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 151 | if ( operations.empty() == true ) { | 2740 | 14 | return; | 2741 | 14 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 137 | #if 1 | 2745 | 137 | { | 2746 | 137 | std::set<uint64_t> moduleIDs; | 2747 | 137 | for (const auto& m : modules ) { | 2748 | 84 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 84 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 84 | moduleIDs.insert(moduleID); | 2756 | 84 | } | 2757 | | | 2758 | 137 | std::set<uint64_t> operationModuleIDs; | 2759 | 137 | for (const auto& op : operations) { | 2760 | 116 | operationModuleIDs.insert(op.first->ID); | 2761 | 116 | } | 2762 | | | 2763 | 137 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 137 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 137 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 137 | for (const auto& id : addModuleIDs) { | 2768 | 31 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 31 | } | 2770 | 137 | } | 2771 | 137 | #endif | 2772 | | | 2773 | 137 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 137 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 284 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 147 | auto& operation = operations[i]; | 2782 | | | 2783 | 147 | auto& module = operation.first; | 2784 | 147 | auto& op = operation.second; | 2785 | | | 2786 | 147 | if ( i > 0 ) { | 2787 | 105 | auto& prevModule = operations[i-1].first; | 2788 | 105 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 105 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 55 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 55 | if ( curModifier.size() == 0 ) { | 2793 | 13.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 13.3k | curModifier.push_back(1); | 2795 | 13.3k | } | 2796 | 29 | } else { | 2797 | 2.04k | for (auto& c : curModifier) { | 2798 | 2.04k | c++; | 2799 | 2.04k | } | 2800 | 29 | } | 2801 | 55 | } | 2802 | 105 | } | 2803 | | | 2804 | 147 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 147 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 147 | const auto& result = results.back(); | 2811 | | | 2812 | 147 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 147 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 147 | if ( options.disableTests == false ) { | 2830 | 147 | tests::test(op, result.second); | 2831 | 147 | } | 2832 | | | 2833 | 147 | postprocess(module, op, result); | 2834 | 147 | } | 2835 | | | 2836 | 137 | if ( options.noCompare == false ) { | 2837 | 42 | compare(operations, results, data, size); | 2838 | 42 | } | 2839 | 137 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 196 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 196 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 196 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.07k | do { | 2725 | 2.07k | auto op = getOp(&parentDs, data, size); | 2726 | 2.07k | auto module = getModule(parentDs); | 2727 | 2.07k | if ( module == nullptr ) { | 2728 | 1.80k | continue; | 2729 | 1.80k | } | 2730 | | | 2731 | 274 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 274 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 11 | break; | 2736 | 11 | } | 2737 | 2.06k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 196 | if ( operations.empty() == true ) { | 2740 | 11 | return; | 2741 | 11 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 185 | #if 1 | 2745 | 185 | { | 2746 | 185 | std::set<uint64_t> moduleIDs; | 2747 | 185 | for (const auto& m : modules ) { | 2748 | 92 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 92 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 92 | moduleIDs.insert(moduleID); | 2756 | 92 | } | 2757 | | | 2758 | 185 | std::set<uint64_t> operationModuleIDs; | 2759 | 185 | for (const auto& op : operations) { | 2760 | 137 | operationModuleIDs.insert(op.first->ID); | 2761 | 137 | } | 2762 | | | 2763 | 185 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 185 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 185 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 185 | for (const auto& id : addModuleIDs) { | 2768 | 31 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 31 | } | 2770 | 185 | } | 2771 | 185 | #endif | 2772 | | | 2773 | 185 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 185 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 353 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 168 | auto& operation = operations[i]; | 2782 | | | 2783 | 168 | auto& module = operation.first; | 2784 | 168 | auto& op = operation.second; | 2785 | | | 2786 | 168 | if ( i > 0 ) { | 2787 | 122 | auto& prevModule = operations[i-1].first; | 2788 | 122 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 122 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 62 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 62 | if ( curModifier.size() == 0 ) { | 2793 | 12.8k | for (size_t j = 0; j < 512; j++) { | 2794 | 12.8k | curModifier.push_back(1); | 2795 | 12.8k | } | 2796 | 37 | } else { | 2797 | 581 | for (auto& c : curModifier) { | 2798 | 581 | c++; | 2799 | 581 | } | 2800 | 37 | } | 2801 | 62 | } | 2802 | 122 | } | 2803 | | | 2804 | 168 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 168 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 168 | const auto& result = results.back(); | 2811 | | | 2812 | 168 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 168 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 168 | if ( options.disableTests == false ) { | 2830 | 168 | tests::test(op, result.second); | 2831 | 168 | } | 2832 | | | 2833 | 168 | postprocess(module, op, result); | 2834 | 168 | } | 2835 | | | 2836 | 185 | if ( options.noCompare == false ) { | 2837 | 46 | compare(operations, results, data, size); | 2838 | 46 | } | 2839 | 185 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 147 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 147 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 147 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.69k | do { | 2725 | 1.69k | auto op = getOp(&parentDs, data, size); | 2726 | 1.69k | auto module = getModule(parentDs); | 2727 | 1.69k | if ( module == nullptr ) { | 2728 | 1.49k | continue; | 2729 | 1.49k | } | 2730 | | | 2731 | 201 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 201 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 1.69k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 147 | if ( operations.empty() == true ) { | 2740 | 17 | return; | 2741 | 17 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 130 | #if 1 | 2745 | 130 | { | 2746 | 130 | std::set<uint64_t> moduleIDs; | 2747 | 130 | for (const auto& m : modules ) { | 2748 | 64 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 64 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 64 | moduleIDs.insert(moduleID); | 2756 | 64 | } | 2757 | | | 2758 | 130 | std::set<uint64_t> operationModuleIDs; | 2759 | 130 | for (const auto& op : operations) { | 2760 | 90 | operationModuleIDs.insert(op.first->ID); | 2761 | 90 | } | 2762 | | | 2763 | 130 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 130 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 130 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 130 | for (const auto& id : addModuleIDs) { | 2768 | 23 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 23 | } | 2770 | 130 | } | 2771 | 130 | #endif | 2772 | | | 2773 | 130 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 130 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 243 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 113 | auto& operation = operations[i]; | 2782 | | | 2783 | 113 | auto& module = operation.first; | 2784 | 113 | auto& op = operation.second; | 2785 | | | 2786 | 113 | if ( i > 0 ) { | 2787 | 81 | auto& prevModule = operations[i-1].first; | 2788 | 81 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 81 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 41 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 41 | if ( curModifier.size() == 0 ) { | 2793 | 13.8k | for (size_t j = 0; j < 512; j++) { | 2794 | 13.8k | curModifier.push_back(1); | 2795 | 13.8k | } | 2796 | 27 | } else { | 2797 | 571 | for (auto& c : curModifier) { | 2798 | 571 | c++; | 2799 | 571 | } | 2800 | 14 | } | 2801 | 41 | } | 2802 | 81 | } | 2803 | | | 2804 | 113 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 113 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 113 | const auto& result = results.back(); | 2811 | | | 2812 | 113 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 113 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 113 | if ( options.disableTests == false ) { | 2830 | 113 | tests::test(op, result.second); | 2831 | 113 | } | 2832 | | | 2833 | 113 | postprocess(module, op, result); | 2834 | 113 | } | 2835 | | | 2836 | 130 | if ( options.noCompare == false ) { | 2837 | 32 | compare(operations, results, data, size); | 2838 | 32 | } | 2839 | 130 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 142 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 142 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 142 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.96k | do { | 2725 | 1.96k | auto op = getOp(&parentDs, data, size); | 2726 | 1.96k | auto module = getModule(parentDs); | 2727 | 1.96k | if ( module == nullptr ) { | 2728 | 1.75k | continue; | 2729 | 1.75k | } | 2730 | | | 2731 | 212 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 212 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 9 | break; | 2736 | 9 | } | 2737 | 1.95k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 142 | if ( operations.empty() == true ) { | 2740 | 14 | return; | 2741 | 14 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 128 | #if 1 | 2745 | 128 | { | 2746 | 128 | std::set<uint64_t> moduleIDs; | 2747 | 128 | for (const auto& m : modules ) { | 2748 | 72 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 72 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 72 | moduleIDs.insert(moduleID); | 2756 | 72 | } | 2757 | | | 2758 | 128 | std::set<uint64_t> operationModuleIDs; | 2759 | 128 | for (const auto& op : operations) { | 2760 | 107 | operationModuleIDs.insert(op.first->ID); | 2761 | 107 | } | 2762 | | | 2763 | 128 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 128 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 128 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 128 | for (const auto& id : addModuleIDs) { | 2768 | 23 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 23 | } | 2770 | 128 | } | 2771 | 128 | #endif | 2772 | | | 2773 | 128 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 128 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 258 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 130 | auto& operation = operations[i]; | 2782 | | | 2783 | 130 | auto& module = operation.first; | 2784 | 130 | auto& op = operation.second; | 2785 | | | 2786 | 130 | if ( i > 0 ) { | 2787 | 94 | auto& prevModule = operations[i-1].first; | 2788 | 94 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 94 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 45 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 45 | if ( curModifier.size() == 0 ) { | 2793 | 13.8k | for (size_t j = 0; j < 512; j++) { | 2794 | 13.8k | curModifier.push_back(1); | 2795 | 13.8k | } | 2796 | 27 | } else { | 2797 | 164 | for (auto& c : curModifier) { | 2798 | 164 | c++; | 2799 | 164 | } | 2800 | 18 | } | 2801 | 45 | } | 2802 | 94 | } | 2803 | | | 2804 | 130 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 130 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 130 | const auto& result = results.back(); | 2811 | | | 2812 | 130 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 130 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 130 | if ( options.disableTests == false ) { | 2830 | 130 | tests::test(op, result.second); | 2831 | 130 | } | 2832 | | | 2833 | 130 | postprocess(module, op, result); | 2834 | 130 | } | 2835 | | | 2836 | 128 | if ( options.noCompare == false ) { | 2837 | 36 | compare(operations, results, data, size); | 2838 | 36 | } | 2839 | 128 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 118 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 118 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 118 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.43k | do { | 2725 | 1.43k | auto op = getOp(&parentDs, data, size); | 2726 | 1.43k | auto module = getModule(parentDs); | 2727 | 1.43k | if ( module == nullptr ) { | 2728 | 1.27k | continue; | 2729 | 1.27k | } | 2730 | | | 2731 | 156 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 156 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 1.42k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 118 | if ( operations.empty() == true ) { | 2740 | 29 | return; | 2741 | 29 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 89 | #if 1 | 2745 | 89 | { | 2746 | 89 | std::set<uint64_t> moduleIDs; | 2747 | 89 | for (const auto& m : modules ) { | 2748 | 56 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 56 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 56 | moduleIDs.insert(moduleID); | 2756 | 56 | } | 2757 | | | 2758 | 89 | std::set<uint64_t> operationModuleIDs; | 2759 | 89 | for (const auto& op : operations) { | 2760 | 82 | operationModuleIDs.insert(op.first->ID); | 2761 | 82 | } | 2762 | | | 2763 | 89 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 89 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 89 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 89 | for (const auto& id : addModuleIDs) { | 2768 | 19 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 19 | } | 2770 | 89 | } | 2771 | 89 | #endif | 2772 | | | 2773 | 89 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 89 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 190 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 101 | auto& operation = operations[i]; | 2782 | | | 2783 | 101 | auto& module = operation.first; | 2784 | 101 | auto& op = operation.second; | 2785 | | | 2786 | 101 | if ( i > 0 ) { | 2787 | 73 | auto& prevModule = operations[i-1].first; | 2788 | 73 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 73 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 34 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 34 | if ( curModifier.size() == 0 ) { | 2793 | 8.20k | for (size_t j = 0; j < 512; j++) { | 2794 | 8.19k | curModifier.push_back(1); | 2795 | 8.19k | } | 2796 | 18 | } else { | 2797 | 1.02k | for (auto& c : curModifier) { | 2798 | 1.02k | c++; | 2799 | 1.02k | } | 2800 | 18 | } | 2801 | 34 | } | 2802 | 73 | } | 2803 | | | 2804 | 101 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 101 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 101 | const auto& result = results.back(); | 2811 | | | 2812 | 101 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 101 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 101 | if ( options.disableTests == false ) { | 2830 | 101 | tests::test(op, result.second); | 2831 | 101 | } | 2832 | | | 2833 | 101 | postprocess(module, op, result); | 2834 | 101 | } | 2835 | | | 2836 | 89 | if ( options.noCompare == false ) { | 2837 | 28 | compare(operations, results, data, size); | 2838 | 28 | } | 2839 | 89 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 102 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 102 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 102 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.73k | do { | 2725 | 1.73k | auto op = getOp(&parentDs, data, size); | 2726 | 1.73k | auto module = getModule(parentDs); | 2727 | 1.73k | if ( module == nullptr ) { | 2728 | 1.56k | continue; | 2729 | 1.56k | } | 2730 | | | 2731 | 166 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 166 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 1.72k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 102 | if ( operations.empty() == true ) { | 2740 | 11 | return; | 2741 | 11 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 91 | #if 1 | 2745 | 91 | { | 2746 | 91 | std::set<uint64_t> moduleIDs; | 2747 | 91 | for (const auto& m : modules ) { | 2748 | 66 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 66 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 66 | moduleIDs.insert(moduleID); | 2756 | 66 | } | 2757 | | | 2758 | 91 | std::set<uint64_t> operationModuleIDs; | 2759 | 97 | for (const auto& op : operations) { | 2760 | 97 | operationModuleIDs.insert(op.first->ID); | 2761 | 97 | } | 2762 | | | 2763 | 91 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 91 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 91 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 91 | for (const auto& id : addModuleIDs) { | 2768 | 21 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 21 | } | 2770 | 91 | } | 2771 | 91 | #endif | 2772 | | | 2773 | 91 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 91 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 209 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 118 | auto& operation = operations[i]; | 2782 | | | 2783 | 118 | auto& module = operation.first; | 2784 | 118 | auto& op = operation.second; | 2785 | | | 2786 | 118 | if ( i > 0 ) { | 2787 | 85 | auto& prevModule = operations[i-1].first; | 2788 | 85 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 85 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 45 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 45 | if ( curModifier.size() == 0 ) { | 2793 | 9.74k | for (size_t j = 0; j < 512; j++) { | 2794 | 9.72k | curModifier.push_back(1); | 2795 | 9.72k | } | 2796 | 26 | } else { | 2797 | 23.2k | for (auto& c : curModifier) { | 2798 | 23.2k | c++; | 2799 | 23.2k | } | 2800 | 26 | } | 2801 | 45 | } | 2802 | 85 | } | 2803 | | | 2804 | 118 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 118 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 118 | const auto& result = results.back(); | 2811 | | | 2812 | 118 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 118 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 118 | if ( options.disableTests == false ) { | 2830 | 118 | tests::test(op, result.second); | 2831 | 118 | } | 2832 | | | 2833 | 118 | postprocess(module, op, result); | 2834 | 118 | } | 2835 | | | 2836 | 91 | if ( options.noCompare == false ) { | 2837 | 33 | compare(operations, results, data, size); | 2838 | 33 | } | 2839 | 91 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 148 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 148 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 148 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.86k | do { | 2725 | 1.86k | auto op = getOp(&parentDs, data, size); | 2726 | 1.86k | auto module = getModule(parentDs); | 2727 | 1.86k | if ( module == nullptr ) { | 2728 | 1.62k | continue; | 2729 | 1.62k | } | 2730 | | | 2731 | 238 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 238 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 1.85k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 148 | if ( operations.empty() == true ) { | 2740 | 19 | return; | 2741 | 19 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 129 | #if 1 | 2745 | 129 | { | 2746 | 129 | std::set<uint64_t> moduleIDs; | 2747 | 129 | for (const auto& m : modules ) { | 2748 | 92 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 92 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 92 | moduleIDs.insert(moduleID); | 2756 | 92 | } | 2757 | | | 2758 | 129 | std::set<uint64_t> operationModuleIDs; | 2759 | 129 | for (const auto& op : operations) { | 2760 | 118 | operationModuleIDs.insert(op.first->ID); | 2761 | 118 | } | 2762 | | | 2763 | 129 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 129 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 129 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 129 | for (const auto& id : addModuleIDs) { | 2768 | 33 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 33 | } | 2770 | 129 | } | 2771 | 129 | #endif | 2772 | | | 2773 | 129 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 129 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 280 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 151 | auto& operation = operations[i]; | 2782 | | | 2783 | 151 | auto& module = operation.first; | 2784 | 151 | auto& op = operation.second; | 2785 | | | 2786 | 151 | if ( i > 0 ) { | 2787 | 105 | auto& prevModule = operations[i-1].first; | 2788 | 105 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 105 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 50 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 50 | if ( curModifier.size() == 0 ) { | 2793 | 11.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 11.2k | curModifier.push_back(1); | 2795 | 11.2k | } | 2796 | 28 | } else { | 2797 | 1.89k | for (auto& c : curModifier) { | 2798 | 1.89k | c++; | 2799 | 1.89k | } | 2800 | 28 | } | 2801 | 50 | } | 2802 | 105 | } | 2803 | | | 2804 | 151 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 151 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 151 | const auto& result = results.back(); | 2811 | | | 2812 | 151 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 151 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 151 | if ( options.disableTests == false ) { | 2830 | 151 | tests::test(op, result.second); | 2831 | 151 | } | 2832 | | | 2833 | 151 | postprocess(module, op, result); | 2834 | 151 | } | 2835 | | | 2836 | 129 | if ( options.noCompare == false ) { | 2837 | 46 | compare(operations, results, data, size); | 2838 | 46 | } | 2839 | 129 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 101 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 101 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 101 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.74k | do { | 2725 | 1.74k | auto op = getOp(&parentDs, data, size); | 2726 | 1.74k | auto module = getModule(parentDs); | 2727 | 1.74k | if ( module == nullptr ) { | 2728 | 1.59k | continue; | 2729 | 1.59k | } | 2730 | | | 2731 | 155 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 155 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 9 | break; | 2736 | 9 | } | 2737 | 1.73k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 101 | if ( operations.empty() == true ) { | 2740 | 17 | return; | 2741 | 17 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 84 | #if 1 | 2745 | 84 | { | 2746 | 84 | std::set<uint64_t> moduleIDs; | 2747 | 84 | for (const auto& m : modules ) { | 2748 | 60 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 60 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 60 | moduleIDs.insert(moduleID); | 2756 | 60 | } | 2757 | | | 2758 | 84 | std::set<uint64_t> operationModuleIDs; | 2759 | 94 | for (const auto& op : operations) { | 2760 | 94 | operationModuleIDs.insert(op.first->ID); | 2761 | 94 | } | 2762 | | | 2763 | 84 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 84 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 84 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 84 | for (const auto& id : addModuleIDs) { | 2768 | 23 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 23 | } | 2770 | 84 | } | 2771 | 84 | #endif | 2772 | | | 2773 | 84 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 84 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 201 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 117 | auto& operation = operations[i]; | 2782 | | | 2783 | 117 | auto& module = operation.first; | 2784 | 117 | auto& op = operation.second; | 2785 | | | 2786 | 117 | if ( i > 0 ) { | 2787 | 87 | auto& prevModule = operations[i-1].first; | 2788 | 87 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 87 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 49 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 49 | if ( curModifier.size() == 0 ) { | 2793 | 10.7k | for (size_t j = 0; j < 512; j++) { | 2794 | 10.7k | curModifier.push_back(1); | 2795 | 10.7k | } | 2796 | 28 | } else { | 2797 | 558 | for (auto& c : curModifier) { | 2798 | 558 | c++; | 2799 | 558 | } | 2800 | 28 | } | 2801 | 49 | } | 2802 | 87 | } | 2803 | | | 2804 | 117 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 117 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 117 | const auto& result = results.back(); | 2811 | | | 2812 | 117 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 117 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 117 | if ( options.disableTests == false ) { | 2830 | 117 | tests::test(op, result.second); | 2831 | 117 | } | 2832 | | | 2833 | 117 | postprocess(module, op, result); | 2834 | 117 | } | 2835 | | | 2836 | 84 | if ( options.noCompare == false ) { | 2837 | 30 | compare(operations, results, data, size); | 2838 | 30 | } | 2839 | 84 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 109 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 109 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 109 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.28k | do { | 2725 | 2.28k | auto op = getOp(&parentDs, data, size); | 2726 | 2.28k | auto module = getModule(parentDs); | 2727 | 2.28k | if ( module == nullptr ) { | 2728 | 2.09k | continue; | 2729 | 2.09k | } | 2730 | | | 2731 | 181 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 181 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 2.27k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 109 | if ( operations.empty() == true ) { | 2740 | 15 | return; | 2741 | 15 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 94 | #if 1 | 2745 | 94 | { | 2746 | 94 | std::set<uint64_t> moduleIDs; | 2747 | 94 | for (const auto& m : modules ) { | 2748 | 68 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 68 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 68 | moduleIDs.insert(moduleID); | 2756 | 68 | } | 2757 | | | 2758 | 94 | std::set<uint64_t> operationModuleIDs; | 2759 | 102 | for (const auto& op : operations) { | 2760 | 102 | operationModuleIDs.insert(op.first->ID); | 2761 | 102 | } | 2762 | | | 2763 | 94 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 94 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 94 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 94 | for (const auto& id : addModuleIDs) { | 2768 | 26 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 26 | } | 2770 | 94 | } | 2771 | 94 | #endif | 2772 | | | 2773 | 94 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 94 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 222 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 128 | auto& operation = operations[i]; | 2782 | | | 2783 | 128 | auto& module = operation.first; | 2784 | 128 | auto& op = operation.second; | 2785 | | | 2786 | 128 | if ( i > 0 ) { | 2787 | 94 | auto& prevModule = operations[i-1].first; | 2788 | 94 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 94 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 54 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 54 | if ( curModifier.size() == 0 ) { | 2793 | 11.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 11.2k | curModifier.push_back(1); | 2795 | 11.2k | } | 2796 | 32 | } else { | 2797 | 825 | for (auto& c : curModifier) { | 2798 | 825 | c++; | 2799 | 825 | } | 2800 | 32 | } | 2801 | 54 | } | 2802 | 94 | } | 2803 | | | 2804 | 128 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 128 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 128 | const auto& result = results.back(); | 2811 | | | 2812 | 128 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 128 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 128 | if ( options.disableTests == false ) { | 2830 | 128 | tests::test(op, result.second); | 2831 | 128 | } | 2832 | | | 2833 | 128 | postprocess(module, op, result); | 2834 | 128 | } | 2835 | | | 2836 | 94 | if ( options.noCompare == false ) { | 2837 | 34 | compare(operations, results, data, size); | 2838 | 34 | } | 2839 | 94 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 97 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 97 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 97 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.48k | do { | 2725 | 2.48k | auto op = getOp(&parentDs, data, size); | 2726 | 2.48k | auto module = getModule(parentDs); | 2727 | 2.48k | if ( module == nullptr ) { | 2728 | 2.31k | continue; | 2729 | 2.31k | } | 2730 | | | 2731 | 167 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 167 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 2.47k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 97 | if ( operations.empty() == true ) { | 2740 | 9 | return; | 2741 | 9 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 88 | #if 1 | 2745 | 88 | { | 2746 | 88 | std::set<uint64_t> moduleIDs; | 2747 | 88 | for (const auto& m : modules ) { | 2748 | 62 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 62 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 62 | moduleIDs.insert(moduleID); | 2756 | 62 | } | 2757 | | | 2758 | 88 | std::set<uint64_t> operationModuleIDs; | 2759 | 96 | for (const auto& op : operations) { | 2760 | 96 | operationModuleIDs.insert(op.first->ID); | 2761 | 96 | } | 2762 | | | 2763 | 88 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 88 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 88 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 88 | for (const auto& id : addModuleIDs) { | 2768 | 22 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 22 | } | 2770 | 88 | } | 2771 | 88 | #endif | 2772 | | | 2773 | 88 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 88 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 206 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 118 | auto& operation = operations[i]; | 2782 | | | 2783 | 118 | auto& module = operation.first; | 2784 | 118 | auto& op = operation.second; | 2785 | | | 2786 | 118 | if ( i > 0 ) { | 2787 | 87 | auto& prevModule = operations[i-1].first; | 2788 | 87 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 87 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 50 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 50 | if ( curModifier.size() == 0 ) { | 2793 | 8.72k | for (size_t j = 0; j < 512; j++) { | 2794 | 8.70k | curModifier.push_back(1); | 2795 | 8.70k | } | 2796 | 33 | } else { | 2797 | 500 | for (auto& c : curModifier) { | 2798 | 500 | c++; | 2799 | 500 | } | 2800 | 33 | } | 2801 | 50 | } | 2802 | 87 | } | 2803 | | | 2804 | 118 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 118 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 118 | const auto& result = results.back(); | 2811 | | | 2812 | 118 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 118 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 118 | if ( options.disableTests == false ) { | 2830 | 118 | tests::test(op, result.second); | 2831 | 118 | } | 2832 | | | 2833 | 118 | postprocess(module, op, result); | 2834 | 118 | } | 2835 | | | 2836 | 88 | if ( options.noCompare == false ) { | 2837 | 31 | compare(operations, results, data, size); | 2838 | 31 | } | 2839 | 88 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 96 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 96 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 96 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.31k | do { | 2725 | 1.31k | auto op = getOp(&parentDs, data, size); | 2726 | 1.31k | auto module = getModule(parentDs); | 2727 | 1.31k | if ( module == nullptr ) { | 2728 | 1.12k | continue; | 2729 | 1.12k | } | 2730 | | | 2731 | 186 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 186 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 1.30k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 96 | if ( operations.empty() == true ) { | 2740 | 9 | return; | 2741 | 9 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 87 | #if 1 | 2745 | 87 | { | 2746 | 87 | std::set<uint64_t> moduleIDs; | 2747 | 87 | for (const auto& m : modules ) { | 2748 | 74 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 74 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 74 | moduleIDs.insert(moduleID); | 2756 | 74 | } | 2757 | | | 2758 | 87 | std::set<uint64_t> operationModuleIDs; | 2759 | 108 | for (const auto& op : operations) { | 2760 | 108 | operationModuleIDs.insert(op.first->ID); | 2761 | 108 | } | 2762 | | | 2763 | 87 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 87 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 87 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 87 | for (const auto& id : addModuleIDs) { | 2768 | 25 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 25 | } | 2770 | 87 | } | 2771 | 87 | #endif | 2772 | | | 2773 | 87 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 87 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 220 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 133 | auto& operation = operations[i]; | 2782 | | | 2783 | 133 | auto& module = operation.first; | 2784 | 133 | auto& op = operation.second; | 2785 | | | 2786 | 133 | if ( i > 0 ) { | 2787 | 96 | auto& prevModule = operations[i-1].first; | 2788 | 96 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 96 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 53 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 53 | if ( curModifier.size() == 0 ) { | 2793 | 9.74k | for (size_t j = 0; j < 512; j++) { | 2794 | 9.72k | curModifier.push_back(1); | 2795 | 9.72k | } | 2796 | 34 | } else { | 2797 | 582 | for (auto& c : curModifier) { | 2798 | 582 | c++; | 2799 | 582 | } | 2800 | 34 | } | 2801 | 53 | } | 2802 | 96 | } | 2803 | | | 2804 | 133 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 133 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 133 | const auto& result = results.back(); | 2811 | | | 2812 | 133 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 133 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 133 | if ( options.disableTests == false ) { | 2830 | 133 | tests::test(op, result.second); | 2831 | 133 | } | 2832 | | | 2833 | 133 | postprocess(module, op, result); | 2834 | 133 | } | 2835 | | | 2836 | 87 | if ( options.noCompare == false ) { | 2837 | 37 | compare(operations, results, data, size); | 2838 | 37 | } | 2839 | 87 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 135 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 135 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 135 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.44k | do { | 2725 | 1.44k | auto op = getOp(&parentDs, data, size); | 2726 | 1.44k | auto module = getModule(parentDs); | 2727 | 1.44k | if ( module == nullptr ) { | 2728 | 1.26k | continue; | 2729 | 1.26k | } | 2730 | | | 2731 | 176 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 176 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 1.43k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 135 | if ( operations.empty() == true ) { | 2740 | 23 | return; | 2741 | 23 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 112 | #if 1 | 2745 | 112 | { | 2746 | 112 | std::set<uint64_t> moduleIDs; | 2747 | 112 | for (const auto& m : modules ) { | 2748 | 94 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 94 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 94 | moduleIDs.insert(moduleID); | 2756 | 94 | } | 2757 | | | 2758 | 112 | std::set<uint64_t> operationModuleIDs; | 2759 | 115 | for (const auto& op : operations) { | 2760 | 115 | operationModuleIDs.insert(op.first->ID); | 2761 | 115 | } | 2762 | | | 2763 | 112 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 112 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 112 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 112 | for (const auto& id : addModuleIDs) { | 2768 | 34 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 34 | } | 2770 | 112 | } | 2771 | 112 | #endif | 2772 | | | 2773 | 112 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 112 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 261 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 149 | auto& operation = operations[i]; | 2782 | | | 2783 | 149 | auto& module = operation.first; | 2784 | 149 | auto& op = operation.second; | 2785 | | | 2786 | 149 | if ( i > 0 ) { | 2787 | 102 | auto& prevModule = operations[i-1].first; | 2788 | 102 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 102 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 48 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 48 | if ( curModifier.size() == 0 ) { | 2793 | 11.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 11.2k | curModifier.push_back(1); | 2795 | 11.2k | } | 2796 | 26 | } else { | 2797 | 447 | for (auto& c : curModifier) { | 2798 | 447 | c++; | 2799 | 447 | } | 2800 | 26 | } | 2801 | 48 | } | 2802 | 102 | } | 2803 | | | 2804 | 149 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 149 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 149 | const auto& result = results.back(); | 2811 | | | 2812 | 149 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 149 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 149 | if ( options.disableTests == false ) { | 2830 | 149 | tests::test(op, result.second); | 2831 | 149 | } | 2832 | | | 2833 | 149 | postprocess(module, op, result); | 2834 | 149 | } | 2835 | | | 2836 | 112 | if ( options.noCompare == false ) { | 2837 | 47 | compare(operations, results, data, size); | 2838 | 47 | } | 2839 | 112 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 104 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 104 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 104 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.88k | do { | 2725 | 1.88k | auto op = getOp(&parentDs, data, size); | 2726 | 1.88k | auto module = getModule(parentDs); | 2727 | 1.88k | if ( module == nullptr ) { | 2728 | 1.68k | continue; | 2729 | 1.68k | } | 2730 | | | 2731 | 199 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 199 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 1.87k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 104 | if ( operations.empty() == true ) { | 2740 | 6 | return; | 2741 | 6 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 98 | #if 1 | 2745 | 98 | { | 2746 | 98 | std::set<uint64_t> moduleIDs; | 2747 | 98 | for (const auto& m : modules ) { | 2748 | 92 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 92 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 92 | moduleIDs.insert(moduleID); | 2756 | 92 | } | 2757 | | | 2758 | 98 | std::set<uint64_t> operationModuleIDs; | 2759 | 126 | for (const auto& op : operations) { | 2760 | 126 | operationModuleIDs.insert(op.first->ID); | 2761 | 126 | } | 2762 | | | 2763 | 98 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 98 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 98 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 98 | for (const auto& id : addModuleIDs) { | 2768 | 29 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 29 | } | 2770 | 98 | } | 2771 | 98 | #endif | 2772 | | | 2773 | 98 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 98 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 253 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 155 | auto& operation = operations[i]; | 2782 | | | 2783 | 155 | auto& module = operation.first; | 2784 | 155 | auto& op = operation.second; | 2785 | | | 2786 | 155 | if ( i > 0 ) { | 2787 | 109 | auto& prevModule = operations[i-1].first; | 2788 | 109 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 109 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 55 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 55 | if ( curModifier.size() == 0 ) { | 2793 | 9.23k | for (size_t j = 0; j < 512; j++) { | 2794 | 9.21k | curModifier.push_back(1); | 2795 | 9.21k | } | 2796 | 37 | } else { | 2797 | 773 | for (auto& c : curModifier) { | 2798 | 773 | c++; | 2799 | 773 | } | 2800 | 37 | } | 2801 | 55 | } | 2802 | 109 | } | 2803 | | | 2804 | 155 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 155 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 155 | const auto& result = results.back(); | 2811 | | | 2812 | 155 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 155 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 155 | if ( options.disableTests == false ) { | 2830 | 155 | tests::test(op, result.second); | 2831 | 155 | } | 2832 | | | 2833 | 155 | postprocess(module, op, result); | 2834 | 155 | } | 2835 | | | 2836 | 98 | if ( options.noCompare == false ) { | 2837 | 46 | compare(operations, results, data, size); | 2838 | 46 | } | 2839 | 98 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 131 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 131 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 131 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.63k | do { | 2725 | 2.63k | auto op = getOp(&parentDs, data, size); | 2726 | 2.63k | auto module = getModule(parentDs); | 2727 | 2.63k | if ( module == nullptr ) { | 2728 | 2.46k | continue; | 2729 | 2.46k | } | 2730 | | | 2731 | 176 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 176 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 2.63k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 131 | if ( operations.empty() == true ) { | 2740 | 19 | return; | 2741 | 19 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 112 | #if 1 | 2745 | 112 | { | 2746 | 112 | std::set<uint64_t> moduleIDs; | 2747 | 112 | for (const auto& m : modules ) { | 2748 | 68 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 68 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 68 | moduleIDs.insert(moduleID); | 2756 | 68 | } | 2757 | | | 2758 | 112 | std::set<uint64_t> operationModuleIDs; | 2759 | 112 | for (const auto& op : operations) { | 2760 | 97 | operationModuleIDs.insert(op.first->ID); | 2761 | 97 | } | 2762 | | | 2763 | 112 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 112 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 112 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 112 | for (const auto& id : addModuleIDs) { | 2768 | 24 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 24 | } | 2770 | 112 | } | 2771 | 112 | #endif | 2772 | | | 2773 | 112 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 112 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 233 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 121 | auto& operation = operations[i]; | 2782 | | | 2783 | 121 | auto& module = operation.first; | 2784 | 121 | auto& op = operation.second; | 2785 | | | 2786 | 121 | if ( i > 0 ) { | 2787 | 87 | auto& prevModule = operations[i-1].first; | 2788 | 87 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 87 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 45 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 45 | if ( curModifier.size() == 0 ) { | 2793 | 11.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 11.2k | curModifier.push_back(1); | 2795 | 11.2k | } | 2796 | 23 | } else { | 2797 | 339 | for (auto& c : curModifier) { | 2798 | 339 | c++; | 2799 | 339 | } | 2800 | 23 | } | 2801 | 45 | } | 2802 | 87 | } | 2803 | | | 2804 | 121 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 121 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 121 | const auto& result = results.back(); | 2811 | | | 2812 | 121 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 121 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 121 | if ( options.disableTests == false ) { | 2830 | 121 | tests::test(op, result.second); | 2831 | 121 | } | 2832 | | | 2833 | 121 | postprocess(module, op, result); | 2834 | 121 | } | 2835 | | | 2836 | 112 | if ( options.noCompare == false ) { | 2837 | 34 | compare(operations, results, data, size); | 2838 | 34 | } | 2839 | 112 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 100 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 100 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 100 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.32k | do { | 2725 | 1.32k | auto op = getOp(&parentDs, data, size); | 2726 | 1.32k | auto module = getModule(parentDs); | 2727 | 1.32k | if ( module == nullptr ) { | 2728 | 1.15k | continue; | 2729 | 1.15k | } | 2730 | | | 2731 | 173 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 173 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 1.31k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 100 | if ( operations.empty() == true ) { | 2740 | 13 | return; | 2741 | 13 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 87 | #if 1 | 2745 | 87 | { | 2746 | 87 | std::set<uint64_t> moduleIDs; | 2747 | 87 | for (const auto& m : modules ) { | 2748 | 64 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 64 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 64 | moduleIDs.insert(moduleID); | 2756 | 64 | } | 2757 | | | 2758 | 87 | std::set<uint64_t> operationModuleIDs; | 2759 | 102 | for (const auto& op : operations) { | 2760 | 102 | operationModuleIDs.insert(op.first->ID); | 2761 | 102 | } | 2762 | | | 2763 | 87 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 87 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 87 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 87 | for (const auto& id : addModuleIDs) { | 2768 | 20 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 20 | } | 2770 | 87 | } | 2771 | 87 | #endif | 2772 | | | 2773 | 87 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 87 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 209 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 122 | auto& operation = operations[i]; | 2782 | | | 2783 | 122 | auto& module = operation.first; | 2784 | 122 | auto& op = operation.second; | 2785 | | | 2786 | 122 | if ( i > 0 ) { | 2787 | 90 | auto& prevModule = operations[i-1].first; | 2788 | 90 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 90 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 50 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 50 | if ( curModifier.size() == 0 ) { | 2793 | 13.8k | for (size_t j = 0; j < 512; j++) { | 2794 | 13.8k | curModifier.push_back(1); | 2795 | 13.8k | } | 2796 | 27 | } else { | 2797 | 275 | for (auto& c : curModifier) { | 2798 | 275 | c++; | 2799 | 275 | } | 2800 | 23 | } | 2801 | 50 | } | 2802 | 90 | } | 2803 | | | 2804 | 122 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 122 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 122 | const auto& result = results.back(); | 2811 | | | 2812 | 122 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 122 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 122 | if ( options.disableTests == false ) { | 2830 | 122 | tests::test(op, result.second); | 2831 | 122 | } | 2832 | | | 2833 | 122 | postprocess(module, op, result); | 2834 | 122 | } | 2835 | | | 2836 | 87 | if ( options.noCompare == false ) { | 2837 | 32 | compare(operations, results, data, size); | 2838 | 32 | } | 2839 | 87 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 96 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 96 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 96 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.31k | do { | 2725 | 1.31k | auto op = getOp(&parentDs, data, size); | 2726 | 1.31k | auto module = getModule(parentDs); | 2727 | 1.31k | if ( module == nullptr ) { | 2728 | 1.16k | continue; | 2729 | 1.16k | } | 2730 | | | 2731 | 154 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 154 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 1.31k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 96 | if ( operations.empty() == true ) { | 2740 | 15 | return; | 2741 | 15 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 81 | #if 1 | 2745 | 81 | { | 2746 | 81 | std::set<uint64_t> moduleIDs; | 2747 | 81 | for (const auto& m : modules ) { | 2748 | 60 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 60 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 60 | moduleIDs.insert(moduleID); | 2756 | 60 | } | 2757 | | | 2758 | 81 | std::set<uint64_t> operationModuleIDs; | 2759 | 82 | for (const auto& op : operations) { | 2760 | 82 | operationModuleIDs.insert(op.first->ID); | 2761 | 82 | } | 2762 | | | 2763 | 81 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 81 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 81 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 81 | for (const auto& id : addModuleIDs) { | 2768 | 18 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 18 | } | 2770 | 81 | } | 2771 | 81 | #endif | 2772 | | | 2773 | 81 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 81 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 181 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 100 | auto& operation = operations[i]; | 2782 | | | 2783 | 100 | auto& module = operation.first; | 2784 | 100 | auto& op = operation.second; | 2785 | | | 2786 | 100 | if ( i > 0 ) { | 2787 | 70 | auto& prevModule = operations[i-1].first; | 2788 | 70 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 70 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 34 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 34 | if ( curModifier.size() == 0 ) { | 2793 | 9.23k | for (size_t j = 0; j < 512; j++) { | 2794 | 9.21k | curModifier.push_back(1); | 2795 | 9.21k | } | 2796 | 18 | } else { | 2797 | 296 | for (auto& c : curModifier) { | 2798 | 296 | c++; | 2799 | 296 | } | 2800 | 16 | } | 2801 | 34 | } | 2802 | 70 | } | 2803 | | | 2804 | 100 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 100 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 100 | const auto& result = results.back(); | 2811 | | | 2812 | 100 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 100 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 100 | if ( options.disableTests == false ) { | 2830 | 100 | tests::test(op, result.second); | 2831 | 100 | } | 2832 | | | 2833 | 100 | postprocess(module, op, result); | 2834 | 100 | } | 2835 | | | 2836 | 81 | if ( options.noCompare == false ) { | 2837 | 30 | compare(operations, results, data, size); | 2838 | 30 | } | 2839 | 81 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 85 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 85 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 85 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.30k | do { | 2725 | 1.30k | auto op = getOp(&parentDs, data, size); | 2726 | 1.30k | auto module = getModule(parentDs); | 2727 | 1.30k | if ( module == nullptr ) { | 2728 | 1.17k | continue; | 2729 | 1.17k | } | 2730 | | | 2731 | 133 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 133 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 1.30k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 85 | if ( operations.empty() == true ) { | 2740 | 14 | return; | 2741 | 14 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 71 | #if 1 | 2745 | 71 | { | 2746 | 71 | std::set<uint64_t> moduleIDs; | 2747 | 71 | for (const auto& m : modules ) { | 2748 | 54 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 54 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 54 | moduleIDs.insert(moduleID); | 2756 | 54 | } | 2757 | | | 2758 | 71 | std::set<uint64_t> operationModuleIDs; | 2759 | 80 | for (const auto& op : operations) { | 2760 | 80 | operationModuleIDs.insert(op.first->ID); | 2761 | 80 | } | 2762 | | | 2763 | 71 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 71 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 71 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 71 | for (const auto& id : addModuleIDs) { | 2768 | 15 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 15 | } | 2770 | 71 | } | 2771 | 71 | #endif | 2772 | | | 2773 | 71 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 71 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 166 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 95 | auto& operation = operations[i]; | 2782 | | | 2783 | 95 | auto& module = operation.first; | 2784 | 95 | auto& op = operation.second; | 2785 | | | 2786 | 95 | if ( i > 0 ) { | 2787 | 68 | auto& prevModule = operations[i-1].first; | 2788 | 68 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 68 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 35 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 35 | if ( curModifier.size() == 0 ) { | 2793 | 7.69k | for (size_t j = 0; j < 512; j++) { | 2794 | 7.68k | curModifier.push_back(1); | 2795 | 7.68k | } | 2796 | 20 | } else { | 2797 | 268 | for (auto& c : curModifier) { | 2798 | 268 | c++; | 2799 | 268 | } | 2800 | 20 | } | 2801 | 35 | } | 2802 | 68 | } | 2803 | | | 2804 | 95 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 95 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 95 | const auto& result = results.back(); | 2811 | | | 2812 | 95 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 95 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 95 | if ( options.disableTests == false ) { | 2830 | 95 | tests::test(op, result.second); | 2831 | 95 | } | 2832 | | | 2833 | 95 | postprocess(module, op, result); | 2834 | 95 | } | 2835 | | | 2836 | 71 | if ( options.noCompare == false ) { | 2837 | 27 | compare(operations, results, data, size); | 2838 | 27 | } | 2839 | 71 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 105 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 105 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 105 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.99k | do { | 2725 | 1.99k | auto op = getOp(&parentDs, data, size); | 2726 | 1.99k | auto module = getModule(parentDs); | 2727 | 1.99k | if ( module == nullptr ) { | 2728 | 1.82k | continue; | 2729 | 1.82k | } | 2730 | | | 2731 | 167 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 167 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 1.98k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 105 | if ( operations.empty() == true ) { | 2740 | 12 | return; | 2741 | 12 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 93 | #if 1 | 2745 | 93 | { | 2746 | 93 | std::set<uint64_t> moduleIDs; | 2747 | 93 | for (const auto& m : modules ) { | 2748 | 64 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 64 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 64 | moduleIDs.insert(moduleID); | 2756 | 64 | } | 2757 | | | 2758 | 93 | std::set<uint64_t> operationModuleIDs; | 2759 | 93 | for (const auto& op : operations) { | 2760 | 85 | operationModuleIDs.insert(op.first->ID); | 2761 | 85 | } | 2762 | | | 2763 | 93 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 93 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 93 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 93 | for (const auto& id : addModuleIDs) { | 2768 | 23 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 23 | } | 2770 | 93 | } | 2771 | 93 | #endif | 2772 | | | 2773 | 93 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 93 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 201 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 108 | auto& operation = operations[i]; | 2782 | | | 2783 | 108 | auto& module = operation.first; | 2784 | 108 | auto& op = operation.second; | 2785 | | | 2786 | 108 | if ( i > 0 ) { | 2787 | 76 | auto& prevModule = operations[i-1].first; | 2788 | 76 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 76 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 41 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 41 | if ( curModifier.size() == 0 ) { | 2793 | 10.7k | for (size_t j = 0; j < 512; j++) { | 2794 | 10.7k | curModifier.push_back(1); | 2795 | 10.7k | } | 2796 | 21 | } else { | 2797 | 1.11k | for (auto& c : curModifier) { | 2798 | 1.11k | c++; | 2799 | 1.11k | } | 2800 | 20 | } | 2801 | 41 | } | 2802 | 76 | } | 2803 | | | 2804 | 108 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 108 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 108 | const auto& result = results.back(); | 2811 | | | 2812 | 108 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 108 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 108 | if ( options.disableTests == false ) { | 2830 | 108 | tests::test(op, result.second); | 2831 | 108 | } | 2832 | | | 2833 | 108 | postprocess(module, op, result); | 2834 | 108 | } | 2835 | | | 2836 | 93 | if ( options.noCompare == false ) { | 2837 | 32 | compare(operations, results, data, size); | 2838 | 32 | } | 2839 | 93 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 141 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 141 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 141 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.08k | do { | 2725 | 2.08k | auto op = getOp(&parentDs, data, size); | 2726 | 2.08k | auto module = getModule(parentDs); | 2727 | 2.08k | if ( module == nullptr ) { | 2728 | 1.87k | continue; | 2729 | 1.87k | } | 2730 | | | 2731 | 211 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 211 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 2.08k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 141 | if ( operations.empty() == true ) { | 2740 | 17 | return; | 2741 | 17 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 124 | #if 1 | 2745 | 124 | { | 2746 | 124 | std::set<uint64_t> moduleIDs; | 2747 | 124 | for (const auto& m : modules ) { | 2748 | 100 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 100 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 100 | moduleIDs.insert(moduleID); | 2756 | 100 | } | 2757 | | | 2758 | 124 | std::set<uint64_t> operationModuleIDs; | 2759 | 127 | for (const auto& op : operations) { | 2760 | 127 | operationModuleIDs.insert(op.first->ID); | 2761 | 127 | } | 2762 | | | 2763 | 124 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 124 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 124 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 124 | for (const auto& id : addModuleIDs) { | 2768 | 36 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 36 | } | 2770 | 124 | } | 2771 | 124 | #endif | 2772 | | | 2773 | 124 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 124 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 287 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 163 | auto& operation = operations[i]; | 2782 | | | 2783 | 163 | auto& module = operation.first; | 2784 | 163 | auto& op = operation.second; | 2785 | | | 2786 | 163 | if ( i > 0 ) { | 2787 | 113 | auto& prevModule = operations[i-1].first; | 2788 | 113 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 113 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 55 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 55 | if ( curModifier.size() == 0 ) { | 2793 | 15.9k | for (size_t j = 0; j < 512; j++) { | 2794 | 15.8k | curModifier.push_back(1); | 2795 | 15.8k | } | 2796 | 31 | } else { | 2797 | 835 | for (auto& c : curModifier) { | 2798 | 835 | c++; | 2799 | 835 | } | 2800 | 24 | } | 2801 | 55 | } | 2802 | 113 | } | 2803 | | | 2804 | 163 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 163 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 163 | const auto& result = results.back(); | 2811 | | | 2812 | 163 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 163 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 163 | if ( options.disableTests == false ) { | 2830 | 163 | tests::test(op, result.second); | 2831 | 163 | } | 2832 | | | 2833 | 163 | postprocess(module, op, result); | 2834 | 163 | } | 2835 | | | 2836 | 124 | if ( options.noCompare == false ) { | 2837 | 50 | compare(operations, results, data, size); | 2838 | 50 | } | 2839 | 124 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 108 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 108 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 108 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.03k | do { | 2725 | 2.03k | auto op = getOp(&parentDs, data, size); | 2726 | 2.03k | auto module = getModule(parentDs); | 2727 | 2.03k | if ( module == nullptr ) { | 2728 | 1.87k | continue; | 2729 | 1.87k | } | 2730 | | | 2731 | 161 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 161 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 2.03k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 108 | if ( operations.empty() == true ) { | 2740 | 9 | return; | 2741 | 9 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 99 | #if 1 | 2745 | 99 | { | 2746 | 99 | std::set<uint64_t> moduleIDs; | 2747 | 99 | for (const auto& m : modules ) { | 2748 | 84 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 84 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 84 | moduleIDs.insert(moduleID); | 2756 | 84 | } | 2757 | | | 2758 | 99 | std::set<uint64_t> operationModuleIDs; | 2759 | 100 | for (const auto& op : operations) { | 2760 | 100 | operationModuleIDs.insert(op.first->ID); | 2761 | 100 | } | 2762 | | | 2763 | 99 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 99 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 99 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 99 | for (const auto& id : addModuleIDs) { | 2768 | 31 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 31 | } | 2770 | 99 | } | 2771 | 99 | #endif | 2772 | | | 2773 | 99 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 99 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 230 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 131 | auto& operation = operations[i]; | 2782 | | | 2783 | 131 | auto& module = operation.first; | 2784 | 131 | auto& op = operation.second; | 2785 | | | 2786 | 131 | if ( i > 0 ) { | 2787 | 89 | auto& prevModule = operations[i-1].first; | 2788 | 89 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 89 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 39 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 39 | if ( curModifier.size() == 0 ) { | 2793 | 8.20k | for (size_t j = 0; j < 512; j++) { | 2794 | 8.19k | curModifier.push_back(1); | 2795 | 8.19k | } | 2796 | 23 | } else { | 2797 | 1.39k | for (auto& c : curModifier) { | 2798 | 1.39k | c++; | 2799 | 1.39k | } | 2800 | 23 | } | 2801 | 39 | } | 2802 | 89 | } | 2803 | | | 2804 | 131 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 131 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 131 | const auto& result = results.back(); | 2811 | | | 2812 | 131 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 131 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 131 | if ( options.disableTests == false ) { | 2830 | 131 | tests::test(op, result.second); | 2831 | 131 | } | 2832 | | | 2833 | 131 | postprocess(module, op, result); | 2834 | 131 | } | 2835 | | | 2836 | 99 | if ( options.noCompare == false ) { | 2837 | 42 | compare(operations, results, data, size); | 2838 | 42 | } | 2839 | 99 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 117 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 117 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 117 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.85k | do { | 2725 | 1.85k | auto op = getOp(&parentDs, data, size); | 2726 | 1.85k | auto module = getModule(parentDs); | 2727 | 1.85k | if ( module == nullptr ) { | 2728 | 1.64k | continue; | 2729 | 1.64k | } | 2730 | | | 2731 | 211 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 211 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 9 | break; | 2736 | 9 | } | 2737 | 1.84k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 117 | if ( operations.empty() == true ) { | 2740 | 5 | return; | 2741 | 5 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 112 | #if 1 | 2745 | 112 | { | 2746 | 112 | std::set<uint64_t> moduleIDs; | 2747 | 118 | for (const auto& m : modules ) { | 2748 | 118 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 118 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 118 | moduleIDs.insert(moduleID); | 2756 | 118 | } | 2757 | | | 2758 | 112 | std::set<uint64_t> operationModuleIDs; | 2759 | 132 | for (const auto& op : operations) { | 2760 | 132 | operationModuleIDs.insert(op.first->ID); | 2761 | 132 | } | 2762 | | | 2763 | 112 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 112 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 112 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 112 | for (const auto& id : addModuleIDs) { | 2768 | 47 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 47 | } | 2770 | 112 | } | 2771 | 112 | #endif | 2772 | | | 2773 | 112 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 112 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 291 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 179 | auto& operation = operations[i]; | 2782 | | | 2783 | 179 | auto& module = operation.first; | 2784 | 179 | auto& op = operation.second; | 2785 | | | 2786 | 179 | if ( i > 0 ) { | 2787 | 120 | auto& prevModule = operations[i-1].first; | 2788 | 120 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 120 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 53 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 53 | if ( curModifier.size() == 0 ) { | 2793 | 17.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 17.4k | curModifier.push_back(1); | 2795 | 17.4k | } | 2796 | 34 | } else { | 2797 | 318 | for (auto& c : curModifier) { | 2798 | 318 | c++; | 2799 | 318 | } | 2800 | 19 | } | 2801 | 53 | } | 2802 | 120 | } | 2803 | | | 2804 | 179 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 179 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 179 | const auto& result = results.back(); | 2811 | | | 2812 | 179 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 179 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 179 | if ( options.disableTests == false ) { | 2830 | 179 | tests::test(op, result.second); | 2831 | 179 | } | 2832 | | | 2833 | 179 | postprocess(module, op, result); | 2834 | 179 | } | 2835 | | | 2836 | 112 | if ( options.noCompare == false ) { | 2837 | 59 | compare(operations, results, data, size); | 2838 | 59 | } | 2839 | 112 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 93 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 93 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 93 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.04k | do { | 2725 | 1.04k | auto op = getOp(&parentDs, data, size); | 2726 | 1.04k | auto module = getModule(parentDs); | 2727 | 1.04k | if ( module == nullptr ) { | 2728 | 897 | continue; | 2729 | 897 | } | 2730 | | | 2731 | 151 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 151 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 1.04k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 93 | if ( operations.empty() == true ) { | 2740 | 9 | return; | 2741 | 9 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 84 | #if 1 | 2745 | 84 | { | 2746 | 84 | std::set<uint64_t> moduleIDs; | 2747 | 84 | for (const auto& m : modules ) { | 2748 | 74 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 74 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 74 | moduleIDs.insert(moduleID); | 2756 | 74 | } | 2757 | | | 2758 | 84 | std::set<uint64_t> operationModuleIDs; | 2759 | 98 | for (const auto& op : operations) { | 2760 | 98 | operationModuleIDs.insert(op.first->ID); | 2761 | 98 | } | 2762 | | | 2763 | 84 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 84 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 84 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 84 | for (const auto& id : addModuleIDs) { | 2768 | 28 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 28 | } | 2770 | 84 | } | 2771 | 84 | #endif | 2772 | | | 2773 | 84 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 84 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 210 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 126 | auto& operation = operations[i]; | 2782 | | | 2783 | 126 | auto& module = operation.first; | 2784 | 126 | auto& op = operation.second; | 2785 | | | 2786 | 126 | if ( i > 0 ) { | 2787 | 89 | auto& prevModule = operations[i-1].first; | 2788 | 89 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 89 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 46 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 46 | if ( curModifier.size() == 0 ) { | 2793 | 12.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 12.2k | curModifier.push_back(1); | 2795 | 12.2k | } | 2796 | 24 | } else { | 2797 | 380 | for (auto& c : curModifier) { | 2798 | 380 | c++; | 2799 | 380 | } | 2800 | 22 | } | 2801 | 46 | } | 2802 | 89 | } | 2803 | | | 2804 | 126 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 126 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 126 | const auto& result = results.back(); | 2811 | | | 2812 | 126 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 126 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 126 | if ( options.disableTests == false ) { | 2830 | 126 | tests::test(op, result.second); | 2831 | 126 | } | 2832 | | | 2833 | 126 | postprocess(module, op, result); | 2834 | 126 | } | 2835 | | | 2836 | 84 | if ( options.noCompare == false ) { | 2837 | 37 | compare(operations, results, data, size); | 2838 | 37 | } | 2839 | 84 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 153 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 153 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 153 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.36k | do { | 2725 | 2.36k | auto op = getOp(&parentDs, data, size); | 2726 | 2.36k | auto module = getModule(parentDs); | 2727 | 2.36k | if ( module == nullptr ) { | 2728 | 2.04k | continue; | 2729 | 2.04k | } | 2730 | | | 2731 | 314 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 314 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 9 | break; | 2736 | 9 | } | 2737 | 2.35k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 153 | if ( operations.empty() == true ) { | 2740 | 5 | return; | 2741 | 5 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 148 | #if 1 | 2745 | 148 | { | 2746 | 148 | std::set<uint64_t> moduleIDs; | 2747 | 162 | for (const auto& m : modules ) { | 2748 | 162 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 162 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 162 | moduleIDs.insert(moduleID); | 2756 | 162 | } | 2757 | | | 2758 | 148 | std::set<uint64_t> operationModuleIDs; | 2759 | 181 | for (const auto& op : operations) { | 2760 | 181 | operationModuleIDs.insert(op.first->ID); | 2761 | 181 | } | 2762 | | | 2763 | 148 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 148 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 148 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 148 | for (const auto& id : addModuleIDs) { | 2768 | 69 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 69 | } | 2770 | 148 | } | 2771 | 148 | #endif | 2772 | | | 2773 | 148 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 148 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 398 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 250 | auto& operation = operations[i]; | 2782 | | | 2783 | 250 | auto& module = operation.first; | 2784 | 250 | auto& op = operation.second; | 2785 | | | 2786 | 250 | if ( i > 0 ) { | 2787 | 169 | auto& prevModule = operations[i-1].first; | 2788 | 169 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 169 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 83 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 83 | if ( curModifier.size() == 0 ) { | 2793 | 28.7k | for (size_t j = 0; j < 512; j++) { | 2794 | 28.6k | curModifier.push_back(1); | 2795 | 28.6k | } | 2796 | 56 | } else { | 2797 | 1.52k | for (auto& c : curModifier) { | 2798 | 1.52k | c++; | 2799 | 1.52k | } | 2800 | 27 | } | 2801 | 83 | } | 2802 | 169 | } | 2803 | | | 2804 | 250 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 250 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 250 | const auto& result = results.back(); | 2811 | | | 2812 | 250 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 250 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 250 | if ( options.disableTests == false ) { | 2830 | 250 | tests::test(op, result.second); | 2831 | 250 | } | 2832 | | | 2833 | 250 | postprocess(module, op, result); | 2834 | 250 | } | 2835 | | | 2836 | 148 | if ( options.noCompare == false ) { | 2837 | 81 | compare(operations, results, data, size); | 2838 | 81 | } | 2839 | 148 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 101 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 101 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 101 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.17k | do { | 2725 | 2.17k | auto op = getOp(&parentDs, data, size); | 2726 | 2.17k | auto module = getModule(parentDs); | 2727 | 2.17k | if ( module == nullptr ) { | 2728 | 2.01k | continue; | 2729 | 2.01k | } | 2730 | | | 2731 | 159 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 159 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 2.16k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 101 | if ( operations.empty() == true ) { | 2740 | 11 | return; | 2741 | 11 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 90 | #if 1 | 2745 | 90 | { | 2746 | 90 | std::set<uint64_t> moduleIDs; | 2747 | 100 | for (const auto& m : modules ) { | 2748 | 100 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 100 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 100 | moduleIDs.insert(moduleID); | 2756 | 100 | } | 2757 | | | 2758 | 90 | std::set<uint64_t> operationModuleIDs; | 2759 | 112 | for (const auto& op : operations) { | 2760 | 112 | operationModuleIDs.insert(op.first->ID); | 2761 | 112 | } | 2762 | | | 2763 | 90 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 90 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 90 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 90 | for (const auto& id : addModuleIDs) { | 2768 | 36 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 36 | } | 2770 | 90 | } | 2771 | 90 | #endif | 2772 | | | 2773 | 90 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 90 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 238 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 148 | auto& operation = operations[i]; | 2782 | | | 2783 | 148 | auto& module = operation.first; | 2784 | 148 | auto& op = operation.second; | 2785 | | | 2786 | 148 | if ( i > 0 ) { | 2787 | 98 | auto& prevModule = operations[i-1].first; | 2788 | 98 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 98 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 37 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 37 | if ( curModifier.size() == 0 ) { | 2793 | 7.69k | for (size_t j = 0; j < 512; j++) { | 2794 | 7.68k | curModifier.push_back(1); | 2795 | 7.68k | } | 2796 | 22 | } else { | 2797 | 1.42k | for (auto& c : curModifier) { | 2798 | 1.42k | c++; | 2799 | 1.42k | } | 2800 | 22 | } | 2801 | 37 | } | 2802 | 98 | } | 2803 | | | 2804 | 148 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 148 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 148 | const auto& result = results.back(); | 2811 | | | 2812 | 148 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 148 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 148 | if ( options.disableTests == false ) { | 2830 | 148 | tests::test(op, result.second); | 2831 | 148 | } | 2832 | | | 2833 | 148 | postprocess(module, op, result); | 2834 | 148 | } | 2835 | | | 2836 | 90 | if ( options.noCompare == false ) { | 2837 | 50 | compare(operations, results, data, size); | 2838 | 50 | } | 2839 | 90 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 143 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 143 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 143 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.44k | do { | 2725 | 2.44k | auto op = getOp(&parentDs, data, size); | 2726 | 2.44k | auto module = getModule(parentDs); | 2727 | 2.44k | if ( module == nullptr ) { | 2728 | 2.18k | continue; | 2729 | 2.18k | } | 2730 | | | 2731 | 267 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 267 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 10 | break; | 2736 | 10 | } | 2737 | 2.43k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 143 | if ( operations.empty() == true ) { | 2740 | 5 | return; | 2741 | 5 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 138 | #if 1 | 2745 | 138 | { | 2746 | 138 | std::set<uint64_t> moduleIDs; | 2747 | 142 | for (const auto& m : modules ) { | 2748 | 142 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 142 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 142 | moduleIDs.insert(moduleID); | 2756 | 142 | } | 2757 | | | 2758 | 138 | std::set<uint64_t> operationModuleIDs; | 2759 | 169 | for (const auto& op : operations) { | 2760 | 169 | operationModuleIDs.insert(op.first->ID); | 2761 | 169 | } | 2762 | | | 2763 | 138 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 138 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 138 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 138 | for (const auto& id : addModuleIDs) { | 2768 | 56 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 56 | } | 2770 | 138 | } | 2771 | 138 | #endif | 2772 | | | 2773 | 138 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 138 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 363 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 225 | auto& operation = operations[i]; | 2782 | | | 2783 | 225 | auto& module = operation.first; | 2784 | 225 | auto& op = operation.second; | 2785 | | | 2786 | 225 | if ( i > 0 ) { | 2787 | 154 | auto& prevModule = operations[i-1].first; | 2788 | 154 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 154 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 70 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 70 | if ( curModifier.size() == 0 ) { | 2793 | 17.9k | for (size_t j = 0; j < 512; j++) { | 2794 | 17.9k | curModifier.push_back(1); | 2795 | 17.9k | } | 2796 | 35 | } else { | 2797 | 1.05k | for (auto& c : curModifier) { | 2798 | 1.05k | c++; | 2799 | 1.05k | } | 2800 | 35 | } | 2801 | 70 | } | 2802 | 154 | } | 2803 | | | 2804 | 225 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 225 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 225 | const auto& result = results.back(); | 2811 | | | 2812 | 225 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 225 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 225 | if ( options.disableTests == false ) { | 2830 | 225 | tests::test(op, result.second); | 2831 | 225 | } | 2832 | | | 2833 | 225 | postprocess(module, op, result); | 2834 | 225 | } | 2835 | | | 2836 | 138 | if ( options.noCompare == false ) { | 2837 | 71 | compare(operations, results, data, size); | 2838 | 71 | } | 2839 | 138 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 114 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 114 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 114 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.63k | do { | 2725 | 1.63k | auto op = getOp(&parentDs, data, size); | 2726 | 1.63k | auto module = getModule(parentDs); | 2727 | 1.63k | if ( module == nullptr ) { | 2728 | 1.44k | continue; | 2729 | 1.44k | } | 2730 | | | 2731 | 197 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 197 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 1.63k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 114 | if ( operations.empty() == true ) { | 2740 | 8 | return; | 2741 | 8 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 106 | #if 1 | 2745 | 106 | { | 2746 | 106 | std::set<uint64_t> moduleIDs; | 2747 | 106 | for (const auto& m : modules ) { | 2748 | 90 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 90 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 90 | moduleIDs.insert(moduleID); | 2756 | 90 | } | 2757 | | | 2758 | 106 | std::set<uint64_t> operationModuleIDs; | 2759 | 113 | for (const auto& op : operations) { | 2760 | 113 | operationModuleIDs.insert(op.first->ID); | 2761 | 113 | } | 2762 | | | 2763 | 106 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 106 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 106 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 106 | for (const auto& id : addModuleIDs) { | 2768 | 33 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 33 | } | 2770 | 106 | } | 2771 | 106 | #endif | 2772 | | | 2773 | 106 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 106 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 252 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 146 | auto& operation = operations[i]; | 2782 | | | 2783 | 146 | auto& module = operation.first; | 2784 | 146 | auto& op = operation.second; | 2785 | | | 2786 | 146 | if ( i > 0 ) { | 2787 | 101 | auto& prevModule = operations[i-1].first; | 2788 | 101 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 101 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 50 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 50 | if ( curModifier.size() == 0 ) { | 2793 | 14.8k | for (size_t j = 0; j < 512; j++) { | 2794 | 14.8k | curModifier.push_back(1); | 2795 | 14.8k | } | 2796 | 29 | } else { | 2797 | 1.39k | for (auto& c : curModifier) { | 2798 | 1.39k | c++; | 2799 | 1.39k | } | 2800 | 21 | } | 2801 | 50 | } | 2802 | 101 | } | 2803 | | | 2804 | 146 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 146 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 146 | const auto& result = results.back(); | 2811 | | | 2812 | 146 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 146 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 146 | if ( options.disableTests == false ) { | 2830 | 146 | tests::test(op, result.second); | 2831 | 146 | } | 2832 | | | 2833 | 146 | postprocess(module, op, result); | 2834 | 146 | } | 2835 | | | 2836 | 106 | if ( options.noCompare == false ) { | 2837 | 45 | compare(operations, results, data, size); | 2838 | 45 | } | 2839 | 106 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 179 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 179 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 179 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.28k | do { | 2725 | 2.28k | auto op = getOp(&parentDs, data, size); | 2726 | 2.28k | auto module = getModule(parentDs); | 2727 | 2.28k | if ( module == nullptr ) { | 2728 | 2.00k | continue; | 2729 | 2.00k | } | 2730 | | | 2731 | 282 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 282 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 9 | break; | 2736 | 9 | } | 2737 | 2.27k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 179 | if ( operations.empty() == true ) { | 2740 | 12 | return; | 2741 | 12 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 167 | #if 1 | 2745 | 167 | { | 2746 | 167 | std::set<uint64_t> moduleIDs; | 2747 | 167 | for (const auto& m : modules ) { | 2748 | 124 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 124 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 124 | moduleIDs.insert(moduleID); | 2756 | 124 | } | 2757 | | | 2758 | 167 | std::set<uint64_t> operationModuleIDs; | 2759 | 167 | for (const auto& op : operations) { | 2760 | 150 | operationModuleIDs.insert(op.first->ID); | 2761 | 150 | } | 2762 | | | 2763 | 167 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 167 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 167 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 167 | for (const auto& id : addModuleIDs) { | 2768 | 46 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 46 | } | 2770 | 167 | } | 2771 | 167 | #endif | 2772 | | | 2773 | 167 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 167 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 363 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 196 | auto& operation = operations[i]; | 2782 | | | 2783 | 196 | auto& module = operation.first; | 2784 | 196 | auto& op = operation.second; | 2785 | | | 2786 | 196 | if ( i > 0 ) { | 2787 | 134 | auto& prevModule = operations[i-1].first; | 2788 | 134 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 134 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 66 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 66 | if ( curModifier.size() == 0 ) { | 2793 | 18.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 18.4k | curModifier.push_back(1); | 2795 | 18.4k | } | 2796 | 36 | } else { | 2797 | 15.5k | for (auto& c : curModifier) { | 2798 | 15.5k | c++; | 2799 | 15.5k | } | 2800 | 30 | } | 2801 | 66 | } | 2802 | 134 | } | 2803 | | | 2804 | 196 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 196 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 196 | const auto& result = results.back(); | 2811 | | | 2812 | 196 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 196 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 196 | if ( options.disableTests == false ) { | 2830 | 196 | tests::test(op, result.second); | 2831 | 196 | } | 2832 | | | 2833 | 196 | postprocess(module, op, result); | 2834 | 196 | } | 2835 | | | 2836 | 167 | if ( options.noCompare == false ) { | 2837 | 62 | compare(operations, results, data, size); | 2838 | 62 | } | 2839 | 167 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 96 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 96 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 96 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.06k | do { | 2725 | 1.06k | auto op = getOp(&parentDs, data, size); | 2726 | 1.06k | auto module = getModule(parentDs); | 2727 | 1.06k | if ( module == nullptr ) { | 2728 | 917 | continue; | 2729 | 917 | } | 2730 | | | 2731 | 150 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 150 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 1.06k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 96 | if ( operations.empty() == true ) { | 2740 | 8 | return; | 2741 | 8 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 88 | #if 1 | 2745 | 88 | { | 2746 | 88 | std::set<uint64_t> moduleIDs; | 2747 | 88 | for (const auto& m : modules ) { | 2748 | 58 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 58 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 58 | moduleIDs.insert(moduleID); | 2756 | 58 | } | 2757 | | | 2758 | 88 | std::set<uint64_t> operationModuleIDs; | 2759 | 96 | for (const auto& op : operations) { | 2760 | 96 | operationModuleIDs.insert(op.first->ID); | 2761 | 96 | } | 2762 | | | 2763 | 88 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 88 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 88 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 88 | for (const auto& id : addModuleIDs) { | 2768 | 19 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 19 | } | 2770 | 88 | } | 2771 | 88 | #endif | 2772 | | | 2773 | 88 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 88 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 203 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 115 | auto& operation = operations[i]; | 2782 | | | 2783 | 115 | auto& module = operation.first; | 2784 | 115 | auto& op = operation.second; | 2785 | | | 2786 | 115 | if ( i > 0 ) { | 2787 | 86 | auto& prevModule = operations[i-1].first; | 2788 | 86 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 86 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 49 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 49 | if ( curModifier.size() == 0 ) { | 2793 | 11.7k | for (size_t j = 0; j < 512; j++) { | 2794 | 11.7k | curModifier.push_back(1); | 2795 | 11.7k | } | 2796 | 26 | } else { | 2797 | 270 | for (auto& c : curModifier) { | 2798 | 270 | c++; | 2799 | 270 | } | 2800 | 26 | } | 2801 | 49 | } | 2802 | 86 | } | 2803 | | | 2804 | 115 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 115 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 115 | const auto& result = results.back(); | 2811 | | | 2812 | 115 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 115 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 115 | if ( options.disableTests == false ) { | 2830 | 115 | tests::test(op, result.second); | 2831 | 115 | } | 2832 | | | 2833 | 115 | postprocess(module, op, result); | 2834 | 115 | } | 2835 | | | 2836 | 88 | if ( options.noCompare == false ) { | 2837 | 29 | compare(operations, results, data, size); | 2838 | 29 | } | 2839 | 88 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 115 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 115 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 115 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.54k | do { | 2725 | 2.54k | auto op = getOp(&parentDs, data, size); | 2726 | 2.54k | auto module = getModule(parentDs); | 2727 | 2.54k | if ( module == nullptr ) { | 2728 | 2.34k | continue; | 2729 | 2.34k | } | 2730 | | | 2731 | 203 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 203 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 2.53k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 115 | if ( operations.empty() == true ) { | 2740 | 10 | return; | 2741 | 10 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 105 | #if 1 | 2745 | 105 | { | 2746 | 105 | std::set<uint64_t> moduleIDs; | 2747 | 105 | for (const auto& m : modules ) { | 2748 | 80 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 80 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 80 | moduleIDs.insert(moduleID); | 2756 | 80 | } | 2757 | | | 2758 | 105 | std::set<uint64_t> operationModuleIDs; | 2759 | 116 | for (const auto& op : operations) { | 2760 | 116 | operationModuleIDs.insert(op.first->ID); | 2761 | 116 | } | 2762 | | | 2763 | 105 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 105 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 105 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 105 | for (const auto& id : addModuleIDs) { | 2768 | 29 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 29 | } | 2770 | 105 | } | 2771 | 105 | #endif | 2772 | | | 2773 | 105 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 105 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 250 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 145 | auto& operation = operations[i]; | 2782 | | | 2783 | 145 | auto& module = operation.first; | 2784 | 145 | auto& op = operation.second; | 2785 | | | 2786 | 145 | if ( i > 0 ) { | 2787 | 105 | auto& prevModule = operations[i-1].first; | 2788 | 105 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 105 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 59 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 59 | if ( curModifier.size() == 0 ) { | 2793 | 18.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 18.4k | curModifier.push_back(1); | 2795 | 18.4k | } | 2796 | 36 | } else { | 2797 | 649 | for (auto& c : curModifier) { | 2798 | 649 | c++; | 2799 | 649 | } | 2800 | 23 | } | 2801 | 59 | } | 2802 | 105 | } | 2803 | | | 2804 | 145 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 145 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 145 | const auto& result = results.back(); | 2811 | | | 2812 | 145 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 145 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 145 | if ( options.disableTests == false ) { | 2830 | 145 | tests::test(op, result.second); | 2831 | 145 | } | 2832 | | | 2833 | 145 | postprocess(module, op, result); | 2834 | 145 | } | 2835 | | | 2836 | 105 | if ( options.noCompare == false ) { | 2837 | 40 | compare(operations, results, data, size); | 2838 | 40 | } | 2839 | 105 | } |
|
2840 | | |
2841 | | /* Explicit template instantiation */ |
2842 | | template class ExecutorBase<component::Digest, operation::Digest>; |
2843 | | template class ExecutorBase<component::MAC, operation::HMAC>; |
2844 | | template class ExecutorBase<component::MAC, operation::UMAC>; |
2845 | | template class ExecutorBase<component::MAC, operation::CMAC>; |
2846 | | template class ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>; |
2847 | | template class ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>; |
2848 | | template class ExecutorBase<component::Key, operation::KDF_SCRYPT>; |
2849 | | template class ExecutorBase<component::Key, operation::KDF_HKDF>; |
2850 | | template class ExecutorBase<component::Key, operation::KDF_TLS1_PRF>; |
2851 | | template class ExecutorBase<component::Key, operation::KDF_PBKDF>; |
2852 | | template class ExecutorBase<component::Key, operation::KDF_PBKDF1>; |
2853 | | template class ExecutorBase<component::Key, operation::KDF_PBKDF2>; |
2854 | | template class ExecutorBase<component::Key, operation::KDF_ARGON2>; |
2855 | | template class ExecutorBase<component::Key, operation::KDF_SSH>; |
2856 | | template class ExecutorBase<component::Key, operation::KDF_X963>; |
2857 | | template class ExecutorBase<component::Key, operation::KDF_BCRYPT>; |
2858 | | template class ExecutorBase<component::Key, operation::KDF_SP_800_108>; |
2859 | | template class ExecutorBase<component::Key3, operation::KDF_SRTP>; |
2860 | | template class ExecutorBase<component::Key3, operation::KDF_SRTCP>; |
2861 | | template class ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>; |
2862 | | template class ExecutorBase<bool, operation::ECC_ValidatePubkey>; |
2863 | | template class ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>; |
2864 | | template class ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>; |
2865 | | template class ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>; |
2866 | | template class ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>; |
2867 | | template class ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>; |
2868 | | template class ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>; |
2869 | | template class ExecutorBase<bool, operation::ECCSI_Verify>; |
2870 | | template class ExecutorBase<bool, operation::ECDSA_Verify>; |
2871 | | template class ExecutorBase<bool, operation::ECGDSA_Verify>; |
2872 | | template class ExecutorBase<bool, operation::ECRDSA_Verify>; |
2873 | | template class ExecutorBase<bool, operation::Schnorr_Verify>; |
2874 | | template class ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>; |
2875 | | template class ExecutorBase<bool, operation::DSA_Verify>; |
2876 | | template class ExecutorBase<component::DSA_Signature, operation::DSA_Sign>; |
2877 | | template class ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>; |
2878 | | template class ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>; |
2879 | | template class ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>; |
2880 | | template class ExecutorBase<component::Secret, operation::ECDH_Derive>; |
2881 | | template class ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>; |
2882 | | template class ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>; |
2883 | | template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>; |
2884 | | template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>; |
2885 | | template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>; |
2886 | | template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>; |
2887 | | template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>; |
2888 | | template class ExecutorBase<bool, operation::ECC_Point_Cmp>; |
2889 | | template class ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>; |
2890 | | template class ExecutorBase<component::Bignum, operation::DH_Derive>; |
2891 | | template class ExecutorBase<component::Bignum, operation::BignumCalc>; |
2892 | | template class ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>; |
2893 | | template class ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>; |
2894 | | template class ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>; |
2895 | | template class ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>; |
2896 | | template class ExecutorBase<component::BLS_Signature, operation::BLS_Sign>; |
2897 | | template class ExecutorBase<bool, operation::BLS_Verify>; |
2898 | | template class ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>; |
2899 | | template class ExecutorBase<bool, operation::BLS_BatchVerify>; |
2900 | | template class ExecutorBase<component::G1, operation::BLS_Aggregate_G1>; |
2901 | | template class ExecutorBase<component::G2, operation::BLS_Aggregate_G2>; |
2902 | | template class ExecutorBase<component::Fp12, operation::BLS_Pairing>; |
2903 | | template class ExecutorBase<component::Fp12, operation::BLS_MillerLoop>; |
2904 | | template class ExecutorBase<component::Fp12, operation::BLS_FinalExp>; |
2905 | | template class ExecutorBase<component::G1, operation::BLS_HashToG1>; |
2906 | | template class ExecutorBase<component::G2, operation::BLS_HashToG2>; |
2907 | | template class ExecutorBase<component::G1, operation::BLS_MapToG1>; |
2908 | | template class ExecutorBase<component::G2, operation::BLS_MapToG2>; |
2909 | | template class ExecutorBase<bool, operation::BLS_IsG1OnCurve>; |
2910 | | template class ExecutorBase<bool, operation::BLS_IsG2OnCurve>; |
2911 | | template class ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>; |
2912 | | template class ExecutorBase<component::G1, operation::BLS_Decompress_G1>; |
2913 | | template class ExecutorBase<component::Bignum, operation::BLS_Compress_G1>; |
2914 | | template class ExecutorBase<component::G2, operation::BLS_Decompress_G2>; |
2915 | | template class ExecutorBase<component::G1, operation::BLS_Compress_G2>; |
2916 | | template class ExecutorBase<component::G1, operation::BLS_G1_Add>; |
2917 | | template class ExecutorBase<component::G1, operation::BLS_G1_Mul>; |
2918 | | template class ExecutorBase<bool, operation::BLS_G1_IsEq>; |
2919 | | template class ExecutorBase<component::G1, operation::BLS_G1_Neg>; |
2920 | | template class ExecutorBase<component::G2, operation::BLS_G2_Add>; |
2921 | | template class ExecutorBase<component::G2, operation::BLS_G2_Mul>; |
2922 | | template class ExecutorBase<bool, operation::BLS_G2_IsEq>; |
2923 | | template class ExecutorBase<component::G2, operation::BLS_G2_Neg>; |
2924 | | template class ExecutorBase<component::G1, operation::BLS_G1_MultiExp>; |
2925 | | template class ExecutorBase<Buffer, operation::Misc>; |
2926 | | template class ExecutorBase<bool, operation::SR25519_Verify>; |
2927 | | |
2928 | | } /* namespace cryptofuzz */ |