/src/cryptofuzz-openssl-api/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 | 81.4k | #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 | 897 | 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 | 897 | (void)module; |
53 | 897 | (void)op; |
54 | | |
55 | 897 | if ( result.second != std::nullopt ) { |
56 | 563 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
57 | 563 | } |
58 | 897 | } |
59 | | |
60 | 897 | template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const { |
61 | 897 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
62 | | |
63 | 897 | return module->OpDigest(op); |
64 | 897 | } |
65 | | |
66 | | /* Specialization for operation::HMAC */ |
67 | 872 | 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 | 872 | (void)module; |
69 | 872 | (void)op; |
70 | | |
71 | 872 | if ( result.second != std::nullopt ) { |
72 | 396 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
73 | 396 | } |
74 | 872 | } |
75 | | |
76 | 872 | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const { |
77 | 872 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
78 | | |
79 | 872 | return module->OpHMAC(op); |
80 | 872 | } |
81 | | |
82 | | /* Specialization for operation::UMAC */ |
83 | 187 | 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 | 187 | (void)module; |
85 | 187 | (void)op; |
86 | | |
87 | 187 | if ( result.second != std::nullopt ) { |
88 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
89 | 0 | } |
90 | 187 | } |
91 | | |
92 | 187 | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const { |
93 | 187 | return module->OpUMAC(op); |
94 | 187 | } |
95 | | |
96 | | /* Specialization for operation::CMAC */ |
97 | 702 | 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 | 702 | (void)module; |
99 | 702 | (void)op; |
100 | | |
101 | 702 | if ( result.second != std::nullopt ) { |
102 | 233 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
103 | 233 | } |
104 | 702 | } |
105 | | |
106 | 702 | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const { |
107 | 702 | RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get()); |
108 | | |
109 | 702 | return module->OpCMAC(op); |
110 | 702 | } |
111 | | |
112 | | /* Specialization for operation::SymmetricEncrypt */ |
113 | 2.56k | 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 | 2.56k | if ( options.noDecrypt == true ) { |
115 | 0 | return; |
116 | 0 | } |
117 | | |
118 | 2.56k | if ( result.second != std::nullopt ) { |
119 | 1.25k | fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize()); |
120 | 1.25k | if ( result.second->tag != std::nullopt ) { |
121 | 192 | fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize()); |
122 | 192 | } |
123 | 1.25k | } |
124 | | |
125 | 2.56k | if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) { |
126 | 1.24k | using fuzzing::datasource::ID; |
127 | | |
128 | 1.24k | bool tryDecrypt = true; |
129 | | |
130 | 1.24k | 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 | 1.24k | if ( tryDecrypt == true ) { |
159 | | /* Try to decrypt the encrypted data */ |
160 | | |
161 | | /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */ |
162 | 1.24k | auto opDecrypt = operation::SymmetricDecrypt( |
163 | | /* The SymmetricEncrypt instance */ |
164 | 1.24k | op, |
165 | | |
166 | | /* The ciphertext generated by OpSymmetricEncrypt */ |
167 | 1.24k | *(result.second), |
168 | | |
169 | | /* The size of the output buffer that OpSymmetricDecrypt() must use. */ |
170 | 1.24k | op.cleartext.GetSize() + 32, |
171 | | |
172 | 1.24k | op.aad, |
173 | | |
174 | | /* Empty modifier */ |
175 | 1.24k | {}); |
176 | | |
177 | 1.24k | const auto cleartext = module->OpSymmetricDecrypt(opDecrypt); |
178 | | |
179 | 1.24k | 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 | 1.24k | } 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 | 1.24k | } |
208 | 1.24k | } |
209 | 2.56k | } |
210 | | |
211 | 2.56k | template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const { |
212 | 2.56k | RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get()); |
213 | | |
214 | 2.56k | return module->OpSymmetricEncrypt(op); |
215 | 2.56k | } |
216 | | |
217 | | /* Specialization for operation::SymmetricDecrypt */ |
218 | 1.32k | 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 | 1.32k | (void)module; |
220 | 1.32k | (void)op; |
221 | | |
222 | 1.32k | if ( result.second != std::nullopt ) { |
223 | 194 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
224 | 194 | } |
225 | 1.32k | } |
226 | | |
227 | 1.32k | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const { |
228 | 1.32k | RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get()); |
229 | | |
230 | 1.32k | return module->OpSymmetricDecrypt(op); |
231 | 1.32k | } |
232 | | |
233 | | /* Specialization for operation::KDF_SCRYPT */ |
234 | 208 | 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 | 208 | (void)module; |
236 | 208 | (void)op; |
237 | | |
238 | 208 | if ( result.second != std::nullopt ) { |
239 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
240 | 0 | } |
241 | 208 | } |
242 | | |
243 | 208 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const { |
244 | 208 | return module->OpKDF_SCRYPT(op); |
245 | 208 | } |
246 | | |
247 | | /* Specialization for operation::KDF_HKDF */ |
248 | 904 | 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 | 904 | (void)module; |
250 | 904 | (void)op; |
251 | | |
252 | 904 | if ( result.second != std::nullopt ) { |
253 | 411 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
254 | 411 | } |
255 | 904 | } |
256 | | |
257 | 904 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const { |
258 | 904 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
259 | | |
260 | 904 | return module->OpKDF_HKDF(op); |
261 | 904 | } |
262 | | |
263 | | /* Specialization for operation::KDF_PBKDF */ |
264 | 183 | 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 | 183 | (void)module; |
266 | 183 | (void)op; |
267 | | |
268 | 183 | if ( result.second != std::nullopt ) { |
269 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
270 | 0 | } |
271 | 183 | } |
272 | | |
273 | 183 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const { |
274 | 183 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
275 | | |
276 | 183 | return module->OpKDF_PBKDF(op); |
277 | 183 | } |
278 | | |
279 | | /* Specialization for operation::KDF_PBKDF1 */ |
280 | 235 | 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 | 235 | (void)module; |
282 | 235 | (void)op; |
283 | | |
284 | 235 | if ( result.second != std::nullopt ) { |
285 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
286 | 0 | } |
287 | 235 | } |
288 | | |
289 | 235 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const { |
290 | 235 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
291 | | |
292 | 235 | return module->OpKDF_PBKDF1(op); |
293 | 235 | } |
294 | | |
295 | | /* Specialization for operation::KDF_PBKDF2 */ |
296 | 674 | 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 | 674 | (void)module; |
298 | 674 | (void)op; |
299 | | |
300 | 674 | if ( result.second != std::nullopt ) { |
301 | 427 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
302 | 427 | } |
303 | 674 | } |
304 | | |
305 | 674 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const { |
306 | 674 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
307 | | |
308 | 674 | return module->OpKDF_PBKDF2(op); |
309 | 674 | } |
310 | | |
311 | | /* Specialization for operation::KDF_ARGON2 */ |
312 | 28 | 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 | 28 | (void)module; |
314 | 28 | (void)op; |
315 | | |
316 | 28 | if ( result.second != std::nullopt ) { |
317 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
318 | 0 | } |
319 | 28 | } |
320 | | |
321 | 28 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const { |
322 | 28 | return module->OpKDF_ARGON2(op); |
323 | 28 | } |
324 | | |
325 | | /* Specialization for operation::KDF_SSH */ |
326 | 193 | 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 | 193 | (void)module; |
328 | 193 | (void)op; |
329 | | |
330 | 193 | if ( result.second != std::nullopt ) { |
331 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
332 | 0 | } |
333 | 193 | } |
334 | | |
335 | 193 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const { |
336 | 193 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
337 | | |
338 | 193 | return module->OpKDF_SSH(op); |
339 | 193 | } |
340 | | |
341 | | /* Specialization for operation::KDF_TLS1_PRF */ |
342 | 219 | 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 | 219 | (void)module; |
344 | 219 | (void)op; |
345 | | |
346 | 219 | if ( result.second != std::nullopt ) { |
347 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
348 | 0 | } |
349 | 219 | } |
350 | | |
351 | 219 | 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 | 219 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
353 | | |
354 | 219 | return module->OpKDF_TLS1_PRF(op); |
355 | 219 | } |
356 | | |
357 | | /* Specialization for operation::KDF_X963 */ |
358 | 190 | 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 | 190 | (void)module; |
360 | 190 | (void)op; |
361 | | |
362 | 190 | if ( result.second != std::nullopt ) { |
363 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
364 | 0 | } |
365 | 190 | } |
366 | | |
367 | 190 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const { |
368 | 190 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
369 | | |
370 | 190 | return module->OpKDF_X963(op); |
371 | 190 | } |
372 | | |
373 | | /* Specialization for operation::KDF_BCRYPT */ |
374 | 19 | 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 | 19 | (void)module; |
376 | 19 | (void)op; |
377 | | |
378 | 19 | if ( result.second != std::nullopt ) { |
379 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
380 | 0 | } |
381 | 19 | } |
382 | | |
383 | 19 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const { |
384 | 19 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
385 | | |
386 | 19 | return module->OpKDF_BCRYPT(op); |
387 | 19 | } |
388 | | |
389 | | /* Specialization for operation::KDF_SP_800_108 */ |
390 | 231 | 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 | 231 | (void)module; |
392 | 231 | (void)op; |
393 | | |
394 | 231 | if ( result.second != std::nullopt ) { |
395 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
396 | 0 | } |
397 | 231 | } |
398 | | |
399 | 231 | 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 | 231 | if ( op.mech.mode == true ) { |
401 | 124 | RETURN_IF_DISABLED(options.digests, op.mech.type.Get()); |
402 | 124 | } |
403 | | |
404 | 231 | return module->OpKDF_SP_800_108(op); |
405 | 231 | } |
406 | | |
407 | | /* Specialization for operation::KDF_SRTP */ |
408 | 171 | 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 | 171 | (void)module; |
410 | 171 | (void)op; |
411 | 171 | (void)result; |
412 | 171 | } |
413 | | |
414 | 171 | template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const { |
415 | 171 | return module->OpKDF_SRTP(op); |
416 | 171 | } |
417 | | |
418 | | /* Specialization for operation::KDF_SRTCP */ |
419 | 202 | 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 | 202 | (void)module; |
421 | 202 | (void)op; |
422 | 202 | (void)result; |
423 | 202 | } |
424 | | |
425 | 202 | template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const { |
426 | 202 | return module->OpKDF_SRTCP(op); |
427 | 202 | } |
428 | | |
429 | | /* Specialization for operation::ECC_PrivateToPublic */ |
430 | 4.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 | 4.04k | (void)module; |
432 | | |
433 | 4.04k | if ( result.second != std::nullopt ) { |
434 | 1.89k | const auto curveID = op.curveType.Get(); |
435 | 1.89k | const auto privkey = op.priv.ToTrimmedString(); |
436 | 1.89k | const auto pub_x = result.second->first.ToTrimmedString(); |
437 | 1.89k | const auto pub_y = result.second->second.ToTrimmedString(); |
438 | | |
439 | 1.89k | Pool_CurvePrivkey.Set({ curveID, privkey }); |
440 | 1.89k | Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y }); |
441 | 1.89k | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
442 | | |
443 | 1.89k | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
444 | 1.89k | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
445 | 1.89k | } |
446 | 4.04k | } |
447 | | |
448 | 4.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 | 4.04k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
450 | | |
451 | 4.04k | const size_t size = op.priv.ToTrimmedString().size(); |
452 | | |
453 | 4.04k | if ( size == 0 || size > 4096 ) { |
454 | 42 | return std::nullopt; |
455 | 42 | } |
456 | | |
457 | 4.00k | return module->OpECC_PrivateToPublic(op); |
458 | 4.04k | } |
459 | | |
460 | | /* Specialization for operation::ECC_ValidatePubkey */ |
461 | 2.45k | 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 | 2.45k | (void)module; |
463 | 2.45k | (void)op; |
464 | 2.45k | (void)result; |
465 | 2.45k | } |
466 | | |
467 | 2.45k | template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const { |
468 | 2.45k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
469 | | |
470 | 2.45k | return module->OpECC_ValidatePubkey(op); |
471 | 2.45k | } |
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 | 1.24k | 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 | 1.24k | (void)operations; |
479 | 1.24k | (void)results; |
480 | 1.24k | (void)data; |
481 | 1.24k | (void)size; |
482 | 1.24k | } |
483 | | |
484 | 3.60k | 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 | 3.60k | (void)module; |
486 | | |
487 | 3.60k | if ( result.second != std::nullopt ) { |
488 | 1.00k | const auto curveID = op.curveType.Get(); |
489 | 1.00k | const auto privkey = result.second->priv.ToTrimmedString(); |
490 | 1.00k | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
491 | 1.00k | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
492 | | |
493 | 1.00k | Pool_CurvePrivkey.Set({ curveID, privkey }); |
494 | 1.00k | Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y }); |
495 | 1.00k | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
496 | | |
497 | 1.00k | { |
498 | 1.00k | auto opValidate = operation::ECC_ValidatePubkey( |
499 | 1.00k | op.curveType, |
500 | 1.00k | result.second->pub, |
501 | 1.00k | op.modifier); |
502 | | |
503 | 1.00k | const auto validateResult = module->OpECC_ValidatePubkey(opValidate); |
504 | 1.00k | CF_ASSERT( |
505 | 1.00k | validateResult == std::nullopt || |
506 | 1.00k | *validateResult == true, |
507 | 1.00k | "Cannot validate generated public key"); |
508 | 1.00k | } |
509 | 1.00k | } |
510 | 3.60k | } |
511 | | |
512 | 3.60k | 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 | 3.60k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
514 | | |
515 | 3.60k | return module->OpECC_GenerateKeyPair(op); |
516 | 3.60k | } |
517 | | |
518 | | /* Specialization for operation::ECCSI_Sign */ |
519 | 506 | 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 | 506 | (void)module; |
521 | | |
522 | 506 | 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 | 506 | } |
565 | | |
566 | 506 | 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 | 506 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
568 | 506 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
569 | | |
570 | 322 | const size_t size = op.priv.ToTrimmedString().size(); |
571 | | |
572 | 322 | if ( size == 0 || size > 4096 ) { |
573 | 3 | return std::nullopt; |
574 | 3 | } |
575 | | |
576 | 319 | return module->OpECCSI_Sign(op); |
577 | 322 | } |
578 | | |
579 | | /* Specialization for operation::ECDSA_Sign */ |
580 | 4.81k | 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 | 4.81k | (void)module; |
582 | | |
583 | 4.81k | if ( result.second != std::nullopt ) { |
584 | 2.94k | const auto curveID = op.curveType.Get(); |
585 | 2.94k | const auto cleartext = op.cleartext.ToHex(); |
586 | 2.94k | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
587 | 2.94k | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
588 | 2.94k | const auto sig_r = result.second->signature.first.ToTrimmedString(); |
589 | 2.94k | const auto sig_s = result.second->signature.second.ToTrimmedString(); |
590 | | |
591 | 2.94k | Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s}); |
592 | 2.94k | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
593 | 2.94k | Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s }); |
594 | | |
595 | 2.94k | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
596 | 2.94k | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
597 | 2.94k | if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); } |
598 | 2.94k | if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); } |
599 | | |
600 | 2.94k | { |
601 | 2.94k | auto opVerify = operation::ECDSA_Verify( |
602 | 2.94k | op, |
603 | 2.94k | *(result.second), |
604 | 2.94k | op.modifier); |
605 | | |
606 | 2.94k | const auto verifyResult = module->OpECDSA_Verify(opVerify); |
607 | 2.94k | CF_ASSERT( |
608 | 2.94k | verifyResult == std::nullopt || |
609 | 2.94k | *verifyResult == true, |
610 | 2.94k | "Cannot verify generated signature"); |
611 | 2.94k | } |
612 | 2.94k | } |
613 | 4.81k | } |
614 | | |
615 | 4.81k | 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 | 4.81k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
617 | 4.81k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
618 | | |
619 | 4.61k | const size_t size = op.priv.ToTrimmedString().size(); |
620 | | |
621 | 4.61k | if ( size == 0 || size > 4096 ) { |
622 | 3 | return std::nullopt; |
623 | 3 | } |
624 | | |
625 | 4.61k | return module->OpECDSA_Sign(op); |
626 | 4.61k | } |
627 | | |
628 | | /* Specialization for operation::ECGDSA_Sign */ |
629 | 63 | 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 | 63 | (void)module; |
631 | | |
632 | 63 | if ( result.second != std::nullopt ) { |
633 | 0 | const auto curveID = op.curveType.Get(); |
634 | 0 | const auto cleartext = op.cleartext.ToHex(); |
635 | 0 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
636 | 0 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
637 | 0 | const auto sig_r = result.second->signature.first.ToTrimmedString(); |
638 | 0 | const auto sig_s = result.second->signature.second.ToTrimmedString(); |
639 | |
|
640 | 0 | Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s}); |
641 | 0 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
642 | 0 | Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s }); |
643 | |
|
644 | 0 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
645 | 0 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
646 | 0 | if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); } |
647 | 0 | if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); } |
648 | 0 | } |
649 | 63 | } |
650 | | |
651 | 63 | 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 | 63 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
653 | 63 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
654 | | |
655 | 63 | const size_t size = op.priv.ToTrimmedString().size(); |
656 | | |
657 | 63 | if ( size == 0 || size > 4096 ) { |
658 | 0 | return std::nullopt; |
659 | 0 | } |
660 | | |
661 | 63 | return module->OpECGDSA_Sign(op); |
662 | 63 | } |
663 | | |
664 | | /* Specialization for operation::ECRDSA_Sign */ |
665 | 74 | 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 | 74 | (void)module; |
667 | | |
668 | 74 | 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 | 74 | } |
686 | | |
687 | 74 | 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 | 74 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
689 | 74 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
690 | | |
691 | 74 | const size_t size = op.priv.ToTrimmedString().size(); |
692 | | |
693 | 74 | if ( size == 0 || size > 4096 ) { |
694 | 0 | return std::nullopt; |
695 | 0 | } |
696 | | |
697 | 74 | return module->OpECRDSA_Sign(op); |
698 | 74 | } |
699 | | |
700 | | /* Specialization for operation::Schnorr_Sign */ |
701 | 74 | 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 | 74 | (void)module; |
703 | | |
704 | 74 | 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 | 74 | } |
722 | | |
723 | 74 | 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 | 74 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
725 | 74 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
726 | | |
727 | 74 | const size_t size = op.priv.ToTrimmedString().size(); |
728 | | |
729 | 74 | if ( size == 0 || size > 4096 ) { |
730 | 0 | return std::nullopt; |
731 | 0 | } |
732 | | |
733 | 74 | return module->OpSchnorr_Sign(op); |
734 | 74 | } |
735 | | |
736 | | /* Specialization for operation::ECCSI_Verify */ |
737 | 379 | 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 | 379 | (void)module; |
739 | 379 | (void)op; |
740 | 379 | (void)result; |
741 | 379 | } |
742 | | |
743 | 379 | template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const { |
744 | 379 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
745 | 379 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
746 | | |
747 | 134 | return module->OpECCSI_Verify(op); |
748 | 379 | } |
749 | | |
750 | | /* Specialization for operation::ECDSA_Verify */ |
751 | 4.16k | 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 | 4.16k | (void)module; |
753 | 4.16k | (void)op; |
754 | 4.16k | (void)result; |
755 | 4.16k | } |
756 | | |
757 | 4.16k | template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const { |
758 | 4.16k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
759 | 4.16k | 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 | 3.98k | return module->OpECDSA_Verify(op); |
772 | 4.16k | } |
773 | | |
774 | | /* Specialization for operation::ECGDSA_Verify */ |
775 | 48 | 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 | 48 | (void)module; |
777 | 48 | (void)op; |
778 | 48 | (void)result; |
779 | 48 | } |
780 | | |
781 | 48 | template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const { |
782 | 48 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
783 | 48 | 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 | 48 | return module->OpECGDSA_Verify(op); |
796 | 48 | } |
797 | | |
798 | | /* Specialization for operation::ECRDSA_Verify */ |
799 | 50 | 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 | 50 | (void)module; |
801 | 50 | (void)op; |
802 | 50 | (void)result; |
803 | 50 | } |
804 | | |
805 | 50 | template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const { |
806 | 50 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
807 | 50 | 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 | 50 | return module->OpECRDSA_Verify(op); |
820 | 50 | } |
821 | | |
822 | | /* Specialization for operation::Schnorr_Verify */ |
823 | 65 | 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 | 65 | (void)module; |
825 | 65 | (void)op; |
826 | 65 | (void)result; |
827 | 65 | } |
828 | | |
829 | 65 | template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const { |
830 | 65 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
831 | 65 | 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 | 65 | return module->OpSchnorr_Verify(op); |
844 | 65 | } |
845 | | |
846 | 63 | 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 | 63 | (void)module; |
848 | 63 | (void)op; |
849 | 63 | (void)result; |
850 | 63 | } |
851 | | |
852 | 63 | 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 | 63 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
854 | 63 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
855 | | |
856 | 63 | return module->OpECDSA_Recover(op); |
857 | 63 | } |
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 | 140 | 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 | 140 | (void)module; |
869 | 140 | (void)op; |
870 | 140 | (void)result; |
871 | 140 | } |
872 | | |
873 | 140 | template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const { |
874 | 140 | const std::vector<size_t> sizes = { |
875 | 140 | op.parameters.p.ToTrimmedString().size(), |
876 | 140 | op.parameters.q.ToTrimmedString().size(), |
877 | 140 | op.parameters.g.ToTrimmedString().size(), |
878 | 140 | op.pub.ToTrimmedString().size(), |
879 | 140 | op.signature.first.ToTrimmedString().size(), |
880 | 140 | op.signature.second.ToTrimmedString().size(), |
881 | 140 | }; |
882 | | |
883 | 830 | for (const auto& size : sizes) { |
884 | 830 | if ( size == 0 || size > 4096 ) { |
885 | 4 | return std::nullopt; |
886 | 4 | } |
887 | 830 | } |
888 | | |
889 | 136 | return module->OpDSA_Verify(op); |
890 | 140 | } |
891 | | |
892 | | /* Specialization for operation::DSA_Sign */ |
893 | | /* Do not compare DSA_Sign results, because the result can be produced indeterministically */ |
894 | | template <> |
895 | 36 | 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 | 36 | (void)operations; |
897 | 36 | (void)results; |
898 | 36 | (void)data; |
899 | 36 | (void)size; |
900 | 36 | } |
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 | 81 | 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 | 81 | (void)module; |
910 | 81 | (void)op; |
911 | 81 | 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 | 81 | } |
934 | | |
935 | 81 | 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 | 81 | const std::vector<size_t> sizes = { |
937 | 81 | op.parameters.p.ToTrimmedString().size(), |
938 | 81 | op.parameters.q.ToTrimmedString().size(), |
939 | 81 | op.parameters.g.ToTrimmedString().size(), |
940 | 81 | op.priv.ToTrimmedString().size(), |
941 | 81 | }; |
942 | | |
943 | 315 | for (const auto& size : sizes) { |
944 | 315 | if ( size == 0 || size > 4096 ) { |
945 | 3 | return std::nullopt; |
946 | 3 | } |
947 | 315 | } |
948 | | |
949 | 78 | return module->OpDSA_Sign(op); |
950 | 81 | } |
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 | 64 | 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 | 64 | (void)result; |
963 | 64 | (void)module; |
964 | 64 | (void)op; |
965 | 64 | if ( result.second != std::nullopt ) { |
966 | | //Pool_DSA_PubPriv.Set({pub, priv}); |
967 | 0 | } |
968 | 64 | } |
969 | | |
970 | 64 | template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const { |
971 | 64 | return module->OpDSA_PrivateToPublic(op); |
972 | 64 | } |
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 | 48 | 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 | 48 | (void)operations; |
980 | 48 | (void)results; |
981 | 48 | (void)data; |
982 | 48 | (void)size; |
983 | 48 | } |
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 | 107 | 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 | 107 | (void)result; |
994 | 107 | (void)module; |
995 | 107 | (void)op; |
996 | 107 | 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 | 107 | } |
1003 | | |
1004 | 107 | 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 | 107 | const std::vector<size_t> sizes = { |
1006 | 107 | op.p.ToTrimmedString().size(), |
1007 | 107 | op.q.ToTrimmedString().size(), |
1008 | 107 | op.g.ToTrimmedString().size(), |
1009 | 107 | }; |
1010 | | |
1011 | 314 | for (const auto& size : sizes) { |
1012 | 314 | if ( size == 0 || size > 4096 ) { |
1013 | 7 | return std::nullopt; |
1014 | 7 | } |
1015 | 314 | } |
1016 | | |
1017 | 100 | return module->OpDSA_GenerateKeyPair(op); |
1018 | 107 | } |
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 | 17 | 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 | 17 | (void)operations; |
1026 | 17 | (void)results; |
1027 | 17 | (void)data; |
1028 | 17 | (void)size; |
1029 | 17 | } |
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 | 45 | 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 | 45 | (void)result; |
1040 | 45 | (void)module; |
1041 | 45 | (void)op; |
1042 | 45 | 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 | 45 | } |
1054 | | |
1055 | 45 | 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 | 45 | return module->OpDSA_GenerateParameters(op); |
1057 | 45 | } |
1058 | | |
1059 | | /* Specialization for operation::ECDH_Derive */ |
1060 | 530 | 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 | 530 | (void)module; |
1062 | 530 | (void)op; |
1063 | 530 | (void)result; |
1064 | 530 | } |
1065 | | |
1066 | 530 | template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const { |
1067 | 530 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1068 | | |
1069 | 530 | return module->OpECDH_Derive(op); |
1070 | 530 | } |
1071 | | |
1072 | | /* Specialization for operation::ECIES_Encrypt */ |
1073 | | template <> |
1074 | 349 | 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 | 349 | (void)operations; |
1076 | 349 | (void)results; |
1077 | 349 | (void)data; |
1078 | 349 | (void)size; |
1079 | 349 | } |
1080 | 831 | 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 | 831 | (void)module; |
1082 | 831 | (void)op; |
1083 | 831 | (void)result; |
1084 | 831 | } |
1085 | | |
1086 | 831 | template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const { |
1087 | 831 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1088 | | |
1089 | 831 | return module->OpECIES_Encrypt(op); |
1090 | 831 | } |
1091 | | |
1092 | | /* Specialization for operation::ECIES_Decrypt */ |
1093 | 1.02k | 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 | 1.02k | (void)module; |
1095 | 1.02k | (void)op; |
1096 | 1.02k | (void)result; |
1097 | 1.02k | } |
1098 | | |
1099 | 1.02k | template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const { |
1100 | 1.02k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1101 | | |
1102 | 1.02k | return module->OpECIES_Decrypt(op); |
1103 | 1.02k | } |
1104 | | |
1105 | | /* Specialization for operation::ECC_Point_Add */ |
1106 | 1.53k | 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 | 1.53k | (void)module; |
1108 | | |
1109 | 1.53k | if ( result.second != std::nullopt ) { |
1110 | 158 | const auto curveID = op.curveType.Get(); |
1111 | 158 | const auto x = result.second->first.ToTrimmedString(); |
1112 | 158 | const auto y = result.second->second.ToTrimmedString(); |
1113 | | |
1114 | 158 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1115 | | |
1116 | 158 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1117 | 158 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1118 | 158 | } |
1119 | 1.53k | } |
1120 | | |
1121 | 1.53k | 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 | 1.53k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1123 | | |
1124 | 1.53k | return module->OpECC_Point_Add(op); |
1125 | 1.53k | } |
1126 | | |
1127 | | /* Specialization for operation::ECC_Point_Sub */ |
1128 | 58 | 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 | 58 | (void)module; |
1130 | | |
1131 | 58 | if ( result.second != std::nullopt ) { |
1132 | 0 | const auto curveID = op.curveType.Get(); |
1133 | 0 | const auto x = result.second->first.ToTrimmedString(); |
1134 | 0 | const auto y = result.second->second.ToTrimmedString(); |
1135 | |
|
1136 | 0 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1137 | |
|
1138 | 0 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1139 | 0 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1140 | 0 | } |
1141 | 58 | } |
1142 | | |
1143 | 58 | 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 | 58 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1145 | | |
1146 | 58 | return module->OpECC_Point_Sub(op); |
1147 | 58 | } |
1148 | | |
1149 | | /* Specialization for operation::ECC_Point_Mul */ |
1150 | 2.23k | 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 | 2.23k | (void)module; |
1152 | | |
1153 | 2.23k | if ( result.second != std::nullopt ) { |
1154 | 316 | const auto curveID = op.curveType.Get(); |
1155 | 316 | const auto x = result.second->first.ToTrimmedString(); |
1156 | 316 | const auto y = result.second->second.ToTrimmedString(); |
1157 | | |
1158 | 316 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1159 | | |
1160 | 316 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1161 | 316 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1162 | 316 | } |
1163 | 2.23k | } |
1164 | | |
1165 | 2.23k | 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 | 2.23k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1167 | | |
1168 | 2.23k | return module->OpECC_Point_Mul(op); |
1169 | 2.23k | } |
1170 | | |
1171 | | /* Specialization for operation::ECC_Point_Neg */ |
1172 | 300 | 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 | 300 | (void)module; |
1174 | | |
1175 | 300 | if ( result.second != std::nullopt ) { |
1176 | 39 | const auto curveID = op.curveType.Get(); |
1177 | 39 | const auto x = result.second->first.ToTrimmedString(); |
1178 | 39 | const auto y = result.second->second.ToTrimmedString(); |
1179 | | |
1180 | 39 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1181 | | |
1182 | 39 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1183 | 39 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1184 | 39 | } |
1185 | 300 | } |
1186 | | |
1187 | 300 | 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 | 300 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1189 | | |
1190 | 300 | return module->OpECC_Point_Neg(op); |
1191 | 300 | } |
1192 | | |
1193 | | /* Specialization for operation::ECC_Point_Dbl */ |
1194 | 2.27k | 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 | 2.27k | (void)module; |
1196 | | |
1197 | 2.27k | if ( result.second != std::nullopt ) { |
1198 | 61 | const auto curveID = op.curveType.Get(); |
1199 | 61 | const auto x = result.second->first.ToTrimmedString(); |
1200 | 61 | const auto y = result.second->second.ToTrimmedString(); |
1201 | | |
1202 | 61 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1203 | | |
1204 | 61 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1205 | 61 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1206 | 61 | } |
1207 | 2.27k | } |
1208 | | |
1209 | 2.27k | 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 | 2.27k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1211 | | |
1212 | 2.27k | return module->OpECC_Point_Dbl(op); |
1213 | 2.27k | } |
1214 | | |
1215 | | /* Specialization for operation::ECC_Point_Cmp */ |
1216 | 126 | 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 | 126 | (void)module; |
1218 | 126 | (void)result; |
1219 | 126 | (void)op; |
1220 | 126 | } |
1221 | | |
1222 | 126 | template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const { |
1223 | 126 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1224 | | |
1225 | 126 | return module->OpECC_Point_Cmp(op); |
1226 | 126 | } |
1227 | | |
1228 | | /* Specialization for operation::DH_Derive */ |
1229 | 1.50k | 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 | 1.50k | (void)module; |
1231 | 1.50k | (void)op; |
1232 | 1.50k | (void)result; |
1233 | 1.50k | } |
1234 | | |
1235 | 1.50k | template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const { |
1236 | 1.50k | if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1237 | 1.47k | if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1238 | 1.46k | if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1239 | 1.44k | if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1240 | | |
1241 | 1.42k | return module->OpDH_Derive(op); |
1242 | 1.44k | } |
1243 | | |
1244 | | /* Specialization for operation::DH_GenerateKeyPair */ |
1245 | 1.84k | 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 | 1.84k | (void)result; |
1247 | 1.84k | (void)op; |
1248 | 1.84k | (void)module; |
1249 | | |
1250 | 1.84k | if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) { |
1251 | 263 | const auto priv = result.second->first.ToTrimmedString(); |
1252 | 263 | const auto pub = result.second->second.ToTrimmedString(); |
1253 | | |
1254 | 263 | Pool_DH_PrivateKey.Set(priv); |
1255 | 263 | Pool_DH_PublicKey.Set(pub); |
1256 | 263 | } |
1257 | 1.84k | } |
1258 | | |
1259 | 1.84k | 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 | 1.84k | if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1261 | 1.82k | if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1262 | | |
1263 | 1.81k | return module->OpDH_GenerateKeyPair(op); |
1264 | 1.82k | } |
1265 | | |
1266 | | /* Specialization for operation::BignumCalc */ |
1267 | 30.4k | 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 | 30.4k | (void)module; |
1269 | 30.4k | (void)op; |
1270 | | |
1271 | 30.4k | if ( result.second != std::nullopt ) { |
1272 | 10.0k | const auto bignum = result.second->ToTrimmedString(); |
1273 | | |
1274 | 10.0k | if ( bignum.size() <= config::kMaxBignumSize ) { |
1275 | 9.96k | Pool_Bignum.Set(bignum); |
1276 | 9.96k | if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) { |
1277 | 669 | Pool_Bignum_Primes.Set(bignum); |
1278 | 669 | } |
1279 | 9.96k | } |
1280 | 10.0k | if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) { |
1281 | 493 | if ( bignum == "1" ) { |
1282 | 220 | Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString()); |
1283 | 220 | } |
1284 | 493 | } |
1285 | 10.0k | } |
1286 | 30.4k | } |
1287 | | |
1288 | 30.4k | std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const { |
1289 | 30.4k | RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get()); |
1290 | | |
1291 | | /* Prevent timeouts */ |
1292 | 30.4k | if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1293 | 30.4k | if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1294 | 30.4k | if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1295 | 30.4k | if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1296 | | |
1297 | 30.4k | if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) { |
1298 | 110 | return std::nullopt; |
1299 | 110 | } |
1300 | | |
1301 | 30.3k | switch ( op.calcOp.Get() ) { |
1302 | 345 | case CF_CALCOP("SetBit(A,B)"): |
1303 | | /* Don't allow setting very high bit positions (risk of memory exhaustion) */ |
1304 | 345 | if ( op.bn1.GetSize() > 4 ) { |
1305 | 32 | return std::nullopt; |
1306 | 32 | } |
1307 | 313 | break; |
1308 | 313 | case CF_CALCOP("Exp(A,B)"): |
1309 | 134 | if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) { |
1310 | 97 | return std::nullopt; |
1311 | 97 | } |
1312 | 37 | break; |
1313 | 80 | case CF_CALCOP("ModLShift(A,B,C)"): |
1314 | 80 | if ( op.bn1.GetSize() > 4 ) { |
1315 | 43 | return std::nullopt; |
1316 | 43 | } |
1317 | 37 | break; |
1318 | 178 | case CF_CALCOP("Exp2(A)"): |
1319 | 178 | if ( op.bn0.GetSize() > 4 ) { |
1320 | 34 | return std::nullopt; |
1321 | 34 | } |
1322 | 144 | break; |
1323 | 30.3k | } |
1324 | | |
1325 | 30.1k | return module->OpBignumCalc(op); |
1326 | 30.3k | } |
1327 | | |
1328 | | /* Specialization for operation::BignumCalc_Fp2 */ |
1329 | 179 | 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 | 179 | (void)module; |
1331 | 179 | (void)op; |
1332 | | |
1333 | 179 | 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 | 179 | } |
1345 | | |
1346 | 179 | std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const { |
1347 | 179 | RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get()); |
1348 | | |
1349 | | /* Prevent timeouts */ |
1350 | 179 | if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1351 | 179 | if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1352 | 176 | if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1353 | 170 | if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1354 | 164 | if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1355 | 158 | if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1356 | 143 | if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1357 | 133 | if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1358 | | |
1359 | 122 | if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) { |
1360 | 0 | return std::nullopt; |
1361 | 0 | } |
1362 | | |
1363 | 122 | return module->OpBignumCalc_Fp2(op); |
1364 | 122 | } |
1365 | | |
1366 | | /* Specialization for operation::BignumCalc_Fp12 */ |
1367 | 695 | 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 | 695 | (void)module; |
1369 | 695 | (void)op; |
1370 | | |
1371 | 695 | 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 | 695 | } |
1400 | | |
1401 | 695 | std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const { |
1402 | 695 | RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get()); |
1403 | | |
1404 | | /* Prevent timeouts */ |
1405 | 695 | if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1406 | 684 | if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1407 | 676 | if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1408 | 670 | if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1409 | 659 | if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1410 | 649 | if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1411 | 646 | if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1412 | 636 | if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1413 | 625 | if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1414 | 614 | if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1415 | 603 | if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1416 | 597 | if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1417 | | |
1418 | 588 | if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1419 | 578 | if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1420 | 568 | if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1421 | 558 | if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1422 | 548 | if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1423 | 540 | if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1424 | 529 | if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1425 | 519 | if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1426 | 509 | if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1427 | 498 | if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1428 | 488 | if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1429 | 478 | if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1430 | | |
1431 | 468 | if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1432 | 462 | if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1433 | 452 | if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1434 | 442 | if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1435 | 432 | if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1436 | 420 | if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1437 | 410 | if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1438 | 399 | if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1439 | 396 | if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1440 | 388 | if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1441 | 381 | if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1442 | 370 | if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1443 | | |
1444 | 364 | if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1445 | 357 | if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1446 | 346 | if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1447 | 338 | if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1448 | 328 | if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1449 | 317 | if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1450 | 306 | if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1451 | 295 | if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1452 | 285 | if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1453 | 275 | if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1454 | 265 | if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1455 | 255 | if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1456 | | |
1457 | 247 | if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) { |
1458 | 0 | return std::nullopt; |
1459 | 0 | } |
1460 | | |
1461 | 247 | return module->OpBignumCalc_Fp12(op); |
1462 | 247 | } |
1463 | | |
1464 | | /* Specialization for operation::BLS_PrivateToPublic */ |
1465 | 76 | 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 | 76 | (void)module; |
1467 | | |
1468 | 76 | 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 | 76 | } |
1479 | | |
1480 | 76 | 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 | 76 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1482 | | |
1483 | 76 | const size_t size = op.priv.ToTrimmedString().size(); |
1484 | | |
1485 | 76 | if ( size == 0 || size > 4096 ) { |
1486 | 0 | return std::nullopt; |
1487 | 0 | } |
1488 | | |
1489 | 76 | return module->OpBLS_PrivateToPublic(op); |
1490 | 76 | } |
1491 | | |
1492 | | /* Specialization for operation::BLS_PrivateToPublic_G2 */ |
1493 | 74 | 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 | 74 | (void)module; |
1495 | 74 | 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 | 74 | } |
1510 | | |
1511 | 74 | 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 | 74 | const size_t size = op.priv.ToTrimmedString().size(); |
1513 | | |
1514 | 74 | if ( size == 0 || size > 4096 ) { |
1515 | 0 | return std::nullopt; |
1516 | 0 | } |
1517 | | |
1518 | 74 | return module->OpBLS_PrivateToPublic_G2(op); |
1519 | 74 | } |
1520 | | |
1521 | | /* Specialization for operation::BLS_Sign */ |
1522 | 63 | 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 | 63 | (void)module; |
1524 | | |
1525 | 63 | 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 | 63 | } |
1553 | | |
1554 | 63 | 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 | 63 | const size_t size = op.priv.ToTrimmedString().size(); |
1556 | | |
1557 | 63 | if ( size == 0 || size > 4096 ) { |
1558 | 0 | return std::nullopt; |
1559 | 0 | } |
1560 | | |
1561 | 63 | return module->OpBLS_Sign(op); |
1562 | 63 | } |
1563 | | |
1564 | | /* Specialization for operation::BLS_Verify */ |
1565 | 58 | 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 | 58 | (void)module; |
1567 | 58 | (void)op; |
1568 | 58 | (void)result; |
1569 | 58 | } |
1570 | | |
1571 | 58 | 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 | 58 | return module->OpBLS_Verify(op); |
1588 | 58 | } |
1589 | | |
1590 | | /* Specialization for operation::BLS_BatchSign */ |
1591 | 88 | 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 | 88 | (void)module; |
1593 | 88 | (void)op; |
1594 | | |
1595 | 88 | 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 | 88 | } |
1624 | | |
1625 | 88 | 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 | 88 | return module->OpBLS_BatchSign(op); |
1627 | 88 | } |
1628 | | |
1629 | | /* Specialization for operation::BLS_BatchVerify */ |
1630 | 65 | 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 | 65 | (void)module; |
1632 | 65 | (void)op; |
1633 | 65 | (void)result; |
1634 | 65 | } |
1635 | | |
1636 | 65 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const { |
1637 | 65 | return module->OpBLS_BatchVerify(op); |
1638 | 65 | } |
1639 | | |
1640 | | /* Specialization for operation::BLS_Aggregate_G1 */ |
1641 | 62 | 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 | 62 | (void)module; |
1643 | 62 | (void)op; |
1644 | 62 | (void)result; |
1645 | 62 | } |
1646 | | |
1647 | 62 | 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 | 62 | return module->OpBLS_Aggregate_G1(op); |
1649 | 62 | } |
1650 | | |
1651 | | /* Specialization for operation::BLS_Aggregate_G2 */ |
1652 | 66 | 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 | 66 | (void)module; |
1654 | 66 | (void)op; |
1655 | 66 | (void)result; |
1656 | 66 | } |
1657 | | |
1658 | 66 | 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 | 66 | return module->OpBLS_Aggregate_G2(op); |
1660 | 66 | } |
1661 | | |
1662 | | /* Specialization for operation::BLS_Pairing */ |
1663 | 70 | 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 | 70 | (void)module; |
1665 | 70 | (void)op; |
1666 | | |
1667 | 70 | 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 | 70 | } |
1684 | | |
1685 | 70 | template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const { |
1686 | 70 | return module->OpBLS_Pairing(op); |
1687 | 70 | } |
1688 | | |
1689 | | /* Specialization for operation::BLS_MillerLoop */ |
1690 | 65 | 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 | 65 | (void)module; |
1692 | 65 | (void)op; |
1693 | | |
1694 | 65 | 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 | 65 | } |
1711 | | |
1712 | 65 | template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const { |
1713 | 65 | return module->OpBLS_MillerLoop(op); |
1714 | 65 | } |
1715 | | |
1716 | | /* Specialization for operation::BLS_FinalExp */ |
1717 | 56 | 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 | 56 | (void)module; |
1719 | 56 | (void)op; |
1720 | | |
1721 | 56 | 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 | 56 | } |
1738 | | |
1739 | 56 | template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const { |
1740 | 56 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1741 | 56 | return module->OpBLS_FinalExp(op); |
1742 | 56 | } |
1743 | | |
1744 | | /* Specialization for operation::BLS_HashToG1 */ |
1745 | 67 | 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 | 67 | (void)module; |
1747 | | |
1748 | 67 | 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 | 67 | } |
1759 | | |
1760 | 67 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const { |
1761 | 67 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1762 | 67 | return module->OpBLS_HashToG1(op); |
1763 | 67 | } |
1764 | | |
1765 | | /* Specialization for operation::BLS_MapToG1 */ |
1766 | 50 | 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 | 50 | (void)module; |
1768 | | |
1769 | 50 | 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 | 50 | } |
1780 | | |
1781 | 50 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const { |
1782 | 50 | return module->OpBLS_MapToG1(op); |
1783 | 50 | } |
1784 | | |
1785 | | /* Specialization for operation::BLS_MapToG2 */ |
1786 | 50 | 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 | 50 | (void)module; |
1788 | | |
1789 | 50 | 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 | 50 | } |
1804 | | |
1805 | 50 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const { |
1806 | 50 | return module->OpBLS_MapToG2(op); |
1807 | 50 | } |
1808 | | |
1809 | | /* Specialization for operation::BLS_IsG1OnCurve */ |
1810 | 78 | 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 | 78 | (void)module; |
1812 | 78 | (void)op; |
1813 | 78 | (void)result; |
1814 | 78 | } |
1815 | | |
1816 | 78 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const { |
1817 | 78 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1818 | 78 | if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1819 | 77 | if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1820 | | |
1821 | 77 | return module->OpBLS_IsG1OnCurve(op); |
1822 | 77 | } |
1823 | | |
1824 | | /* Specialization for operation::BLS_IsG2OnCurve */ |
1825 | 148 | 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 | 148 | (void)module; |
1827 | 148 | (void)op; |
1828 | 148 | (void)result; |
1829 | 148 | } |
1830 | | |
1831 | 148 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const { |
1832 | 148 | if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1833 | 145 | if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1834 | 135 | if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1835 | 124 | if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1836 | | |
1837 | 124 | return module->OpBLS_IsG2OnCurve(op); |
1838 | 124 | } |
1839 | | |
1840 | | /* Specialization for operation::BLS_GenerateKeyPair */ |
1841 | 54 | 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 | 54 | (void)module; |
1843 | | |
1844 | 54 | 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 | 54 | } |
1857 | | |
1858 | 54 | 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 | 54 | return module->OpBLS_GenerateKeyPair(op); |
1860 | 54 | } |
1861 | | |
1862 | | /* Specialization for operation::BLS_Decompress_G1 */ |
1863 | 53 | 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 | 53 | (void)module; |
1865 | | |
1866 | 53 | 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 | 53 | } |
1877 | | |
1878 | 53 | 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 | 53 | return module->OpBLS_Decompress_G1(op); |
1880 | 53 | } |
1881 | | |
1882 | | /* Specialization for operation::BLS_Compress_G1 */ |
1883 | 57 | 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 | 57 | (void)module; |
1885 | 57 | (void)op; |
1886 | | |
1887 | 57 | 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 | 57 | } |
1893 | | |
1894 | 57 | 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 | 57 | return module->OpBLS_Compress_G1(op); |
1896 | 57 | } |
1897 | | |
1898 | | /* Specialization for operation::BLS_Decompress_G2 */ |
1899 | 57 | 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 | 57 | (void)module; |
1901 | | |
1902 | 57 | 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 | 57 | } |
1917 | | |
1918 | 57 | 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 | 57 | return module->OpBLS_Decompress_G2(op); |
1920 | 57 | } |
1921 | | |
1922 | | /* Specialization for operation::BLS_Compress_G2 */ |
1923 | 46 | 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 | 46 | (void)module; |
1925 | | |
1926 | 46 | 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 | 46 | } |
1937 | | |
1938 | 46 | 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 | 46 | return module->OpBLS_Compress_G2(op); |
1940 | 46 | } |
1941 | | |
1942 | | /* Specialization for operation::BLS_G1_Add */ |
1943 | 134 | 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 | 134 | (void)module; |
1945 | | |
1946 | 134 | 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 | 134 | } |
1957 | | |
1958 | 134 | 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 | 134 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1960 | 134 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1961 | 133 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1962 | 132 | if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1963 | 129 | if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1964 | | |
1965 | 119 | return module->OpBLS_G1_Add(op); |
1966 | 129 | } |
1967 | | |
1968 | | /* Specialization for operation::BLS_G1_Mul */ |
1969 | 77 | 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 | 77 | (void)module; |
1971 | | |
1972 | 77 | 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 | 77 | } |
1983 | | |
1984 | 77 | 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 | 77 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1986 | 77 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1987 | 77 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1988 | 77 | if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1989 | | |
1990 | 77 | return module->OpBLS_G1_Mul(op); |
1991 | 77 | } |
1992 | | |
1993 | | /* Specialization for operation::BLS_G1_IsEq */ |
1994 | 144 | 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 | 144 | (void)module; |
1996 | 144 | (void)op; |
1997 | 144 | (void)result; |
1998 | 144 | } |
1999 | | |
2000 | 144 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const { |
2001 | 144 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2002 | 144 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2003 | 134 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2004 | 126 | if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2005 | 115 | if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2006 | | |
2007 | 104 | return module->OpBLS_G1_IsEq(op); |
2008 | 115 | } |
2009 | | |
2010 | | /* Specialization for operation::BLS_G1_Neg */ |
2011 | 78 | 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 | 78 | (void)module; |
2013 | | |
2014 | 78 | 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 | 78 | } |
2025 | | |
2026 | 78 | 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 | 78 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2028 | 78 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2029 | 75 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2030 | | |
2031 | 75 | return module->OpBLS_G1_Neg(op); |
2032 | 75 | } |
2033 | | |
2034 | | /* Specialization for operation::BLS_G2_Add */ |
2035 | 129 | 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 | 129 | (void)module; |
2037 | | |
2038 | 129 | 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 | 129 | } |
2053 | | |
2054 | 129 | 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 | 129 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2056 | 129 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2057 | 128 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2058 | 117 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2059 | 116 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2060 | 113 | if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2061 | 110 | if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2062 | 99 | if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2063 | 89 | if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2064 | | |
2065 | 83 | return module->OpBLS_G2_Add(op); |
2066 | 89 | } |
2067 | | |
2068 | | /* Specialization for operation::BLS_G2_Mul */ |
2069 | 96 | 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 | 96 | (void)module; |
2071 | | |
2072 | 96 | 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 | 96 | } |
2087 | | |
2088 | 96 | 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 | 96 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2090 | 96 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2091 | 96 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2092 | 90 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2093 | 87 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2094 | 84 | if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2095 | | |
2096 | 78 | return module->OpBLS_G2_Mul(op); |
2097 | 84 | } |
2098 | | |
2099 | | /* Specialization for operation::BLS_G2_IsEq */ |
2100 | 162 | 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 | 162 | (void)module; |
2102 | 162 | (void)op; |
2103 | 162 | (void)result; |
2104 | 162 | } |
2105 | | |
2106 | 162 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const { |
2107 | 162 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2108 | 162 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2109 | 162 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2110 | 162 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2111 | 162 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2112 | 162 | if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2113 | 151 | if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2114 | 148 | if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2115 | 137 | if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2116 | | |
2117 | 126 | return module->OpBLS_G2_IsEq(op); |
2118 | 137 | } |
2119 | | |
2120 | | /* Specialization for operation::BLS_G2_Neg */ |
2121 | 103 | 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 | 103 | (void)module; |
2123 | | |
2124 | 103 | 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 | 103 | } |
2139 | | |
2140 | 103 | 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 | 103 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2142 | 103 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2143 | 91 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2144 | 90 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2145 | 90 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2146 | | |
2147 | 90 | return module->OpBLS_G2_Neg(op); |
2148 | 90 | } |
2149 | | |
2150 | | /* Specialization for operation::BLS_G1_MultiExp */ |
2151 | 160 | 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 | 160 | (void)module; |
2153 | | |
2154 | 160 | 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 | 160 | } |
2165 | | |
2166 | 160 | 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 | 160 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2168 | | |
2169 | 1.36k | for (const auto& point_scalar : op.points_scalars.points_scalars) { |
2170 | 1.36k | if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2171 | 1.35k | if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2172 | 1.35k | if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2173 | 1.35k | } |
2174 | | |
2175 | 146 | return module->OpBLS_G1_MultiExp(op); |
2176 | 160 | } |
2177 | | |
2178 | | /* Specialization for operation::Misc */ |
2179 | 56 | template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const { |
2180 | 56 | (void)module; |
2181 | 56 | (void)op; |
2182 | 56 | (void)result; |
2183 | 56 | } |
2184 | | |
2185 | 56 | template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const { |
2186 | 56 | return module->OpMisc(op); |
2187 | 56 | } |
2188 | | |
2189 | | /* Specialization for operation::BLS_HashToG2 */ |
2190 | 58 | 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 | 58 | (void)module; |
2192 | | |
2193 | 58 | 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 | 58 | } |
2208 | | |
2209 | 58 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const { |
2210 | 58 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2211 | 58 | return module->OpBLS_HashToG2(op); |
2212 | 58 | } |
2213 | | |
2214 | | ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2215 | 92 | ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options) |
2216 | 92 | { } |
2217 | 88 | void ExecutorBignumCalc::SetModulo(const std::string& modulo) { |
2218 | 88 | this->modulo = component::Bignum(modulo); |
2219 | 88 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2223 | 4 | CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513")); |
2224 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2228 | 4 | CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787")); |
2229 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2233 | 4 | CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041")); |
2234 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2238 | 4 | CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177")); |
2239 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2243 | 4 | CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617")); |
2244 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2248 | 4 | CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583")); |
2249 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2253 | 4 | CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337")); |
2254 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2258 | 4 | CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097")); |
2259 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2263 | 4 | CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949")); |
2264 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2268 | 4 | CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601")); |
2269 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2273 | 4 | CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001")); |
2274 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2278 | 4 | CF_NORET(SetModulo("18446744069414584321")); |
2279 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2283 | 4 | CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137")); |
2284 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2288 | 4 | CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081")); |
2289 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2293 | 4 | CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081")); |
2294 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2298 | 4 | CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040")); |
2299 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2303 | 4 | CF_NORET(SetModulo("18446744073709551616")); |
2304 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2308 | 4 | CF_NORET(SetModulo("340282366920938463463374607431768211456")); |
2309 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2313 | 4 | CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936")); |
2314 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2318 | 4 | CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096")); |
2319 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2323 | 4 | CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337")); |
2324 | 4 | } |
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 | 4 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2328 | 4 | CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663")); |
2329 | 4 | } |
2330 | | |
2331 | | ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2332 | 4 | ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options) |
2333 | 4 | { } |
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 | 4 | ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options) |
2340 | 4 | { } |
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 | 428 | operationID(operationID), |
2348 | 428 | modules(modules), |
2349 | 428 | options(options) |
2350 | 428 | { |
2351 | 428 | } 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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 92 | operationID(operationID), | 2348 | 92 | modules(modules), | 2349 | 92 | options(options) | 2350 | 92 | { | 2351 | 92 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
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 | 2347 | 4 | operationID(operationID), | 2348 | 4 | modules(modules), | 2349 | 4 | options(options) | 2350 | 4 | { | 2351 | 4 | } |
|
2352 | | |
2353 | | /* Specialization for operation::SR25519_Verify */ |
2354 | 70 | 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 | 70 | (void)module; |
2356 | 70 | (void)op; |
2357 | 70 | (void)result; |
2358 | 70 | } |
2359 | | |
2360 | 70 | template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const { |
2361 | 70 | return module->OpSR25519_Verify(op); |
2362 | 70 | } |
2363 | | |
2364 | | template <class ResultType, class OperationType> |
2365 | 428 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { |
2366 | 428 | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase() Line | Count | Source | 2365 | 92 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 92 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 4 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 4 | } |
|
2367 | | |
2368 | | /* Filter away the values in the set that are std::nullopt */ |
2369 | | template <class ResultType, class OperationType> |
2370 | 12.4k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { |
2371 | 12.4k | ResultSet ret; |
2372 | | |
2373 | 40.0k | for (const auto& result : results) { |
2374 | 40.0k | if ( result.second == std::nullopt ) { |
2375 | 27.3k | continue; |
2376 | 27.3k | } |
2377 | | |
2378 | 12.7k | ret.push_back(result); |
2379 | 12.7k | } |
2380 | | |
2381 | 12.4k | return ret; |
2382 | 12.4k | } 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 | 152 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 152 | ResultSet ret; | 2372 | | | 2373 | 727 | for (const auto& result : results) { | 2374 | 727 | if ( result.second == std::nullopt ) { | 2375 | 282 | continue; | 2376 | 282 | } | 2377 | | | 2378 | 445 | ret.push_back(result); | 2379 | 445 | } | 2380 | | | 2381 | 152 | return ret; | 2382 | 152 | } |
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 | 159 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 159 | ResultSet ret; | 2372 | | | 2373 | 813 | for (const auto& result : results) { | 2374 | 813 | if ( result.second == std::nullopt ) { | 2375 | 463 | continue; | 2376 | 463 | } | 2377 | | | 2378 | 350 | ret.push_back(result); | 2379 | 350 | } | 2380 | | | 2381 | 159 | return ret; | 2382 | 159 | } |
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 | 29 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 29 | ResultSet ret; | 2372 | | | 2373 | 186 | for (const auto& result : results) { | 2374 | 186 | if ( result.second == std::nullopt ) { | 2375 | 186 | continue; | 2376 | 186 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 29 | return ret; | 2382 | 29 | } |
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 | 102 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 102 | ResultSet ret; | 2372 | | | 2373 | 629 | for (const auto& result : results) { | 2374 | 629 | if ( result.second == std::nullopt ) { | 2375 | 421 | continue; | 2376 | 421 | } | 2377 | | | 2378 | 208 | ret.push_back(result); | 2379 | 208 | } | 2380 | | | 2381 | 102 | return ret; | 2382 | 102 | } |
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 | 452 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 452 | ResultSet ret; | 2372 | | | 2373 | 2.13k | for (const auto& result : results) { | 2374 | 2.13k | if ( result.second == std::nullopt ) { | 2375 | 1.03k | continue; | 2376 | 1.03k | } | 2377 | | | 2378 | 1.10k | ret.push_back(result); | 2379 | 1.10k | } | 2380 | | | 2381 | 452 | return ret; | 2382 | 452 | } |
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 | 205 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 205 | ResultSet ret; | 2372 | | | 2373 | 1.16k | for (const auto& result : results) { | 2374 | 1.16k | if ( result.second == std::nullopt ) { | 2375 | 1.00k | continue; | 2376 | 1.00k | } | 2377 | | | 2378 | 162 | ret.push_back(result); | 2379 | 162 | } | 2380 | | | 2381 | 205 | return ret; | 2382 | 205 | } |
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 | 30 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 30 | ResultSet ret; | 2372 | | | 2373 | 207 | for (const auto& result : results) { | 2374 | 207 | if ( result.second == std::nullopt ) { | 2375 | 207 | continue; | 2376 | 207 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 30 | return ret; | 2382 | 30 | } |
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 | 119 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 119 | ResultSet ret; | 2372 | | | 2373 | 688 | for (const auto& result : results) { | 2374 | 688 | if ( result.second == std::nullopt ) { | 2375 | 477 | continue; | 2376 | 477 | } | 2377 | | | 2378 | 211 | ret.push_back(result); | 2379 | 211 | } | 2380 | | | 2381 | 119 | return ret; | 2382 | 119 | } |
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 | 34 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 34 | ResultSet ret; | 2372 | | | 2373 | 217 | for (const auto& result : results) { | 2374 | 217 | if ( result.second == std::nullopt ) { | 2375 | 217 | continue; | 2376 | 217 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 34 | return ret; | 2382 | 34 | } |
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 | 26 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 26 | ResultSet ret; | 2372 | | | 2373 | 182 | for (const auto& result : results) { | 2374 | 182 | if ( result.second == std::nullopt ) { | 2375 | 182 | continue; | 2376 | 182 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 26 | return ret; | 2382 | 26 | } |
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 | 32 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 32 | ResultSet ret; | 2372 | | | 2373 | 233 | for (const auto& result : results) { | 2374 | 233 | if ( result.second == std::nullopt ) { | 2375 | 233 | continue; | 2376 | 233 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 32 | return ret; | 2382 | 32 | } |
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 | 91 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 91 | ResultSet ret; | 2372 | | | 2373 | 547 | for (const auto& result : results) { | 2374 | 547 | if ( result.second == std::nullopt ) { | 2375 | 244 | continue; | 2376 | 244 | } | 2377 | | | 2378 | 303 | ret.push_back(result); | 2379 | 303 | } | 2380 | | | 2381 | 91 | return ret; | 2382 | 91 | } |
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 | 12 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 12 | ResultSet ret; | 2372 | | | 2373 | 27 | for (const auto& result : results) { | 2374 | 27 | if ( result.second == std::nullopt ) { | 2375 | 27 | continue; | 2376 | 27 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 12 | return ret; | 2382 | 12 | } |
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 | 29 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 29 | 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 | 29 | return ret; | 2382 | 29 | } |
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 | 27 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 27 | ResultSet ret; | 2372 | | | 2373 | 188 | for (const auto& result : results) { | 2374 | 188 | if ( result.second == std::nullopt ) { | 2375 | 188 | continue; | 2376 | 188 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 27 | return ret; | 2382 | 27 | } |
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 | 9 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 9 | ResultSet ret; | 2372 | | | 2373 | 18 | for (const auto& result : results) { | 2374 | 18 | if ( result.second == std::nullopt ) { | 2375 | 18 | continue; | 2376 | 18 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 9 | return ret; | 2382 | 9 | } |
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 | 32 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 32 | ResultSet ret; | 2372 | | | 2373 | 229 | for (const auto& result : results) { | 2374 | 229 | if ( result.second == std::nullopt ) { | 2375 | 229 | continue; | 2376 | 229 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 32 | return ret; | 2382 | 32 | } |
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 | 28 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 28 | ResultSet ret; | 2372 | | | 2373 | 170 | for (const auto& result : results) { | 2374 | 170 | if ( result.second == std::nullopt ) { | 2375 | 170 | continue; | 2376 | 170 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 28 | return ret; | 2382 | 28 | } |
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 | 29 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 29 | ResultSet ret; | 2372 | | | 2373 | 201 | for (const auto& result : results) { | 2374 | 201 | if ( result.second == std::nullopt ) { | 2375 | 201 | continue; | 2376 | 201 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 29 | return ret; | 2382 | 29 | } |
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 | 608 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 608 | ResultSet ret; | 2372 | | | 2373 | 1.68k | for (const auto& result : results) { | 2374 | 1.68k | if ( result.second == std::nullopt ) { | 2375 | 1.02k | continue; | 2376 | 1.02k | } | 2377 | | | 2378 | 653 | ret.push_back(result); | 2379 | 653 | } | 2380 | | | 2381 | 608 | return ret; | 2382 | 608 | } |
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 | 417 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 417 | ResultSet ret; | 2372 | | | 2373 | 1.20k | for (const auto& result : results) { | 2374 | 1.20k | if ( result.second == std::nullopt ) { | 2375 | 837 | continue; | 2376 | 837 | } | 2377 | | | 2378 | 366 | ret.push_back(result); | 2379 | 366 | } | 2380 | | | 2381 | 417 | return ret; | 2382 | 417 | } |
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 | 153 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 153 | ResultSet ret; | 2372 | | | 2373 | 471 | for (const auto& result : results) { | 2374 | 471 | if ( result.second == std::nullopt ) { | 2375 | 471 | continue; | 2376 | 471 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 153 | return ret; | 2382 | 153 | } |
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 | 1.18k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 1.18k | ResultSet ret; | 2372 | | | 2373 | 3.57k | for (const auto& result : results) { | 2374 | 3.57k | if ( result.second == std::nullopt ) { | 2375 | 1.40k | continue; | 2376 | 1.40k | } | 2377 | | | 2378 | 2.17k | ret.push_back(result); | 2379 | 2.17k | } | 2380 | | | 2381 | 1.18k | return ret; | 2382 | 1.18k | } |
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 | 21 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 21 | ResultSet ret; | 2372 | | | 2373 | 60 | for (const auto& result : results) { | 2374 | 60 | if ( result.second == std::nullopt ) { | 2375 | 60 | continue; | 2376 | 60 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 21 | return ret; | 2382 | 21 | } |
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 | 23 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 23 | ResultSet ret; | 2372 | | | 2373 | 68 | for (const auto& result : results) { | 2374 | 68 | if ( result.second == std::nullopt ) { | 2375 | 68 | continue; | 2376 | 68 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 23 | return ret; | 2382 | 23 | } |
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 | 23 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 23 | ResultSet ret; | 2372 | | | 2373 | 70 | for (const auto& result : results) { | 2374 | 70 | if ( result.second == std::nullopt ) { | 2375 | 70 | continue; | 2376 | 70 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 23 | return ret; | 2382 | 23 | } |
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 | 105 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 105 | ResultSet ret; | 2372 | | | 2373 | 361 | for (const auto& result : results) { | 2374 | 361 | if ( result.second == std::nullopt ) { | 2375 | 361 | continue; | 2376 | 361 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 105 | return ret; | 2382 | 105 | } |
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 | 933 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 933 | ResultSet ret; | 2372 | | | 2373 | 2.56k | for (const auto& result : results) { | 2374 | 2.56k | if ( result.second == std::nullopt ) { | 2375 | 1.32k | continue; | 2376 | 1.32k | } | 2377 | | | 2378 | 1.23k | ret.push_back(result); | 2379 | 1.23k | } | 2380 | | | 2381 | 933 | return ret; | 2382 | 933 | } |
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 | 16 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 16 | ResultSet ret; | 2372 | | | 2373 | 47 | for (const auto& result : results) { | 2374 | 47 | if ( result.second == std::nullopt ) { | 2375 | 47 | continue; | 2376 | 47 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 16 | return ret; | 2382 | 16 | } |
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 | 16 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 16 | ResultSet ret; | 2372 | | | 2373 | 49 | for (const auto& result : results) { | 2374 | 49 | if ( result.second == std::nullopt ) { | 2375 | 49 | continue; | 2376 | 49 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 16 | return ret; | 2382 | 16 | } |
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 | 20 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 20 | ResultSet ret; | 2372 | | | 2373 | 63 | for (const auto& result : results) { | 2374 | 63 | if ( result.second == std::nullopt ) { | 2375 | 63 | continue; | 2376 | 63 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 20 | return ret; | 2382 | 20 | } |
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 | 21 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 21 | ResultSet ret; | 2372 | | | 2373 | 61 | for (const auto& result : results) { | 2374 | 61 | if ( result.second == std::nullopt ) { | 2375 | 61 | continue; | 2376 | 61 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 21 | return ret; | 2382 | 21 | } |
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 | 41 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 41 | 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 | 41 | return ret; | 2382 | 41 | } |
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 | 20 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 20 | ResultSet ret; | 2372 | | | 2373 | 63 | for (const auto& result : results) { | 2374 | 63 | if ( result.second == std::nullopt ) { | 2375 | 63 | continue; | 2376 | 63 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 20 | return ret; | 2382 | 20 | } |
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 | 159 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 159 | ResultSet ret; | 2372 | | | 2373 | 465 | for (const auto& result : results) { | 2374 | 465 | if ( result.second == std::nullopt ) { | 2375 | 399 | continue; | 2376 | 399 | } | 2377 | | | 2378 | 66 | ret.push_back(result); | 2379 | 66 | } | 2380 | | | 2381 | 159 | return ret; | 2382 | 159 | } |
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 | 298 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 298 | ResultSet ret; | 2372 | | | 2373 | 936 | for (const auto& result : results) { | 2374 | 936 | if ( result.second == std::nullopt ) { | 2375 | 933 | continue; | 2376 | 933 | } | 2377 | | | 2378 | 3 | ret.push_back(result); | 2379 | 3 | } | 2380 | | | 2381 | 298 | return ret; | 2382 | 298 | } |
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 | 414 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 414 | ResultSet ret; | 2372 | | | 2373 | 1.21k | for (const auto& result : results) { | 2374 | 1.21k | if ( result.second == std::nullopt ) { | 2375 | 1.07k | continue; | 2376 | 1.07k | } | 2377 | | | 2378 | 134 | ret.push_back(result); | 2379 | 134 | } | 2380 | | | 2381 | 414 | return ret; | 2382 | 414 | } |
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 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 19 | ResultSet ret; | 2372 | | | 2373 | 57 | for (const auto& result : results) { | 2374 | 57 | if ( result.second == std::nullopt ) { | 2375 | 57 | continue; | 2376 | 57 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 19 | return ret; | 2382 | 19 | } |
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 | 472 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 472 | ResultSet ret; | 2372 | | | 2373 | 1.34k | for (const auto& result : results) { | 2374 | 1.34k | if ( result.second == std::nullopt ) { | 2375 | 1.13k | continue; | 2376 | 1.13k | } | 2377 | | | 2378 | 214 | ret.push_back(result); | 2379 | 214 | } | 2380 | | | 2381 | 472 | return ret; | 2382 | 472 | } |
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 | 72 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 72 | ResultSet ret; | 2372 | | | 2373 | 211 | for (const auto& result : results) { | 2374 | 211 | if ( result.second == std::nullopt ) { | 2375 | 179 | continue; | 2376 | 179 | } | 2377 | | | 2378 | 32 | ret.push_back(result); | 2379 | 32 | } | 2380 | | | 2381 | 72 | return ret; | 2382 | 72 | } |
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 | 417 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 417 | ResultSet ret; | 2372 | | | 2373 | 1.07k | for (const auto& result : results) { | 2374 | 1.07k | if ( result.second == std::nullopt ) { | 2375 | 1.03k | continue; | 2376 | 1.03k | } | 2377 | | | 2378 | 45 | ret.push_back(result); | 2379 | 45 | } | 2380 | | | 2381 | 417 | return ret; | 2382 | 417 | } |
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 | 39 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 39 | ResultSet ret; | 2372 | | | 2373 | 114 | for (const auto& result : results) { | 2374 | 114 | if ( result.second == std::nullopt ) { | 2375 | 72 | continue; | 2376 | 72 | } | 2377 | | | 2378 | 42 | ret.push_back(result); | 2379 | 42 | } | 2380 | | | 2381 | 39 | return ret; | 2382 | 39 | } |
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 | 388 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 388 | ResultSet ret; | 2372 | | | 2373 | 1.10k | for (const auto& result : results) { | 2374 | 1.10k | if ( result.second == std::nullopt ) { | 2375 | 981 | continue; | 2376 | 981 | } | 2377 | | | 2378 | 121 | ret.push_back(result); | 2379 | 121 | } | 2380 | | | 2381 | 388 | return ret; | 2382 | 388 | } |
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 | 3.94k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 3.94k | ResultSet ret; | 2372 | | | 2373 | 11.3k | for (const auto& result : results) { | 2374 | 11.3k | if ( result.second == std::nullopt ) { | 2375 | 6.47k | continue; | 2376 | 6.47k | } | 2377 | | | 2378 | 4.84k | ret.push_back(result); | 2379 | 4.84k | } | 2380 | | | 2381 | 3.94k | return ret; | 2382 | 3.94k | } |
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 | 50 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 50 | 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 | 50 | return ret; | 2382 | 50 | } |
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 | 191 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 191 | ResultSet ret; | 2372 | | | 2373 | 550 | for (const auto& result : results) { | 2374 | 550 | if ( result.second == std::nullopt ) { | 2375 | 550 | continue; | 2376 | 550 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 191 | return ret; | 2382 | 191 | } |
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 | 21 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 21 | ResultSet ret; | 2372 | | | 2373 | 60 | for (const auto& result : results) { | 2374 | 60 | if ( result.second == std::nullopt ) { | 2375 | 60 | continue; | 2376 | 60 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 21 | return ret; | 2382 | 21 | } |
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 | 23 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 23 | ResultSet ret; | 2372 | | | 2373 | 69 | for (const auto& result : results) { | 2374 | 69 | if ( result.second == std::nullopt ) { | 2375 | 69 | continue; | 2376 | 69 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 23 | return ret; | 2382 | 23 | } |
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 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 19 | ResultSet ret; | 2372 | | | 2373 | 59 | for (const auto& result : results) { | 2374 | 59 | if ( result.second == std::nullopt ) { | 2375 | 59 | continue; | 2376 | 59 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 19 | return ret; | 2382 | 19 | } |
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 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 19 | ResultSet ret; | 2372 | | | 2373 | 55 | for (const auto& result : results) { | 2374 | 55 | if ( result.second == std::nullopt ) { | 2375 | 55 | continue; | 2376 | 55 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 19 | return ret; | 2382 | 19 | } |
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 | 28 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 28 | ResultSet ret; | 2372 | | | 2373 | 83 | for (const auto& result : results) { | 2374 | 83 | if ( result.second == std::nullopt ) { | 2375 | 83 | continue; | 2376 | 83 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 28 | return ret; | 2382 | 28 | } |
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 | 21 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 21 | ResultSet ret; | 2372 | | | 2373 | 63 | for (const auto& result : results) { | 2374 | 63 | if ( result.second == std::nullopt ) { | 2375 | 63 | continue; | 2376 | 63 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 21 | return ret; | 2382 | 21 | } |
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 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 19 | ResultSet ret; | 2372 | | | 2373 | 59 | for (const auto& result : results) { | 2374 | 59 | if ( result.second == std::nullopt ) { | 2375 | 59 | continue; | 2376 | 59 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 19 | return ret; | 2382 | 19 | } |
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 | 20 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 20 | ResultSet ret; | 2372 | | | 2373 | 65 | for (const auto& result : results) { | 2374 | 65 | if ( result.second == std::nullopt ) { | 2375 | 65 | continue; | 2376 | 65 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 20 | return ret; | 2382 | 20 | } |
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 | 20 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 20 | ResultSet ret; | 2372 | | | 2373 | 69 | for (const auto& result : results) { | 2374 | 69 | if ( result.second == std::nullopt ) { | 2375 | 69 | continue; | 2376 | 69 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 20 | return ret; | 2382 | 20 | } |
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 | 20 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 20 | ResultSet ret; | 2372 | | | 2373 | 63 | for (const auto& result : results) { | 2374 | 63 | if ( result.second == std::nullopt ) { | 2375 | 63 | continue; | 2376 | 63 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 20 | return ret; | 2382 | 20 | } |
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 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 19 | ResultSet ret; | 2372 | | | 2373 | 55 | for (const auto& result : results) { | 2374 | 55 | if ( result.second == std::nullopt ) { | 2375 | 55 | continue; | 2376 | 55 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 19 | return ret; | 2382 | 19 | } |
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 | 20 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 20 | ResultSet ret; | 2372 | | | 2373 | 66 | for (const auto& result : results) { | 2374 | 66 | if ( result.second == std::nullopt ) { | 2375 | 66 | continue; | 2376 | 66 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 20 | return ret; | 2382 | 20 | } |
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 | 17 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 17 | ResultSet ret; | 2372 | | | 2373 | 57 | for (const auto& result : results) { | 2374 | 57 | if ( result.second == std::nullopt ) { | 2375 | 57 | continue; | 2376 | 57 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 17 | return ret; | 2382 | 17 | } |
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 | 17 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 17 | ResultSet ret; | 2372 | | | 2373 | 49 | for (const auto& result : results) { | 2374 | 49 | if ( result.second == std::nullopt ) { | 2375 | 49 | continue; | 2376 | 49 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 17 | return ret; | 2382 | 17 | } |
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 | 17 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 17 | ResultSet ret; | 2372 | | | 2373 | 49 | for (const auto& result : results) { | 2374 | 49 | if ( result.second == std::nullopt ) { | 2375 | 49 | continue; | 2376 | 49 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 17 | return ret; | 2382 | 17 | } |
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 | 22 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 22 | ResultSet ret; | 2372 | | | 2373 | 60 | for (const auto& result : results) { | 2374 | 60 | if ( result.second == std::nullopt ) { | 2375 | 60 | continue; | 2376 | 60 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 22 | return ret; | 2382 | 22 | } |
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 | 42 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 42 | 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 | 42 | return ret; | 2382 | 42 | } |
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 | 17 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 17 | ResultSet ret; | 2372 | | | 2373 | 53 | for (const auto& result : results) { | 2374 | 53 | if ( result.second == std::nullopt ) { | 2375 | 53 | continue; | 2376 | 53 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 17 | return ret; | 2382 | 17 | } |
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 | 17 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 17 | ResultSet ret; | 2372 | | | 2373 | 52 | for (const auto& result : results) { | 2374 | 52 | if ( result.second == std::nullopt ) { | 2375 | 52 | continue; | 2376 | 52 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 17 | return ret; | 2382 | 17 | } |
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 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 19 | ResultSet ret; | 2372 | | | 2373 | 56 | for (const auto& result : results) { | 2374 | 56 | if ( result.second == std::nullopt ) { | 2375 | 56 | continue; | 2376 | 56 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 19 | return ret; | 2382 | 19 | } |
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 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 19 | ResultSet ret; | 2372 | | | 2373 | 56 | for (const auto& result : results) { | 2374 | 56 | if ( result.second == std::nullopt ) { | 2375 | 56 | continue; | 2376 | 56 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 19 | return ret; | 2382 | 19 | } |
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 | 16 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 16 | ResultSet ret; | 2372 | | | 2373 | 45 | for (const auto& result : results) { | 2374 | 45 | if ( result.second == std::nullopt ) { | 2375 | 45 | continue; | 2376 | 45 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 16 | return ret; | 2382 | 16 | } |
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 | 34 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 34 | ResultSet ret; | 2372 | | | 2373 | 93 | for (const auto& result : results) { | 2374 | 93 | if ( result.second == std::nullopt ) { | 2375 | 93 | continue; | 2376 | 93 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 34 | return ret; | 2382 | 34 | } |
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 | 21 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 21 | ResultSet ret; | 2372 | | | 2373 | 67 | for (const auto& result : results) { | 2374 | 67 | if ( result.second == std::nullopt ) { | 2375 | 67 | continue; | 2376 | 67 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 21 | return ret; | 2382 | 21 | } |
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 | 40 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 40 | ResultSet ret; | 2372 | | | 2373 | 116 | for (const auto& result : results) { | 2374 | 116 | if ( result.second == std::nullopt ) { | 2375 | 116 | continue; | 2376 | 116 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 40 | return ret; | 2382 | 40 | } |
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 | 25 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 25 | ResultSet ret; | 2372 | | | 2373 | 65 | for (const auto& result : results) { | 2374 | 65 | if ( result.second == std::nullopt ) { | 2375 | 65 | continue; | 2376 | 65 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 25 | return ret; | 2382 | 25 | } |
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 | 39 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 39 | ResultSet ret; | 2372 | | | 2373 | 105 | for (const auto& result : results) { | 2374 | 105 | if ( result.second == std::nullopt ) { | 2375 | 105 | continue; | 2376 | 105 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 39 | return ret; | 2382 | 39 | } |
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 | 27 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 27 | ResultSet ret; | 2372 | | | 2373 | 74 | for (const auto& result : results) { | 2374 | 74 | if ( result.second == std::nullopt ) { | 2375 | 74 | continue; | 2376 | 74 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 27 | return ret; | 2382 | 27 | } |
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 | 43 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 43 | 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 | 43 | return ret; | 2382 | 43 | } |
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 | 28 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 28 | ResultSet ret; | 2372 | | | 2373 | 74 | for (const auto& result : results) { | 2374 | 74 | if ( result.second == std::nullopt ) { | 2375 | 74 | continue; | 2376 | 74 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 28 | return ret; | 2382 | 28 | } |
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 | 50 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 50 | ResultSet ret; | 2372 | | | 2373 | 141 | for (const auto& result : results) { | 2374 | 141 | if ( result.second == std::nullopt ) { | 2375 | 141 | continue; | 2376 | 141 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 50 | return ret; | 2382 | 50 | } |
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 | 18 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 18 | ResultSet ret; | 2372 | | | 2373 | 55 | for (const auto& result : results) { | 2374 | 55 | if ( result.second == std::nullopt ) { | 2375 | 55 | continue; | 2376 | 55 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 18 | return ret; | 2382 | 18 | } |
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 | 20 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 20 | ResultSet ret; | 2372 | | | 2373 | 67 | for (const auto& result : results) { | 2374 | 67 | if ( result.second == std::nullopt ) { | 2375 | 67 | continue; | 2376 | 67 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 20 | return ret; | 2382 | 20 | } |
|
2383 | | |
2384 | | /* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */ |
2385 | | template <> |
2386 | 2.51k | 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 | 2.51k | (void)operations; |
2388 | 2.51k | (void)results; |
2389 | 2.51k | (void)data; |
2390 | 2.51k | (void)size; |
2391 | 2.51k | } |
2392 | | |
2393 | | template <class ResultType, class OperationType> |
2394 | 1.15k | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { |
2395 | 1.15k | (void)operation; |
2396 | | |
2397 | 1.15k | return false; |
2398 | 1.15k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest 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 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const Line | Count | Source | 2394 | 51 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 51 | (void)operation; | 2396 | | | 2397 | 51 | return false; | 2398 | 51 | } |
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 | 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_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const 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 Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::dontCompare(cryptofuzz::operation::KDF_BCRYPT const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const 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 | 209 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 209 | (void)operation; | 2396 | | | 2397 | 209 | return false; | 2398 | 209 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const Line | Count | Source | 2394 | 102 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 102 | (void)operation; | 2396 | | | 2397 | 102 | return false; | 2398 | 102 | } |
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 | 405 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 405 | (void)operation; | 2396 | | | 2397 | 405 | return false; | 2398 | 405 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const 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 Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::dontCompare(cryptofuzz::operation::ECDSA_Recover const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const 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 cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::dontCompare(cryptofuzz::operation::ECDH_Derive const&) const Line | Count | Source | 2394 | 19 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 19 | (void)operation; | 2396 | | | 2397 | 19 | return false; | 2398 | 19 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::dontCompare(cryptofuzz::operation::ECIES_Encrypt const&) const cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::dontCompare(cryptofuzz::operation::ECIES_Decrypt const&) const Line | Count | Source | 2394 | 1 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 1 | (void)operation; | 2396 | | | 2397 | 1 | return false; | 2398 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::dontCompare(cryptofuzz::operation::ECC_Point_Add const&) const Line | Count | Source | 2394 | 43 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 43 | (void)operation; | 2396 | | | 2397 | 43 | return false; | 2398 | 43 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::dontCompare(cryptofuzz::operation::ECC_Point_Sub const&) const cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const Line | Count | Source | 2394 | 69 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 69 | (void)operation; | 2396 | | | 2397 | 69 | return false; | 2398 | 69 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const Line | Count | Source | 2394 | 10 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 10 | (void)operation; | 2396 | | | 2397 | 10 | return false; | 2398 | 10 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const Line | Count | Source | 2394 | 16 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 16 | (void)operation; | 2396 | | | 2397 | 16 | return false; | 2398 | 16 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const Line | Count | Source | 2394 | 13 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 13 | (void)operation; | 2396 | | | 2397 | 13 | return false; | 2398 | 13 | } |
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 | 38 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 38 | (void)operation; | 2396 | | | 2397 | 38 | return false; | 2398 | 38 | } |
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 | 1.54k | bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const { |
2402 | 1.54k | if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; } |
2403 | 1.53k | if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; } |
2404 | 1.53k | if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; } |
2405 | 1.45k | if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; } |
2406 | | |
2407 | 1.45k | return false; |
2408 | 1.45k | } |
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 | 694 | bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const { |
2418 | 694 | if ( |
2419 | 694 | operation.curveType.Get() != CF_ECC_CURVE("ed25519") && |
2420 | 694 | operation.curveType.Get() != CF_ECC_CURVE("ed448") ) { |
2421 | 378 | if ( operation.UseRandomNonce() ) { |
2422 | | /* Don't compare ECDSA signatures comptued from a randomly generated nonce */ |
2423 | 273 | return true; |
2424 | 273 | } |
2425 | 378 | } |
2426 | | |
2427 | 421 | return false; |
2428 | 694 | } |
2429 | | |
2430 | | template <> |
2431 | 0 | bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const { |
2432 | 0 | if ( |
2433 | 0 | operation.curveType.Get() != CF_ECC_CURVE("ed25519") && |
2434 | 0 | operation.curveType.Get() != CF_ECC_CURVE("ed448") ) { |
2435 | 0 | if ( operation.UseRandomNonce() ) { |
2436 | | /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */ |
2437 | 0 | return true; |
2438 | 0 | } |
2439 | 0 | } |
2440 | | |
2441 | 0 | return false; |
2442 | 0 | } |
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 | 237 | bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const { |
2461 | 237 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; } |
2462 | | |
2463 | 237 | return false; |
2464 | 237 | } |
2465 | | |
2466 | | template <> |
2467 | 30 | bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const { |
2468 | 30 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true; |
2469 | | |
2470 | 30 | return false; |
2471 | 30 | } |
2472 | | |
2473 | | template <> |
2474 | 37 | bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const { |
2475 | 37 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true; |
2476 | | |
2477 | 37 | return false; |
2478 | 37 | } |
2479 | | |
2480 | | template <> |
2481 | 92 | bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const { |
2482 | 92 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true; |
2483 | | |
2484 | 91 | return false; |
2485 | 92 | } |
2486 | | |
2487 | | template <class ResultType, class OperationType> |
2488 | 42.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 | 42.9k | if ( results.size() < 2 ) { |
2490 | | /* Nothing to compare. Don't even bother filtering. */ |
2491 | 30.4k | return; |
2492 | 30.4k | } |
2493 | | |
2494 | 12.4k | const auto filtered = filter(results); |
2495 | | |
2496 | 12.4k | if ( filtered.size() < 2 ) { |
2497 | | /* Nothing to compare */ |
2498 | 8.67k | return; |
2499 | 8.67k | } |
2500 | | |
2501 | 3.78k | if ( dontCompare(operations[0].second) == true ) { |
2502 | 362 | return; |
2503 | 362 | } |
2504 | | |
2505 | 10.7k | for (size_t i = 1; i < filtered.size(); i++) { |
2506 | 7.32k | const std::optional<ResultType>& prev = filtered[i-1].second; |
2507 | 7.32k | const std::optional<ResultType>& cur = filtered[i].second; |
2508 | | |
2509 | 7.32k | const bool equal = *prev == *cur; |
2510 | | |
2511 | 7.32k | 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 | 7.32k | } |
2528 | 3.42k | } 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 | 322 | 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 | 322 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 170 | return; | 2492 | 170 | } | 2493 | | | 2494 | 152 | const auto filtered = filter(results); | 2495 | | | 2496 | 152 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 34 | return; | 2499 | 34 | } | 2500 | | | 2501 | 118 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 445 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 327 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 327 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 327 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 327 | 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 | 327 | } | 2528 | 118 | } |
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 | 218 | 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 | 218 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 59 | return; | 2492 | 59 | } | 2493 | | | 2494 | 159 | const auto filtered = filter(results); | 2495 | | | 2496 | 159 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 67 | return; | 2499 | 67 | } | 2500 | | | 2501 | 92 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 1 | return; | 2503 | 1 | } | 2504 | | | 2505 | 342 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 251 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 251 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 251 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 251 | 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 | 251 | } | 2528 | 91 | } |
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 | 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 | 1 | return; | 2492 | 1 | } | 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::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 | 175 | 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 | 175 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 73 | return; | 2492 | 73 | } | 2493 | | | 2494 | 102 | const auto filtered = filter(results); | 2495 | | | 2496 | 102 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 65 | return; | 2499 | 65 | } | 2500 | | | 2501 | 37 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 208 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 171 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 171 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 171 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 171 | 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 | 171 | } | 2528 | 37 | } |
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 | 882 | 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 | 882 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 430 | return; | 2492 | 430 | } | 2493 | | | 2494 | 452 | const auto filtered = filter(results); | 2495 | | | 2496 | 452 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 215 | return; | 2499 | 215 | } | 2500 | | | 2501 | 237 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 1.10k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 867 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 867 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 867 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 867 | 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 | 867 | } | 2528 | 237 | } |
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 | 369 | 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 | 369 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 164 | return; | 2492 | 164 | } | 2493 | | | 2494 | 205 | const auto filtered = filter(results); | 2495 | | | 2496 | 205 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 175 | return; | 2499 | 175 | } | 2500 | | | 2501 | 30 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 162 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 132 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 132 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 132 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 132 | 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 | 132 | } | 2528 | 30 | } |
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 | 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 | 1 | return; | 2492 | 1 | } | 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::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 | 335 | 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 | 335 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 216 | return; | 2492 | 216 | } | 2493 | | | 2494 | 119 | const auto filtered = filter(results); | 2495 | | | 2496 | 119 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 68 | return; | 2499 | 68 | } | 2500 | | | 2501 | 51 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 211 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 160 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 160 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 160 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 160 | 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 | 160 | } | 2528 | 51 | } |
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 | 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 | 2 | return; | 2492 | 2 | } | 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::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 | 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 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 26 | const auto filtered = filter(results); | 2495 | | | 2496 | 26 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 26 | return; | 2499 | 26 | } | 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 | 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 | 2 | return; | 2492 | 2 | } | 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::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 | 218 | 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 | 218 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 127 | return; | 2492 | 127 | } | 2493 | | | 2494 | 91 | const auto filtered = filter(results); | 2495 | | | 2496 | 91 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 33 | return; | 2499 | 33 | } | 2500 | | | 2501 | 58 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 303 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 245 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 245 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 245 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 245 | 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 | 245 | } | 2528 | 58 | } |
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 | 13 | 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 | 13 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 12 | const auto filtered = filter(results); | 2495 | | | 2496 | 12 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 12 | return; | 2499 | 12 | } | 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_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 | 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 | 1 | return; | 2492 | 1 | } | 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::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 | 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 | 2 | return; | 2492 | 2 | } | 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::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 | 10 | 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 | 10 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 9 | const auto filtered = filter(results); | 2495 | | | 2496 | 9 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 9 | return; | 2499 | 9 | } | 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_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 | 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 | 2 | return; | 2492 | 2 | } | 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<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 | 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 | 1 | return; | 2492 | 1 | } | 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<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 | 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 | 1 | return; | 2492 | 1 | } | 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_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 | 2.97k | 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.97k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 2.36k | return; | 2492 | 2.36k | } | 2493 | | | 2494 | 608 | const auto filtered = filter(results); | 2495 | | | 2496 | 608 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 399 | return; | 2499 | 399 | } | 2500 | | | 2501 | 209 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 580 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 371 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 371 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 371 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 371 | 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 | 371 | } | 2528 | 209 | } |
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 | 1.66k | 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.66k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1.24k | return; | 2492 | 1.24k | } | 2493 | | | 2494 | 417 | const auto filtered = filter(results); | 2495 | | | 2496 | 417 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 315 | return; | 2499 | 315 | } | 2500 | | | 2501 | 102 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 334 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 232 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 232 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 232 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 232 | 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 | 232 | } | 2528 | 102 | } |
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 | 188 | 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 | 188 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 35 | return; | 2492 | 35 | } | 2493 | | | 2494 | 153 | const auto filtered = filter(results); | 2495 | | | 2496 | 153 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 153 | return; | 2499 | 153 | } | 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 | 2.41k | 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.41k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1.23k | return; | 2492 | 1.23k | } | 2493 | | | 2494 | 1.18k | const auto filtered = filter(results); | 2495 | | | 2496 | 1.18k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 492 | return; | 2499 | 492 | } | 2500 | | | 2501 | 694 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 273 | return; | 2503 | 273 | } | 2504 | | | 2505 | 1.24k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 827 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 827 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 827 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 827 | 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 | 827 | } | 2528 | 421 | } |
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 | 24 | 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 | 24 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 3 | return; | 2492 | 3 | } | 2493 | | | 2494 | 21 | const auto filtered = filter(results); | 2495 | | | 2496 | 21 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 21 | return; | 2499 | 21 | } | 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::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 | 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 | 6 | return; | 2492 | 6 | } | 2493 | | | 2494 | 23 | const auto filtered = filter(results); | 2495 | | | 2496 | 23 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 23 | return; | 2499 | 23 | } | 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 | 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 | 4 | return; | 2492 | 4 | } | 2493 | | | 2494 | 23 | const auto filtered = filter(results); | 2495 | | | 2496 | 23 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 23 | return; | 2499 | 23 | } | 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 | 123 | 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 | 123 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 18 | return; | 2492 | 18 | } | 2493 | | | 2494 | 105 | const auto filtered = filter(results); | 2495 | | | 2496 | 105 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 105 | return; | 2499 | 105 | } | 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 | 2.53k | 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.53k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1.60k | return; | 2492 | 1.60k | } | 2493 | | | 2494 | 933 | const auto filtered = filter(results); | 2495 | | | 2496 | 933 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 528 | return; | 2499 | 528 | } | 2500 | | | 2501 | 405 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 1.10k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 699 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 699 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 699 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 699 | 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 | 699 | } | 2528 | 405 | } |
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 | 17 | 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 | 17 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 16 | const auto filtered = filter(results); | 2495 | | | 2496 | 16 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 16 | return; | 2499 | 16 | } | 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::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 | 17 | 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 | 17 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 16 | const auto filtered = filter(results); | 2495 | | | 2496 | 16 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 16 | return; | 2499 | 16 | } | 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 | 22 | 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 | 22 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 2 | return; | 2492 | 2 | } | 2493 | | | 2494 | 20 | const auto filtered = filter(results); | 2495 | | | 2496 | 20 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 20 | return; | 2499 | 20 | } | 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 | 23 | 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 | 23 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 2 | return; | 2492 | 2 | } | 2493 | | | 2494 | 21 | const auto filtered = filter(results); | 2495 | | | 2496 | 21 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 21 | return; | 2499 | 21 | } | 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::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 | 54 | 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 | 54 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 13 | return; | 2492 | 13 | } | 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::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 | 21 | 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 | 21 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 20 | const auto filtered = filter(results); | 2495 | | | 2496 | 20 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 20 | return; | 2499 | 20 | } | 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 | 224 | 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 | 224 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 65 | return; | 2492 | 65 | } | 2493 | | | 2494 | 159 | const auto filtered = filter(results); | 2495 | | | 2496 | 159 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 140 | return; | 2499 | 140 | } | 2500 | | | 2501 | 19 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 55 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 36 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 36 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 36 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 36 | 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 | 36 | } | 2528 | 19 | } |
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 | 390 | 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 | 390 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 92 | return; | 2492 | 92 | } | 2493 | | | 2494 | 298 | const auto filtered = filter(results); | 2495 | | | 2496 | 298 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 297 | return; | 2499 | 297 | } | 2500 | | | 2501 | 1 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 2 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 1 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 1 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 1 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 1 | 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 | } | 2528 | 1 | } |
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 | 736 | 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 | 736 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 322 | return; | 2492 | 322 | } | 2493 | | | 2494 | 414 | const auto filtered = filter(results); | 2495 | | | 2496 | 414 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 371 | return; | 2499 | 371 | } | 2500 | | | 2501 | 43 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 126 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 83 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 83 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 83 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 83 | 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 | 83 | } | 2528 | 43 | } |
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 | 20 | 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 | 20 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 19 | const auto filtered = filter(results); | 2495 | | | 2496 | 19 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 19 | return; | 2499 | 19 | } | 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_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 | 1.36k | 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.36k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 891 | return; | 2492 | 891 | } | 2493 | | | 2494 | 472 | const auto filtered = filter(results); | 2495 | | | 2496 | 472 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 403 | return; | 2499 | 403 | } | 2500 | | | 2501 | 69 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 205 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 136 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 136 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 136 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 136 | 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 | 136 | } | 2528 | 69 | } |
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 | 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 | 89 | return; | 2492 | 89 | } | 2493 | | | 2494 | 72 | const auto filtered = filter(results); | 2495 | | | 2496 | 72 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 62 | return; | 2499 | 62 | } | 2500 | | | 2501 | 10 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 32 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 22 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 22 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 22 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 22 | 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 | 22 | } | 2528 | 10 | } |
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 | 1.61k | 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.61k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1.19k | return; | 2492 | 1.19k | } | 2493 | | | 2494 | 417 | const auto filtered = filter(results); | 2495 | | | 2496 | 417 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 401 | return; | 2499 | 401 | } | 2500 | | | 2501 | 16 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 38 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 22 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 22 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 22 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 22 | 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 | 22 | } | 2528 | 16 | } |
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 | 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 | 12 | return; | 2492 | 12 | } | 2493 | | | 2494 | 39 | const auto filtered = filter(results); | 2495 | | | 2496 | 39 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 26 | return; | 2499 | 26 | } | 2500 | | | 2501 | 13 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 42 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 29 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 29 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 29 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 29 | 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 | 29 | } | 2528 | 13 | } |
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 | 788 | 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 | 788 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 400 | return; | 2492 | 400 | } | 2493 | | | 2494 | 388 | const auto filtered = filter(results); | 2495 | | | 2496 | 388 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 350 | return; | 2499 | 350 | } | 2500 | | | 2501 | 38 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 109 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 71 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 71 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 71 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 71 | 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 | 71 | } | 2528 | 38 | } |
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 | 23.0k | 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 | 23.0k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 19.1k | return; | 2492 | 19.1k | } | 2493 | | | 2494 | 3.94k | const auto filtered = filter(results); | 2495 | | | 2496 | 3.94k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 2.39k | return; | 2499 | 2.39k | } | 2500 | | | 2501 | 1.54k | if ( dontCompare(operations[0].second) == true ) { | 2502 | 88 | return; | 2503 | 88 | } | 2504 | | | 2505 | 4.09k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 2.63k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 2.63k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 2.63k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 2.63k | 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.63k | } | 2528 | 1.45k | } |
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 | 80 | 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 | 80 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 30 | return; | 2492 | 30 | } | 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::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 | 336 | 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 | 336 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 145 | return; | 2492 | 145 | } | 2493 | | | 2494 | 191 | const auto filtered = filter(results); | 2495 | | | 2496 | 191 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 191 | return; | 2499 | 191 | } | 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 | 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 | 16 | return; | 2492 | 16 | } | 2493 | | | 2494 | 21 | const auto filtered = filter(results); | 2495 | | | 2496 | 21 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 21 | return; | 2499 | 21 | } | 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 | 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 | 5 | return; | 2492 | 5 | } | 2493 | | | 2494 | 23 | const auto filtered = filter(results); | 2495 | | | 2496 | 23 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 23 | return; | 2499 | 23 | } | 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 | 23 | 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 | 23 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 4 | return; | 2492 | 4 | } | 2493 | | | 2494 | 19 | const auto filtered = filter(results); | 2495 | | | 2496 | 19 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 19 | return; | 2499 | 19 | } | 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 | 22 | 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 | 22 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 3 | return; | 2492 | 3 | } | 2493 | | | 2494 | 19 | const auto filtered = filter(results); | 2495 | | | 2496 | 19 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 19 | return; | 2499 | 19 | } | 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 | 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 | 5 | return; | 2492 | 5 | } | 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<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 | 23 | 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 | 23 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 2 | return; | 2492 | 2 | } | 2493 | | | 2494 | 21 | const auto filtered = filter(results); | 2495 | | | 2496 | 21 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 21 | return; | 2499 | 21 | } | 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 | 22 | 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 | 22 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 3 | return; | 2492 | 3 | } | 2493 | | | 2494 | 19 | const auto filtered = filter(results); | 2495 | | | 2496 | 19 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 19 | return; | 2499 | 19 | } | 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 | 21 | 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 | 21 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 20 | const auto filtered = filter(results); | 2495 | | | 2496 | 20 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 20 | return; | 2499 | 20 | } | 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 | 21 | 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 | 21 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 20 | const auto filtered = filter(results); | 2495 | | | 2496 | 20 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 20 | return; | 2499 | 20 | } | 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 | 22 | 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 | 22 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 2 | return; | 2492 | 2 | } | 2493 | | | 2494 | 20 | const auto filtered = filter(results); | 2495 | | | 2496 | 20 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 20 | return; | 2499 | 20 | } | 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 | 20 | 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 | 20 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 19 | const auto filtered = filter(results); | 2495 | | | 2496 | 19 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 19 | return; | 2499 | 19 | } | 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 | 21 | 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 | 21 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 20 | const auto filtered = filter(results); | 2495 | | | 2496 | 20 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 20 | return; | 2499 | 20 | } | 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 | 18 | 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 | 18 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 17 | const auto filtered = filter(results); | 2495 | | | 2496 | 17 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 17 | return; | 2499 | 17 | } | 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 | 18 | 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 | 18 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 17 | const auto filtered = filter(results); | 2495 | | | 2496 | 17 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 17 | return; | 2499 | 17 | } | 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 | 18 | 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 | 18 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 17 | const auto filtered = filter(results); | 2495 | | | 2496 | 17 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 17 | return; | 2499 | 17 | } | 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 | 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 | 18 | return; | 2492 | 18 | } | 2493 | | | 2494 | 22 | const auto filtered = filter(results); | 2495 | | | 2496 | 22 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 22 | return; | 2499 | 22 | } | 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 | 77 | 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 | 77 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 35 | return; | 2492 | 35 | } | 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<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 | 18 | 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 | 18 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 17 | const auto filtered = filter(results); | 2495 | | | 2496 | 17 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 17 | return; | 2499 | 17 | } | 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 | 18 | 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 | 18 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 17 | const auto filtered = filter(results); | 2495 | | | 2496 | 17 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 17 | return; | 2499 | 17 | } | 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 | 20 | 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 | 20 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 19 | const auto filtered = filter(results); | 2495 | | | 2496 | 19 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 19 | return; | 2499 | 19 | } | 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 | 20 | 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 | 20 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 19 | const auto filtered = filter(results); | 2495 | | | 2496 | 19 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 19 | return; | 2499 | 19 | } | 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 | 17 | 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 | 17 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 16 | const auto filtered = filter(results); | 2495 | | | 2496 | 16 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 16 | return; | 2499 | 16 | } | 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 | 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 | 41 | return; | 2492 | 41 | } | 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_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 | 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 | 10 | return; | 2492 | 10 | } | 2493 | | | 2494 | 21 | const auto filtered = filter(results); | 2495 | | | 2496 | 21 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 21 | return; | 2499 | 21 | } | 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 | 68 | 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 | 68 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 28 | return; | 2492 | 28 | } | 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 | } |
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 | 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 | 13 | return; | 2492 | 13 | } | 2493 | | | 2494 | 25 | const auto filtered = filter(results); | 2495 | | | 2496 | 25 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 25 | return; | 2499 | 25 | } | 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 | 63 | 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 | 63 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 24 | return; | 2492 | 24 | } | 2493 | | | 2494 | 39 | const auto filtered = filter(results); | 2495 | | | 2496 | 39 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 39 | return; | 2499 | 39 | } | 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 | 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 | 22 | return; | 2492 | 22 | } | 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<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 | 90 | 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 | 90 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 47 | return; | 2492 | 47 | } | 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::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 | 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 | 29 | return; | 2492 | 29 | } | 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::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 | 69 | 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 | 69 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 19 | return; | 2492 | 19 | } | 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::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 | 19 | 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 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 18 | const auto filtered = filter(results); | 2495 | | | 2496 | 18 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 18 | return; | 2499 | 18 | } | 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 | 23 | 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 | 23 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 3 | return; | 2492 | 3 | } | 2493 | | | 2494 | 20 | const auto filtered = filter(results); | 2495 | | | 2496 | 20 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 20 | return; | 2499 | 20 | } | 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 | 86.7k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { |
2550 | 86.7k | (void)parentDs; |
2551 | 86.7k | return op; |
2552 | 86.7k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const Line | Count | Source | 2549 | 1.18k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.18k | (void)parentDs; | 2551 | 1.18k | return op; | 2552 | 1.18k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const Line | Count | Source | 2549 | 1.05k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.05k | (void)parentDs; | 2551 | 1.05k | return op; | 2552 | 1.05k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const Line | Count | Source | 2549 | 314 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 314 | (void)parentDs; | 2551 | 314 | return op; | 2552 | 314 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const Line | Count | Source | 2549 | 828 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 828 | (void)parentDs; | 2551 | 828 | return op; | 2552 | 828 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) 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::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) 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::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const Line | Count | Source | 2549 | 358 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 358 | (void)parentDs; | 2551 | 358 | return op; | 2552 | 358 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const Line | Count | Source | 2549 | 1.07k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.07k | (void)parentDs; | 2551 | 1.07k | return op; | 2552 | 1.07k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const Line | Count | Source | 2549 | 336 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 336 | (void)parentDs; | 2551 | 336 | return op; | 2552 | 336 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const Line | Count | Source | 2549 | 349 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 349 | (void)parentDs; | 2551 | 349 | return op; | 2552 | 349 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const Line | Count | Source | 2549 | 399 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 399 | (void)parentDs; | 2551 | 399 | return op; | 2552 | 399 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const Line | Count | Source | 2549 | 887 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 887 | (void)parentDs; | 2551 | 887 | return op; | 2552 | 887 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const Line | Count | Source | 2549 | 54 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 54 | (void)parentDs; | 2551 | 54 | return op; | 2552 | 54 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const Line | Count | Source | 2549 | 348 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 348 | (void)parentDs; | 2551 | 348 | return op; | 2552 | 348 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const Line | Count | Source | 2549 | 391 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 391 | (void)parentDs; | 2551 | 391 | return op; | 2552 | 391 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const Line | Count | Source | 2549 | 31 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 31 | (void)parentDs; | 2551 | 31 | return op; | 2552 | 31 | } |
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 | 397 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 397 | (void)parentDs; | 2551 | 397 | return op; | 2552 | 397 | } |
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 | 383 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 383 | (void)parentDs; | 2551 | 383 | return op; | 2552 | 383 | } |
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 | 423 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 423 | (void)parentDs; | 2551 | 423 | return op; | 2552 | 423 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const Line | Count | Source | 2549 | 4.38k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.38k | (void)parentDs; | 2551 | 4.38k | return op; | 2552 | 4.38k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const Line | Count | Source | 2549 | 2.71k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.71k | (void)parentDs; | 2551 | 2.71k | return op; | 2552 | 2.71k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const Line | Count | Source | 2549 | 3.83k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.83k | (void)parentDs; | 2551 | 3.83k | return op; | 2552 | 3.83k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const Line | Count | Source | 2549 | 699 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 699 | (void)parentDs; | 2551 | 699 | return op; | 2552 | 699 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const Line | Count | Source | 2549 | 5.05k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 5.05k | (void)parentDs; | 2551 | 5.05k | return op; | 2552 | 5.05k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const Line | Count | Source | 2549 | 111 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 111 | (void)parentDs; | 2551 | 111 | return op; | 2552 | 111 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const Line | Count | Source | 2549 | 118 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 118 | (void)parentDs; | 2551 | 118 | return op; | 2552 | 118 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const Line | Count | Source | 2549 | 112 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 112 | (void)parentDs; | 2551 | 112 | return op; | 2552 | 112 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const Line | Count | Source | 2549 | 626 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 626 | (void)parentDs; | 2551 | 626 | return op; | 2552 | 626 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const Line | Count | Source | 2549 | 4.42k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.42k | (void)parentDs; | 2551 | 4.42k | return op; | 2552 | 4.42k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const Line | Count | Source | 2549 | 88 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 88 | (void)parentDs; | 2551 | 88 | return op; | 2552 | 88 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const Line | Count | Source | 2549 | 84 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 84 | (void)parentDs; | 2551 | 84 | return op; | 2552 | 84 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const Line | Count | Source | 2549 | 93 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 93 | (void)parentDs; | 2551 | 93 | return op; | 2552 | 93 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const Line | Count | Source | 2549 | 101 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 101 | (void)parentDs; | 2551 | 101 | return op; | 2552 | 101 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const Line | Count | Source | 2549 | 189 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 189 | (void)parentDs; | 2551 | 189 | return op; | 2552 | 189 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const Line | Count | Source | 2549 | 117 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 117 | (void)parentDs; | 2551 | 117 | return op; | 2552 | 117 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const Line | Count | Source | 2549 | 98 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 98 | (void)parentDs; | 2551 | 98 | return op; | 2552 | 98 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const Line | Count | Source | 2549 | 107 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 107 | (void)parentDs; | 2551 | 107 | return op; | 2552 | 107 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const Line | Count | Source | 2549 | 163 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 163 | (void)parentDs; | 2551 | 163 | return op; | 2552 | 163 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const Line | Count | Source | 2549 | 736 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 736 | (void)parentDs; | 2551 | 736 | return op; | 2552 | 736 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const Line | Count | Source | 2549 | 1.13k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.13k | (void)parentDs; | 2551 | 1.13k | return op; | 2552 | 1.13k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const Line | Count | Source | 2549 | 1.28k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.28k | (void)parentDs; | 2551 | 1.28k | return op; | 2552 | 1.28k | } |
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.81k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.81k | (void)parentDs; | 2551 | 1.81k | return op; | 2552 | 1.81k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const Line | Count | Source | 2549 | 98 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 98 | (void)parentDs; | 2551 | 98 | return op; | 2552 | 98 | } |
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.46k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.46k | (void)parentDs; | 2551 | 2.46k | return op; | 2552 | 2.46k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const Line | Count | Source | 2549 | 344 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 344 | (void)parentDs; | 2551 | 344 | return op; | 2552 | 344 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) 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<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const Line | Count | Source | 2549 | 174 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 174 | (void)parentDs; | 2551 | 174 | return op; | 2552 | 174 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const Line | Count | Source | 2549 | 2.07k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.07k | (void)parentDs; | 2551 | 2.07k | return op; | 2552 | 2.07k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const Line | Count | Source | 2549 | 1.75k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.75k | (void)parentDs; | 2551 | 1.75k | return op; | 2552 | 1.75k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const Line | Count | Source | 2549 | 30.5k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 30.5k | (void)parentDs; | 2551 | 30.5k | return op; | 2552 | 30.5k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const Line | Count | Source | 2549 | 234 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 234 | (void)parentDs; | 2551 | 234 | return op; | 2552 | 234 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const Line | Count | Source | 2549 | 733 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 733 | (void)parentDs; | 2551 | 733 | return op; | 2552 | 733 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const Line | Count | Source | 2549 | 132 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 132 | (void)parentDs; | 2551 | 132 | return op; | 2552 | 132 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const Line | Count | Source | 2549 | 135 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 135 | (void)parentDs; | 2551 | 135 | return op; | 2552 | 135 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const Line | Count | Source | 2549 | 114 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 114 | (void)parentDs; | 2551 | 114 | return op; | 2552 | 114 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const Line | Count | Source | 2549 | 98 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 98 | (void)parentDs; | 2551 | 98 | return op; | 2552 | 98 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const Line | Count | Source | 2549 | 196 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 196 | (void)parentDs; | 2551 | 196 | return op; | 2552 | 196 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const Line | Count | Source | 2549 | 142 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 142 | (void)parentDs; | 2551 | 142 | return op; | 2552 | 142 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const Line | Count | Source | 2549 | 145 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 145 | (void)parentDs; | 2551 | 145 | return op; | 2552 | 145 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const Line | Count | Source | 2549 | 140 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 140 | (void)parentDs; | 2551 | 140 | return op; | 2552 | 140 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const Line | Count | Source | 2549 | 127 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 127 | (void)parentDs; | 2551 | 127 | return op; | 2552 | 127 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const Line | Count | Source | 2549 | 111 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 111 | (void)parentDs; | 2551 | 111 | return op; | 2552 | 111 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const Line | Count | Source | 2549 | 143 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 143 | (void)parentDs; | 2551 | 143 | return op; | 2552 | 143 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const Line | Count | Source | 2549 | 121 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 121 | (void)parentDs; | 2551 | 121 | return op; | 2552 | 121 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const Line | Count | Source | 2549 | 96 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 96 | (void)parentDs; | 2551 | 96 | return op; | 2552 | 96 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const Line | Count | Source | 2549 | 89 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 89 | (void)parentDs; | 2551 | 89 | return op; | 2552 | 89 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const Line | Count | Source | 2549 | 85 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 85 | (void)parentDs; | 2551 | 85 | return op; | 2552 | 85 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const Line | Count | Source | 2549 | 113 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 113 | (void)parentDs; | 2551 | 113 | return op; | 2552 | 113 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const Line | Count | Source | 2549 | 185 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 185 | (void)parentDs; | 2551 | 185 | return op; | 2552 | 185 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const Line | Count | Source | 2549 | 100 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 100 | (void)parentDs; | 2551 | 100 | return op; | 2552 | 100 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const Line | Count | Source | 2549 | 108 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 108 | (void)parentDs; | 2551 | 108 | return op; | 2552 | 108 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const Line | Count | Source | 2549 | 105 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 105 | (void)parentDs; | 2551 | 105 | return op; | 2552 | 105 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const Line | Count | Source | 2549 | 106 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 106 | (void)parentDs; | 2551 | 106 | return op; | 2552 | 106 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const Line | Count | Source | 2549 | 88 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 88 | (void)parentDs; | 2551 | 88 | return op; | 2552 | 88 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const Line | Count | Source | 2549 | 173 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 173 | (void)parentDs; | 2551 | 173 | return op; | 2552 | 173 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const Line | Count | Source | 2549 | 121 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 121 | (void)parentDs; | 2551 | 121 | return op; | 2552 | 121 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const Line | Count | Source | 2549 | 191 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 191 | (void)parentDs; | 2551 | 191 | return op; | 2552 | 191 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const Line | Count | Source | 2549 | 134 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 134 | (void)parentDs; | 2551 | 134 | return op; | 2552 | 134 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const Line | Count | Source | 2549 | 177 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 177 | (void)parentDs; | 2551 | 177 | return op; | 2552 | 177 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const Line | Count | Source | 2549 | 150 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 150 | (void)parentDs; | 2551 | 150 | return op; | 2552 | 150 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const Line | Count | Source | 2549 | 222 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 222 | (void)parentDs; | 2551 | 222 | return op; | 2552 | 222 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const Line | Count | Source | 2549 | 153 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 153 | (void)parentDs; | 2551 | 153 | return op; | 2552 | 153 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const Line | Count | Source | 2549 | 257 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 257 | (void)parentDs; | 2551 | 257 | return op; | 2552 | 257 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const Line | Count | Source | 2549 | 117 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 117 | (void)parentDs; | 2551 | 117 | return op; | 2552 | 117 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const Line | Count | Source | 2549 | 154 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 154 | (void)parentDs; | 2551 | 154 | return op; | 2552 | 154 | } |
|
2553 | | |
2554 | 11 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2555 | 11 | (void)parentDs; |
2556 | 11 | op.modulo = modulo; |
2557 | 11 | return op; |
2558 | 11 | } |
2559 | | |
2560 | 19 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2561 | 19 | (void)parentDs; |
2562 | 19 | op.modulo = modulo; |
2563 | 19 | return op; |
2564 | 19 | } |
2565 | | |
2566 | 12 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2567 | 12 | (void)parentDs; |
2568 | 12 | op.modulo = modulo; |
2569 | 12 | return op; |
2570 | 12 | } |
2571 | | |
2572 | 12 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2573 | 12 | (void)parentDs; |
2574 | 12 | op.modulo = modulo; |
2575 | 12 | return op; |
2576 | 12 | } |
2577 | | |
2578 | 11 | operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2579 | 11 | (void)parentDs; |
2580 | 11 | op.modulo = modulo; |
2581 | 11 | return op; |
2582 | 11 | } |
2583 | | |
2584 | 12 | operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2585 | 12 | (void)parentDs; |
2586 | 12 | op.modulo = modulo; |
2587 | 12 | return op; |
2588 | 12 | } |
2589 | | |
2590 | 14 | operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2591 | 14 | (void)parentDs; |
2592 | 14 | op.modulo = modulo; |
2593 | 14 | return op; |
2594 | 14 | } |
2595 | | |
2596 | 12 | operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2597 | 12 | (void)parentDs; |
2598 | 12 | op.modulo = modulo; |
2599 | 12 | return op; |
2600 | 12 | } |
2601 | | |
2602 | 11 | operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2603 | 11 | (void)parentDs; |
2604 | 11 | op.modulo = modulo; |
2605 | 11 | return op; |
2606 | 11 | } |
2607 | | |
2608 | 11 | operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2609 | 11 | (void)parentDs; |
2610 | 11 | op.modulo = modulo; |
2611 | 11 | return op; |
2612 | 11 | } |
2613 | | |
2614 | 19 | operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2615 | 19 | (void)parentDs; |
2616 | 19 | op.modulo = modulo; |
2617 | 19 | return op; |
2618 | 19 | } |
2619 | | |
2620 | 10 | operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2621 | 10 | (void)parentDs; |
2622 | 10 | op.modulo = modulo; |
2623 | 10 | return op; |
2624 | 10 | } |
2625 | | |
2626 | 10 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2627 | 10 | (void)parentDs; |
2628 | 10 | op.modulo = modulo; |
2629 | 10 | return op; |
2630 | 10 | } |
2631 | | |
2632 | 12 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2633 | 12 | (void)parentDs; |
2634 | 12 | op.modulo = modulo; |
2635 | 12 | return op; |
2636 | 12 | } |
2637 | | |
2638 | 16 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2639 | 16 | (void)parentDs; |
2640 | 16 | op.modulo = modulo; |
2641 | 16 | return op; |
2642 | 16 | } |
2643 | | |
2644 | 14 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2645 | 14 | (void)parentDs; |
2646 | 14 | op.modulo = modulo; |
2647 | 14 | return op; |
2648 | 14 | } |
2649 | | |
2650 | 14 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2651 | 14 | (void)parentDs; |
2652 | 14 | op.modulo = modulo; |
2653 | 14 | return op; |
2654 | 14 | } |
2655 | | |
2656 | 12 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2657 | 12 | (void)parentDs; |
2658 | 12 | op.modulo = modulo; |
2659 | 12 | return op; |
2660 | 12 | } |
2661 | | |
2662 | 10 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2663 | 10 | (void)parentDs; |
2664 | 10 | op.modulo = modulo; |
2665 | 10 | return op; |
2666 | 10 | } |
2667 | | |
2668 | 11 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2669 | 11 | (void)parentDs; |
2670 | 11 | op.modulo = modulo; |
2671 | 11 | return op; |
2672 | 11 | } |
2673 | | |
2674 | 20 | operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2675 | 20 | (void)parentDs; |
2676 | 20 | op.modulo = modulo; |
2677 | 20 | return op; |
2678 | 20 | } |
2679 | | |
2680 | 16 | operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2681 | 16 | (void)parentDs; |
2682 | 16 | op.modulo = modulo; |
2683 | 16 | return op; |
2684 | 16 | } |
2685 | | |
2686 | | template <class ResultType, class OperationType> |
2687 | 88.6k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { |
2688 | 88.6k | Datasource ds(data, size); |
2689 | 88.6k | if ( parentDs != nullptr ) { |
2690 | 88.6k | auto modifier = parentDs->GetData(0); |
2691 | 88.6k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); |
2692 | 88.6k | } else { |
2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); |
2694 | 0 | } |
2695 | 88.6k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.19k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.19k | Datasource ds(data, size); | 2689 | 1.19k | if ( parentDs != nullptr ) { | 2690 | 1.19k | auto modifier = parentDs->GetData(0); | 2691 | 1.19k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.19k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.19k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::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<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 326 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 326 | Datasource ds(data, size); | 2689 | 326 | if ( parentDs != nullptr ) { | 2690 | 326 | auto modifier = parentDs->GetData(0); | 2691 | 326 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 326 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 326 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 838 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 838 | Datasource ds(data, size); | 2689 | 838 | if ( parentDs != nullptr ) { | 2690 | 838 | auto modifier = parentDs->GetData(0); | 2691 | 838 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 838 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 838 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.79k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.79k | Datasource ds(data, size); | 2689 | 2.79k | if ( parentDs != nullptr ) { | 2690 | 2.79k | auto modifier = parentDs->GetData(0); | 2691 | 2.79k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.79k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.79k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::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::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 372 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 372 | Datasource ds(data, size); | 2689 | 372 | if ( parentDs != nullptr ) { | 2690 | 372 | auto modifier = parentDs->GetData(0); | 2691 | 372 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 372 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 372 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.09k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.09k | Datasource ds(data, size); | 2689 | 1.09k | if ( parentDs != nullptr ) { | 2690 | 1.09k | auto modifier = parentDs->GetData(0); | 2691 | 1.09k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.09k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.09k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 345 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 345 | Datasource ds(data, size); | 2689 | 345 | if ( parentDs != nullptr ) { | 2690 | 345 | auto modifier = parentDs->GetData(0); | 2691 | 345 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 345 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 345 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 358 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 358 | Datasource ds(data, size); | 2689 | 358 | if ( parentDs != nullptr ) { | 2690 | 358 | auto modifier = parentDs->GetData(0); | 2691 | 358 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 358 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 358 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 409 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 409 | Datasource ds(data, size); | 2689 | 409 | if ( parentDs != nullptr ) { | 2690 | 409 | auto modifier = parentDs->GetData(0); | 2691 | 409 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 409 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 409 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 899 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 899 | Datasource ds(data, size); | 2689 | 899 | if ( parentDs != nullptr ) { | 2690 | 899 | auto modifier = parentDs->GetData(0); | 2691 | 899 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 899 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 899 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 60 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 60 | Datasource ds(data, size); | 2689 | 60 | if ( parentDs != nullptr ) { | 2690 | 60 | auto modifier = parentDs->GetData(0); | 2691 | 60 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 60 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 60 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 359 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 359 | Datasource ds(data, size); | 2689 | 359 | if ( parentDs != nullptr ) { | 2690 | 359 | auto modifier = parentDs->GetData(0); | 2691 | 359 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 359 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 359 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 401 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 401 | Datasource ds(data, size); | 2689 | 401 | if ( parentDs != nullptr ) { | 2690 | 401 | auto modifier = parentDs->GetData(0); | 2691 | 401 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 401 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 401 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 36 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 36 | Datasource ds(data, size); | 2689 | 36 | if ( parentDs != nullptr ) { | 2690 | 36 | auto modifier = parentDs->GetData(0); | 2691 | 36 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 36 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 36 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 409 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 409 | Datasource ds(data, size); | 2689 | 409 | if ( parentDs != nullptr ) { | 2690 | 409 | auto modifier = parentDs->GetData(0); | 2691 | 409 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 409 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 409 | } |
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 | 395 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 395 | Datasource ds(data, size); | 2689 | 395 | if ( parentDs != nullptr ) { | 2690 | 395 | auto modifier = parentDs->GetData(0); | 2691 | 395 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 395 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 395 | } |
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 | 437 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 437 | Datasource ds(data, size); | 2689 | 437 | if ( parentDs != nullptr ) { | 2690 | 437 | auto modifier = parentDs->GetData(0); | 2691 | 437 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 437 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 437 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.41k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.41k | Datasource ds(data, size); | 2689 | 4.41k | if ( parentDs != nullptr ) { | 2690 | 4.41k | auto modifier = parentDs->GetData(0); | 2691 | 4.41k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.41k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.41k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::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::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.86k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.86k | Datasource ds(data, size); | 2689 | 3.86k | if ( parentDs != nullptr ) { | 2690 | 3.86k | auto modifier = parentDs->GetData(0); | 2691 | 3.86k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.86k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.86k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 738 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 738 | Datasource ds(data, size); | 2689 | 738 | if ( parentDs != nullptr ) { | 2690 | 738 | auto modifier = parentDs->GetData(0); | 2691 | 738 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 738 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 738 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.09k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.09k | Datasource ds(data, size); | 2689 | 5.09k | if ( parentDs != nullptr ) { | 2690 | 5.09k | auto modifier = parentDs->GetData(0); | 2691 | 5.09k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.09k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.09k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 119 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 119 | Datasource ds(data, size); | 2689 | 119 | if ( parentDs != nullptr ) { | 2690 | 119 | auto modifier = parentDs->GetData(0); | 2691 | 119 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 119 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 119 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 126 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 126 | Datasource ds(data, size); | 2689 | 126 | if ( parentDs != nullptr ) { | 2690 | 126 | auto modifier = parentDs->GetData(0); | 2691 | 126 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 126 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 126 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 119 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 119 | Datasource ds(data, size); | 2689 | 119 | if ( parentDs != nullptr ) { | 2690 | 119 | auto modifier = parentDs->GetData(0); | 2691 | 119 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 119 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 119 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 692 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 692 | Datasource ds(data, size); | 2689 | 692 | if ( parentDs != nullptr ) { | 2690 | 692 | auto modifier = parentDs->GetData(0); | 2691 | 692 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 692 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 692 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.48k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.48k | Datasource ds(data, size); | 2689 | 4.48k | if ( parentDs != nullptr ) { | 2690 | 4.48k | auto modifier = parentDs->GetData(0); | 2691 | 4.48k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.48k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.48k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 95 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 95 | Datasource ds(data, size); | 2689 | 95 | if ( parentDs != nullptr ) { | 2690 | 95 | auto modifier = parentDs->GetData(0); | 2691 | 95 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 95 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 95 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 90 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 90 | Datasource ds(data, size); | 2689 | 90 | if ( parentDs != nullptr ) { | 2690 | 90 | auto modifier = parentDs->GetData(0); | 2691 | 90 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 90 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 90 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 99 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 99 | Datasource ds(data, size); | 2689 | 99 | if ( parentDs != nullptr ) { | 2690 | 99 | auto modifier = parentDs->GetData(0); | 2691 | 99 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 99 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 99 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 105 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 105 | Datasource ds(data, size); | 2689 | 105 | if ( parentDs != nullptr ) { | 2690 | 105 | auto modifier = parentDs->GetData(0); | 2691 | 105 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 105 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 105 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 202 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 202 | Datasource ds(data, size); | 2689 | 202 | if ( parentDs != nullptr ) { | 2690 | 202 | auto modifier = parentDs->GetData(0); | 2691 | 202 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 202 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 202 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 128 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 128 | Datasource ds(data, size); | 2689 | 128 | if ( parentDs != nullptr ) { | 2690 | 128 | auto modifier = parentDs->GetData(0); | 2691 | 128 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 128 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 128 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 103 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 103 | Datasource ds(data, size); | 2689 | 103 | if ( parentDs != nullptr ) { | 2690 | 103 | auto modifier = parentDs->GetData(0); | 2691 | 103 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 103 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 103 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 123 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 123 | Datasource ds(data, size); | 2689 | 123 | if ( parentDs != nullptr ) { | 2690 | 123 | auto modifier = parentDs->GetData(0); | 2691 | 123 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 123 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 123 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 172 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 172 | Datasource ds(data, size); | 2689 | 172 | if ( parentDs != nullptr ) { | 2690 | 172 | auto modifier = parentDs->GetData(0); | 2691 | 172 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 172 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 172 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 768 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 768 | Datasource ds(data, size); | 2689 | 768 | if ( parentDs != nullptr ) { | 2690 | 768 | auto modifier = parentDs->GetData(0); | 2691 | 768 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 768 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 768 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.18k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.18k | Datasource ds(data, size); | 2689 | 1.18k | if ( parentDs != nullptr ) { | 2690 | 1.18k | auto modifier = parentDs->GetData(0); | 2691 | 1.18k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.18k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.18k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::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::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::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::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 105 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 105 | Datasource ds(data, size); | 2689 | 105 | if ( parentDs != nullptr ) { | 2690 | 105 | auto modifier = parentDs->GetData(0); | 2691 | 105 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 105 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 105 | } |
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.51k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.51k | Datasource ds(data, size); | 2689 | 2.51k | if ( parentDs != nullptr ) { | 2690 | 2.51k | auto modifier = parentDs->GetData(0); | 2691 | 2.51k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.51k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.51k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 349 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 349 | Datasource ds(data, size); | 2689 | 349 | if ( parentDs != nullptr ) { | 2690 | 349 | auto modifier = parentDs->GetData(0); | 2691 | 349 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 349 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 349 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.61k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.61k | Datasource ds(data, size); | 2689 | 2.61k | if ( parentDs != nullptr ) { | 2690 | 2.61k | auto modifier = parentDs->GetData(0); | 2691 | 2.61k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.61k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.61k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 181 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 181 | Datasource ds(data, size); | 2689 | 181 | if ( parentDs != nullptr ) { | 2690 | 181 | auto modifier = parentDs->GetData(0); | 2691 | 181 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 181 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 181 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::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<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.81k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.81k | Datasource ds(data, size); | 2689 | 1.81k | if ( parentDs != nullptr ) { | 2690 | 1.81k | auto modifier = parentDs->GetData(0); | 2691 | 1.81k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.81k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.81k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 30.9k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 30.9k | Datasource ds(data, size); | 2689 | 30.9k | if ( parentDs != nullptr ) { | 2690 | 30.9k | auto modifier = parentDs->GetData(0); | 2691 | 30.9k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 30.9k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 30.9k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 248 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 248 | Datasource ds(data, size); | 2689 | 248 | if ( parentDs != nullptr ) { | 2690 | 248 | auto modifier = parentDs->GetData(0); | 2691 | 248 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 248 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 248 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 770 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 770 | Datasource ds(data, size); | 2689 | 770 | if ( parentDs != nullptr ) { | 2690 | 770 | auto modifier = parentDs->GetData(0); | 2691 | 770 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 770 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 770 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 140 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 140 | Datasource ds(data, size); | 2689 | 140 | if ( parentDs != nullptr ) { | 2690 | 140 | auto modifier = parentDs->GetData(0); | 2691 | 140 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 140 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 140 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 141 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 141 | Datasource ds(data, size); | 2689 | 141 | if ( parentDs != nullptr ) { | 2690 | 141 | auto modifier = parentDs->GetData(0); | 2691 | 141 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 141 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 141 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 124 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 124 | Datasource ds(data, size); | 2689 | 124 | if ( parentDs != nullptr ) { | 2690 | 124 | auto modifier = parentDs->GetData(0); | 2691 | 124 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 124 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 124 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 109 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 109 | Datasource ds(data, size); | 2689 | 109 | if ( parentDs != nullptr ) { | 2690 | 109 | auto modifier = parentDs->GetData(0); | 2691 | 109 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 109 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 109 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 249 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 249 | Datasource ds(data, size); | 2689 | 249 | if ( parentDs != nullptr ) { | 2690 | 249 | auto modifier = parentDs->GetData(0); | 2691 | 249 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 249 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 249 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 167 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 167 | Datasource ds(data, size); | 2689 | 167 | if ( parentDs != nullptr ) { | 2690 | 167 | auto modifier = parentDs->GetData(0); | 2691 | 167 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 167 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 167 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 207 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 207 | Datasource ds(data, size); | 2689 | 207 | if ( parentDs != nullptr ) { | 2690 | 207 | auto modifier = parentDs->GetData(0); | 2691 | 207 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 207 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 207 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 157 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 157 | Datasource ds(data, size); | 2689 | 157 | if ( parentDs != nullptr ) { | 2690 | 157 | auto modifier = parentDs->GetData(0); | 2691 | 157 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 157 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 157 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 138 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 138 | Datasource ds(data, size); | 2689 | 138 | if ( parentDs != nullptr ) { | 2690 | 138 | auto modifier = parentDs->GetData(0); | 2691 | 138 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 138 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 138 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 121 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 121 | Datasource ds(data, size); | 2689 | 121 | if ( parentDs != nullptr ) { | 2690 | 121 | auto modifier = parentDs->GetData(0); | 2691 | 121 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 121 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 121 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 156 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 156 | Datasource ds(data, size); | 2689 | 156 | if ( parentDs != nullptr ) { | 2690 | 156 | auto modifier = parentDs->GetData(0); | 2691 | 156 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 156 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 156 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 129 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 129 | Datasource ds(data, size); | 2689 | 129 | if ( parentDs != nullptr ) { | 2690 | 129 | auto modifier = parentDs->GetData(0); | 2691 | 129 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 129 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 129 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 104 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 104 | Datasource ds(data, size); | 2689 | 104 | if ( parentDs != nullptr ) { | 2690 | 104 | auto modifier = parentDs->GetData(0); | 2691 | 104 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 104 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 104 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 94 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 94 | Datasource ds(data, size); | 2689 | 94 | if ( parentDs != nullptr ) { | 2690 | 94 | auto modifier = parentDs->GetData(0); | 2691 | 94 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 94 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 94 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 92 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 92 | Datasource ds(data, size); | 2689 | 92 | if ( parentDs != nullptr ) { | 2690 | 92 | auto modifier = parentDs->GetData(0); | 2691 | 92 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 92 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 92 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 119 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 119 | Datasource ds(data, size); | 2689 | 119 | if ( parentDs != nullptr ) { | 2690 | 119 | auto modifier = parentDs->GetData(0); | 2691 | 119 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 119 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 119 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 194 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 194 | Datasource ds(data, size); | 2689 | 194 | if ( parentDs != nullptr ) { | 2690 | 194 | auto modifier = parentDs->GetData(0); | 2691 | 194 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 194 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 194 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 107 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 107 | Datasource ds(data, size); | 2689 | 107 | if ( parentDs != nullptr ) { | 2690 | 107 | auto modifier = parentDs->GetData(0); | 2691 | 107 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 107 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 107 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 114 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 114 | Datasource ds(data, size); | 2689 | 114 | if ( parentDs != nullptr ) { | 2690 | 114 | auto modifier = parentDs->GetData(0); | 2691 | 114 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 114 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 114 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 111 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 111 | Datasource ds(data, size); | 2689 | 111 | if ( parentDs != nullptr ) { | 2690 | 111 | auto modifier = parentDs->GetData(0); | 2691 | 111 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 111 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 111 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 112 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 112 | Datasource ds(data, size); | 2689 | 112 | if ( parentDs != nullptr ) { | 2690 | 112 | auto modifier = parentDs->GetData(0); | 2691 | 112 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 112 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 112 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 94 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 94 | Datasource ds(data, size); | 2689 | 94 | if ( parentDs != nullptr ) { | 2690 | 94 | auto modifier = parentDs->GetData(0); | 2691 | 94 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 94 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 94 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 180 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 180 | Datasource ds(data, size); | 2689 | 180 | if ( parentDs != nullptr ) { | 2690 | 180 | auto modifier = parentDs->GetData(0); | 2691 | 180 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 180 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 180 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 129 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 129 | Datasource ds(data, size); | 2689 | 129 | if ( parentDs != nullptr ) { | 2690 | 129 | auto modifier = parentDs->GetData(0); | 2691 | 129 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 129 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 129 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 201 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 201 | Datasource ds(data, size); | 2689 | 201 | if ( parentDs != nullptr ) { | 2690 | 201 | auto modifier = parentDs->GetData(0); | 2691 | 201 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 201 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 201 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 140 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 140 | Datasource ds(data, size); | 2689 | 140 | if ( parentDs != nullptr ) { | 2690 | 140 | auto modifier = parentDs->GetData(0); | 2691 | 140 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 140 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 140 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 186 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 186 | Datasource ds(data, size); | 2689 | 186 | if ( parentDs != nullptr ) { | 2690 | 186 | auto modifier = parentDs->GetData(0); | 2691 | 186 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 186 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 186 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 159 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 159 | Datasource ds(data, size); | 2689 | 159 | if ( parentDs != nullptr ) { | 2690 | 159 | auto modifier = parentDs->GetData(0); | 2691 | 159 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 159 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 159 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 234 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 234 | Datasource ds(data, size); | 2689 | 234 | if ( parentDs != nullptr ) { | 2690 | 234 | auto modifier = parentDs->GetData(0); | 2691 | 234 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 234 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 234 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 160 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 160 | Datasource ds(data, size); | 2689 | 160 | if ( parentDs != nullptr ) { | 2690 | 160 | auto modifier = parentDs->GetData(0); | 2691 | 160 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 160 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 160 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 295 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 295 | Datasource ds(data, size); | 2689 | 295 | if ( parentDs != nullptr ) { | 2690 | 295 | auto modifier = parentDs->GetData(0); | 2691 | 295 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 295 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 295 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 124 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 124 | Datasource ds(data, size); | 2689 | 124 | if ( parentDs != nullptr ) { | 2690 | 124 | auto modifier = parentDs->GetData(0); | 2691 | 124 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 124 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 124 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 171 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 171 | Datasource ds(data, size); | 2689 | 171 | if ( parentDs != nullptr ) { | 2690 | 171 | auto modifier = parentDs->GetData(0); | 2691 | 171 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 171 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 171 | } |
|
2696 | | |
2697 | | template <class ResultType, class OperationType> |
2698 | 87.0k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { |
2699 | 87.0k | auto moduleID = ds.Get<uint64_t>(); |
2700 | | |
2701 | | /* Override the extracted module ID with the preferred one, if specified */ |
2702 | 87.0k | if ( options.forceModule != std::nullopt ) { |
2703 | 85.1k | moduleID = *options.forceModule; |
2704 | 85.1k | } |
2705 | | |
2706 | | /* Skip if this is a disabled module */ |
2707 | 87.0k | if ( options.disableModules.HaveExplicit(moduleID) ) { |
2708 | 0 | return nullptr; |
2709 | 0 | } |
2710 | | |
2711 | 87.0k | if ( modules.find(moduleID) == modules.end() ) { |
2712 | 0 | return nullptr; |
2713 | 0 | } |
2714 | | |
2715 | 87.0k | return modules.at(moduleID); |
2716 | 87.0k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.18k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.18k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.18k | if ( options.forceModule != std::nullopt ) { | 2703 | 1.16k | moduleID = *options.forceModule; | 2704 | 1.16k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.18k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.18k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 1.18k | return modules.at(moduleID); | 2716 | 1.18k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.05k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.05k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.05k | if ( options.forceModule != std::nullopt ) { | 2703 | 1.04k | moduleID = *options.forceModule; | 2704 | 1.04k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.05k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.05k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 1.05k | return modules.at(moduleID); | 2716 | 1.05k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 314 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 314 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 314 | if ( options.forceModule != std::nullopt ) { | 2703 | 298 | moduleID = *options.forceModule; | 2704 | 298 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 314 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 314 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 314 | return modules.at(moduleID); | 2716 | 314 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 828 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 828 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 828 | if ( options.forceModule != std::nullopt ) { | 2703 | 817 | moduleID = *options.forceModule; | 2704 | 817 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 828 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 828 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 828 | return modules.at(moduleID); | 2716 | 828 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::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 | 2.76k | moduleID = *options.forceModule; | 2704 | 2.76k | } | 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 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 2.78k | return modules.at(moduleID); | 2716 | 2.78k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::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 | 1.52k | moduleID = *options.forceModule; | 2704 | 1.52k | } | 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 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 1.54k | return modules.at(moduleID); | 2716 | 1.54k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 358 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 358 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 358 | if ( options.forceModule != std::nullopt ) { | 2703 | 346 | moduleID = *options.forceModule; | 2704 | 346 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 358 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 358 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 358 | return modules.at(moduleID); | 2716 | 358 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.07k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.07k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.07k | if ( options.forceModule != std::nullopt ) { | 2703 | 1.05k | moduleID = *options.forceModule; | 2704 | 1.05k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.07k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.07k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 1.07k | return modules.at(moduleID); | 2716 | 1.07k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 336 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 336 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 336 | if ( options.forceModule != std::nullopt ) { | 2703 | 324 | moduleID = *options.forceModule; | 2704 | 324 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 336 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 336 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 336 | return modules.at(moduleID); | 2716 | 336 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 349 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 349 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 349 | if ( options.forceModule != std::nullopt ) { | 2703 | 334 | moduleID = *options.forceModule; | 2704 | 334 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 349 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 349 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 349 | return modules.at(moduleID); | 2716 | 349 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 399 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 399 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 399 | if ( options.forceModule != std::nullopt ) { | 2703 | 385 | moduleID = *options.forceModule; | 2704 | 385 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 399 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 399 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 399 | return modules.at(moduleID); | 2716 | 399 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 887 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 887 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 887 | if ( options.forceModule != std::nullopt ) { | 2703 | 875 | moduleID = *options.forceModule; | 2704 | 875 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 887 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 887 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 887 | return modules.at(moduleID); | 2716 | 887 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 54 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 54 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 54 | if ( options.forceModule != std::nullopt ) { | 2703 | 45 | moduleID = *options.forceModule; | 2704 | 45 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 54 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 54 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 54 | return modules.at(moduleID); | 2716 | 54 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 348 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 348 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 348 | if ( options.forceModule != std::nullopt ) { | 2703 | 328 | moduleID = *options.forceModule; | 2704 | 328 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 348 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 348 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 348 | return modules.at(moduleID); | 2716 | 348 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 391 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 391 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 391 | if ( options.forceModule != std::nullopt ) { | 2703 | 378 | moduleID = *options.forceModule; | 2704 | 378 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 391 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 391 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 391 | return modules.at(moduleID); | 2716 | 391 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 31 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 31 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 31 | if ( options.forceModule != std::nullopt ) { | 2703 | 25 | moduleID = *options.forceModule; | 2704 | 25 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 31 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 31 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 31 | return modules.at(moduleID); | 2716 | 31 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 397 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 397 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 397 | if ( options.forceModule != std::nullopt ) { | 2703 | 382 | moduleID = *options.forceModule; | 2704 | 382 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 397 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 397 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 397 | return modules.at(moduleID); | 2716 | 397 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 383 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 383 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 383 | if ( options.forceModule != std::nullopt ) { | 2703 | 367 | moduleID = *options.forceModule; | 2704 | 367 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 383 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 383 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 383 | return modules.at(moduleID); | 2716 | 383 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 423 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 423 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 423 | if ( options.forceModule != std::nullopt ) { | 2703 | 407 | moduleID = *options.forceModule; | 2704 | 407 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 423 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 423 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 423 | return modules.at(moduleID); | 2716 | 423 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.38k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.38k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.38k | if ( options.forceModule != std::nullopt ) { | 2703 | 4.29k | moduleID = *options.forceModule; | 2704 | 4.29k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.38k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.38k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 4.38k | return modules.at(moduleID); | 2716 | 4.38k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.71k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.71k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.71k | if ( options.forceModule != std::nullopt ) { | 2703 | 2.62k | moduleID = *options.forceModule; | 2704 | 2.62k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.71k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.71k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 2.71k | return modules.at(moduleID); | 2716 | 2.71k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.83k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.83k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.83k | if ( options.forceModule != std::nullopt ) { | 2703 | 3.79k | moduleID = *options.forceModule; | 2704 | 3.79k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.83k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.83k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 3.83k | return modules.at(moduleID); | 2716 | 3.83k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 699 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 699 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 699 | if ( options.forceModule != std::nullopt ) { | 2703 | 655 | moduleID = *options.forceModule; | 2704 | 655 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 699 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 699 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 699 | return modules.at(moduleID); | 2716 | 699 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 5.05k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 5.05k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 5.05k | if ( options.forceModule != std::nullopt ) { | 2703 | 5.00k | moduleID = *options.forceModule; | 2704 | 5.00k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 5.05k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 5.05k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 5.05k | return modules.at(moduleID); | 2716 | 5.05k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 111 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 111 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 111 | if ( options.forceModule != std::nullopt ) { | 2703 | 99 | moduleID = *options.forceModule; | 2704 | 99 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 111 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 111 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 111 | return modules.at(moduleID); | 2716 | 111 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 118 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 118 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 118 | if ( options.forceModule != std::nullopt ) { | 2703 | 105 | moduleID = *options.forceModule; | 2704 | 105 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 118 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 118 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 118 | return modules.at(moduleID); | 2716 | 118 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 112 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 112 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 112 | if ( options.forceModule != std::nullopt ) { | 2703 | 101 | moduleID = *options.forceModule; | 2704 | 101 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 112 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 112 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 112 | return modules.at(moduleID); | 2716 | 112 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 626 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 626 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 626 | if ( options.forceModule != std::nullopt ) { | 2703 | 562 | moduleID = *options.forceModule; | 2704 | 562 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 626 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 626 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 626 | return modules.at(moduleID); | 2716 | 626 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.42k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.42k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.42k | if ( options.forceModule != std::nullopt ) { | 2703 | 4.35k | moduleID = *options.forceModule; | 2704 | 4.35k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.42k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.42k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 4.42k | return modules.at(moduleID); | 2716 | 4.42k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 88 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 88 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 88 | if ( options.forceModule != std::nullopt ) { | 2703 | 78 | moduleID = *options.forceModule; | 2704 | 78 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 88 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 88 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 88 | return modules.at(moduleID); | 2716 | 88 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 84 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 84 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 84 | if ( options.forceModule != std::nullopt ) { | 2703 | 75 | moduleID = *options.forceModule; | 2704 | 75 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 84 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 84 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 84 | return modules.at(moduleID); | 2716 | 84 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 93 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 93 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 93 | if ( options.forceModule != std::nullopt ) { | 2703 | 85 | moduleID = *options.forceModule; | 2704 | 85 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 93 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 93 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 93 | return modules.at(moduleID); | 2716 | 93 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 101 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 101 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 101 | if ( options.forceModule != std::nullopt ) { | 2703 | 88 | moduleID = *options.forceModule; | 2704 | 88 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 101 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 101 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 101 | return modules.at(moduleID); | 2716 | 101 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 189 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 189 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 189 | if ( options.forceModule != std::nullopt ) { | 2703 | 176 | moduleID = *options.forceModule; | 2704 | 176 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 189 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 189 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 189 | return modules.at(moduleID); | 2716 | 189 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 117 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 117 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 117 | if ( options.forceModule != std::nullopt ) { | 2703 | 107 | moduleID = *options.forceModule; | 2704 | 107 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 117 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 117 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 117 | return modules.at(moduleID); | 2716 | 117 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 98 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 98 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 98 | if ( options.forceModule != std::nullopt ) { | 2703 | 88 | moduleID = *options.forceModule; | 2704 | 88 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 98 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 98 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 98 | return modules.at(moduleID); | 2716 | 98 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 107 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 107 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 107 | if ( options.forceModule != std::nullopt ) { | 2703 | 96 | moduleID = *options.forceModule; | 2704 | 96 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 107 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 107 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 107 | return modules.at(moduleID); | 2716 | 107 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 163 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 163 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 163 | if ( options.forceModule != std::nullopt ) { | 2703 | 151 | moduleID = *options.forceModule; | 2704 | 151 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 163 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 163 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 163 | return modules.at(moduleID); | 2716 | 163 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 736 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 736 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 736 | if ( options.forceModule != std::nullopt ) { | 2703 | 685 | moduleID = *options.forceModule; | 2704 | 685 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 736 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 736 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 736 | return modules.at(moduleID); | 2716 | 736 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.13k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.13k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.13k | if ( options.forceModule != std::nullopt ) { | 2703 | 1.06k | moduleID = *options.forceModule; | 2704 | 1.06k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.13k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.13k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 1.13k | return modules.at(moduleID); | 2716 | 1.13k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.28k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.28k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.28k | if ( options.forceModule != std::nullopt ) { | 2703 | 1.22k | moduleID = *options.forceModule; | 2704 | 1.22k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.28k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.28k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 1.28k | return modules.at(moduleID); | 2716 | 1.28k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.81k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.81k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.81k | if ( options.forceModule != std::nullopt ) { | 2703 | 1.75k | moduleID = *options.forceModule; | 2704 | 1.75k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.81k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.81k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 1.81k | return modules.at(moduleID); | 2716 | 1.81k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 98 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 98 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 98 | if ( options.forceModule != std::nullopt ) { | 2703 | 88 | moduleID = *options.forceModule; | 2704 | 88 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 98 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 98 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 98 | return modules.at(moduleID); | 2716 | 98 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.46k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.46k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.46k | if ( options.forceModule != std::nullopt ) { | 2703 | 2.41k | moduleID = *options.forceModule; | 2704 | 2.41k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.46k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.46k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 2.46k | return modules.at(moduleID); | 2716 | 2.46k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 344 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 344 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 344 | if ( options.forceModule != std::nullopt ) { | 2703 | 332 | moduleID = *options.forceModule; | 2704 | 332 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 344 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 344 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 344 | return modules.at(moduleID); | 2716 | 344 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::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 | 2.47k | moduleID = *options.forceModule; | 2704 | 2.47k | } | 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 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 2.54k | return modules.at(moduleID); | 2716 | 2.54k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 174 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 174 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 174 | if ( options.forceModule != std::nullopt ) { | 2703 | 164 | moduleID = *options.forceModule; | 2704 | 164 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 174 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 174 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 174 | return modules.at(moduleID); | 2716 | 174 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.07k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.07k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.07k | if ( options.forceModule != std::nullopt ) { | 2703 | 2.00k | moduleID = *options.forceModule; | 2704 | 2.00k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.07k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.07k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 2.07k | return modules.at(moduleID); | 2716 | 2.07k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.75k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.75k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.75k | if ( options.forceModule != std::nullopt ) { | 2703 | 1.68k | moduleID = *options.forceModule; | 2704 | 1.68k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.75k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.75k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 1.75k | return modules.at(moduleID); | 2716 | 1.75k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 30.8k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 30.8k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 30.8k | if ( options.forceModule != std::nullopt ) { | 2703 | 30.7k | moduleID = *options.forceModule; | 2704 | 30.7k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 30.8k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 30.8k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 30.8k | return modules.at(moduleID); | 2716 | 30.8k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 234 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 234 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 234 | if ( options.forceModule != std::nullopt ) { | 2703 | 220 | moduleID = *options.forceModule; | 2704 | 220 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 234 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 234 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 234 | return modules.at(moduleID); | 2716 | 234 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 733 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 733 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 733 | if ( options.forceModule != std::nullopt ) { | 2703 | 726 | moduleID = *options.forceModule; | 2704 | 726 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 733 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 733 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 733 | return modules.at(moduleID); | 2716 | 733 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 132 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 132 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 132 | if ( options.forceModule != std::nullopt ) { | 2703 | 119 | moduleID = *options.forceModule; | 2704 | 119 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 132 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 132 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 132 | return modules.at(moduleID); | 2716 | 132 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 135 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 135 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 135 | if ( options.forceModule != std::nullopt ) { | 2703 | 125 | moduleID = *options.forceModule; | 2704 | 125 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 135 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 135 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 135 | return modules.at(moduleID); | 2716 | 135 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 114 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 114 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 114 | if ( options.forceModule != std::nullopt ) { | 2703 | 103 | moduleID = *options.forceModule; | 2704 | 103 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 114 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 114 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 114 | return modules.at(moduleID); | 2716 | 114 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 98 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 98 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 98 | if ( options.forceModule != std::nullopt ) { | 2703 | 88 | moduleID = *options.forceModule; | 2704 | 88 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 98 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 98 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 98 | return modules.at(moduleID); | 2716 | 98 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 196 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 196 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 196 | if ( options.forceModule != std::nullopt ) { | 2703 | 170 | moduleID = *options.forceModule; | 2704 | 170 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 196 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 196 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 196 | return modules.at(moduleID); | 2716 | 196 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 142 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 142 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 142 | if ( options.forceModule != std::nullopt ) { | 2703 | 123 | moduleID = *options.forceModule; | 2704 | 123 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 142 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 142 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 142 | return modules.at(moduleID); | 2716 | 142 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 145 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 145 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 145 | if ( options.forceModule != std::nullopt ) { | 2703 | 127 | moduleID = *options.forceModule; | 2704 | 127 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 145 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 145 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 145 | return modules.at(moduleID); | 2716 | 145 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 140 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 140 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 140 | if ( options.forceModule != std::nullopt ) { | 2703 | 125 | moduleID = *options.forceModule; | 2704 | 125 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 140 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 140 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 140 | return modules.at(moduleID); | 2716 | 140 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 127 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 127 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 127 | if ( options.forceModule != std::nullopt ) { | 2703 | 116 | moduleID = *options.forceModule; | 2704 | 116 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 127 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 127 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 127 | return modules.at(moduleID); | 2716 | 127 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 111 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 111 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 111 | if ( options.forceModule != std::nullopt ) { | 2703 | 101 | moduleID = *options.forceModule; | 2704 | 101 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 111 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 111 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 111 | return modules.at(moduleID); | 2716 | 111 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 143 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 143 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 143 | if ( options.forceModule != std::nullopt ) { | 2703 | 121 | moduleID = *options.forceModule; | 2704 | 121 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 143 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 143 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 143 | return modules.at(moduleID); | 2716 | 143 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 121 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 121 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 121 | if ( options.forceModule != std::nullopt ) { | 2703 | 108 | moduleID = *options.forceModule; | 2704 | 108 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 121 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 121 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 121 | return modules.at(moduleID); | 2716 | 121 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 96 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 96 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 96 | if ( options.forceModule != std::nullopt ) { | 2703 | 86 | moduleID = *options.forceModule; | 2704 | 86 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 96 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 96 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 96 | return modules.at(moduleID); | 2716 | 96 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 89 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 89 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 89 | if ( options.forceModule != std::nullopt ) { | 2703 | 78 | moduleID = *options.forceModule; | 2704 | 78 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 89 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 89 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 89 | return modules.at(moduleID); | 2716 | 89 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 85 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 85 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 85 | if ( options.forceModule != std::nullopt ) { | 2703 | 79 | moduleID = *options.forceModule; | 2704 | 79 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 85 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 85 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 85 | return modules.at(moduleID); | 2716 | 85 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 113 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 113 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 113 | if ( options.forceModule != std::nullopt ) { | 2703 | 107 | moduleID = *options.forceModule; | 2704 | 107 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 113 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 113 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 113 | return modules.at(moduleID); | 2716 | 113 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 185 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 185 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 185 | if ( options.forceModule != std::nullopt ) { | 2703 | 177 | moduleID = *options.forceModule; | 2704 | 177 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 185 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 185 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 185 | return modules.at(moduleID); | 2716 | 185 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 100 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 100 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 100 | if ( options.forceModule != std::nullopt ) { | 2703 | 90 | moduleID = *options.forceModule; | 2704 | 90 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 100 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 100 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 100 | return modules.at(moduleID); | 2716 | 100 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 108 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 108 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 108 | if ( options.forceModule != std::nullopt ) { | 2703 | 96 | moduleID = *options.forceModule; | 2704 | 96 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 108 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 108 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 108 | return modules.at(moduleID); | 2716 | 108 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 105 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 105 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 105 | if ( options.forceModule != std::nullopt ) { | 2703 | 92 | moduleID = *options.forceModule; | 2704 | 92 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 105 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 105 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 105 | return modules.at(moduleID); | 2716 | 105 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 106 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 106 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 106 | if ( options.forceModule != std::nullopt ) { | 2703 | 94 | moduleID = *options.forceModule; | 2704 | 94 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 106 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 106 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 106 | return modules.at(moduleID); | 2716 | 106 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 88 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 88 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 88 | if ( options.forceModule != std::nullopt ) { | 2703 | 81 | moduleID = *options.forceModule; | 2704 | 81 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 88 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 88 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 88 | return modules.at(moduleID); | 2716 | 88 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 173 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 173 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 173 | if ( options.forceModule != std::nullopt ) { | 2703 | 163 | moduleID = *options.forceModule; | 2704 | 163 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 173 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 173 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 173 | return modules.at(moduleID); | 2716 | 173 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 121 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 121 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 121 | if ( options.forceModule != std::nullopt ) { | 2703 | 113 | moduleID = *options.forceModule; | 2704 | 113 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 121 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 121 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 121 | return modules.at(moduleID); | 2716 | 121 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 191 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 191 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 191 | if ( options.forceModule != std::nullopt ) { | 2703 | 180 | moduleID = *options.forceModule; | 2704 | 180 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 191 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 191 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 191 | return modules.at(moduleID); | 2716 | 191 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 134 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 134 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 134 | if ( options.forceModule != std::nullopt ) { | 2703 | 121 | moduleID = *options.forceModule; | 2704 | 121 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 134 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 134 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 134 | return modules.at(moduleID); | 2716 | 134 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 177 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 177 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 177 | if ( options.forceModule != std::nullopt ) { | 2703 | 169 | moduleID = *options.forceModule; | 2704 | 169 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 177 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 177 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 177 | return modules.at(moduleID); | 2716 | 177 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 150 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 150 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 150 | if ( options.forceModule != std::nullopt ) { | 2703 | 140 | moduleID = *options.forceModule; | 2704 | 140 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 150 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 150 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 150 | return modules.at(moduleID); | 2716 | 150 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 222 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 222 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 222 | if ( options.forceModule != std::nullopt ) { | 2703 | 213 | moduleID = *options.forceModule; | 2704 | 213 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 222 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 222 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 222 | return modules.at(moduleID); | 2716 | 222 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 153 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 153 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 153 | if ( options.forceModule != std::nullopt ) { | 2703 | 146 | moduleID = *options.forceModule; | 2704 | 146 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 153 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 153 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 153 | return modules.at(moduleID); | 2716 | 153 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 257 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 257 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 257 | if ( options.forceModule != std::nullopt ) { | 2703 | 227 | moduleID = *options.forceModule; | 2704 | 227 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 257 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 257 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 257 | return modules.at(moduleID); | 2716 | 257 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 117 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 117 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 117 | if ( options.forceModule != std::nullopt ) { | 2703 | 109 | moduleID = *options.forceModule; | 2704 | 109 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 117 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 117 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 117 | return modules.at(moduleID); | 2716 | 117 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 154 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 154 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 154 | if ( options.forceModule != std::nullopt ) { | 2703 | 126 | moduleID = *options.forceModule; | 2704 | 126 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 154 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 154 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 154 | return modules.at(moduleID); | 2716 | 154 | } |
|
2717 | | |
2718 | | template <class ResultType, class OperationType> |
2719 | 52.1k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { |
2720 | 52.1k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; |
2721 | | |
2722 | 52.1k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; |
2723 | | |
2724 | 88.6k | do { |
2725 | 88.6k | auto op = getOp(&parentDs, data, size); |
2726 | 88.6k | auto module = getModule(parentDs); |
2727 | 88.6k | if ( module == nullptr ) { |
2728 | 0 | continue; |
2729 | 0 | } |
2730 | | |
2731 | 88.6k | operations.push_back( {module, op} ); |
2732 | | |
2733 | | /* Limit number of operations per run to prevent time-outs */ |
2734 | 88.6k | if ( operations.size() == OperationType::MaxOperations() ) { |
2735 | 1.55k | break; |
2736 | 1.55k | } |
2737 | 88.6k | } while ( parentDs.Get<bool>() == true ); |
2738 | | |
2739 | 52.1k | if ( operations.empty() == true ) { |
2740 | 0 | return; |
2741 | 0 | } |
2742 | | |
2743 | | /* Enable this to run every operation on every loaded module */ |
2744 | 52.1k | #if 1 |
2745 | 52.1k | { |
2746 | 52.1k | std::set<uint64_t> moduleIDs; |
2747 | 52.1k | for (const auto& m : modules ) { |
2748 | 47.1k | const auto moduleID = m.first; |
2749 | | |
2750 | | /* Skip if this is a disabled module */ |
2751 | 47.1k | if ( options.disableModules.HaveExplicit(moduleID) ) { |
2752 | 0 | continue; |
2753 | 0 | } |
2754 | | |
2755 | 47.1k | moduleIDs.insert(moduleID); |
2756 | 47.1k | } |
2757 | | |
2758 | 52.1k | std::set<uint64_t> operationModuleIDs; |
2759 | 77.1k | for (const auto& op : operations) { |
2760 | 77.1k | operationModuleIDs.insert(op.first->ID); |
2761 | 77.1k | } |
2762 | | |
2763 | 52.1k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); |
2764 | 52.1k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); |
2765 | 52.1k | addModuleIDs.resize(it - addModuleIDs.begin()); |
2766 | | |
2767 | 52.1k | for (const auto& id : addModuleIDs) { |
2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); |
2769 | 0 | } |
2770 | 52.1k | } |
2771 | 52.1k | #endif |
2772 | | |
2773 | 52.1k | if ( operations.size() < options.minModules ) { |
2774 | 0 | return; |
2775 | 0 | } |
2776 | | |
2777 | 52.1k | if ( options.debug == true && !operations.empty() ) { |
2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); |
2779 | 0 | } |
2780 | 129k | for (size_t i = 0; i < operations.size(); i++) { |
2781 | 77.1k | auto& operation = operations[i]; |
2782 | | |
2783 | 77.1k | auto& module = operation.first; |
2784 | 77.1k | auto& op = operation.second; |
2785 | | |
2786 | 77.1k | if ( i > 0 ) { |
2787 | 29.9k | auto& prevModule = operations[i-1].first; |
2788 | 29.9k | auto& prevOp = operations[i].second; |
2789 | | |
2790 | 29.9k | if ( prevModule == module && prevOp.modifier == op.modifier ) { |
2791 | 29.9k | auto& curModifier = op.modifier.GetVectorPtr(); |
2792 | 29.9k | if ( curModifier.size() == 0 ) { |
2793 | 5.87M | for (size_t j = 0; j < 512; j++) { |
2794 | 5.86M | curModifier.push_back(1); |
2795 | 5.86M | } |
2796 | 18.5k | } else { |
2797 | 3.38M | for (auto& c : curModifier) { |
2798 | 3.38M | c++; |
2799 | 3.38M | } |
2800 | 18.5k | } |
2801 | 29.9k | } |
2802 | 29.9k | } |
2803 | | |
2804 | 77.1k | if ( options.debug == true ) { |
2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); |
2806 | 0 | } |
2807 | | |
2808 | 77.1k | results.push_back( {module, std::move(callModule(module, op))} ); |
2809 | | |
2810 | 77.1k | const auto& result = results.back(); |
2811 | | |
2812 | 77.1k | if ( result.second != std::nullopt ) { |
2813 | 23.9k | 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 | 23.9k | } |
2820 | | |
2821 | 77.1k | 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 | 77.1k | if ( options.disableTests == false ) { |
2830 | 77.0k | tests::test(op, result.second); |
2831 | 77.0k | } |
2832 | | |
2833 | 77.1k | postprocess(module, op, result); |
2834 | 77.1k | } |
2835 | | |
2836 | 52.1k | if ( options.noCompare == false ) { |
2837 | 47.1k | compare(operations, results, data, size); |
2838 | 47.1k | } |
2839 | 52.1k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 374 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 374 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 374 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.19k | do { | 2725 | 1.19k | auto op = getOp(&parentDs, data, size); | 2726 | 1.19k | auto module = getModule(parentDs); | 2727 | 1.19k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 1.19k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.19k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 1.19k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 374 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 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 | 374 | 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 | 374 | std::set<uint64_t> operationModuleIDs; | 2759 | 897 | for (const auto& op : operations) { | 2760 | 897 | operationModuleIDs.insert(op.first->ID); | 2761 | 897 | } | 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 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 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 | 897 | auto& operation = operations[i]; | 2782 | | | 2783 | 897 | auto& module = operation.first; | 2784 | 897 | auto& op = operation.second; | 2785 | | | 2786 | 897 | if ( i > 0 ) { | 2787 | 575 | auto& prevModule = operations[i-1].first; | 2788 | 575 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 575 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 575 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 575 | if ( curModifier.size() == 0 ) { | 2793 | 227k | for (size_t j = 0; j < 512; j++) { | 2794 | 226k | curModifier.push_back(1); | 2795 | 226k | } | 2796 | 443 | } else { | 2797 | 69.5k | for (auto& c : curModifier) { | 2798 | 69.5k | c++; | 2799 | 69.5k | } | 2800 | 132 | } | 2801 | 575 | } | 2802 | 575 | } | 2803 | | | 2804 | 897 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 897 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 897 | const auto& result = results.back(); | 2811 | | | 2812 | 897 | if ( result.second != std::nullopt ) { | 2813 | 563 | 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 | 563 | } | 2820 | | | 2821 | 897 | 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 | 897 | if ( options.disableTests == false ) { | 2830 | 897 | tests::test(op, result.second); | 2831 | 897 | } | 2832 | | | 2833 | 897 | postprocess(module, op, result); | 2834 | 897 | } | 2835 | | | 2836 | 374 | if ( options.noCompare == false ) { | 2837 | 322 | compare(operations, results, data, size); | 2838 | 322 | } | 2839 | 374 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 258 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 258 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 258 | 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 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 1.06k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.06k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 1.06k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 258 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 258 | #if 1 | 2745 | 258 | { | 2746 | 258 | std::set<uint64_t> moduleIDs; | 2747 | 258 | for (const auto& m : modules ) { | 2748 | 218 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 218 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 218 | moduleIDs.insert(moduleID); | 2756 | 218 | } | 2757 | | | 2758 | 258 | std::set<uint64_t> operationModuleIDs; | 2759 | 872 | for (const auto& op : operations) { | 2760 | 872 | operationModuleIDs.insert(op.first->ID); | 2761 | 872 | } | 2762 | | | 2763 | 258 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 258 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 258 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 258 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 258 | } | 2771 | 258 | #endif | 2772 | | | 2773 | 258 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 258 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.13k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 872 | auto& operation = operations[i]; | 2782 | | | 2783 | 872 | auto& module = operation.first; | 2784 | 872 | auto& op = operation.second; | 2785 | | | 2786 | 872 | if ( i > 0 ) { | 2787 | 654 | auto& prevModule = operations[i-1].first; | 2788 | 654 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 654 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 654 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 654 | if ( curModifier.size() == 0 ) { | 2793 | 238k | for (size_t j = 0; j < 512; j++) { | 2794 | 238k | curModifier.push_back(1); | 2795 | 238k | } | 2796 | 465 | } else { | 2797 | 54.4k | for (auto& c : curModifier) { | 2798 | 54.4k | c++; | 2799 | 54.4k | } | 2800 | 189 | } | 2801 | 654 | } | 2802 | 654 | } | 2803 | | | 2804 | 872 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 872 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 872 | const auto& result = results.back(); | 2811 | | | 2812 | 872 | if ( result.second != std::nullopt ) { | 2813 | 396 | 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 | 396 | } | 2820 | | | 2821 | 872 | 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 | 872 | if ( options.disableTests == false ) { | 2830 | 872 | tests::test(op, result.second); | 2831 | 872 | } | 2832 | | | 2833 | 872 | postprocess(module, op, result); | 2834 | 872 | } | 2835 | | | 2836 | 258 | if ( options.noCompare == false ) { | 2837 | 218 | compare(operations, results, data, size); | 2838 | 218 | } | 2839 | 258 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 70 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 70 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 70 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 326 | do { | 2725 | 326 | auto op = getOp(&parentDs, data, size); | 2726 | 326 | auto module = getModule(parentDs); | 2727 | 326 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 326 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 326 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 326 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 70 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 70 | #if 1 | 2745 | 70 | { | 2746 | 70 | std::set<uint64_t> moduleIDs; | 2747 | 70 | for (const auto& m : modules ) { | 2748 | 30 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 30 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 30 | moduleIDs.insert(moduleID); | 2756 | 30 | } | 2757 | | | 2758 | 70 | std::set<uint64_t> operationModuleIDs; | 2759 | 187 | for (const auto& op : operations) { | 2760 | 187 | operationModuleIDs.insert(op.first->ID); | 2761 | 187 | } | 2762 | | | 2763 | 70 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 70 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 70 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 70 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 70 | } | 2771 | 70 | #endif | 2772 | | | 2773 | 70 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 70 | 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 | 187 | auto& operation = operations[i]; | 2782 | | | 2783 | 187 | auto& module = operation.first; | 2784 | 187 | auto& op = operation.second; | 2785 | | | 2786 | 187 | if ( i > 0 ) { | 2787 | 157 | auto& prevModule = operations[i-1].first; | 2788 | 157 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 157 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 157 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 157 | 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 | 259 | for (auto& c : curModifier) { | 2798 | 259 | c++; | 2799 | 259 | } | 2800 | 37 | } | 2801 | 157 | } | 2802 | 157 | } | 2803 | | | 2804 | 187 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 187 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 187 | const auto& result = results.back(); | 2811 | | | 2812 | 187 | 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 | 187 | 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 | 187 | if ( options.disableTests == false ) { | 2830 | 187 | tests::test(op, result.second); | 2831 | 187 | } | 2832 | | | 2833 | 187 | postprocess(module, op, result); | 2834 | 187 | } | 2835 | | | 2836 | 70 | if ( options.noCompare == false ) { | 2837 | 30 | compare(operations, results, data, size); | 2838 | 30 | } | 2839 | 70 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 209 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 209 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 209 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 838 | do { | 2725 | 838 | auto op = getOp(&parentDs, data, size); | 2726 | 838 | auto module = getModule(parentDs); | 2727 | 838 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 838 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 838 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 838 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 209 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 209 | #if 1 | 2745 | 209 | { | 2746 | 209 | std::set<uint64_t> moduleIDs; | 2747 | 209 | for (const auto& m : modules ) { | 2748 | 175 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 175 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 175 | moduleIDs.insert(moduleID); | 2756 | 175 | } | 2757 | | | 2758 | 209 | std::set<uint64_t> operationModuleIDs; | 2759 | 702 | for (const auto& op : operations) { | 2760 | 702 | operationModuleIDs.insert(op.first->ID); | 2761 | 702 | } | 2762 | | | 2763 | 209 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 209 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 209 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 209 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 209 | } | 2771 | 209 | #endif | 2772 | | | 2773 | 209 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 209 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 911 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 702 | auto& operation = operations[i]; | 2782 | | | 2783 | 702 | auto& module = operation.first; | 2784 | 702 | auto& op = operation.second; | 2785 | | | 2786 | 702 | if ( i > 0 ) { | 2787 | 527 | auto& prevModule = operations[i-1].first; | 2788 | 527 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 527 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 527 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 527 | if ( curModifier.size() == 0 ) { | 2793 | 203k | for (size_t j = 0; j < 512; j++) { | 2794 | 203k | curModifier.push_back(1); | 2795 | 203k | } | 2796 | 397 | } else { | 2797 | 2.68k | for (auto& c : curModifier) { | 2798 | 2.68k | c++; | 2799 | 2.68k | } | 2800 | 130 | } | 2801 | 527 | } | 2802 | 527 | } | 2803 | | | 2804 | 702 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 702 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 702 | const auto& result = results.back(); | 2811 | | | 2812 | 702 | if ( result.second != std::nullopt ) { | 2813 | 233 | 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 | 233 | } | 2820 | | | 2821 | 702 | 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 | 702 | if ( options.disableTests == false ) { | 2830 | 702 | tests::test(op, result.second); | 2831 | 702 | } | 2832 | | | 2833 | 702 | postprocess(module, op, result); | 2834 | 702 | } | 2835 | | | 2836 | 209 | if ( options.noCompare == false ) { | 2837 | 175 | compare(operations, results, data, size); | 2838 | 175 | } | 2839 | 209 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 938 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 938 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 938 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.79k | do { | 2725 | 2.79k | auto op = getOp(&parentDs, data, size); | 2726 | 2.79k | auto module = getModule(parentDs); | 2727 | 2.79k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 2.79k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 2.79k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 2.79k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 938 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 938 | #if 1 | 2745 | 938 | { | 2746 | 938 | std::set<uint64_t> moduleIDs; | 2747 | 938 | for (const auto& m : modules ) { | 2748 | 882 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 882 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 882 | moduleIDs.insert(moduleID); | 2756 | 882 | } | 2757 | | | 2758 | 938 | std::set<uint64_t> operationModuleIDs; | 2759 | 2.56k | for (const auto& op : operations) { | 2760 | 2.56k | operationModuleIDs.insert(op.first->ID); | 2761 | 2.56k | } | 2762 | | | 2763 | 938 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 938 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 938 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 938 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 938 | } | 2771 | 938 | #endif | 2772 | | | 2773 | 938 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 938 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 3.50k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 2.56k | auto& operation = operations[i]; | 2782 | | | 2783 | 2.56k | auto& module = operation.first; | 2784 | 2.56k | auto& op = operation.second; | 2785 | | | 2786 | 2.56k | if ( i > 0 ) { | 2787 | 1.68k | auto& prevModule = operations[i-1].first; | 2788 | 1.68k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 1.68k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 1.68k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 1.68k | if ( curModifier.size() == 0 ) { | 2793 | 550k | for (size_t j = 0; j < 512; j++) { | 2794 | 549k | curModifier.push_back(1); | 2795 | 549k | } | 2796 | 1.07k | } else { | 2797 | 30.2k | for (auto& c : curModifier) { | 2798 | 30.2k | c++; | 2799 | 30.2k | } | 2800 | 611 | } | 2801 | 1.68k | } | 2802 | 1.68k | } | 2803 | | | 2804 | 2.56k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 2.56k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 2.56k | const auto& result = results.back(); | 2811 | | | 2812 | 2.56k | if ( result.second != std::nullopt ) { | 2813 | 1.25k | 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.25k | } | 2820 | | | 2821 | 2.56k | 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.56k | if ( options.disableTests == false ) { | 2830 | 2.56k | tests::test(op, result.second); | 2831 | 2.56k | } | 2832 | | | 2833 | 2.56k | postprocess(module, op, result); | 2834 | 2.56k | } | 2835 | | | 2836 | 938 | if ( options.noCompare == false ) { | 2837 | 882 | compare(operations, results, data, size); | 2838 | 882 | } | 2839 | 938 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 429 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 429 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 429 | 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 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 1.56k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.56k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 1.56k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 429 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 429 | #if 1 | 2745 | 429 | { | 2746 | 429 | std::set<uint64_t> moduleIDs; | 2747 | 429 | for (const auto& m : modules ) { | 2748 | 369 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 369 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 369 | moduleIDs.insert(moduleID); | 2756 | 369 | } | 2757 | | | 2758 | 429 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.32k | for (const auto& op : operations) { | 2760 | 1.32k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.32k | } | 2762 | | | 2763 | 429 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 429 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 429 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 429 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 429 | } | 2771 | 429 | #endif | 2772 | | | 2773 | 429 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 429 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.75k | 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 | 957 | auto& prevModule = operations[i-1].first; | 2788 | 957 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 957 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 957 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 957 | if ( curModifier.size() == 0 ) { | 2793 | 402k | for (size_t j = 0; j < 512; j++) { | 2794 | 401k | curModifier.push_back(1); | 2795 | 401k | } | 2796 | 785 | } else { | 2797 | 5.17k | for (auto& c : curModifier) { | 2798 | 5.17k | c++; | 2799 | 5.17k | } | 2800 | 172 | } | 2801 | 957 | } | 2802 | 957 | } | 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 | 194 | 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 | 194 | } | 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 | 429 | if ( options.noCompare == false ) { | 2837 | 369 | compare(operations, results, data, size); | 2838 | 369 | } | 2839 | 429 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 72 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 72 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 72 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 372 | do { | 2725 | 372 | auto op = getOp(&parentDs, data, size); | 2726 | 372 | auto module = getModule(parentDs); | 2727 | 372 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 372 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 372 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 372 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 72 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 72 | #if 1 | 2745 | 72 | { | 2746 | 72 | std::set<uint64_t> moduleIDs; | 2747 | 72 | for (const auto& m : modules ) { | 2748 | 31 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 31 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 31 | moduleIDs.insert(moduleID); | 2756 | 31 | } | 2757 | | | 2758 | 72 | std::set<uint64_t> operationModuleIDs; | 2759 | 208 | for (const auto& op : operations) { | 2760 | 208 | operationModuleIDs.insert(op.first->ID); | 2761 | 208 | } | 2762 | | | 2763 | 72 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 72 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 72 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 72 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 72 | } | 2771 | 72 | #endif | 2772 | | | 2773 | 72 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 72 | 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 | 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 | 177 | auto& prevModule = operations[i-1].first; | 2788 | 177 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 177 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 177 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 177 | if ( curModifier.size() == 0 ) { | 2793 | 65.1k | for (size_t j = 0; j < 512; j++) { | 2794 | 65.0k | curModifier.push_back(1); | 2795 | 65.0k | } | 2796 | 127 | } else { | 2797 | 294 | for (auto& c : curModifier) { | 2798 | 294 | c++; | 2799 | 294 | } | 2800 | 50 | } | 2801 | 177 | } | 2802 | 177 | } | 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 | 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 | 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 | 72 | if ( options.noCompare == false ) { | 2837 | 31 | compare(operations, results, data, size); | 2838 | 31 | } | 2839 | 72 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 381 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 381 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 381 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.09k | do { | 2725 | 1.09k | auto op = getOp(&parentDs, data, size); | 2726 | 1.09k | auto module = getModule(parentDs); | 2727 | 1.09k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 1.09k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.09k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 1.09k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 381 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 381 | #if 1 | 2745 | 381 | { | 2746 | 381 | std::set<uint64_t> moduleIDs; | 2747 | 381 | for (const auto& m : modules ) { | 2748 | 335 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 335 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 335 | moduleIDs.insert(moduleID); | 2756 | 335 | } | 2757 | | | 2758 | 381 | std::set<uint64_t> operationModuleIDs; | 2759 | 904 | for (const auto& op : operations) { | 2760 | 904 | operationModuleIDs.insert(op.first->ID); | 2761 | 904 | } | 2762 | | | 2763 | 381 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 381 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 381 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 381 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 381 | } | 2771 | 381 | #endif | 2772 | | | 2773 | 381 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 381 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.28k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 904 | auto& operation = operations[i]; | 2782 | | | 2783 | 904 | auto& module = operation.first; | 2784 | 904 | auto& op = operation.second; | 2785 | | | 2786 | 904 | if ( i > 0 ) { | 2787 | 569 | auto& prevModule = operations[i-1].first; | 2788 | 569 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 569 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 569 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 569 | if ( curModifier.size() == 0 ) { | 2793 | 234k | for (size_t j = 0; j < 512; j++) { | 2794 | 233k | curModifier.push_back(1); | 2795 | 233k | } | 2796 | 457 | } else { | 2797 | 17.4k | for (auto& c : curModifier) { | 2798 | 17.4k | c++; | 2799 | 17.4k | } | 2800 | 112 | } | 2801 | 569 | } | 2802 | 569 | } | 2803 | | | 2804 | 904 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 904 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 904 | const auto& result = results.back(); | 2811 | | | 2812 | 904 | if ( result.second != std::nullopt ) { | 2813 | 411 | 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 | 411 | } | 2820 | | | 2821 | 904 | 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 | 904 | if ( options.disableTests == false ) { | 2830 | 904 | tests::test(op, result.second); | 2831 | 904 | } | 2832 | | | 2833 | 904 | postprocess(module, op, result); | 2834 | 904 | } | 2835 | | | 2836 | 381 | if ( options.noCompare == false ) { | 2837 | 335 | compare(operations, results, data, size); | 2838 | 335 | } | 2839 | 381 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 68 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 68 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 68 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 345 | do { | 2725 | 345 | auto op = getOp(&parentDs, data, size); | 2726 | 345 | auto module = getModule(parentDs); | 2727 | 345 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 345 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 345 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 345 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 68 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 68 | #if 1 | 2745 | 68 | { | 2746 | 68 | std::set<uint64_t> moduleIDs; | 2747 | 68 | for (const auto& m : modules ) { | 2748 | 36 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 36 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 36 | moduleIDs.insert(moduleID); | 2756 | 36 | } | 2757 | | | 2758 | 68 | std::set<uint64_t> operationModuleIDs; | 2759 | 219 | for (const auto& op : operations) { | 2760 | 219 | operationModuleIDs.insert(op.first->ID); | 2761 | 219 | } | 2762 | | | 2763 | 68 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 68 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 68 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 68 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 68 | } | 2771 | 68 | #endif | 2772 | | | 2773 | 68 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 68 | 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 | 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 | 183 | auto& prevModule = operations[i-1].first; | 2788 | 183 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 183 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 183 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 183 | if ( curModifier.size() == 0 ) { | 2793 | 66.1k | for (size_t j = 0; j < 512; j++) { | 2794 | 66.0k | curModifier.push_back(1); | 2795 | 66.0k | } | 2796 | 129 | } else { | 2797 | 249 | for (auto& c : curModifier) { | 2798 | 249 | c++; | 2799 | 249 | } | 2800 | 54 | } | 2801 | 183 | } | 2802 | 183 | } | 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 | 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 | 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 | 68 | if ( options.noCompare == false ) { | 2837 | 36 | compare(operations, results, data, size); | 2838 | 36 | } | 2839 | 68 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 64 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 64 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 64 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 358 | do { | 2725 | 358 | auto op = getOp(&parentDs, data, size); | 2726 | 358 | auto module = getModule(parentDs); | 2727 | 358 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 358 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 358 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 358 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 64 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 64 | #if 1 | 2745 | 64 | { | 2746 | 64 | std::set<uint64_t> moduleIDs; | 2747 | 64 | for (const auto& m : modules ) { | 2748 | 27 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 27 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 27 | moduleIDs.insert(moduleID); | 2756 | 27 | } | 2757 | | | 2758 | 64 | std::set<uint64_t> operationModuleIDs; | 2759 | 183 | for (const auto& op : operations) { | 2760 | 183 | operationModuleIDs.insert(op.first->ID); | 2761 | 183 | } | 2762 | | | 2763 | 64 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 64 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 64 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 64 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 64 | } | 2771 | 64 | #endif | 2772 | | | 2773 | 64 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 64 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 247 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 183 | auto& operation = operations[i]; | 2782 | | | 2783 | 183 | auto& module = operation.first; | 2784 | 183 | auto& op = operation.second; | 2785 | | | 2786 | 183 | if ( i > 0 ) { | 2787 | 156 | auto& prevModule = operations[i-1].first; | 2788 | 156 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 156 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 156 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 156 | if ( curModifier.size() == 0 ) { | 2793 | 63.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 62.9k | curModifier.push_back(1); | 2795 | 62.9k | } | 2796 | 123 | } else { | 2797 | 331 | for (auto& c : curModifier) { | 2798 | 331 | c++; | 2799 | 331 | } | 2800 | 33 | } | 2801 | 156 | } | 2802 | 156 | } | 2803 | | | 2804 | 183 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 183 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 183 | const auto& result = results.back(); | 2811 | | | 2812 | 183 | 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 | 183 | 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 | 183 | if ( options.disableTests == false ) { | 2830 | 183 | tests::test(op, result.second); | 2831 | 183 | } | 2832 | | | 2833 | 183 | postprocess(module, op, result); | 2834 | 183 | } | 2835 | | | 2836 | 64 | if ( options.noCompare == false ) { | 2837 | 27 | compare(operations, results, data, size); | 2838 | 27 | } | 2839 | 64 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 72 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 72 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 72 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 409 | do { | 2725 | 409 | auto op = getOp(&parentDs, data, size); | 2726 | 409 | auto module = getModule(parentDs); | 2727 | 409 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 409 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 409 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 409 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 72 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 72 | #if 1 | 2745 | 72 | { | 2746 | 72 | std::set<uint64_t> moduleIDs; | 2747 | 72 | for (const auto& m : modules ) { | 2748 | 34 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 34 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 34 | moduleIDs.insert(moduleID); | 2756 | 34 | } | 2757 | | | 2758 | 72 | std::set<uint64_t> operationModuleIDs; | 2759 | 235 | for (const auto& op : operations) { | 2760 | 235 | operationModuleIDs.insert(op.first->ID); | 2761 | 235 | } | 2762 | | | 2763 | 72 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 72 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 72 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 72 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 72 | } | 2771 | 72 | #endif | 2772 | | | 2773 | 72 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 72 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 307 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 235 | auto& operation = operations[i]; | 2782 | | | 2783 | 235 | auto& module = operation.first; | 2784 | 235 | auto& op = operation.second; | 2785 | | | 2786 | 235 | if ( i > 0 ) { | 2787 | 201 | auto& prevModule = operations[i-1].first; | 2788 | 201 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 201 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 201 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 201 | 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 | 440 | for (auto& c : curModifier) { | 2798 | 440 | c++; | 2799 | 440 | } | 2800 | 81 | } | 2801 | 201 | } | 2802 | 201 | } | 2803 | | | 2804 | 235 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 235 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 235 | const auto& result = results.back(); | 2811 | | | 2812 | 235 | 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 | 235 | 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 | 235 | if ( options.disableTests == false ) { | 2830 | 235 | tests::test(op, result.second); | 2831 | 235 | } | 2832 | | | 2833 | 235 | postprocess(module, op, result); | 2834 | 235 | } | 2835 | | | 2836 | 72 | if ( options.noCompare == false ) { | 2837 | 34 | compare(operations, results, data, size); | 2838 | 34 | } | 2839 | 72 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 261 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 261 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 261 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 899 | do { | 2725 | 899 | auto op = getOp(&parentDs, data, size); | 2726 | 899 | auto module = getModule(parentDs); | 2727 | 899 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 899 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 899 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 899 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 261 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 261 | #if 1 | 2745 | 261 | { | 2746 | 261 | std::set<uint64_t> moduleIDs; | 2747 | 261 | for (const auto& m : modules ) { | 2748 | 218 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 218 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 218 | moduleIDs.insert(moduleID); | 2756 | 218 | } | 2757 | | | 2758 | 261 | std::set<uint64_t> operationModuleIDs; | 2759 | 674 | for (const auto& op : operations) { | 2760 | 674 | operationModuleIDs.insert(op.first->ID); | 2761 | 674 | } | 2762 | | | 2763 | 261 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 261 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 261 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 261 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 261 | } | 2771 | 261 | #endif | 2772 | | | 2773 | 261 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 261 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 935 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 674 | auto& operation = operations[i]; | 2782 | | | 2783 | 674 | auto& module = operation.first; | 2784 | 674 | auto& op = operation.second; | 2785 | | | 2786 | 674 | if ( i > 0 ) { | 2787 | 456 | auto& prevModule = operations[i-1].first; | 2788 | 456 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 456 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 456 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 456 | if ( curModifier.size() == 0 ) { | 2793 | 171k | for (size_t j = 0; j < 512; j++) { | 2794 | 171k | curModifier.push_back(1); | 2795 | 171k | } | 2796 | 335 | } else { | 2797 | 25.0k | for (auto& c : curModifier) { | 2798 | 25.0k | c++; | 2799 | 25.0k | } | 2800 | 121 | } | 2801 | 456 | } | 2802 | 456 | } | 2803 | | | 2804 | 674 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 674 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 674 | const auto& result = results.back(); | 2811 | | | 2812 | 674 | if ( result.second != std::nullopt ) { | 2813 | 427 | 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 | 427 | } | 2820 | | | 2821 | 674 | 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 | 674 | if ( options.disableTests == false ) { | 2830 | 674 | tests::test(op, result.second); | 2831 | 674 | } | 2832 | | | 2833 | 674 | postprocess(module, op, result); | 2834 | 674 | } | 2835 | | | 2836 | 261 | if ( options.noCompare == false ) { | 2837 | 218 | compare(operations, results, data, size); | 2838 | 218 | } | 2839 | 261 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 34 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 34 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 34 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 60 | do { | 2725 | 60 | auto op = getOp(&parentDs, data, size); | 2726 | 60 | auto module = getModule(parentDs); | 2727 | 60 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 60 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 60 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 60 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 34 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 34 | #if 1 | 2745 | 34 | { | 2746 | 34 | std::set<uint64_t> moduleIDs; | 2747 | 34 | for (const auto& m : modules ) { | 2748 | 13 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 13 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 13 | moduleIDs.insert(moduleID); | 2756 | 13 | } | 2757 | | | 2758 | 34 | std::set<uint64_t> operationModuleIDs; | 2759 | 34 | for (const auto& op : operations) { | 2760 | 28 | operationModuleIDs.insert(op.first->ID); | 2761 | 28 | } | 2762 | | | 2763 | 34 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 34 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 34 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 34 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 34 | } | 2771 | 34 | #endif | 2772 | | | 2773 | 34 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 34 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 62 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 28 | auto& operation = operations[i]; | 2782 | | | 2783 | 28 | auto& module = operation.first; | 2784 | 28 | auto& op = operation.second; | 2785 | | | 2786 | 28 | if ( i > 0 ) { | 2787 | 15 | auto& prevModule = operations[i-1].first; | 2788 | 15 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 15 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 15 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 15 | if ( curModifier.size() == 0 ) { | 2793 | 2.05k | for (size_t j = 0; j < 512; j++) { | 2794 | 2.04k | curModifier.push_back(1); | 2795 | 2.04k | } | 2796 | 11 | } else { | 2797 | 238 | for (auto& c : curModifier) { | 2798 | 238 | c++; | 2799 | 238 | } | 2800 | 11 | } | 2801 | 15 | } | 2802 | 15 | } | 2803 | | | 2804 | 28 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 28 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 28 | const auto& result = results.back(); | 2811 | | | 2812 | 28 | 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 | 28 | 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 | 28 | if ( options.disableTests == false ) { | 2830 | 28 | tests::test(op, result.second); | 2831 | 28 | } | 2832 | | | 2833 | 28 | postprocess(module, op, result); | 2834 | 28 | } | 2835 | | | 2836 | 34 | if ( options.noCompare == false ) { | 2837 | 13 | compare(operations, results, data, size); | 2838 | 13 | } | 2839 | 34 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 74 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 74 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 74 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 359 | do { | 2725 | 359 | auto op = getOp(&parentDs, data, size); | 2726 | 359 | auto module = getModule(parentDs); | 2727 | 359 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 359 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 359 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 359 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 74 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 74 | #if 1 | 2745 | 74 | { | 2746 | 74 | std::set<uint64_t> moduleIDs; | 2747 | 74 | for (const auto& m : modules ) { | 2748 | 30 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 30 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 30 | moduleIDs.insert(moduleID); | 2756 | 30 | } | 2757 | | | 2758 | 74 | std::set<uint64_t> operationModuleIDs; | 2759 | 193 | for (const auto& op : operations) { | 2760 | 193 | operationModuleIDs.insert(op.first->ID); | 2761 | 193 | } | 2762 | | | 2763 | 74 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 74 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 74 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 74 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 74 | } | 2771 | 74 | #endif | 2772 | | | 2773 | 74 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 74 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 267 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 193 | auto& operation = operations[i]; | 2782 | | | 2783 | 193 | auto& module = operation.first; | 2784 | 193 | auto& op = operation.second; | 2785 | | | 2786 | 193 | if ( i > 0 ) { | 2787 | 163 | auto& prevModule = operations[i-1].first; | 2788 | 163 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 163 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 163 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 163 | if ( curModifier.size() == 0 ) { | 2793 | 43.6k | for (size_t j = 0; j < 512; j++) { | 2794 | 43.5k | curModifier.push_back(1); | 2795 | 43.5k | } | 2796 | 85 | } else { | 2797 | 315 | for (auto& c : curModifier) { | 2798 | 315 | c++; | 2799 | 315 | } | 2800 | 78 | } | 2801 | 163 | } | 2802 | 163 | } | 2803 | | | 2804 | 193 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 193 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 193 | const auto& result = results.back(); | 2811 | | | 2812 | 193 | 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 | 193 | 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 | 193 | if ( options.disableTests == false ) { | 2830 | 193 | tests::test(op, result.second); | 2831 | 193 | } | 2832 | | | 2833 | 193 | postprocess(module, op, result); | 2834 | 193 | } | 2835 | | | 2836 | 74 | if ( options.noCompare == false ) { | 2837 | 30 | compare(operations, results, data, size); | 2838 | 30 | } | 2839 | 74 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 72 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 72 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 72 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 401 | do { | 2725 | 401 | auto op = getOp(&parentDs, data, size); | 2726 | 401 | auto module = getModule(parentDs); | 2727 | 401 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 401 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 401 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 401 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 72 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 72 | #if 1 | 2745 | 72 | { | 2746 | 72 | std::set<uint64_t> moduleIDs; | 2747 | 72 | for (const auto& m : modules ) { | 2748 | 29 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 29 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 29 | moduleIDs.insert(moduleID); | 2756 | 29 | } | 2757 | | | 2758 | 72 | std::set<uint64_t> operationModuleIDs; | 2759 | 190 | for (const auto& op : operations) { | 2760 | 190 | operationModuleIDs.insert(op.first->ID); | 2761 | 190 | } | 2762 | | | 2763 | 72 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 72 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 72 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 72 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 72 | } | 2771 | 72 | #endif | 2772 | | | 2773 | 72 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 72 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 262 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 190 | auto& operation = operations[i]; | 2782 | | | 2783 | 190 | auto& module = operation.first; | 2784 | 190 | auto& op = operation.second; | 2785 | | | 2786 | 190 | if ( i > 0 ) { | 2787 | 161 | auto& prevModule = operations[i-1].first; | 2788 | 161 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 161 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 161 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 161 | if ( curModifier.size() == 0 ) { | 2793 | 60.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 59.9k | curModifier.push_back(1); | 2795 | 59.9k | } | 2796 | 117 | } else { | 2797 | 263 | for (auto& c : curModifier) { | 2798 | 263 | c++; | 2799 | 263 | } | 2800 | 44 | } | 2801 | 161 | } | 2802 | 161 | } | 2803 | | | 2804 | 190 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 190 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 190 | const auto& result = results.back(); | 2811 | | | 2812 | 190 | 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 | 190 | 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 | 190 | if ( options.disableTests == false ) { | 2830 | 190 | tests::test(op, result.second); | 2831 | 190 | } | 2832 | | | 2833 | 190 | postprocess(module, op, result); | 2834 | 190 | } | 2835 | | | 2836 | 72 | if ( options.noCompare == false ) { | 2837 | 29 | compare(operations, results, data, size); | 2838 | 29 | } | 2839 | 72 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 23 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 23 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 23 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 36 | do { | 2725 | 36 | auto op = getOp(&parentDs, data, size); | 2726 | 36 | auto module = getModule(parentDs); | 2727 | 36 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 36 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 36 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 9 | break; | 2736 | 9 | } | 2737 | 36 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 23 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 23 | #if 1 | 2745 | 23 | { | 2746 | 23 | std::set<uint64_t> moduleIDs; | 2747 | 23 | for (const auto& m : modules ) { | 2748 | 10 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 10 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 10 | moduleIDs.insert(moduleID); | 2756 | 10 | } | 2757 | | | 2758 | 23 | std::set<uint64_t> operationModuleIDs; | 2759 | 23 | for (const auto& op : operations) { | 2760 | 19 | operationModuleIDs.insert(op.first->ID); | 2761 | 19 | } | 2762 | | | 2763 | 23 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 23 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 23 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 23 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 23 | } | 2771 | 23 | #endif | 2772 | | | 2773 | 23 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 23 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 42 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 19 | auto& operation = operations[i]; | 2782 | | | 2783 | 19 | auto& module = operation.first; | 2784 | 19 | auto& op = operation.second; | 2785 | | | 2786 | 19 | if ( i > 0 ) { | 2787 | 9 | auto& prevModule = operations[i-1].first; | 2788 | 9 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 9 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 9 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 9 | if ( curModifier.size() == 0 ) { | 2793 | 513 | for (size_t j = 0; j < 512; j++) { | 2794 | 512 | curModifier.push_back(1); | 2795 | 512 | } | 2796 | 8 | } else { | 2797 | 3.46k | for (auto& c : curModifier) { | 2798 | 3.46k | c++; | 2799 | 3.46k | } | 2800 | 8 | } | 2801 | 9 | } | 2802 | 9 | } | 2803 | | | 2804 | 19 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 19 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 19 | const auto& result = results.back(); | 2811 | | | 2812 | 19 | 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 | 19 | 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 | 19 | if ( options.disableTests == false ) { | 2830 | 19 | tests::test(op, result.second); | 2831 | 19 | } | 2832 | | | 2833 | 19 | postprocess(module, op, result); | 2834 | 19 | } | 2835 | | | 2836 | 23 | if ( options.noCompare == false ) { | 2837 | 10 | compare(operations, results, data, size); | 2838 | 10 | } | 2839 | 23 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 78 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 78 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 78 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 409 | do { | 2725 | 409 | auto op = getOp(&parentDs, data, size); | 2726 | 409 | auto module = getModule(parentDs); | 2727 | 409 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 409 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 409 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 409 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 78 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 78 | #if 1 | 2745 | 78 | { | 2746 | 78 | std::set<uint64_t> moduleIDs; | 2747 | 78 | for (const auto& m : modules ) { | 2748 | 34 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 34 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 34 | moduleIDs.insert(moduleID); | 2756 | 34 | } | 2757 | | | 2758 | 78 | std::set<uint64_t> operationModuleIDs; | 2759 | 231 | for (const auto& op : operations) { | 2760 | 231 | operationModuleIDs.insert(op.first->ID); | 2761 | 231 | } | 2762 | | | 2763 | 78 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 78 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 78 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 78 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 78 | } | 2771 | 78 | #endif | 2772 | | | 2773 | 78 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 78 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 309 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 231 | auto& operation = operations[i]; | 2782 | | | 2783 | 231 | auto& module = operation.first; | 2784 | 231 | auto& op = operation.second; | 2785 | | | 2786 | 231 | if ( i > 0 ) { | 2787 | 197 | auto& prevModule = operations[i-1].first; | 2788 | 197 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 197 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 197 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 197 | if ( curModifier.size() == 0 ) { | 2793 | 86.1k | for (size_t j = 0; j < 512; j++) { | 2794 | 86.0k | curModifier.push_back(1); | 2795 | 86.0k | } | 2796 | 168 | } else { | 2797 | 277 | for (auto& c : curModifier) { | 2798 | 277 | c++; | 2799 | 277 | } | 2800 | 29 | } | 2801 | 197 | } | 2802 | 197 | } | 2803 | | | 2804 | 231 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 231 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 231 | const auto& result = results.back(); | 2811 | | | 2812 | 231 | 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 | 231 | 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 | 231 | if ( options.disableTests == false ) { | 2830 | 231 | tests::test(op, result.second); | 2831 | 231 | } | 2832 | | | 2833 | 231 | postprocess(module, op, result); | 2834 | 231 | } | 2835 | | | 2836 | 78 | if ( options.noCompare == false ) { | 2837 | 34 | compare(operations, results, data, size); | 2838 | 34 | } | 2839 | 78 | } |
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 | 69 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 69 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 69 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 395 | do { | 2725 | 395 | auto op = getOp(&parentDs, data, size); | 2726 | 395 | auto module = getModule(parentDs); | 2727 | 395 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 395 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 395 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 395 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 69 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 69 | #if 1 | 2745 | 69 | { | 2746 | 69 | std::set<uint64_t> moduleIDs; | 2747 | 69 | for (const auto& m : modules ) { | 2748 | 29 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 29 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 29 | moduleIDs.insert(moduleID); | 2756 | 29 | } | 2757 | | | 2758 | 69 | std::set<uint64_t> operationModuleIDs; | 2759 | 171 | for (const auto& op : operations) { | 2760 | 171 | operationModuleIDs.insert(op.first->ID); | 2761 | 171 | } | 2762 | | | 2763 | 69 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 69 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 69 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 69 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 69 | } | 2771 | 69 | #endif | 2772 | | | 2773 | 69 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 69 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 240 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 171 | auto& operation = operations[i]; | 2782 | | | 2783 | 171 | auto& module = operation.first; | 2784 | 171 | auto& op = operation.second; | 2785 | | | 2786 | 171 | if ( i > 0 ) { | 2787 | 142 | auto& prevModule = operations[i-1].first; | 2788 | 142 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 142 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 142 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 142 | 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 | 307 | for (auto& c : curModifier) { | 2798 | 307 | c++; | 2799 | 307 | } | 2800 | 56 | } | 2801 | 142 | } | 2802 | 142 | } | 2803 | | | 2804 | 171 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 171 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 171 | const auto& result = results.back(); | 2811 | | | 2812 | 171 | 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 | 171 | 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 | 171 | if ( options.disableTests == false ) { | 2830 | 171 | tests::test(op, result.second); | 2831 | 171 | } | 2832 | | | 2833 | 171 | postprocess(module, op, result); | 2834 | 171 | } | 2835 | | | 2836 | 69 | if ( options.noCompare == false ) { | 2837 | 29 | compare(operations, results, data, size); | 2838 | 29 | } | 2839 | 69 | } |
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 | 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 | 437 | do { | 2725 | 437 | auto op = getOp(&parentDs, data, size); | 2726 | 437 | auto module = getModule(parentDs); | 2727 | 437 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 437 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 437 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 437 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 76 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 76 | #if 1 | 2745 | 76 | { | 2746 | 76 | std::set<uint64_t> moduleIDs; | 2747 | 76 | for (const auto& m : modules ) { | 2748 | 30 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 30 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 30 | moduleIDs.insert(moduleID); | 2756 | 30 | } | 2757 | | | 2758 | 76 | std::set<uint64_t> operationModuleIDs; | 2759 | 202 | for (const auto& op : operations) { | 2760 | 202 | operationModuleIDs.insert(op.first->ID); | 2761 | 202 | } | 2762 | | | 2763 | 76 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 76 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 76 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 76 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 76 | } | 2771 | 76 | #endif | 2772 | | | 2773 | 76 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 76 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 278 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 202 | auto& operation = operations[i]; | 2782 | | | 2783 | 202 | auto& module = operation.first; | 2784 | 202 | auto& op = operation.second; | 2785 | | | 2786 | 202 | if ( i > 0 ) { | 2787 | 172 | auto& prevModule = operations[i-1].first; | 2788 | 172 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 172 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 172 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 172 | 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 | 137 | } else { | 2797 | 379 | for (auto& c : curModifier) { | 2798 | 379 | c++; | 2799 | 379 | } | 2800 | 137 | } | 2801 | 172 | } | 2802 | 172 | } | 2803 | | | 2804 | 202 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 202 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 202 | const auto& result = results.back(); | 2811 | | | 2812 | 202 | 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 | 202 | 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 | 202 | if ( options.disableTests == false ) { | 2830 | 202 | tests::test(op, result.second); | 2831 | 202 | } | 2832 | | | 2833 | 202 | postprocess(module, op, result); | 2834 | 202 | } | 2835 | | | 2836 | 76 | if ( options.noCompare == false ) { | 2837 | 30 | compare(operations, results, data, size); | 2838 | 30 | } | 2839 | 76 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 3.14k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 3.14k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 3.14k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.41k | do { | 2725 | 4.41k | auto op = getOp(&parentDs, data, size); | 2726 | 4.41k | auto module = getModule(parentDs); | 2727 | 4.41k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 4.41k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 4.41k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 49 | break; | 2736 | 49 | } | 2737 | 4.41k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 3.14k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 3.14k | #if 1 | 2745 | 3.14k | { | 2746 | 3.14k | std::set<uint64_t> moduleIDs; | 2747 | 3.14k | for (const auto& m : modules ) { | 2748 | 2.97k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 2.97k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 2.97k | moduleIDs.insert(moduleID); | 2756 | 2.97k | } | 2757 | | | 2758 | 3.14k | std::set<uint64_t> operationModuleIDs; | 2759 | 4.04k | for (const auto& op : operations) { | 2760 | 4.04k | operationModuleIDs.insert(op.first->ID); | 2761 | 4.04k | } | 2762 | | | 2763 | 3.14k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 3.14k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 3.14k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 3.14k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 3.14k | } | 2771 | 3.14k | #endif | 2772 | | | 2773 | 3.14k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 3.14k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 7.18k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 4.04k | auto& operation = operations[i]; | 2782 | | | 2783 | 4.04k | auto& module = operation.first; | 2784 | 4.04k | auto& op = operation.second; | 2785 | | | 2786 | 4.04k | if ( i > 0 ) { | 2787 | 1.07k | auto& prevModule = operations[i-1].first; | 2788 | 1.07k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 1.07k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 1.07k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 1.07k | if ( curModifier.size() == 0 ) { | 2793 | 203k | for (size_t j = 0; j < 512; j++) { | 2794 | 203k | curModifier.push_back(1); | 2795 | 203k | } | 2796 | 677 | } else { | 2797 | 63.0k | for (auto& c : curModifier) { | 2798 | 63.0k | c++; | 2799 | 63.0k | } | 2800 | 677 | } | 2801 | 1.07k | } | 2802 | 1.07k | } | 2803 | | | 2804 | 4.04k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 4.04k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 4.04k | const auto& result = results.back(); | 2811 | | | 2812 | 4.04k | if ( result.second != std::nullopt ) { | 2813 | 1.89k | 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.89k | } | 2820 | | | 2821 | 4.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 | 4.04k | if ( options.disableTests == false ) { | 2830 | 4.04k | tests::test(op, result.second); | 2831 | 4.04k | } | 2832 | | | 2833 | 4.04k | postprocess(module, op, result); | 2834 | 4.04k | } | 2835 | | | 2836 | 3.14k | if ( options.noCompare == false ) { | 2837 | 2.97k | compare(operations, results, data, size); | 2838 | 2.97k | } | 2839 | 3.14k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.84k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.84k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.84k | 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 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 2.76k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 2.76k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 51 | break; | 2736 | 51 | } | 2737 | 2.76k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.84k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 1.84k | #if 1 | 2745 | 1.84k | { | 2746 | 1.84k | std::set<uint64_t> moduleIDs; | 2747 | 1.84k | for (const auto& m : modules ) { | 2748 | 1.66k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.66k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.66k | moduleIDs.insert(moduleID); | 2756 | 1.66k | } | 2757 | | | 2758 | 1.84k | std::set<uint64_t> operationModuleIDs; | 2759 | 2.45k | for (const auto& op : operations) { | 2760 | 2.45k | operationModuleIDs.insert(op.first->ID); | 2761 | 2.45k | } | 2762 | | | 2763 | 1.84k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 1.84k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 1.84k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 1.84k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 1.84k | } | 2771 | 1.84k | #endif | 2772 | | | 2773 | 1.84k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 1.84k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 4.29k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 2.45k | auto& operation = operations[i]; | 2782 | | | 2783 | 2.45k | auto& module = operation.first; | 2784 | 2.45k | auto& op = operation.second; | 2785 | | | 2786 | 2.45k | if ( i > 0 ) { | 2787 | 786 | auto& prevModule = operations[i-1].first; | 2788 | 786 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 786 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 786 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 786 | if ( curModifier.size() == 0 ) { | 2793 | 70.7k | for (size_t j = 0; j < 512; j++) { | 2794 | 70.6k | curModifier.push_back(1); | 2795 | 70.6k | } | 2796 | 648 | } else { | 2797 | 51.6k | for (auto& c : curModifier) { | 2798 | 51.6k | c++; | 2799 | 51.6k | } | 2800 | 648 | } | 2801 | 786 | } | 2802 | 786 | } | 2803 | | | 2804 | 2.45k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 2.45k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 2.45k | const auto& result = results.back(); | 2811 | | | 2812 | 2.45k | if ( result.second != std::nullopt ) { | 2813 | 869 | 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 | 869 | } | 2820 | | | 2821 | 2.45k | 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.45k | if ( options.disableTests == false ) { | 2830 | 2.45k | tests::test(op, result.second); | 2831 | 2.45k | } | 2832 | | | 2833 | 2.45k | postprocess(module, op, result); | 2834 | 2.45k | } | 2835 | | | 2836 | 1.84k | if ( options.noCompare == false ) { | 2837 | 1.66k | compare(operations, results, data, size); | 2838 | 1.66k | } | 2839 | 1.84k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 2.63k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 2.63k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 2.63k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.86k | do { | 2725 | 3.86k | auto op = getOp(&parentDs, data, size); | 2726 | 3.86k | auto module = getModule(parentDs); | 2727 | 3.86k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 3.86k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 3.86k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 57 | break; | 2736 | 57 | } | 2737 | 3.86k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 2.63k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 2.63k | #if 1 | 2745 | 2.63k | { | 2746 | 2.63k | std::set<uint64_t> moduleIDs; | 2747 | 2.63k | for (const auto& m : modules ) { | 2748 | 2.51k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 2.51k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 2.51k | moduleIDs.insert(moduleID); | 2756 | 2.51k | } | 2757 | | | 2758 | 2.63k | std::set<uint64_t> operationModuleIDs; | 2759 | 3.60k | for (const auto& op : operations) { | 2760 | 3.60k | operationModuleIDs.insert(op.first->ID); | 2761 | 3.60k | } | 2762 | | | 2763 | 2.63k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 2.63k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 2.63k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 2.63k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 2.63k | } | 2771 | 2.63k | #endif | 2772 | | | 2773 | 2.63k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 2.63k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 6.23k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 3.60k | auto& operation = operations[i]; | 2782 | | | 2783 | 3.60k | auto& module = operation.first; | 2784 | 3.60k | auto& op = operation.second; | 2785 | | | 2786 | 3.60k | if ( i > 0 ) { | 2787 | 1.08k | auto& prevModule = operations[i-1].first; | 2788 | 1.08k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 1.08k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 1.08k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 1.08k | if ( curModifier.size() == 0 ) { | 2793 | 94.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 94.2k | curModifier.push_back(1); | 2795 | 94.2k | } | 2796 | 899 | } else { | 2797 | 141k | for (auto& c : curModifier) { | 2798 | 141k | c++; | 2799 | 141k | } | 2800 | 899 | } | 2801 | 1.08k | } | 2802 | 1.08k | } | 2803 | | | 2804 | 3.60k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 3.60k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 3.60k | const auto& result = results.back(); | 2811 | | | 2812 | 3.60k | if ( result.second != std::nullopt ) { | 2813 | 1.00k | 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.00k | } | 2820 | | | 2821 | 3.60k | 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 | 3.60k | if ( options.disableTests == false ) { | 2830 | 3.60k | tests::test(op, result.second); | 2831 | 3.60k | } | 2832 | | | 2833 | 3.60k | postprocess(module, op, result); | 2834 | 3.60k | } | 2835 | | | 2836 | 2.63k | if ( options.noCompare == false ) { | 2837 | 2.51k | compare(operations, results, data, size); | 2838 | 2.51k | } | 2839 | 2.63k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 306 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 306 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 306 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 738 | do { | 2725 | 738 | auto op = getOp(&parentDs, data, size); | 2726 | 738 | auto module = getModule(parentDs); | 2727 | 738 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 738 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 738 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 33 | break; | 2736 | 33 | } | 2737 | 738 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 306 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 306 | #if 1 | 2745 | 306 | { | 2746 | 306 | std::set<uint64_t> moduleIDs; | 2747 | 306 | for (const auto& m : modules ) { | 2748 | 188 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 188 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 188 | moduleIDs.insert(moduleID); | 2756 | 188 | } | 2757 | | | 2758 | 306 | std::set<uint64_t> operationModuleIDs; | 2759 | 506 | for (const auto& op : operations) { | 2760 | 506 | operationModuleIDs.insert(op.first->ID); | 2761 | 506 | } | 2762 | | | 2763 | 306 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 306 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 306 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 306 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 306 | } | 2771 | 306 | #endif | 2772 | | | 2773 | 306 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 306 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 812 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 506 | auto& operation = operations[i]; | 2782 | | | 2783 | 506 | auto& module = operation.first; | 2784 | 506 | auto& op = operation.second; | 2785 | | | 2786 | 506 | if ( i > 0 ) { | 2787 | 318 | auto& prevModule = operations[i-1].first; | 2788 | 318 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 318 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 318 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 318 | if ( curModifier.size() == 0 ) { | 2793 | 50.7k | for (size_t j = 0; j < 512; j++) { | 2794 | 50.6k | curModifier.push_back(1); | 2795 | 50.6k | } | 2796 | 219 | } else { | 2797 | 42.6k | for (auto& c : curModifier) { | 2798 | 42.6k | c++; | 2799 | 42.6k | } | 2800 | 219 | } | 2801 | 318 | } | 2802 | 318 | } | 2803 | | | 2804 | 506 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 506 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 506 | const auto& result = results.back(); | 2811 | | | 2812 | 506 | 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 | 506 | 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 | 506 | if ( options.disableTests == false ) { | 2830 | 506 | tests::test(op, result.second); | 2831 | 506 | } | 2832 | | | 2833 | 506 | postprocess(module, op, result); | 2834 | 506 | } | 2835 | | | 2836 | 306 | if ( options.noCompare == false ) { | 2837 | 188 | compare(operations, results, data, size); | 2838 | 188 | } | 2839 | 306 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 2.55k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 2.55k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 2.55k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.09k | do { | 2725 | 5.09k | auto op = getOp(&parentDs, data, size); | 2726 | 5.09k | auto module = getModule(parentDs); | 2727 | 5.09k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 5.09k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 5.09k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 194 | break; | 2736 | 194 | } | 2737 | 5.09k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 2.55k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 2.55k | #if 1 | 2745 | 2.55k | { | 2746 | 2.55k | std::set<uint64_t> moduleIDs; | 2747 | 2.55k | for (const auto& m : modules ) { | 2748 | 2.41k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 2.41k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 2.41k | moduleIDs.insert(moduleID); | 2756 | 2.41k | } | 2757 | | | 2758 | 2.55k | std::set<uint64_t> operationModuleIDs; | 2759 | 4.81k | for (const auto& op : operations) { | 2760 | 4.81k | operationModuleIDs.insert(op.first->ID); | 2761 | 4.81k | } | 2762 | | | 2763 | 2.55k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 2.55k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 2.55k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 2.55k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 2.55k | } | 2771 | 2.55k | #endif | 2772 | | | 2773 | 2.55k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 2.55k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 7.36k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 4.81k | auto& operation = operations[i]; | 2782 | | | 2783 | 4.81k | auto& module = operation.first; | 2784 | 4.81k | auto& op = operation.second; | 2785 | | | 2786 | 4.81k | if ( i > 0 ) { | 2787 | 2.39k | auto& prevModule = operations[i-1].first; | 2788 | 2.39k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 2.39k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 2.39k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 2.39k | if ( curModifier.size() == 0 ) { | 2793 | 250k | for (size_t j = 0; j < 512; j++) { | 2794 | 250k | curModifier.push_back(1); | 2795 | 250k | } | 2796 | 1.90k | } else { | 2797 | 101k | for (auto& c : curModifier) { | 2798 | 101k | c++; | 2799 | 101k | } | 2800 | 1.90k | } | 2801 | 2.39k | } | 2802 | 2.39k | } | 2803 | | | 2804 | 4.81k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 4.81k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 4.81k | const auto& result = results.back(); | 2811 | | | 2812 | 4.81k | if ( result.second != std::nullopt ) { | 2813 | 2.94k | 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.94k | } | 2820 | | | 2821 | 4.81k | 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.81k | if ( options.disableTests == false ) { | 2830 | 4.81k | tests::test(op, result.second); | 2831 | 4.81k | } | 2832 | | | 2833 | 4.81k | postprocess(module, op, result); | 2834 | 4.81k | } | 2835 | | | 2836 | 2.55k | if ( options.noCompare == false ) { | 2837 | 2.41k | compare(operations, results, data, size); | 2838 | 2.41k | } | 2839 | 2.55k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 50 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 50 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 50 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 119 | do { | 2725 | 119 | auto op = getOp(&parentDs, data, size); | 2726 | 119 | auto module = getModule(parentDs); | 2727 | 119 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 119 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 119 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 119 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 50 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 50 | #if 1 | 2745 | 50 | { | 2746 | 50 | std::set<uint64_t> moduleIDs; | 2747 | 50 | for (const auto& m : modules ) { | 2748 | 24 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 24 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 24 | moduleIDs.insert(moduleID); | 2756 | 24 | } | 2757 | | | 2758 | 50 | std::set<uint64_t> operationModuleIDs; | 2759 | 63 | for (const auto& op : operations) { | 2760 | 63 | operationModuleIDs.insert(op.first->ID); | 2761 | 63 | } | 2762 | | | 2763 | 50 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 50 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 50 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 50 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 50 | } | 2771 | 50 | #endif | 2772 | | | 2773 | 50 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 50 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 113 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 63 | auto& operation = operations[i]; | 2782 | | | 2783 | 63 | auto& module = operation.first; | 2784 | 63 | auto& op = operation.second; | 2785 | | | 2786 | 63 | if ( i > 0 ) { | 2787 | 39 | auto& prevModule = operations[i-1].first; | 2788 | 39 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 39 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 39 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 39 | 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 | 22 | } else { | 2797 | 670 | for (auto& c : curModifier) { | 2798 | 670 | c++; | 2799 | 670 | } | 2800 | 22 | } | 2801 | 39 | } | 2802 | 39 | } | 2803 | | | 2804 | 63 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 63 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 63 | const auto& result = results.back(); | 2811 | | | 2812 | 63 | 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 | 63 | 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 | 63 | if ( options.disableTests == false ) { | 2830 | 63 | tests::test(op, result.second); | 2831 | 63 | } | 2832 | | | 2833 | 63 | postprocess(module, op, result); | 2834 | 63 | } | 2835 | | | 2836 | 50 | if ( options.noCompare == false ) { | 2837 | 24 | compare(operations, results, data, size); | 2838 | 24 | } | 2839 | 50 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 55 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 55 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 55 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 126 | do { | 2725 | 126 | auto op = getOp(&parentDs, data, size); | 2726 | 126 | auto module = getModule(parentDs); | 2727 | 126 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 126 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 126 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 126 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 55 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 55 | #if 1 | 2745 | 55 | { | 2746 | 55 | std::set<uint64_t> moduleIDs; | 2747 | 55 | for (const auto& m : modules ) { | 2748 | 29 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 29 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 29 | moduleIDs.insert(moduleID); | 2756 | 29 | } | 2757 | | | 2758 | 55 | std::set<uint64_t> operationModuleIDs; | 2759 | 74 | for (const auto& op : operations) { | 2760 | 74 | operationModuleIDs.insert(op.first->ID); | 2761 | 74 | } | 2762 | | | 2763 | 55 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 55 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 55 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 55 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 55 | } | 2771 | 55 | #endif | 2772 | | | 2773 | 55 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 55 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 129 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 74 | auto& operation = operations[i]; | 2782 | | | 2783 | 74 | auto& module = operation.first; | 2784 | 74 | auto& op = operation.second; | 2785 | | | 2786 | 74 | if ( i > 0 ) { | 2787 | 45 | auto& prevModule = operations[i-1].first; | 2788 | 45 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 45 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 45 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 45 | if ( curModifier.size() == 0 ) { | 2793 | 6.66k | for (size_t j = 0; j < 512; j++) { | 2794 | 6.65k | curModifier.push_back(1); | 2795 | 6.65k | } | 2796 | 32 | } else { | 2797 | 284 | for (auto& c : curModifier) { | 2798 | 284 | c++; | 2799 | 284 | } | 2800 | 32 | } | 2801 | 45 | } | 2802 | 45 | } | 2803 | | | 2804 | 74 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 74 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 74 | const auto& result = results.back(); | 2811 | | | 2812 | 74 | 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 | 74 | 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 | 74 | if ( options.disableTests == false ) { | 2830 | 74 | tests::test(op, result.second); | 2831 | 74 | } | 2832 | | | 2833 | 74 | postprocess(module, op, result); | 2834 | 74 | } | 2835 | | | 2836 | 55 | if ( options.noCompare == false ) { | 2837 | 29 | compare(operations, results, data, size); | 2838 | 29 | } | 2839 | 55 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 51 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 51 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 51 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 119 | do { | 2725 | 119 | auto op = getOp(&parentDs, data, size); | 2726 | 119 | auto module = getModule(parentDs); | 2727 | 119 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 119 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 119 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 119 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 51 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 51 | #if 1 | 2745 | 51 | { | 2746 | 51 | std::set<uint64_t> moduleIDs; | 2747 | 51 | for (const auto& m : modules ) { | 2748 | 27 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 27 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 27 | moduleIDs.insert(moduleID); | 2756 | 27 | } | 2757 | | | 2758 | 51 | std::set<uint64_t> operationModuleIDs; | 2759 | 74 | for (const auto& op : operations) { | 2760 | 74 | operationModuleIDs.insert(op.first->ID); | 2761 | 74 | } | 2762 | | | 2763 | 51 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 51 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 51 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 51 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 51 | } | 2771 | 51 | #endif | 2772 | | | 2773 | 51 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 51 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 125 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 74 | auto& operation = operations[i]; | 2782 | | | 2783 | 74 | auto& module = operation.first; | 2784 | 74 | auto& op = operation.second; | 2785 | | | 2786 | 74 | if ( i > 0 ) { | 2787 | 47 | auto& prevModule = operations[i-1].first; | 2788 | 47 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 47 | 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 | 454 | for (auto& c : curModifier) { | 2798 | 454 | c++; | 2799 | 454 | } | 2800 | 31 | } | 2801 | 47 | } | 2802 | 47 | } | 2803 | | | 2804 | 74 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 74 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 74 | const auto& result = results.back(); | 2811 | | | 2812 | 74 | 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 | 74 | 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 | 74 | if ( options.disableTests == false ) { | 2830 | 74 | tests::test(op, result.second); | 2831 | 74 | } | 2832 | | | 2833 | 74 | postprocess(module, op, result); | 2834 | 74 | } | 2835 | | | 2836 | 51 | if ( options.noCompare == false ) { | 2837 | 27 | compare(operations, results, data, size); | 2838 | 27 | } | 2839 | 51 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 291 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 291 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 291 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 692 | do { | 2725 | 692 | auto op = getOp(&parentDs, data, size); | 2726 | 692 | auto module = getModule(parentDs); | 2727 | 692 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 692 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 692 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 31 | break; | 2736 | 31 | } | 2737 | 692 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 291 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 291 | #if 1 | 2745 | 291 | { | 2746 | 291 | std::set<uint64_t> moduleIDs; | 2747 | 291 | for (const auto& m : modules ) { | 2748 | 123 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 123 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 123 | moduleIDs.insert(moduleID); | 2756 | 123 | } | 2757 | | | 2758 | 291 | std::set<uint64_t> operationModuleIDs; | 2759 | 379 | for (const auto& op : operations) { | 2760 | 379 | operationModuleIDs.insert(op.first->ID); | 2761 | 379 | } | 2762 | | | 2763 | 291 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 291 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 291 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 291 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 291 | } | 2771 | 291 | #endif | 2772 | | | 2773 | 291 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 291 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 670 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 379 | auto& operation = operations[i]; | 2782 | | | 2783 | 379 | auto& module = operation.first; | 2784 | 379 | auto& op = operation.second; | 2785 | | | 2786 | 379 | if ( i > 0 ) { | 2787 | 256 | auto& prevModule = operations[i-1].first; | 2788 | 256 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 256 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 256 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 256 | if ( curModifier.size() == 0 ) { | 2793 | 65.1k | for (size_t j = 0; j < 512; j++) { | 2794 | 65.0k | curModifier.push_back(1); | 2795 | 65.0k | } | 2796 | 129 | } else { | 2797 | 5.01k | for (auto& c : curModifier) { | 2798 | 5.01k | c++; | 2799 | 5.01k | } | 2800 | 129 | } | 2801 | 256 | } | 2802 | 256 | } | 2803 | | | 2804 | 379 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 379 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 379 | const auto& result = results.back(); | 2811 | | | 2812 | 379 | 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 | 379 | 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 | 379 | if ( options.disableTests == false ) { | 2830 | 379 | tests::test(op, result.second); | 2831 | 379 | } | 2832 | | | 2833 | 379 | postprocess(module, op, result); | 2834 | 379 | } | 2835 | | | 2836 | 291 | if ( options.noCompare == false ) { | 2837 | 123 | compare(operations, results, data, size); | 2838 | 123 | } | 2839 | 291 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 2.70k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 2.70k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 2.70k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.48k | do { | 2725 | 4.48k | auto op = getOp(&parentDs, data, size); | 2726 | 4.48k | auto module = getModule(parentDs); | 2727 | 4.48k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 4.48k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 4.48k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 92 | break; | 2736 | 92 | } | 2737 | 4.48k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 2.70k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 2.70k | #if 1 | 2745 | 2.70k | { | 2746 | 2.70k | std::set<uint64_t> moduleIDs; | 2747 | 2.70k | for (const auto& m : modules ) { | 2748 | 2.53k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 2.53k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 2.53k | moduleIDs.insert(moduleID); | 2756 | 2.53k | } | 2757 | | | 2758 | 2.70k | std::set<uint64_t> operationModuleIDs; | 2759 | 4.16k | for (const auto& op : operations) { | 2760 | 4.16k | operationModuleIDs.insert(op.first->ID); | 2761 | 4.16k | } | 2762 | | | 2763 | 2.70k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 2.70k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 2.70k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 2.70k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 2.70k | } | 2771 | 2.70k | #endif | 2772 | | | 2773 | 2.70k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 2.70k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 6.87k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 4.16k | auto& operation = operations[i]; | 2782 | | | 2783 | 4.16k | auto& module = operation.first; | 2784 | 4.16k | auto& op = operation.second; | 2785 | | | 2786 | 4.16k | if ( i > 0 ) { | 2787 | 1.62k | auto& prevModule = operations[i-1].first; | 2788 | 1.62k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 1.62k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 1.62k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 1.62k | if ( curModifier.size() == 0 ) { | 2793 | 210k | for (size_t j = 0; j < 512; j++) { | 2794 | 210k | curModifier.push_back(1); | 2795 | 210k | } | 2796 | 1.21k | } else { | 2797 | 307k | for (auto& c : curModifier) { | 2798 | 307k | c++; | 2799 | 307k | } | 2800 | 1.21k | } | 2801 | 1.62k | } | 2802 | 1.62k | } | 2803 | | | 2804 | 4.16k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 4.16k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 4.16k | const auto& result = results.back(); | 2811 | | | 2812 | 4.16k | if ( result.second != std::nullopt ) { | 2813 | 1.81k | 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.81k | } | 2820 | | | 2821 | 4.16k | 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.16k | if ( options.disableTests == false ) { | 2830 | 4.16k | tests::test(op, result.second); | 2831 | 4.16k | } | 2832 | | | 2833 | 4.16k | postprocess(module, op, result); | 2834 | 4.16k | } | 2835 | | | 2836 | 2.70k | if ( options.noCompare == false ) { | 2837 | 2.53k | compare(operations, results, data, size); | 2838 | 2.53k | } | 2839 | 2.70k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 41 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 41 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 41 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 95 | do { | 2725 | 95 | auto op = getOp(&parentDs, data, size); | 2726 | 95 | auto module = getModule(parentDs); | 2727 | 95 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 95 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 95 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 95 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 41 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 41 | #if 1 | 2745 | 41 | { | 2746 | 41 | std::set<uint64_t> moduleIDs; | 2747 | 41 | for (const auto& m : modules ) { | 2748 | 17 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 17 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 17 | moduleIDs.insert(moduleID); | 2756 | 17 | } | 2757 | | | 2758 | 41 | std::set<uint64_t> operationModuleIDs; | 2759 | 48 | for (const auto& op : operations) { | 2760 | 48 | operationModuleIDs.insert(op.first->ID); | 2761 | 48 | } | 2762 | | | 2763 | 41 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 41 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 41 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 41 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 41 | } | 2771 | 41 | #endif | 2772 | | | 2773 | 41 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 41 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 89 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 48 | auto& operation = operations[i]; | 2782 | | | 2783 | 48 | auto& module = operation.first; | 2784 | 48 | auto& op = operation.second; | 2785 | | | 2786 | 48 | if ( i > 0 ) { | 2787 | 31 | auto& prevModule = operations[i-1].first; | 2788 | 31 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 31 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 31 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 31 | if ( curModifier.size() == 0 ) { | 2793 | 5.13k | for (size_t j = 0; j < 512; j++) { | 2794 | 5.12k | curModifier.push_back(1); | 2795 | 5.12k | } | 2796 | 21 | } else { | 2797 | 358 | for (auto& c : curModifier) { | 2798 | 358 | c++; | 2799 | 358 | } | 2800 | 21 | } | 2801 | 31 | } | 2802 | 31 | } | 2803 | | | 2804 | 48 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 48 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 48 | const auto& result = results.back(); | 2811 | | | 2812 | 48 | 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 | 48 | 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 | 48 | if ( options.disableTests == false ) { | 2830 | 48 | tests::test(op, result.second); | 2831 | 48 | } | 2832 | | | 2833 | 48 | postprocess(module, op, result); | 2834 | 48 | } | 2835 | | | 2836 | 41 | if ( options.noCompare == false ) { | 2837 | 17 | compare(operations, results, data, size); | 2838 | 17 | } | 2839 | 41 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 39 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 39 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 39 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 90 | do { | 2725 | 90 | auto op = getOp(&parentDs, data, size); | 2726 | 90 | auto module = getModule(parentDs); | 2727 | 90 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 90 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 90 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 90 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 39 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 39 | #if 1 | 2745 | 39 | { | 2746 | 39 | std::set<uint64_t> moduleIDs; | 2747 | 39 | for (const auto& m : modules ) { | 2748 | 17 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 17 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 17 | moduleIDs.insert(moduleID); | 2756 | 17 | } | 2757 | | | 2758 | 39 | std::set<uint64_t> operationModuleIDs; | 2759 | 50 | for (const auto& op : operations) { | 2760 | 50 | operationModuleIDs.insert(op.first->ID); | 2761 | 50 | } | 2762 | | | 2763 | 39 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 39 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 39 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 39 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 39 | } | 2771 | 39 | #endif | 2772 | | | 2773 | 39 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 39 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 89 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 50 | auto& operation = operations[i]; | 2782 | | | 2783 | 50 | auto& module = operation.first; | 2784 | 50 | auto& op = operation.second; | 2785 | | | 2786 | 50 | if ( i > 0 ) { | 2787 | 33 | auto& prevModule = operations[i-1].first; | 2788 | 33 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 33 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 33 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 33 | if ( curModifier.size() == 0 ) { | 2793 | 6.66k | for (size_t j = 0; j < 512; j++) { | 2794 | 6.65k | curModifier.push_back(1); | 2795 | 6.65k | } | 2796 | 20 | } else { | 2797 | 240 | for (auto& c : curModifier) { | 2798 | 240 | c++; | 2799 | 240 | } | 2800 | 20 | } | 2801 | 33 | } | 2802 | 33 | } | 2803 | | | 2804 | 50 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 50 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 50 | const auto& result = results.back(); | 2811 | | | 2812 | 50 | 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 | 50 | 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 | 50 | if ( options.disableTests == false ) { | 2830 | 50 | tests::test(op, result.second); | 2831 | 50 | } | 2832 | | | 2833 | 50 | postprocess(module, op, result); | 2834 | 50 | } | 2835 | | | 2836 | 39 | if ( options.noCompare == false ) { | 2837 | 17 | compare(operations, results, data, size); | 2838 | 17 | } | 2839 | 39 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 40 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 40 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 40 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 99 | do { | 2725 | 99 | auto op = getOp(&parentDs, data, size); | 2726 | 99 | auto module = getModule(parentDs); | 2727 | 99 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 99 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 99 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 99 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 40 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 40 | #if 1 | 2745 | 40 | { | 2746 | 40 | std::set<uint64_t> moduleIDs; | 2747 | 40 | for (const auto& m : modules ) { | 2748 | 22 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 22 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 22 | moduleIDs.insert(moduleID); | 2756 | 22 | } | 2757 | | | 2758 | 40 | std::set<uint64_t> operationModuleIDs; | 2759 | 65 | for (const auto& op : operations) { | 2760 | 65 | operationModuleIDs.insert(op.first->ID); | 2761 | 65 | } | 2762 | | | 2763 | 40 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 40 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 40 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 40 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 40 | } | 2771 | 40 | #endif | 2772 | | | 2773 | 40 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 40 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 105 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 65 | auto& operation = operations[i]; | 2782 | | | 2783 | 65 | auto& module = operation.first; | 2784 | 65 | auto& op = operation.second; | 2785 | | | 2786 | 65 | if ( i > 0 ) { | 2787 | 43 | auto& prevModule = operations[i-1].first; | 2788 | 43 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 43 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 43 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 43 | 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 | 24 | } else { | 2797 | 265 | for (auto& c : curModifier) { | 2798 | 265 | c++; | 2799 | 265 | } | 2800 | 24 | } | 2801 | 43 | } | 2802 | 43 | } | 2803 | | | 2804 | 65 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 65 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 65 | const auto& result = results.back(); | 2811 | | | 2812 | 65 | 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 | 65 | 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 | 65 | if ( options.disableTests == false ) { | 2830 | 65 | tests::test(op, result.second); | 2831 | 65 | } | 2832 | | | 2833 | 65 | postprocess(module, op, result); | 2834 | 65 | } | 2835 | | | 2836 | 40 | if ( options.noCompare == false ) { | 2837 | 22 | compare(operations, results, data, size); | 2838 | 22 | } | 2839 | 40 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 45 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 45 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 45 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 105 | do { | 2725 | 105 | auto op = getOp(&parentDs, data, size); | 2726 | 105 | auto module = getModule(parentDs); | 2727 | 105 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 105 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 105 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 105 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 45 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 45 | #if 1 | 2745 | 45 | { | 2746 | 45 | std::set<uint64_t> moduleIDs; | 2747 | 45 | for (const auto& m : modules ) { | 2748 | 23 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 23 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 23 | moduleIDs.insert(moduleID); | 2756 | 23 | } | 2757 | | | 2758 | 45 | std::set<uint64_t> operationModuleIDs; | 2759 | 63 | for (const auto& op : operations) { | 2760 | 63 | operationModuleIDs.insert(op.first->ID); | 2761 | 63 | } | 2762 | | | 2763 | 45 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 45 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 45 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 45 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 45 | } | 2771 | 45 | #endif | 2772 | | | 2773 | 45 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 45 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 108 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 63 | auto& operation = operations[i]; | 2782 | | | 2783 | 63 | auto& module = operation.first; | 2784 | 63 | auto& op = operation.second; | 2785 | | | 2786 | 63 | if ( i > 0 ) { | 2787 | 40 | auto& prevModule = operations[i-1].first; | 2788 | 40 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 40 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 40 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 40 | 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 | 25 | } else { | 2797 | 258 | for (auto& c : curModifier) { | 2798 | 258 | c++; | 2799 | 258 | } | 2800 | 25 | } | 2801 | 40 | } | 2802 | 40 | } | 2803 | | | 2804 | 63 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 63 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 63 | const auto& result = results.back(); | 2811 | | | 2812 | 63 | 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 | 63 | 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 | 63 | if ( options.disableTests == false ) { | 2830 | 63 | tests::test(op, result.second); | 2831 | 63 | } | 2832 | | | 2833 | 63 | postprocess(module, op, result); | 2834 | 63 | } | 2835 | | | 2836 | 45 | if ( options.noCompare == false ) { | 2837 | 23 | compare(operations, results, data, size); | 2838 | 23 | } | 2839 | 45 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_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 | 202 | do { | 2725 | 202 | auto op = getOp(&parentDs, data, size); | 2726 | 202 | auto module = getModule(parentDs); | 2727 | 202 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 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 | 8 | break; | 2736 | 8 | } | 2737 | 202 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 86 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 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 | 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 | 86 | std::set<uint64_t> operationModuleIDs; | 2759 | 140 | for (const auto& op : operations) { | 2760 | 140 | operationModuleIDs.insert(op.first->ID); | 2761 | 140 | } | 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 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 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 | 226 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 140 | auto& operation = operations[i]; | 2782 | | | 2783 | 140 | auto& module = operation.first; | 2784 | 140 | auto& op = operation.second; | 2785 | | | 2786 | 140 | 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 | 86 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 86 | if ( curModifier.size() == 0 ) { | 2793 | 23.5k | for (size_t j = 0; j < 512; j++) { | 2794 | 23.5k | curModifier.push_back(1); | 2795 | 23.5k | } | 2796 | 46 | } else { | 2797 | 1.55k | for (auto& c : curModifier) { | 2798 | 1.55k | c++; | 2799 | 1.55k | } | 2800 | 40 | } | 2801 | 86 | } | 2802 | 86 | } | 2803 | | | 2804 | 140 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 140 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 140 | const auto& result = results.back(); | 2811 | | | 2812 | 140 | 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 | 140 | 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 | 140 | if ( options.disableTests == false ) { | 2830 | 140 | tests::test(op, result.second); | 2831 | 140 | } | 2832 | | | 2833 | 140 | postprocess(module, op, result); | 2834 | 140 | } | 2835 | | | 2836 | 86 | if ( options.noCompare == false ) { | 2837 | 54 | compare(operations, results, data, size); | 2838 | 54 | } | 2839 | 86 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 61 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 61 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 61 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 128 | do { | 2725 | 128 | auto op = getOp(&parentDs, data, size); | 2726 | 128 | auto module = getModule(parentDs); | 2727 | 128 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 128 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 128 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 128 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 61 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 61 | #if 1 | 2745 | 61 | { | 2746 | 61 | std::set<uint64_t> moduleIDs; | 2747 | 61 | for (const auto& m : modules ) { | 2748 | 36 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 36 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 36 | moduleIDs.insert(moduleID); | 2756 | 36 | } | 2757 | | | 2758 | 61 | std::set<uint64_t> operationModuleIDs; | 2759 | 81 | for (const auto& op : operations) { | 2760 | 81 | operationModuleIDs.insert(op.first->ID); | 2761 | 81 | } | 2762 | | | 2763 | 61 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 61 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 61 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 61 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 61 | } | 2771 | 61 | #endif | 2772 | | | 2773 | 61 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 61 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 142 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 81 | auto& operation = operations[i]; | 2782 | | | 2783 | 81 | auto& module = operation.first; | 2784 | 81 | auto& op = operation.second; | 2785 | | | 2786 | 81 | if ( i > 0 ) { | 2787 | 45 | auto& prevModule = operations[i-1].first; | 2788 | 45 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 45 | 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 | 1.66k | for (auto& c : curModifier) { | 2798 | 1.66k | c++; | 2799 | 1.66k | } | 2800 | 26 | } | 2801 | 45 | } | 2802 | 45 | } | 2803 | | | 2804 | 81 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 81 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 81 | const auto& result = results.back(); | 2811 | | | 2812 | 81 | 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 | 81 | 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 | 81 | if ( options.disableTests == false ) { | 2830 | 81 | tests::test(op, result.second); | 2831 | 81 | } | 2832 | | | 2833 | 81 | postprocess(module, op, result); | 2834 | 81 | } | 2835 | | | 2836 | 61 | if ( options.noCompare == false ) { | 2837 | 36 | compare(operations, results, data, size); | 2838 | 36 | } | 2839 | 61 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 40 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 40 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 40 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 103 | do { | 2725 | 103 | auto op = getOp(&parentDs, data, size); | 2726 | 103 | auto module = getModule(parentDs); | 2727 | 103 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 103 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 103 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 103 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 40 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 40 | #if 1 | 2745 | 40 | { | 2746 | 40 | std::set<uint64_t> moduleIDs; | 2747 | 40 | for (const auto& m : modules ) { | 2748 | 17 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 17 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 17 | moduleIDs.insert(moduleID); | 2756 | 17 | } | 2757 | | | 2758 | 40 | std::set<uint64_t> operationModuleIDs; | 2759 | 45 | for (const auto& op : operations) { | 2760 | 45 | operationModuleIDs.insert(op.first->ID); | 2761 | 45 | } | 2762 | | | 2763 | 40 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 40 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 40 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 40 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 40 | } | 2771 | 40 | #endif | 2772 | | | 2773 | 40 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 40 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 85 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 45 | auto& operation = operations[i]; | 2782 | | | 2783 | 45 | auto& module = operation.first; | 2784 | 45 | auto& op = operation.second; | 2785 | | | 2786 | 45 | if ( i > 0 ) { | 2787 | 28 | auto& prevModule = operations[i-1].first; | 2788 | 28 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 28 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 28 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 28 | if ( curModifier.size() == 0 ) { | 2793 | 5.13k | for (size_t j = 0; j < 512; j++) { | 2794 | 5.12k | curModifier.push_back(1); | 2795 | 5.12k | } | 2796 | 18 | } else { | 2797 | 217 | for (auto& c : curModifier) { | 2798 | 217 | c++; | 2799 | 217 | } | 2800 | 18 | } | 2801 | 28 | } | 2802 | 28 | } | 2803 | | | 2804 | 45 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 45 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 45 | const auto& result = results.back(); | 2811 | | | 2812 | 45 | 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 | 45 | 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 | 45 | if ( options.disableTests == false ) { | 2830 | 45 | tests::test(op, result.second); | 2831 | 45 | } | 2832 | | | 2833 | 45 | postprocess(module, op, result); | 2834 | 45 | } | 2835 | | | 2836 | 40 | if ( options.noCompare == false ) { | 2837 | 17 | compare(operations, results, data, size); | 2838 | 17 | } | 2839 | 40 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 56 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 56 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 56 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 123 | do { | 2725 | 123 | auto op = getOp(&parentDs, data, size); | 2726 | 123 | auto module = getModule(parentDs); | 2727 | 123 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 123 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 123 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 123 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 56 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 56 | #if 1 | 2745 | 56 | { | 2746 | 56 | std::set<uint64_t> moduleIDs; | 2747 | 56 | for (const auto& m : modules ) { | 2748 | 21 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 21 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 21 | moduleIDs.insert(moduleID); | 2756 | 21 | } | 2757 | | | 2758 | 56 | std::set<uint64_t> operationModuleIDs; | 2759 | 64 | for (const auto& op : operations) { | 2760 | 64 | operationModuleIDs.insert(op.first->ID); | 2761 | 64 | } | 2762 | | | 2763 | 56 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 56 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 56 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 56 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 56 | } | 2771 | 56 | #endif | 2772 | | | 2773 | 56 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 56 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 120 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 64 | auto& operation = operations[i]; | 2782 | | | 2783 | 64 | auto& module = operation.first; | 2784 | 64 | auto& op = operation.second; | 2785 | | | 2786 | 64 | if ( i > 0 ) { | 2787 | 43 | auto& prevModule = operations[i-1].first; | 2788 | 43 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 43 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 43 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 43 | 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 | 26 | } else { | 2797 | 372 | for (auto& c : curModifier) { | 2798 | 372 | c++; | 2799 | 372 | } | 2800 | 26 | } | 2801 | 43 | } | 2802 | 43 | } | 2803 | | | 2804 | 64 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 64 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 64 | const auto& result = results.back(); | 2811 | | | 2812 | 64 | 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 | 64 | 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 | 64 | if ( options.disableTests == false ) { | 2830 | 64 | tests::test(op, result.second); | 2831 | 64 | } | 2832 | | | 2833 | 64 | postprocess(module, op, result); | 2834 | 64 | } | 2835 | | | 2836 | 56 | if ( options.noCompare == false ) { | 2837 | 21 | compare(operations, results, data, size); | 2838 | 21 | } | 2839 | 56 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 78 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 78 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 78 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 172 | do { | 2725 | 172 | auto op = getOp(&parentDs, data, size); | 2726 | 172 | auto module = getModule(parentDs); | 2727 | 172 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 172 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 172 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 172 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 78 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 78 | #if 1 | 2745 | 78 | { | 2746 | 78 | std::set<uint64_t> moduleIDs; | 2747 | 78 | for (const auto& m : modules ) { | 2748 | 48 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 48 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 48 | moduleIDs.insert(moduleID); | 2756 | 48 | } | 2757 | | | 2758 | 78 | std::set<uint64_t> operationModuleIDs; | 2759 | 107 | for (const auto& op : operations) { | 2760 | 107 | operationModuleIDs.insert(op.first->ID); | 2761 | 107 | } | 2762 | | | 2763 | 78 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 78 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 78 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 78 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 78 | } | 2771 | 78 | #endif | 2772 | | | 2773 | 78 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 78 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 185 | 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 | 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 | 59 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 59 | 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 | 41 | } else { | 2797 | 21.2k | for (auto& c : curModifier) { | 2798 | 21.2k | c++; | 2799 | 21.2k | } | 2800 | 41 | } | 2801 | 59 | } | 2802 | 59 | } | 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 | 78 | if ( options.noCompare == false ) { | 2837 | 48 | compare(operations, results, data, size); | 2838 | 48 | } | 2839 | 78 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 338 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 338 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 338 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 768 | do { | 2725 | 768 | auto op = getOp(&parentDs, data, size); | 2726 | 768 | auto module = getModule(parentDs); | 2727 | 768 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 768 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 768 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 24 | break; | 2736 | 24 | } | 2737 | 768 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 338 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 338 | #if 1 | 2745 | 338 | { | 2746 | 338 | std::set<uint64_t> moduleIDs; | 2747 | 338 | for (const auto& m : modules ) { | 2748 | 224 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 224 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 224 | moduleIDs.insert(moduleID); | 2756 | 224 | } | 2757 | | | 2758 | 338 | std::set<uint64_t> operationModuleIDs; | 2759 | 530 | for (const auto& op : operations) { | 2760 | 530 | operationModuleIDs.insert(op.first->ID); | 2761 | 530 | } | 2762 | | | 2763 | 338 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 338 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 338 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 338 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 338 | } | 2771 | 338 | #endif | 2772 | | | 2773 | 338 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 338 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 868 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 530 | auto& operation = operations[i]; | 2782 | | | 2783 | 530 | auto& module = operation.first; | 2784 | 530 | auto& op = operation.second; | 2785 | | | 2786 | 530 | if ( i > 0 ) { | 2787 | 306 | auto& prevModule = operations[i-1].first; | 2788 | 306 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 306 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 306 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 306 | if ( curModifier.size() == 0 ) { | 2793 | 38.9k | for (size_t j = 0; j < 512; j++) { | 2794 | 38.9k | curModifier.push_back(1); | 2795 | 38.9k | } | 2796 | 230 | } else { | 2797 | 3.49k | for (auto& c : curModifier) { | 2798 | 3.49k | c++; | 2799 | 3.49k | } | 2800 | 230 | } | 2801 | 306 | } | 2802 | 306 | } | 2803 | | | 2804 | 530 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 530 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 530 | const auto& result = results.back(); | 2811 | | | 2812 | 530 | if ( result.second != std::nullopt ) { | 2813 | 87 | 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 | 87 | } | 2820 | | | 2821 | 530 | 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 | 530 | if ( options.disableTests == false ) { | 2830 | 530 | tests::test(op, result.second); | 2831 | 530 | } | 2832 | | | 2833 | 530 | postprocess(module, op, result); | 2834 | 530 | } | 2835 | | | 2836 | 338 | if ( options.noCompare == false ) { | 2837 | 224 | compare(operations, results, data, size); | 2838 | 224 | } | 2839 | 338 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 517 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 517 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 517 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.18k | do { | 2725 | 1.18k | auto op = getOp(&parentDs, data, size); | 2726 | 1.18k | auto module = getModule(parentDs); | 2727 | 1.18k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 1.18k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.18k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 54 | break; | 2736 | 54 | } | 2737 | 1.18k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 517 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 517 | #if 1 | 2745 | 517 | { | 2746 | 517 | std::set<uint64_t> moduleIDs; | 2747 | 517 | for (const auto& m : modules ) { | 2748 | 349 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 349 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 349 | moduleIDs.insert(moduleID); | 2756 | 349 | } | 2757 | | | 2758 | 517 | std::set<uint64_t> operationModuleIDs; | 2759 | 831 | for (const auto& op : operations) { | 2760 | 831 | operationModuleIDs.insert(op.first->ID); | 2761 | 831 | } | 2762 | | | 2763 | 517 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 517 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 517 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 517 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 517 | } | 2771 | 517 | #endif | 2772 | | | 2773 | 517 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 517 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.34k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 831 | auto& operation = operations[i]; | 2782 | | | 2783 | 831 | auto& module = operation.first; | 2784 | 831 | auto& op = operation.second; | 2785 | | | 2786 | 831 | if ( i > 0 ) { | 2787 | 482 | auto& prevModule = operations[i-1].first; | 2788 | 482 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 482 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 482 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 482 | if ( curModifier.size() == 0 ) { | 2793 | 72.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 72.1k | curModifier.push_back(1); | 2795 | 72.1k | } | 2796 | 341 | } else { | 2797 | 60.6k | for (auto& c : curModifier) { | 2798 | 60.6k | c++; | 2799 | 60.6k | } | 2800 | 341 | } | 2801 | 482 | } | 2802 | 482 | } | 2803 | | | 2804 | 831 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 831 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 831 | const auto& result = results.back(); | 2811 | | | 2812 | 831 | if ( result.second != std::nullopt ) { | 2813 | 105 | 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 | 105 | } | 2820 | | | 2821 | 831 | 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 | 831 | if ( options.disableTests == false ) { | 2830 | 831 | tests::test(op, result.second); | 2831 | 831 | } | 2832 | | | 2833 | 831 | postprocess(module, op, result); | 2834 | 831 | } | 2835 | | | 2836 | 517 | if ( options.noCompare == false ) { | 2837 | 349 | compare(operations, results, data, size); | 2838 | 349 | } | 2839 | 517 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::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 | 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 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 1.32k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.32k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 53 | break; | 2736 | 53 | } | 2737 | 1.32k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 538 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 538 | #if 1 | 2745 | 538 | { | 2746 | 538 | std::set<uint64_t> moduleIDs; | 2747 | 538 | for (const auto& m : modules ) { | 2748 | 390 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 390 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 390 | moduleIDs.insert(moduleID); | 2756 | 390 | } | 2757 | | | 2758 | 538 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.02k | for (const auto& op : operations) { | 2760 | 1.02k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.02k | } | 2762 | | | 2763 | 538 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 538 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 538 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 538 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 538 | } | 2771 | 538 | #endif | 2772 | | | 2773 | 538 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 538 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.56k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.02k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.02k | auto& module = operation.first; | 2784 | 1.02k | auto& op = operation.second; | 2785 | | | 2786 | 1.02k | if ( i > 0 ) { | 2787 | 638 | auto& prevModule = operations[i-1].first; | 2788 | 638 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 638 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 638 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 638 | if ( curModifier.size() == 0 ) { | 2793 | 65.1k | for (size_t j = 0; j < 512; j++) { | 2794 | 65.0k | curModifier.push_back(1); | 2795 | 65.0k | } | 2796 | 511 | } else { | 2797 | 215k | for (auto& c : curModifier) { | 2798 | 215k | c++; | 2799 | 215k | } | 2800 | 511 | } | 2801 | 638 | } | 2802 | 638 | } | 2803 | | | 2804 | 1.02k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.02k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.02k | const auto& result = results.back(); | 2811 | | | 2812 | 1.02k | if ( result.second != std::nullopt ) { | 2813 | 7 | 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 | 7 | } | 2820 | | | 2821 | 1.02k | 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.02k | if ( options.disableTests == false ) { | 2830 | 1.02k | tests::test(op, result.second); | 2831 | 1.02k | } | 2832 | | | 2833 | 1.02k | postprocess(module, op, result); | 2834 | 1.02k | } | 2835 | | | 2836 | 538 | if ( options.noCompare == false ) { | 2837 | 390 | compare(operations, results, data, size); | 2838 | 390 | } | 2839 | 538 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 922 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 922 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 922 | 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 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 1.88k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.88k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 59 | break; | 2736 | 59 | } | 2737 | 1.88k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 922 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 922 | #if 1 | 2745 | 922 | { | 2746 | 922 | std::set<uint64_t> moduleIDs; | 2747 | 922 | for (const auto& m : modules ) { | 2748 | 736 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 736 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 736 | moduleIDs.insert(moduleID); | 2756 | 736 | } | 2757 | | | 2758 | 922 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.53k | for (const auto& op : operations) { | 2760 | 1.53k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.53k | } | 2762 | | | 2763 | 922 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 922 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 922 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 922 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 922 | } | 2771 | 922 | #endif | 2772 | | | 2773 | 922 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 922 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 2.45k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.53k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.53k | auto& module = operation.first; | 2784 | 1.53k | auto& op = operation.second; | 2785 | | | 2786 | 1.53k | if ( i > 0 ) { | 2787 | 796 | auto& prevModule = operations[i-1].first; | 2788 | 796 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 796 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 796 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 796 | if ( curModifier.size() == 0 ) { | 2793 | 68.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 68.0k | curModifier.push_back(1); | 2795 | 68.0k | } | 2796 | 663 | } else { | 2797 | 175k | for (auto& c : curModifier) { | 2798 | 175k | c++; | 2799 | 175k | } | 2800 | 663 | } | 2801 | 796 | } | 2802 | 796 | } | 2803 | | | 2804 | 1.53k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.53k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.53k | const auto& result = results.back(); | 2811 | | | 2812 | 1.53k | if ( result.second != std::nullopt ) { | 2813 | 158 | 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 | 158 | } | 2820 | | | 2821 | 1.53k | 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.53k | if ( options.disableTests == false ) { | 2830 | 1.53k | tests::test(op, result.second); | 2831 | 1.53k | } | 2832 | | | 2833 | 1.53k | postprocess(module, op, result); | 2834 | 1.53k | } | 2835 | | | 2836 | 922 | if ( options.noCompare == false ) { | 2837 | 736 | compare(operations, results, data, size); | 2838 | 736 | } | 2839 | 922 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 44 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 44 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 44 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 105 | do { | 2725 | 105 | auto op = getOp(&parentDs, data, size); | 2726 | 105 | auto module = getModule(parentDs); | 2727 | 105 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 105 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 105 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 105 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 44 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 44 | #if 1 | 2745 | 44 | { | 2746 | 44 | std::set<uint64_t> moduleIDs; | 2747 | 44 | for (const auto& m : modules ) { | 2748 | 20 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 20 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 20 | moduleIDs.insert(moduleID); | 2756 | 20 | } | 2757 | | | 2758 | 44 | std::set<uint64_t> operationModuleIDs; | 2759 | 58 | for (const auto& op : operations) { | 2760 | 58 | operationModuleIDs.insert(op.first->ID); | 2761 | 58 | } | 2762 | | | 2763 | 44 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 44 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 44 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 44 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 44 | } | 2771 | 44 | #endif | 2772 | | | 2773 | 44 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 44 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 102 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 58 | auto& operation = operations[i]; | 2782 | | | 2783 | 58 | auto& module = operation.first; | 2784 | 58 | auto& op = operation.second; | 2785 | | | 2786 | 58 | if ( i > 0 ) { | 2787 | 38 | auto& prevModule = operations[i-1].first; | 2788 | 38 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 38 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 38 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 38 | 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 | 26 | } else { | 2797 | 2.08k | for (auto& c : curModifier) { | 2798 | 2.08k | c++; | 2799 | 2.08k | } | 2800 | 26 | } | 2801 | 38 | } | 2802 | 38 | } | 2803 | | | 2804 | 58 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 58 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 58 | const auto& result = results.back(); | 2811 | | | 2812 | 58 | 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 | 58 | 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 | 58 | if ( options.disableTests == false ) { | 2830 | 58 | tests::test(op, result.second); | 2831 | 58 | } | 2832 | | | 2833 | 58 | postprocess(module, op, result); | 2834 | 58 | } | 2835 | | | 2836 | 44 | if ( options.noCompare == false ) { | 2837 | 20 | compare(operations, results, data, size); | 2838 | 20 | } | 2839 | 44 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.50k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.50k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.50k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.51k | do { | 2725 | 2.51k | auto op = getOp(&parentDs, data, size); | 2726 | 2.51k | auto module = getModule(parentDs); | 2727 | 2.51k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 2.51k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 2.51k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 61 | break; | 2736 | 61 | } | 2737 | 2.51k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.50k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 1.50k | #if 1 | 2745 | 1.50k | { | 2746 | 1.50k | std::set<uint64_t> moduleIDs; | 2747 | 1.50k | for (const auto& m : modules ) { | 2748 | 1.36k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.36k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.36k | moduleIDs.insert(moduleID); | 2756 | 1.36k | } | 2757 | | | 2758 | 1.50k | std::set<uint64_t> operationModuleIDs; | 2759 | 2.23k | for (const auto& op : operations) { | 2760 | 2.23k | operationModuleIDs.insert(op.first->ID); | 2761 | 2.23k | } | 2762 | | | 2763 | 1.50k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 1.50k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 1.50k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 1.50k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 1.50k | } | 2771 | 1.50k | #endif | 2772 | | | 2773 | 1.50k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 1.50k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 3.74k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 2.23k | auto& operation = operations[i]; | 2782 | | | 2783 | 2.23k | auto& module = operation.first; | 2784 | 2.23k | auto& op = operation.second; | 2785 | | | 2786 | 2.23k | if ( i > 0 ) { | 2787 | 876 | auto& prevModule = operations[i-1].first; | 2788 | 876 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 876 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 876 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 876 | if ( curModifier.size() == 0 ) { | 2793 | 94.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 94.2k | curModifier.push_back(1); | 2795 | 94.2k | } | 2796 | 692 | } else { | 2797 | 218k | for (auto& c : curModifier) { | 2798 | 218k | c++; | 2799 | 218k | } | 2800 | 692 | } | 2801 | 876 | } | 2802 | 876 | } | 2803 | | | 2804 | 2.23k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 2.23k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 2.23k | const auto& result = results.back(); | 2811 | | | 2812 | 2.23k | if ( result.second != std::nullopt ) { | 2813 | 316 | 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 | 316 | } | 2820 | | | 2821 | 2.23k | 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.23k | if ( options.disableTests == false ) { | 2830 | 2.23k | tests::test(op, result.second); | 2831 | 2.23k | } | 2832 | | | 2833 | 2.23k | postprocess(module, op, result); | 2834 | 2.23k | } | 2835 | | | 2836 | 1.50k | if ( options.noCompare == false ) { | 2837 | 1.36k | compare(operations, results, data, size); | 2838 | 1.36k | } | 2839 | 1.50k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 182 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 182 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 182 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 349 | do { | 2725 | 349 | auto op = getOp(&parentDs, data, size); | 2726 | 349 | auto module = getModule(parentDs); | 2727 | 349 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 349 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 349 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 349 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 182 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 182 | #if 1 | 2745 | 182 | { | 2746 | 182 | std::set<uint64_t> moduleIDs; | 2747 | 182 | for (const auto& m : modules ) { | 2748 | 161 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 161 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 161 | moduleIDs.insert(moduleID); | 2756 | 161 | } | 2757 | | | 2758 | 182 | std::set<uint64_t> operationModuleIDs; | 2759 | 300 | for (const auto& op : operations) { | 2760 | 300 | operationModuleIDs.insert(op.first->ID); | 2761 | 300 | } | 2762 | | | 2763 | 182 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 182 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 182 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 182 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 182 | } | 2771 | 182 | #endif | 2772 | | | 2773 | 182 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 182 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 482 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 300 | auto& operation = operations[i]; | 2782 | | | 2783 | 300 | auto& module = operation.first; | 2784 | 300 | auto& op = operation.second; | 2785 | | | 2786 | 300 | if ( i > 0 ) { | 2787 | 139 | auto& prevModule = operations[i-1].first; | 2788 | 139 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 139 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 139 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 139 | if ( curModifier.size() == 0 ) { | 2793 | 29.7k | for (size_t j = 0; j < 512; j++) { | 2794 | 29.6k | curModifier.push_back(1); | 2795 | 29.6k | } | 2796 | 81 | } else { | 2797 | 4.60k | for (auto& c : curModifier) { | 2798 | 4.60k | c++; | 2799 | 4.60k | } | 2800 | 81 | } | 2801 | 139 | } | 2802 | 139 | } | 2803 | | | 2804 | 300 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 300 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 300 | const auto& result = results.back(); | 2811 | | | 2812 | 300 | if ( result.second != std::nullopt ) { | 2813 | 39 | 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 | 39 | } | 2820 | | | 2821 | 300 | 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 | 300 | if ( options.disableTests == false ) { | 2830 | 300 | tests::test(op, result.second); | 2831 | 300 | } | 2832 | | | 2833 | 300 | postprocess(module, op, result); | 2834 | 300 | } | 2835 | | | 2836 | 182 | if ( options.noCompare == false ) { | 2837 | 161 | compare(operations, results, data, size); | 2838 | 161 | } | 2839 | 182 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.79k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.79k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.79k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.61k | do { | 2725 | 2.61k | auto op = getOp(&parentDs, data, size); | 2726 | 2.61k | auto module = getModule(parentDs); | 2727 | 2.61k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 2.61k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 2.61k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 34 | break; | 2736 | 34 | } | 2737 | 2.61k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.79k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 1.79k | #if 1 | 2745 | 1.79k | { | 2746 | 1.79k | std::set<uint64_t> moduleIDs; | 2747 | 1.79k | for (const auto& m : modules ) { | 2748 | 1.61k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.61k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.61k | moduleIDs.insert(moduleID); | 2756 | 1.61k | } | 2757 | | | 2758 | 1.79k | std::set<uint64_t> operationModuleIDs; | 2759 | 2.27k | for (const auto& op : operations) { | 2760 | 2.27k | operationModuleIDs.insert(op.first->ID); | 2761 | 2.27k | } | 2762 | | | 2763 | 1.79k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 1.79k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 1.79k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 1.79k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 1.79k | } | 2771 | 1.79k | #endif | 2772 | | | 2773 | 1.79k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 1.79k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 4.06k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 2.27k | auto& operation = operations[i]; | 2782 | | | 2783 | 2.27k | auto& module = operation.first; | 2784 | 2.27k | auto& op = operation.second; | 2785 | | | 2786 | 2.27k | if ( i > 0 ) { | 2787 | 660 | auto& prevModule = operations[i-1].first; | 2788 | 660 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 660 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 660 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 660 | if ( curModifier.size() == 0 ) { | 2793 | 57.9k | for (size_t j = 0; j < 512; j++) { | 2794 | 57.8k | curModifier.push_back(1); | 2795 | 57.8k | } | 2796 | 547 | } else { | 2797 | 112k | for (auto& c : curModifier) { | 2798 | 112k | c++; | 2799 | 112k | } | 2800 | 547 | } | 2801 | 660 | } | 2802 | 660 | } | 2803 | | | 2804 | 2.27k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 2.27k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 2.27k | const auto& result = results.back(); | 2811 | | | 2812 | 2.27k | if ( result.second != std::nullopt ) { | 2813 | 61 | 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 | 61 | } | 2820 | | | 2821 | 2.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 | 2.27k | if ( options.disableTests == false ) { | 2830 | 2.27k | tests::test(op, result.second); | 2831 | 2.27k | } | 2832 | | | 2833 | 2.27k | postprocess(module, op, result); | 2834 | 2.27k | } | 2835 | | | 2836 | 1.79k | if ( options.noCompare == false ) { | 2837 | 1.61k | compare(operations, results, data, size); | 2838 | 1.61k | } | 2839 | 1.79k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::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 | 181 | do { | 2725 | 181 | auto op = getOp(&parentDs, data, size); | 2726 | 181 | auto module = getModule(parentDs); | 2727 | 181 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 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 | 5 | break; | 2736 | 5 | } | 2737 | 181 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 76 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 76 | #if 1 | 2745 | 76 | { | 2746 | 76 | std::set<uint64_t> moduleIDs; | 2747 | 76 | for (const auto& m : modules ) { | 2748 | 51 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 51 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 51 | moduleIDs.insert(moduleID); | 2756 | 51 | } | 2757 | | | 2758 | 76 | std::set<uint64_t> operationModuleIDs; | 2759 | 126 | for (const auto& op : operations) { | 2760 | 126 | operationModuleIDs.insert(op.first->ID); | 2761 | 126 | } | 2762 | | | 2763 | 76 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 76 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 76 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 76 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 76 | } | 2771 | 76 | #endif | 2772 | | | 2773 | 76 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 76 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 202 | 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 | 75 | auto& prevModule = operations[i-1].first; | 2788 | 75 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 75 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 75 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 75 | 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 | 45 | } else { | 2797 | 1.16k | for (auto& c : curModifier) { | 2798 | 1.16k | c++; | 2799 | 1.16k | } | 2800 | 45 | } | 2801 | 75 | } | 2802 | 75 | } | 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 | 45 | 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 | 45 | } | 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 | 76 | if ( options.noCompare == false ) { | 2837 | 51 | compare(operations, results, data, size); | 2838 | 51 | } | 2839 | 76 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.40k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.40k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.40k | 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 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 2.13k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 2.13k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 36 | break; | 2736 | 36 | } | 2737 | 2.13k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.40k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 1.40k | #if 1 | 2745 | 1.40k | { | 2746 | 1.40k | std::set<uint64_t> moduleIDs; | 2747 | 1.40k | for (const auto& m : modules ) { | 2748 | 1.24k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.24k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.24k | moduleIDs.insert(moduleID); | 2756 | 1.24k | } | 2757 | | | 2758 | 1.40k | std::set<uint64_t> operationModuleIDs; | 2759 | 1.84k | for (const auto& op : operations) { | 2760 | 1.84k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.84k | } | 2762 | | | 2763 | 1.40k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 1.40k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 1.40k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 1.40k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 1.40k | } | 2771 | 1.40k | #endif | 2772 | | | 2773 | 1.40k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 1.40k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 3.24k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.84k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.84k | auto& module = operation.first; | 2784 | 1.84k | auto& op = operation.second; | 2785 | | | 2786 | 1.84k | if ( i > 0 ) { | 2787 | 597 | auto& prevModule = operations[i-1].first; | 2788 | 597 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 597 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 597 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 597 | if ( curModifier.size() == 0 ) { | 2793 | 82.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 81.9k | curModifier.push_back(1); | 2795 | 81.9k | } | 2796 | 437 | } else { | 2797 | 26.7k | for (auto& c : curModifier) { | 2798 | 26.7k | c++; | 2799 | 26.7k | } | 2800 | 437 | } | 2801 | 597 | } | 2802 | 597 | } | 2803 | | | 2804 | 1.84k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.84k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.84k | const auto& result = results.back(); | 2811 | | | 2812 | 1.84k | if ( result.second != std::nullopt ) { | 2813 | 975 | 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 | 975 | } | 2820 | | | 2821 | 1.84k | 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.84k | if ( options.disableTests == false ) { | 2830 | 1.84k | tests::test(op, result.second); | 2831 | 1.84k | } | 2832 | | | 2833 | 1.84k | postprocess(module, op, result); | 2834 | 1.84k | } | 2835 | | | 2836 | 1.40k | if ( options.noCompare == false ) { | 2837 | 1.24k | compare(operations, results, data, size); | 2838 | 1.24k | } | 2839 | 1.40k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 968 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 968 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 968 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.81k | do { | 2725 | 1.81k | auto op = getOp(&parentDs, data, size); | 2726 | 1.81k | auto module = getModule(parentDs); | 2727 | 1.81k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 1.81k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.81k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 40 | break; | 2736 | 40 | } | 2737 | 1.81k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 968 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 968 | #if 1 | 2745 | 968 | { | 2746 | 968 | std::set<uint64_t> moduleIDs; | 2747 | 968 | for (const auto& m : modules ) { | 2748 | 788 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 788 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 788 | moduleIDs.insert(moduleID); | 2756 | 788 | } | 2757 | | | 2758 | 968 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.50k | for (const auto& op : operations) { | 2760 | 1.50k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.50k | } | 2762 | | | 2763 | 968 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 968 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 968 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 968 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 968 | } | 2771 | 968 | #endif | 2772 | | | 2773 | 968 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 968 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 2.47k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.50k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.50k | auto& module = operation.first; | 2784 | 1.50k | auto& op = operation.second; | 2785 | | | 2786 | 1.50k | if ( i > 0 ) { | 2787 | 714 | auto& prevModule = operations[i-1].first; | 2788 | 714 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 714 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 714 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 714 | if ( curModifier.size() == 0 ) { | 2793 | 139k | for (size_t j = 0; j < 512; j++) { | 2794 | 139k | curModifier.push_back(1); | 2795 | 139k | } | 2796 | 442 | } else { | 2797 | 33.7k | for (auto& c : curModifier) { | 2798 | 33.7k | c++; | 2799 | 33.7k | } | 2800 | 442 | } | 2801 | 714 | } | 2802 | 714 | } | 2803 | | | 2804 | 1.50k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.50k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.50k | const auto& result = results.back(); | 2811 | | | 2812 | 1.50k | if ( result.second != std::nullopt ) { | 2813 | 185 | 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 | 185 | } | 2820 | | | 2821 | 1.50k | 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.50k | if ( options.disableTests == false ) { | 2830 | 1.50k | tests::test(op, result.second); | 2831 | 1.50k | } | 2832 | | | 2833 | 1.50k | postprocess(module, op, result); | 2834 | 1.50k | } | 2835 | | | 2836 | 968 | if ( options.noCompare == false ) { | 2837 | 788 | compare(operations, results, data, size); | 2838 | 788 | } | 2839 | 968 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 23.3k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 23.3k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 23.3k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 30.9k | do { | 2725 | 30.9k | auto op = getOp(&parentDs, data, size); | 2726 | 30.9k | auto module = getModule(parentDs); | 2727 | 30.9k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 30.9k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 30.9k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 406 | break; | 2736 | 406 | } | 2737 | 30.9k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 23.3k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 23.3k | #if 1 | 2745 | 23.3k | { | 2746 | 23.3k | std::set<uint64_t> moduleIDs; | 2747 | 23.3k | for (const auto& m : modules ) { | 2748 | 23.0k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 23.0k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 23.0k | moduleIDs.insert(moduleID); | 2756 | 23.0k | } | 2757 | | | 2758 | 23.3k | std::set<uint64_t> operationModuleIDs; | 2759 | 30.4k | for (const auto& op : operations) { | 2760 | 30.4k | operationModuleIDs.insert(op.first->ID); | 2761 | 30.4k | } | 2762 | | | 2763 | 23.3k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 23.3k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 23.3k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 23.3k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 23.3k | } | 2771 | 23.3k | #endif | 2772 | | | 2773 | 23.3k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 23.3k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 53.7k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 30.4k | auto& operation = operations[i]; | 2782 | | | 2783 | 30.4k | auto& module = operation.first; | 2784 | 30.4k | auto& op = operation.second; | 2785 | | | 2786 | 30.4k | if ( i > 0 ) { | 2787 | 7.41k | auto& prevModule = operations[i-1].first; | 2788 | 7.41k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 7.41k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 7.41k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 7.41k | if ( curModifier.size() == 0 ) { | 2793 | 1.09M | for (size_t j = 0; j < 512; j++) { | 2794 | 1.09M | curModifier.push_back(1); | 2795 | 1.09M | } | 2796 | 5.27k | } else { | 2797 | 1.50M | for (auto& c : curModifier) { | 2798 | 1.50M | c++; | 2799 | 1.50M | } | 2800 | 5.27k | } | 2801 | 7.41k | } | 2802 | 7.41k | } | 2803 | | | 2804 | 30.4k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 30.4k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 30.4k | const auto& result = results.back(); | 2811 | | | 2812 | 30.4k | if ( result.second != std::nullopt ) { | 2813 | 10.0k | 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 | 10.0k | } | 2820 | | | 2821 | 30.4k | 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 | 30.4k | if ( options.disableTests == false ) { | 2830 | 30.4k | tests::test(op, result.second); | 2831 | 30.4k | } | 2832 | | | 2833 | 30.4k | postprocess(module, op, result); | 2834 | 30.4k | } | 2835 | | | 2836 | 23.3k | if ( options.noCompare == false ) { | 2837 | 23.0k | compare(operations, results, data, size); | 2838 | 23.0k | } | 2839 | 23.3k | } |
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 | 248 | do { | 2725 | 248 | auto op = getOp(&parentDs, data, size); | 2726 | 248 | auto module = getModule(parentDs); | 2727 | 248 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 248 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 248 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 248 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 116 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 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 | 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 | 116 | std::set<uint64_t> operationModuleIDs; | 2759 | 179 | for (const auto& op : operations) { | 2760 | 179 | operationModuleIDs.insert(op.first->ID); | 2761 | 179 | } | 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 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 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 | 295 | 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 | 99 | auto& prevModule = operations[i-1].first; | 2788 | 99 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 99 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 99 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 99 | if ( curModifier.size() == 0 ) { | 2793 | 25.1k | for (size_t j = 0; j < 512; j++) { | 2794 | 25.0k | curModifier.push_back(1); | 2795 | 25.0k | } | 2796 | 50 | } else { | 2797 | 2.16k | for (auto& c : curModifier) { | 2798 | 2.16k | c++; | 2799 | 2.16k | } | 2800 | 50 | } | 2801 | 99 | } | 2802 | 99 | } | 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 | 116 | if ( options.noCompare == false ) { | 2837 | 80 | compare(operations, results, data, size); | 2838 | 80 | } | 2839 | 116 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 384 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 384 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 384 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 770 | do { | 2725 | 770 | auto op = getOp(&parentDs, data, size); | 2726 | 770 | auto module = getModule(parentDs); | 2727 | 770 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 770 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 770 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 22 | break; | 2736 | 22 | } | 2737 | 770 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 384 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 384 | #if 1 | 2745 | 384 | { | 2746 | 384 | std::set<uint64_t> moduleIDs; | 2747 | 384 | for (const auto& m : modules ) { | 2748 | 336 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 336 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 336 | moduleIDs.insert(moduleID); | 2756 | 336 | } | 2757 | | | 2758 | 384 | std::set<uint64_t> operationModuleIDs; | 2759 | 695 | for (const auto& op : operations) { | 2760 | 695 | operationModuleIDs.insert(op.first->ID); | 2761 | 695 | } | 2762 | | | 2763 | 384 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 384 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 384 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 384 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 384 | } | 2771 | 384 | #endif | 2772 | | | 2773 | 384 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 384 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.07k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 695 | auto& operation = operations[i]; | 2782 | | | 2783 | 695 | auto& module = operation.first; | 2784 | 695 | auto& op = operation.second; | 2785 | | | 2786 | 695 | if ( i > 0 ) { | 2787 | 359 | auto& prevModule = operations[i-1].first; | 2788 | 359 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 359 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 359 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 359 | if ( curModifier.size() == 0 ) { | 2793 | 111k | for (size_t j = 0; j < 512; j++) { | 2794 | 111k | curModifier.push_back(1); | 2795 | 111k | } | 2796 | 217 | } else { | 2797 | 22.7k | for (auto& c : curModifier) { | 2798 | 22.7k | c++; | 2799 | 22.7k | } | 2800 | 142 | } | 2801 | 359 | } | 2802 | 359 | } | 2803 | | | 2804 | 695 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 695 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 695 | const auto& result = results.back(); | 2811 | | | 2812 | 695 | 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 | 695 | 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 | 695 | if ( options.disableTests == false ) { | 2830 | 695 | tests::test(op, result.second); | 2831 | 695 | } | 2832 | | | 2833 | 695 | postprocess(module, op, result); | 2834 | 695 | } | 2835 | | | 2836 | 384 | if ( options.noCompare == false ) { | 2837 | 336 | compare(operations, results, data, size); | 2838 | 336 | } | 2839 | 384 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 64 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 64 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 64 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 140 | do { | 2725 | 140 | auto op = getOp(&parentDs, data, size); | 2726 | 140 | auto module = getModule(parentDs); | 2727 | 140 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 140 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 140 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 140 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 64 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 64 | #if 1 | 2745 | 64 | { | 2746 | 64 | std::set<uint64_t> moduleIDs; | 2747 | 64 | for (const auto& m : modules ) { | 2748 | 37 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 37 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 37 | moduleIDs.insert(moduleID); | 2756 | 37 | } | 2757 | | | 2758 | 64 | std::set<uint64_t> operationModuleIDs; | 2759 | 76 | for (const auto& op : operations) { | 2760 | 76 | operationModuleIDs.insert(op.first->ID); | 2761 | 76 | } | 2762 | | | 2763 | 64 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 64 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 64 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 64 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 64 | } | 2771 | 64 | #endif | 2772 | | | 2773 | 64 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 64 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 140 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 76 | auto& operation = operations[i]; | 2782 | | | 2783 | 76 | auto& module = operation.first; | 2784 | 76 | auto& op = operation.second; | 2785 | | | 2786 | 76 | if ( i > 0 ) { | 2787 | 39 | auto& prevModule = operations[i-1].first; | 2788 | 39 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 39 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 39 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 39 | 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 | 24 | } else { | 2797 | 299 | for (auto& c : curModifier) { | 2798 | 299 | c++; | 2799 | 299 | } | 2800 | 24 | } | 2801 | 39 | } | 2802 | 39 | } | 2803 | | | 2804 | 76 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 76 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 76 | const auto& result = results.back(); | 2811 | | | 2812 | 76 | 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 | 76 | 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 | 76 | if ( options.disableTests == false ) { | 2830 | 76 | tests::test(op, result.second); | 2831 | 76 | } | 2832 | | | 2833 | 76 | postprocess(module, op, result); | 2834 | 76 | } | 2835 | | | 2836 | 64 | if ( options.noCompare == false ) { | 2837 | 37 | compare(operations, results, data, size); | 2838 | 37 | } | 2839 | 64 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 56 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 56 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 56 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 141 | do { | 2725 | 141 | auto op = getOp(&parentDs, data, size); | 2726 | 141 | auto module = getModule(parentDs); | 2727 | 141 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 141 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 141 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 141 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 56 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 56 | #if 1 | 2745 | 56 | { | 2746 | 56 | std::set<uint64_t> moduleIDs; | 2747 | 56 | for (const auto& m : modules ) { | 2748 | 28 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 28 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 28 | moduleIDs.insert(moduleID); | 2756 | 28 | } | 2757 | | | 2758 | 56 | std::set<uint64_t> operationModuleIDs; | 2759 | 74 | for (const auto& op : operations) { | 2760 | 74 | operationModuleIDs.insert(op.first->ID); | 2761 | 74 | } | 2762 | | | 2763 | 56 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 56 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 56 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 56 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 56 | } | 2771 | 56 | #endif | 2772 | | | 2773 | 56 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 56 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 130 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 74 | auto& operation = operations[i]; | 2782 | | | 2783 | 74 | auto& module = operation.first; | 2784 | 74 | auto& op = operation.second; | 2785 | | | 2786 | 74 | if ( i > 0 ) { | 2787 | 46 | auto& prevModule = operations[i-1].first; | 2788 | 46 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 46 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 46 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 46 | if ( curModifier.size() == 0 ) { | 2793 | 7.18k | for (size_t j = 0; j < 512; j++) { | 2794 | 7.16k | curModifier.push_back(1); | 2795 | 7.16k | } | 2796 | 32 | } else { | 2797 | 356 | for (auto& c : curModifier) { | 2798 | 356 | c++; | 2799 | 356 | } | 2800 | 32 | } | 2801 | 46 | } | 2802 | 46 | } | 2803 | | | 2804 | 74 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 74 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 74 | const auto& result = results.back(); | 2811 | | | 2812 | 74 | 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 | 74 | 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 | 74 | if ( options.disableTests == false ) { | 2830 | 74 | tests::test(op, result.second); | 2831 | 74 | } | 2832 | | | 2833 | 74 | postprocess(module, op, result); | 2834 | 74 | } | 2835 | | | 2836 | 56 | if ( options.noCompare == false ) { | 2837 | 28 | compare(operations, results, data, size); | 2838 | 28 | } | 2839 | 56 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 53 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 53 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 53 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 124 | do { | 2725 | 124 | auto op = getOp(&parentDs, data, size); | 2726 | 124 | auto module = getModule(parentDs); | 2727 | 124 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 124 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 124 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 124 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 53 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 53 | #if 1 | 2745 | 53 | { | 2746 | 53 | std::set<uint64_t> moduleIDs; | 2747 | 53 | for (const auto& m : modules ) { | 2748 | 23 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 23 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 23 | moduleIDs.insert(moduleID); | 2756 | 23 | } | 2757 | | | 2758 | 53 | std::set<uint64_t> operationModuleIDs; | 2759 | 63 | for (const auto& op : operations) { | 2760 | 63 | operationModuleIDs.insert(op.first->ID); | 2761 | 63 | } | 2762 | | | 2763 | 53 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 53 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 53 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 53 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 53 | } | 2771 | 53 | #endif | 2772 | | | 2773 | 53 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 53 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 116 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 63 | auto& operation = operations[i]; | 2782 | | | 2783 | 63 | auto& module = operation.first; | 2784 | 63 | auto& op = operation.second; | 2785 | | | 2786 | 63 | if ( i > 0 ) { | 2787 | 40 | auto& prevModule = operations[i-1].first; | 2788 | 40 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 40 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 40 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 40 | if ( curModifier.size() == 0 ) { | 2793 | 7.18k | for (size_t j = 0; j < 512; j++) { | 2794 | 7.16k | curModifier.push_back(1); | 2795 | 7.16k | } | 2796 | 26 | } else { | 2797 | 752 | for (auto& c : curModifier) { | 2798 | 752 | c++; | 2799 | 752 | } | 2800 | 26 | } | 2801 | 40 | } | 2802 | 40 | } | 2803 | | | 2804 | 63 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 63 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 63 | const auto& result = results.back(); | 2811 | | | 2812 | 63 | 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 | 63 | 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 | 63 | if ( options.disableTests == false ) { | 2830 | 63 | tests::test(op, result.second); | 2831 | 63 | } | 2832 | | | 2833 | 63 | postprocess(module, op, result); | 2834 | 63 | } | 2835 | | | 2836 | 53 | if ( options.noCompare == false ) { | 2837 | 23 | compare(operations, results, data, size); | 2838 | 23 | } | 2839 | 53 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 51 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 51 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 51 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 109 | do { | 2725 | 109 | auto op = getOp(&parentDs, data, size); | 2726 | 109 | auto module = getModule(parentDs); | 2727 | 109 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 109 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 109 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 109 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 51 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 51 | #if 1 | 2745 | 51 | { | 2746 | 51 | std::set<uint64_t> moduleIDs; | 2747 | 51 | for (const auto& m : modules ) { | 2748 | 22 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 22 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 22 | moduleIDs.insert(moduleID); | 2756 | 22 | } | 2757 | | | 2758 | 51 | std::set<uint64_t> operationModuleIDs; | 2759 | 58 | for (const auto& op : operations) { | 2760 | 58 | operationModuleIDs.insert(op.first->ID); | 2761 | 58 | } | 2762 | | | 2763 | 51 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 51 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 51 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 51 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 51 | } | 2771 | 51 | #endif | 2772 | | | 2773 | 51 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 51 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 109 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 58 | auto& operation = operations[i]; | 2782 | | | 2783 | 58 | auto& module = operation.first; | 2784 | 58 | auto& op = operation.second; | 2785 | | | 2786 | 58 | if ( i > 0 ) { | 2787 | 36 | auto& prevModule = operations[i-1].first; | 2788 | 36 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 36 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 36 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 36 | 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 | 20 | } else { | 2797 | 358 | for (auto& c : curModifier) { | 2798 | 358 | c++; | 2799 | 358 | } | 2800 | 20 | } | 2801 | 36 | } | 2802 | 36 | } | 2803 | | | 2804 | 58 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 58 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 58 | const auto& result = results.back(); | 2811 | | | 2812 | 58 | 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 | 58 | 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 | 58 | if ( options.disableTests == false ) { | 2830 | 58 | tests::test(op, result.second); | 2831 | 58 | } | 2832 | | | 2833 | 58 | postprocess(module, op, result); | 2834 | 58 | } | 2835 | | | 2836 | 51 | if ( options.noCompare == false ) { | 2837 | 22 | compare(operations, results, data, size); | 2838 | 22 | } | 2839 | 51 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 126 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 126 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 126 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 249 | do { | 2725 | 249 | auto op = getOp(&parentDs, data, size); | 2726 | 249 | auto module = getModule(parentDs); | 2727 | 249 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 249 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 249 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 249 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 126 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 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 | 126 | for (const auto& m : modules ) { | 2748 | 33 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 33 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 33 | moduleIDs.insert(moduleID); | 2756 | 33 | } | 2757 | | | 2758 | 126 | std::set<uint64_t> operationModuleIDs; | 2759 | 126 | for (const auto& op : operations) { | 2760 | 88 | operationModuleIDs.insert(op.first->ID); | 2761 | 88 | } | 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 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 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 | 214 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 88 | auto& operation = operations[i]; | 2782 | | | 2783 | 88 | auto& module = operation.first; | 2784 | 88 | auto& op = operation.second; | 2785 | | | 2786 | 88 | if ( i > 0 ) { | 2787 | 55 | auto& prevModule = operations[i-1].first; | 2788 | 55 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 55 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 55 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 55 | 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 | 34 | } else { | 2797 | 2.05k | for (auto& c : curModifier) { | 2798 | 2.05k | c++; | 2799 | 2.05k | } | 2800 | 34 | } | 2801 | 55 | } | 2802 | 55 | } | 2803 | | | 2804 | 88 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 88 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 88 | const auto& result = results.back(); | 2811 | | | 2812 | 88 | 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 | 88 | 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 | 88 | if ( options.disableTests == false ) { | 2830 | 88 | tests::test(op, result.second); | 2831 | 88 | } | 2832 | | | 2833 | 88 | postprocess(module, op, result); | 2834 | 88 | } | 2835 | | | 2836 | 126 | if ( options.noCompare == false ) { | 2837 | 33 | compare(operations, results, data, size); | 2838 | 33 | } | 2839 | 126 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 79 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 79 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 79 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 167 | do { | 2725 | 167 | auto op = getOp(&parentDs, data, size); | 2726 | 167 | auto module = getModule(parentDs); | 2727 | 167 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 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 | 2 | break; | 2736 | 2 | } | 2737 | 167 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 79 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 79 | #if 1 | 2745 | 79 | { | 2746 | 79 | std::set<uint64_t> moduleIDs; | 2747 | 79 | for (const auto& m : modules ) { | 2748 | 23 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 23 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 23 | moduleIDs.insert(moduleID); | 2756 | 23 | } | 2757 | | | 2758 | 79 | std::set<uint64_t> operationModuleIDs; | 2759 | 79 | for (const auto& op : operations) { | 2760 | 65 | operationModuleIDs.insert(op.first->ID); | 2761 | 65 | } | 2762 | | | 2763 | 79 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 79 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 79 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 79 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 79 | } | 2771 | 79 | #endif | 2772 | | | 2773 | 79 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 79 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 144 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 65 | auto& operation = operations[i]; | 2782 | | | 2783 | 65 | auto& module = operation.first; | 2784 | 65 | auto& op = operation.second; | 2785 | | | 2786 | 65 | if ( i > 0 ) { | 2787 | 42 | auto& prevModule = operations[i-1].first; | 2788 | 42 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 42 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 42 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 42 | 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 | 25 | } else { | 2797 | 268 | for (auto& c : curModifier) { | 2798 | 268 | c++; | 2799 | 268 | } | 2800 | 25 | } | 2801 | 42 | } | 2802 | 42 | } | 2803 | | | 2804 | 65 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 65 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 65 | const auto& result = results.back(); | 2811 | | | 2812 | 65 | 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 | 65 | 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 | 65 | if ( options.disableTests == false ) { | 2830 | 65 | tests::test(op, result.second); | 2831 | 65 | } | 2832 | | | 2833 | 65 | postprocess(module, op, result); | 2834 | 65 | } | 2835 | | | 2836 | 79 | if ( options.noCompare == false ) { | 2837 | 23 | compare(operations, results, data, size); | 2838 | 23 | } | 2839 | 79 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::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 | 207 | do { | 2725 | 207 | auto op = getOp(&parentDs, data, size); | 2726 | 207 | auto module = getModule(parentDs); | 2727 | 207 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 207 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 207 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 207 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 114 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 114 | #if 1 | 2745 | 114 | { | 2746 | 114 | std::set<uint64_t> moduleIDs; | 2747 | 114 | for (const auto& m : modules ) { | 2748 | 22 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 22 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 22 | moduleIDs.insert(moduleID); | 2756 | 22 | } | 2757 | | | 2758 | 114 | std::set<uint64_t> operationModuleIDs; | 2759 | 114 | for (const auto& op : operations) { | 2760 | 62 | operationModuleIDs.insert(op.first->ID); | 2761 | 62 | } | 2762 | | | 2763 | 114 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 114 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 114 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 114 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 114 | } | 2771 | 114 | #endif | 2772 | | | 2773 | 114 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 114 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 176 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 62 | auto& operation = operations[i]; | 2782 | | | 2783 | 62 | auto& module = operation.first; | 2784 | 62 | auto& op = operation.second; | 2785 | | | 2786 | 62 | if ( i > 0 ) { | 2787 | 40 | auto& prevModule = operations[i-1].first; | 2788 | 40 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 40 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 40 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 40 | 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 | 22 | } else { | 2797 | 1.29k | for (auto& c : curModifier) { | 2798 | 1.29k | c++; | 2799 | 1.29k | } | 2800 | 22 | } | 2801 | 40 | } | 2802 | 40 | } | 2803 | | | 2804 | 62 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 62 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 62 | const auto& result = results.back(); | 2811 | | | 2812 | 62 | 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 | 62 | 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 | 62 | if ( options.disableTests == false ) { | 2830 | 62 | tests::test(op, result.second); | 2831 | 62 | } | 2832 | | | 2833 | 62 | postprocess(module, op, result); | 2834 | 62 | } | 2835 | | | 2836 | 114 | if ( options.noCompare == false ) { | 2837 | 22 | compare(operations, results, data, size); | 2838 | 22 | } | 2839 | 114 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 65 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 65 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 65 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 157 | do { | 2725 | 157 | auto op = getOp(&parentDs, data, size); | 2726 | 157 | auto module = getModule(parentDs); | 2727 | 157 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 157 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 157 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 157 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 65 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 65 | #if 1 | 2745 | 65 | { | 2746 | 65 | std::set<uint64_t> moduleIDs; | 2747 | 65 | for (const auto& m : modules ) { | 2748 | 21 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 21 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 21 | moduleIDs.insert(moduleID); | 2756 | 21 | } | 2757 | | | 2758 | 65 | std::set<uint64_t> operationModuleIDs; | 2759 | 66 | for (const auto& op : operations) { | 2760 | 66 | operationModuleIDs.insert(op.first->ID); | 2761 | 66 | } | 2762 | | | 2763 | 65 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 65 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 65 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 65 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 65 | } | 2771 | 65 | #endif | 2772 | | | 2773 | 65 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 65 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 131 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 66 | auto& operation = operations[i]; | 2782 | | | 2783 | 66 | auto& module = operation.first; | 2784 | 66 | auto& op = operation.second; | 2785 | | | 2786 | 66 | if ( i > 0 ) { | 2787 | 45 | auto& prevModule = operations[i-1].first; | 2788 | 45 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 45 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 45 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 45 | 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 | 24 | } else { | 2797 | 695 | for (auto& c : curModifier) { | 2798 | 695 | c++; | 2799 | 695 | } | 2800 | 24 | } | 2801 | 45 | } | 2802 | 45 | } | 2803 | | | 2804 | 66 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 66 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 66 | const auto& result = results.back(); | 2811 | | | 2812 | 66 | 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 | 66 | 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 | 66 | if ( options.disableTests == false ) { | 2830 | 66 | tests::test(op, result.second); | 2831 | 66 | } | 2832 | | | 2833 | 66 | postprocess(module, op, result); | 2834 | 66 | } | 2835 | | | 2836 | 65 | if ( options.noCompare == false ) { | 2837 | 21 | compare(operations, results, data, size); | 2838 | 21 | } | 2839 | 65 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 52 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 52 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 52 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 138 | do { | 2725 | 138 | auto op = getOp(&parentDs, data, size); | 2726 | 138 | auto module = getModule(parentDs); | 2727 | 138 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 138 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 138 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 138 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 52 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 52 | #if 1 | 2745 | 52 | { | 2746 | 52 | std::set<uint64_t> moduleIDs; | 2747 | 52 | for (const auto& m : modules ) { | 2748 | 21 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 21 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 21 | moduleIDs.insert(moduleID); | 2756 | 21 | } | 2757 | | | 2758 | 52 | std::set<uint64_t> operationModuleIDs; | 2759 | 70 | for (const auto& op : operations) { | 2760 | 70 | operationModuleIDs.insert(op.first->ID); | 2761 | 70 | } | 2762 | | | 2763 | 52 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 52 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 52 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 52 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 52 | } | 2771 | 52 | #endif | 2772 | | | 2773 | 52 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 52 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 122 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 70 | auto& operation = operations[i]; | 2782 | | | 2783 | 70 | auto& module = operation.first; | 2784 | 70 | auto& op = operation.second; | 2785 | | | 2786 | 70 | if ( i > 0 ) { | 2787 | 49 | auto& prevModule = operations[i-1].first; | 2788 | 49 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 49 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 49 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 49 | 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 | 30 | } else { | 2797 | 256 | for (auto& c : curModifier) { | 2798 | 256 | c++; | 2799 | 256 | } | 2800 | 30 | } | 2801 | 49 | } | 2802 | 49 | } | 2803 | | | 2804 | 70 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 70 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 70 | const auto& result = results.back(); | 2811 | | | 2812 | 70 | 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 | 70 | 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 | if ( options.disableTests == false ) { | 2830 | 70 | tests::test(op, result.second); | 2831 | 70 | } | 2832 | | | 2833 | 70 | postprocess(module, op, result); | 2834 | 70 | } | 2835 | | | 2836 | 52 | if ( options.noCompare == false ) { | 2837 | 21 | compare(operations, results, data, size); | 2838 | 21 | } | 2839 | 52 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 49 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 49 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 49 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 121 | do { | 2725 | 121 | auto op = getOp(&parentDs, data, size); | 2726 | 121 | auto module = getModule(parentDs); | 2727 | 121 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 121 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 121 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 121 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 49 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 49 | #if 1 | 2745 | 49 | { | 2746 | 49 | std::set<uint64_t> moduleIDs; | 2747 | 49 | for (const auto& m : modules ) { | 2748 | 22 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 22 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 22 | moduleIDs.insert(moduleID); | 2756 | 22 | } | 2757 | | | 2758 | 49 | std::set<uint64_t> operationModuleIDs; | 2759 | 65 | for (const auto& op : operations) { | 2760 | 65 | operationModuleIDs.insert(op.first->ID); | 2761 | 65 | } | 2762 | | | 2763 | 49 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 49 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 49 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 49 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 49 | } | 2771 | 49 | #endif | 2772 | | | 2773 | 49 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 49 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 114 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 65 | auto& operation = operations[i]; | 2782 | | | 2783 | 65 | auto& module = operation.first; | 2784 | 65 | auto& op = operation.second; | 2785 | | | 2786 | 65 | if ( i > 0 ) { | 2787 | 43 | auto& prevModule = operations[i-1].first; | 2788 | 43 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 43 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 43 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 43 | 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 | 28 | } else { | 2797 | 370 | for (auto& c : curModifier) { | 2798 | 370 | c++; | 2799 | 370 | } | 2800 | 28 | } | 2801 | 43 | } | 2802 | 43 | } | 2803 | | | 2804 | 65 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 65 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 65 | const auto& result = results.back(); | 2811 | | | 2812 | 65 | 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 | 65 | 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 | 65 | if ( options.disableTests == false ) { | 2830 | 65 | tests::test(op, result.second); | 2831 | 65 | } | 2832 | | | 2833 | 65 | postprocess(module, op, result); | 2834 | 65 | } | 2835 | | | 2836 | 49 | if ( options.noCompare == false ) { | 2837 | 22 | compare(operations, results, data, size); | 2838 | 22 | } | 2839 | 49 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 72 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 72 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 72 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 156 | do { | 2725 | 156 | auto op = getOp(&parentDs, data, size); | 2726 | 156 | auto module = getModule(parentDs); | 2727 | 156 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 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 | 3 | break; | 2736 | 3 | } | 2737 | 156 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 72 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 72 | #if 1 | 2745 | 72 | { | 2746 | 72 | std::set<uint64_t> moduleIDs; | 2747 | 72 | for (const auto& m : modules ) { | 2748 | 20 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 20 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 20 | moduleIDs.insert(moduleID); | 2756 | 20 | } | 2757 | | | 2758 | 72 | std::set<uint64_t> operationModuleIDs; | 2759 | 72 | for (const auto& op : operations) { | 2760 | 56 | operationModuleIDs.insert(op.first->ID); | 2761 | 56 | } | 2762 | | | 2763 | 72 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 72 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 72 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 72 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 72 | } | 2771 | 72 | #endif | 2772 | | | 2773 | 72 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 72 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 128 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 56 | auto& operation = operations[i]; | 2782 | | | 2783 | 56 | auto& module = operation.first; | 2784 | 56 | auto& op = operation.second; | 2785 | | | 2786 | 56 | if ( i > 0 ) { | 2787 | 36 | auto& prevModule = operations[i-1].first; | 2788 | 36 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 36 | 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 | 400 | for (auto& c : curModifier) { | 2798 | 400 | c++; | 2799 | 400 | } | 2800 | 19 | } | 2801 | 36 | } | 2802 | 36 | } | 2803 | | | 2804 | 56 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 56 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 56 | const auto& result = results.back(); | 2811 | | | 2812 | 56 | 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 | 56 | 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 | 56 | if ( options.disableTests == false ) { | 2830 | 56 | tests::test(op, result.second); | 2831 | 56 | } | 2832 | | | 2833 | 56 | postprocess(module, op, result); | 2834 | 56 | } | 2835 | | | 2836 | 72 | if ( options.noCompare == false ) { | 2837 | 20 | compare(operations, results, data, size); | 2838 | 20 | } | 2839 | 72 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 50 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 50 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 50 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 129 | do { | 2725 | 129 | auto op = getOp(&parentDs, data, size); | 2726 | 129 | auto module = getModule(parentDs); | 2727 | 129 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 129 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 129 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 129 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 50 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 50 | #if 1 | 2745 | 50 | { | 2746 | 50 | std::set<uint64_t> moduleIDs; | 2747 | 50 | for (const auto& m : modules ) { | 2748 | 21 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 21 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 21 | moduleIDs.insert(moduleID); | 2756 | 21 | } | 2757 | | | 2758 | 50 | std::set<uint64_t> operationModuleIDs; | 2759 | 67 | for (const auto& op : operations) { | 2760 | 67 | operationModuleIDs.insert(op.first->ID); | 2761 | 67 | } | 2762 | | | 2763 | 50 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 50 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 50 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 50 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 50 | } | 2771 | 50 | #endif | 2772 | | | 2773 | 50 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 50 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 117 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 67 | auto& operation = operations[i]; | 2782 | | | 2783 | 67 | auto& module = operation.first; | 2784 | 67 | auto& op = operation.second; | 2785 | | | 2786 | 67 | if ( i > 0 ) { | 2787 | 46 | auto& prevModule = operations[i-1].first; | 2788 | 46 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 46 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 46 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 46 | 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 | 31 | } else { | 2797 | 260 | for (auto& c : curModifier) { | 2798 | 260 | c++; | 2799 | 260 | } | 2800 | 31 | } | 2801 | 46 | } | 2802 | 46 | } | 2803 | | | 2804 | 67 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 67 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 67 | const auto& result = results.back(); | 2811 | | | 2812 | 67 | 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 | 67 | 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 | 67 | if ( options.disableTests == false ) { | 2830 | 67 | tests::test(op, result.second); | 2831 | 67 | } | 2832 | | | 2833 | 67 | postprocess(module, op, result); | 2834 | 67 | } | 2835 | | | 2836 | 50 | if ( options.noCompare == false ) { | 2837 | 21 | compare(operations, results, data, size); | 2838 | 21 | } | 2839 | 50 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 41 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 41 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 41 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 104 | do { | 2725 | 104 | auto op = getOp(&parentDs, data, size); | 2726 | 104 | auto module = getModule(parentDs); | 2727 | 104 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 104 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 104 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 104 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 41 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 41 | #if 1 | 2745 | 41 | { | 2746 | 41 | std::set<uint64_t> moduleIDs; | 2747 | 41 | for (const auto& m : modules ) { | 2748 | 18 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 18 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 18 | moduleIDs.insert(moduleID); | 2756 | 18 | } | 2757 | | | 2758 | 41 | std::set<uint64_t> operationModuleIDs; | 2759 | 58 | for (const auto& op : operations) { | 2760 | 58 | operationModuleIDs.insert(op.first->ID); | 2761 | 58 | } | 2762 | | | 2763 | 41 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 41 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 41 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 41 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 41 | } | 2771 | 41 | #endif | 2772 | | | 2773 | 41 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 41 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 99 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 58 | auto& operation = operations[i]; | 2782 | | | 2783 | 58 | auto& module = operation.first; | 2784 | 58 | auto& op = operation.second; | 2785 | | | 2786 | 58 | if ( i > 0 ) { | 2787 | 40 | auto& prevModule = operations[i-1].first; | 2788 | 40 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 40 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 40 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 40 | if ( curModifier.size() == 0 ) { | 2793 | 7.18k | for (size_t j = 0; j < 512; j++) { | 2794 | 7.16k | curModifier.push_back(1); | 2795 | 7.16k | } | 2796 | 26 | } else { | 2797 | 257 | for (auto& c : curModifier) { | 2798 | 257 | c++; | 2799 | 257 | } | 2800 | 26 | } | 2801 | 40 | } | 2802 | 40 | } | 2803 | | | 2804 | 58 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 58 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 58 | const auto& result = results.back(); | 2811 | | | 2812 | 58 | 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 | 58 | 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 | 58 | if ( options.disableTests == false ) { | 2830 | 58 | tests::test(op, result.second); | 2831 | 58 | } | 2832 | | | 2833 | 58 | postprocess(module, op, result); | 2834 | 58 | } | 2835 | | | 2836 | 41 | if ( options.noCompare == false ) { | 2837 | 18 | compare(operations, results, data, size); | 2838 | 18 | } | 2839 | 41 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 38 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 38 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 38 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 94 | do { | 2725 | 94 | auto op = getOp(&parentDs, data, size); | 2726 | 94 | auto module = getModule(parentDs); | 2727 | 94 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 94 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 94 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 94 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 38 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 38 | #if 1 | 2745 | 38 | { | 2746 | 38 | std::set<uint64_t> moduleIDs; | 2747 | 38 | for (const auto& m : modules ) { | 2748 | 18 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 18 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 18 | moduleIDs.insert(moduleID); | 2756 | 18 | } | 2757 | | | 2758 | 38 | std::set<uint64_t> operationModuleIDs; | 2759 | 50 | for (const auto& op : operations) { | 2760 | 50 | operationModuleIDs.insert(op.first->ID); | 2761 | 50 | } | 2762 | | | 2763 | 38 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 38 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 38 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 38 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 38 | } | 2771 | 38 | #endif | 2772 | | | 2773 | 38 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 38 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 88 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 50 | auto& operation = operations[i]; | 2782 | | | 2783 | 50 | auto& module = operation.first; | 2784 | 50 | auto& op = operation.second; | 2785 | | | 2786 | 50 | if ( i > 0 ) { | 2787 | 32 | auto& prevModule = operations[i-1].first; | 2788 | 32 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 32 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 32 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 32 | if ( curModifier.size() == 0 ) { | 2793 | 5.64k | for (size_t j = 0; j < 512; j++) { | 2794 | 5.63k | curModifier.push_back(1); | 2795 | 5.63k | } | 2796 | 21 | } else { | 2797 | 409 | for (auto& c : curModifier) { | 2798 | 409 | c++; | 2799 | 409 | } | 2800 | 21 | } | 2801 | 32 | } | 2802 | 32 | } | 2803 | | | 2804 | 50 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 50 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 50 | const auto& result = results.back(); | 2811 | | | 2812 | 50 | 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 | 50 | 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 | 50 | if ( options.disableTests == false ) { | 2830 | 50 | tests::test(op, result.second); | 2831 | 50 | } | 2832 | | | 2833 | 50 | postprocess(module, op, result); | 2834 | 50 | } | 2835 | | | 2836 | 38 | if ( options.noCompare == false ) { | 2837 | 18 | compare(operations, results, data, size); | 2838 | 18 | } | 2839 | 38 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 38 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 38 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 38 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 92 | do { | 2725 | 92 | auto op = getOp(&parentDs, data, size); | 2726 | 92 | auto module = getModule(parentDs); | 2727 | 92 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 92 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 92 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 92 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 38 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 38 | #if 1 | 2745 | 38 | { | 2746 | 38 | std::set<uint64_t> moduleIDs; | 2747 | 38 | for (const auto& m : modules ) { | 2748 | 18 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 18 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 18 | moduleIDs.insert(moduleID); | 2756 | 18 | } | 2757 | | | 2758 | 38 | std::set<uint64_t> operationModuleIDs; | 2759 | 50 | for (const auto& op : operations) { | 2760 | 50 | operationModuleIDs.insert(op.first->ID); | 2761 | 50 | } | 2762 | | | 2763 | 38 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 38 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 38 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 38 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 38 | } | 2771 | 38 | #endif | 2772 | | | 2773 | 38 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 38 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 88 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 50 | auto& operation = operations[i]; | 2782 | | | 2783 | 50 | auto& module = operation.first; | 2784 | 50 | auto& op = operation.second; | 2785 | | | 2786 | 50 | if ( i > 0 ) { | 2787 | 32 | auto& prevModule = operations[i-1].first; | 2788 | 32 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 32 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 32 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 32 | if ( curModifier.size() == 0 ) { | 2793 | 7.18k | for (size_t j = 0; j < 512; j++) { | 2794 | 7.16k | curModifier.push_back(1); | 2795 | 7.16k | } | 2796 | 18 | } else { | 2797 | 262 | for (auto& c : curModifier) { | 2798 | 262 | c++; | 2799 | 262 | } | 2800 | 18 | } | 2801 | 32 | } | 2802 | 32 | } | 2803 | | | 2804 | 50 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 50 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 50 | const auto& result = results.back(); | 2811 | | | 2812 | 50 | 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 | 50 | 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 | 50 | if ( options.disableTests == false ) { | 2830 | 50 | tests::test(op, result.second); | 2831 | 50 | } | 2832 | | | 2833 | 50 | postprocess(module, op, result); | 2834 | 50 | } | 2835 | | | 2836 | 38 | if ( options.noCompare == false ) { | 2837 | 18 | compare(operations, results, data, size); | 2838 | 18 | } | 2839 | 38 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 60 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 60 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 60 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 119 | do { | 2725 | 119 | auto op = getOp(&parentDs, data, size); | 2726 | 119 | auto module = getModule(parentDs); | 2727 | 119 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 119 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 119 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 119 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 60 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 60 | #if 1 | 2745 | 60 | { | 2746 | 60 | std::set<uint64_t> moduleIDs; | 2747 | 60 | for (const auto& m : modules ) { | 2748 | 40 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 40 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 40 | moduleIDs.insert(moduleID); | 2756 | 40 | } | 2757 | | | 2758 | 60 | std::set<uint64_t> operationModuleIDs; | 2759 | 78 | for (const auto& op : operations) { | 2760 | 78 | operationModuleIDs.insert(op.first->ID); | 2761 | 78 | } | 2762 | | | 2763 | 60 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 60 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 60 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 60 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 60 | } | 2771 | 60 | #endif | 2772 | | | 2773 | 60 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 60 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 138 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 78 | auto& operation = operations[i]; | 2782 | | | 2783 | 78 | auto& module = operation.first; | 2784 | 78 | auto& op = operation.second; | 2785 | | | 2786 | 78 | if ( i > 0 ) { | 2787 | 38 | auto& prevModule = operations[i-1].first; | 2788 | 38 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 38 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 38 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 38 | if ( curModifier.size() == 0 ) { | 2793 | 7.18k | for (size_t j = 0; j < 512; j++) { | 2794 | 7.16k | curModifier.push_back(1); | 2795 | 7.16k | } | 2796 | 24 | } else { | 2797 | 371 | for (auto& c : curModifier) { | 2798 | 371 | c++; | 2799 | 371 | } | 2800 | 24 | } | 2801 | 38 | } | 2802 | 38 | } | 2803 | | | 2804 | 78 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 78 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 78 | const auto& result = results.back(); | 2811 | | | 2812 | 78 | 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 | 78 | 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 | 78 | if ( options.disableTests == false ) { | 2830 | 78 | tests::test(op, result.second); | 2831 | 78 | } | 2832 | | | 2833 | 78 | postprocess(module, op, result); | 2834 | 78 | } | 2835 | | | 2836 | 60 | if ( options.noCompare == false ) { | 2837 | 40 | compare(operations, results, data, size); | 2838 | 40 | } | 2839 | 60 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 99 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 99 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 99 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 194 | do { | 2725 | 194 | auto op = getOp(&parentDs, data, size); | 2726 | 194 | auto module = getModule(parentDs); | 2727 | 194 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 194 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 194 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 194 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 99 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 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 | 77 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 77 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 77 | moduleIDs.insert(moduleID); | 2756 | 77 | } | 2757 | | | 2758 | 99 | std::set<uint64_t> operationModuleIDs; | 2759 | 148 | for (const auto& op : operations) { | 2760 | 148 | operationModuleIDs.insert(op.first->ID); | 2761 | 148 | } | 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 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 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 | 247 | 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 | 71 | auto& prevModule = operations[i-1].first; | 2788 | 71 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 71 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 71 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 71 | 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 | 39 | } else { | 2797 | 9.48k | for (auto& c : curModifier) { | 2798 | 9.48k | c++; | 2799 | 9.48k | } | 2800 | 39 | } | 2801 | 71 | } | 2802 | 71 | } | 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 | 99 | if ( options.noCompare == false ) { | 2837 | 77 | compare(operations, results, data, size); | 2838 | 77 | } | 2839 | 99 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 42 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 42 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 42 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 107 | do { | 2725 | 107 | auto op = getOp(&parentDs, data, size); | 2726 | 107 | auto module = getModule(parentDs); | 2727 | 107 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 107 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 107 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 107 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 42 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 42 | #if 1 | 2745 | 42 | { | 2746 | 42 | std::set<uint64_t> moduleIDs; | 2747 | 42 | for (const auto& m : modules ) { | 2748 | 18 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 18 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 18 | moduleIDs.insert(moduleID); | 2756 | 18 | } | 2757 | | | 2758 | 42 | std::set<uint64_t> operationModuleIDs; | 2759 | 54 | for (const auto& op : operations) { | 2760 | 54 | operationModuleIDs.insert(op.first->ID); | 2761 | 54 | } | 2762 | | | 2763 | 42 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 42 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 42 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 42 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 42 | } | 2771 | 42 | #endif | 2772 | | | 2773 | 42 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 42 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 96 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 54 | auto& operation = operations[i]; | 2782 | | | 2783 | 54 | auto& module = operation.first; | 2784 | 54 | auto& op = operation.second; | 2785 | | | 2786 | 54 | if ( i > 0 ) { | 2787 | 36 | auto& prevModule = operations[i-1].first; | 2788 | 36 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 36 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 36 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 36 | if ( curModifier.size() == 0 ) { | 2793 | 7.18k | for (size_t j = 0; j < 512; j++) { | 2794 | 7.16k | curModifier.push_back(1); | 2795 | 7.16k | } | 2796 | 22 | } else { | 2797 | 317 | for (auto& c : curModifier) { | 2798 | 317 | c++; | 2799 | 317 | } | 2800 | 22 | } | 2801 | 36 | } | 2802 | 36 | } | 2803 | | | 2804 | 54 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 54 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 54 | const auto& result = results.back(); | 2811 | | | 2812 | 54 | 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 | 54 | 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 | 54 | if ( options.disableTests == false ) { | 2830 | 54 | tests::test(op, result.second); | 2831 | 54 | } | 2832 | | | 2833 | 54 | postprocess(module, op, result); | 2834 | 54 | } | 2835 | | | 2836 | 42 | if ( options.noCompare == false ) { | 2837 | 18 | compare(operations, results, data, size); | 2838 | 18 | } | 2839 | 42 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 45 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 45 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 45 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 114 | do { | 2725 | 114 | auto op = getOp(&parentDs, data, size); | 2726 | 114 | auto module = getModule(parentDs); | 2727 | 114 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 114 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 114 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 114 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 45 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 45 | #if 1 | 2745 | 45 | { | 2746 | 45 | std::set<uint64_t> moduleIDs; | 2747 | 45 | for (const auto& m : modules ) { | 2748 | 18 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 18 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 18 | moduleIDs.insert(moduleID); | 2756 | 18 | } | 2757 | | | 2758 | 45 | std::set<uint64_t> operationModuleIDs; | 2759 | 53 | for (const auto& op : operations) { | 2760 | 53 | operationModuleIDs.insert(op.first->ID); | 2761 | 53 | } | 2762 | | | 2763 | 45 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 45 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 45 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 45 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 45 | } | 2771 | 45 | #endif | 2772 | | | 2773 | 45 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 45 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 98 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 53 | auto& operation = operations[i]; | 2782 | | | 2783 | 53 | auto& module = operation.first; | 2784 | 53 | auto& op = operation.second; | 2785 | | | 2786 | 53 | if ( i > 0 ) { | 2787 | 35 | auto& prevModule = operations[i-1].first; | 2788 | 35 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 35 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 35 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 35 | 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 | 19 | } else { | 2797 | 529 | for (auto& c : curModifier) { | 2798 | 529 | c++; | 2799 | 529 | } | 2800 | 19 | } | 2801 | 35 | } | 2802 | 35 | } | 2803 | | | 2804 | 53 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 53 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 53 | const auto& result = results.back(); | 2811 | | | 2812 | 53 | 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 | 53 | 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 | 53 | if ( options.disableTests == false ) { | 2830 | 53 | tests::test(op, result.second); | 2831 | 53 | } | 2832 | | | 2833 | 53 | postprocess(module, op, result); | 2834 | 53 | } | 2835 | | | 2836 | 45 | if ( options.noCompare == false ) { | 2837 | 18 | compare(operations, results, data, size); | 2838 | 18 | } | 2839 | 45 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 46 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 46 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 46 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 111 | do { | 2725 | 111 | auto op = getOp(&parentDs, data, size); | 2726 | 111 | auto module = getModule(parentDs); | 2727 | 111 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 111 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 111 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 111 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 46 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 46 | #if 1 | 2745 | 46 | { | 2746 | 46 | std::set<uint64_t> moduleIDs; | 2747 | 46 | for (const auto& m : modules ) { | 2748 | 20 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 20 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 20 | moduleIDs.insert(moduleID); | 2756 | 20 | } | 2757 | | | 2758 | 46 | std::set<uint64_t> operationModuleIDs; | 2759 | 57 | for (const auto& op : operations) { | 2760 | 57 | operationModuleIDs.insert(op.first->ID); | 2761 | 57 | } | 2762 | | | 2763 | 46 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 46 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 46 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 46 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 46 | } | 2771 | 46 | #endif | 2772 | | | 2773 | 46 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 46 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 103 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 57 | auto& operation = operations[i]; | 2782 | | | 2783 | 57 | auto& module = operation.first; | 2784 | 57 | auto& op = operation.second; | 2785 | | | 2786 | 57 | if ( i > 0 ) { | 2787 | 37 | auto& prevModule = operations[i-1].first; | 2788 | 37 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 37 | 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 | 347 | for (auto& c : curModifier) { | 2798 | 347 | c++; | 2799 | 347 | } | 2800 | 22 | } | 2801 | 37 | } | 2802 | 37 | } | 2803 | | | 2804 | 57 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 57 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 57 | const auto& result = results.back(); | 2811 | | | 2812 | 57 | 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 | 57 | 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 | 57 | if ( options.disableTests == false ) { | 2830 | 57 | tests::test(op, result.second); | 2831 | 57 | } | 2832 | | | 2833 | 57 | postprocess(module, op, result); | 2834 | 57 | } | 2835 | | | 2836 | 46 | if ( options.noCompare == false ) { | 2837 | 20 | compare(operations, results, data, size); | 2838 | 20 | } | 2839 | 46 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 45 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 45 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 45 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 112 | do { | 2725 | 112 | auto op = getOp(&parentDs, data, size); | 2726 | 112 | auto module = getModule(parentDs); | 2727 | 112 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 112 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 112 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 112 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 45 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 45 | #if 1 | 2745 | 45 | { | 2746 | 45 | std::set<uint64_t> moduleIDs; | 2747 | 45 | for (const auto& m : modules ) { | 2748 | 20 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 20 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 20 | moduleIDs.insert(moduleID); | 2756 | 20 | } | 2757 | | | 2758 | 45 | std::set<uint64_t> operationModuleIDs; | 2759 | 57 | for (const auto& op : operations) { | 2760 | 57 | operationModuleIDs.insert(op.first->ID); | 2761 | 57 | } | 2762 | | | 2763 | 45 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 45 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 45 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 45 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 45 | } | 2771 | 45 | #endif | 2772 | | | 2773 | 45 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 45 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 102 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 57 | auto& operation = operations[i]; | 2782 | | | 2783 | 57 | auto& module = operation.first; | 2784 | 57 | auto& op = operation.second; | 2785 | | | 2786 | 57 | if ( i > 0 ) { | 2787 | 37 | auto& prevModule = operations[i-1].first; | 2788 | 37 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 37 | 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 | 248 | for (auto& c : curModifier) { | 2798 | 248 | c++; | 2799 | 248 | } | 2800 | 22 | } | 2801 | 37 | } | 2802 | 37 | } | 2803 | | | 2804 | 57 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 57 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 57 | const auto& result = results.back(); | 2811 | | | 2812 | 57 | 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 | 57 | 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 | 57 | if ( options.disableTests == false ) { | 2830 | 57 | tests::test(op, result.second); | 2831 | 57 | } | 2832 | | | 2833 | 57 | postprocess(module, op, result); | 2834 | 57 | } | 2835 | | | 2836 | 45 | if ( options.noCompare == false ) { | 2837 | 20 | compare(operations, results, data, size); | 2838 | 20 | } | 2839 | 45 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 36 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 36 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 36 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 94 | do { | 2725 | 94 | auto op = getOp(&parentDs, data, size); | 2726 | 94 | auto module = getModule(parentDs); | 2727 | 94 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 94 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 94 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 94 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 36 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 36 | #if 1 | 2745 | 36 | { | 2746 | 36 | std::set<uint64_t> moduleIDs; | 2747 | 36 | for (const auto& m : modules ) { | 2748 | 17 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 17 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 17 | moduleIDs.insert(moduleID); | 2756 | 17 | } | 2757 | | | 2758 | 36 | std::set<uint64_t> operationModuleIDs; | 2759 | 46 | for (const auto& op : operations) { | 2760 | 46 | operationModuleIDs.insert(op.first->ID); | 2761 | 46 | } | 2762 | | | 2763 | 36 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 36 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 36 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 36 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 36 | } | 2771 | 36 | #endif | 2772 | | | 2773 | 36 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 36 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 82 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 46 | auto& operation = operations[i]; | 2782 | | | 2783 | 46 | auto& module = operation.first; | 2784 | 46 | auto& op = operation.second; | 2785 | | | 2786 | 46 | if ( i > 0 ) { | 2787 | 29 | auto& prevModule = operations[i-1].first; | 2788 | 29 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 29 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 29 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 29 | if ( curModifier.size() == 0 ) { | 2793 | 5.13k | for (size_t j = 0; j < 512; j++) { | 2794 | 5.12k | curModifier.push_back(1); | 2795 | 5.12k | } | 2796 | 19 | } else { | 2797 | 321 | for (auto& c : curModifier) { | 2798 | 321 | c++; | 2799 | 321 | } | 2800 | 19 | } | 2801 | 29 | } | 2802 | 29 | } | 2803 | | | 2804 | 46 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 46 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 46 | const auto& result = results.back(); | 2811 | | | 2812 | 46 | 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 | 46 | 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 | 46 | if ( options.disableTests == false ) { | 2830 | 46 | tests::test(op, result.second); | 2831 | 46 | } | 2832 | | | 2833 | 46 | postprocess(module, op, result); | 2834 | 46 | } | 2835 | | | 2836 | 36 | if ( options.noCompare == false ) { | 2837 | 17 | compare(operations, results, data, size); | 2838 | 17 | } | 2839 | 36 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::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 | 180 | do { | 2725 | 180 | auto op = getOp(&parentDs, data, size); | 2726 | 180 | auto module = getModule(parentDs); | 2727 | 180 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 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 | 4 | break; | 2736 | 4 | } | 2737 | 180 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 96 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 96 | #if 1 | 2745 | 96 | { | 2746 | 96 | std::set<uint64_t> moduleIDs; | 2747 | 96 | for (const auto& m : modules ) { | 2748 | 75 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 75 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 75 | moduleIDs.insert(moduleID); | 2756 | 75 | } | 2757 | | | 2758 | 96 | std::set<uint64_t> operationModuleIDs; | 2759 | 134 | for (const auto& op : operations) { | 2760 | 134 | operationModuleIDs.insert(op.first->ID); | 2761 | 134 | } | 2762 | | | 2763 | 96 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 96 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 96 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 96 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 96 | } | 2771 | 96 | #endif | 2772 | | | 2773 | 96 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 96 | 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 | 134 | auto& operation = operations[i]; | 2782 | | | 2783 | 134 | auto& module = operation.first; | 2784 | 134 | auto& op = operation.second; | 2785 | | | 2786 | 134 | 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 | 59 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 59 | 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 | 39 | } else { | 2797 | 1.01k | for (auto& c : curModifier) { | 2798 | 1.01k | c++; | 2799 | 1.01k | } | 2800 | 39 | } | 2801 | 59 | } | 2802 | 59 | } | 2803 | | | 2804 | 134 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 134 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 134 | const auto& result = results.back(); | 2811 | | | 2812 | 134 | 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 | 134 | 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 | 134 | if ( options.disableTests == false ) { | 2830 | 134 | tests::test(op, result.second); | 2831 | 134 | } | 2832 | | | 2833 | 134 | postprocess(module, op, result); | 2834 | 134 | } | 2835 | | | 2836 | 96 | if ( options.noCompare == false ) { | 2837 | 75 | compare(operations, results, data, size); | 2838 | 75 | } | 2839 | 96 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 56 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 56 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 56 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 129 | do { | 2725 | 129 | auto op = getOp(&parentDs, data, size); | 2726 | 129 | auto module = getModule(parentDs); | 2727 | 129 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 129 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 129 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 129 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 56 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 56 | #if 1 | 2745 | 56 | { | 2746 | 56 | std::set<uint64_t> moduleIDs; | 2747 | 56 | for (const auto& m : modules ) { | 2748 | 31 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 31 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 31 | moduleIDs.insert(moduleID); | 2756 | 31 | } | 2757 | | | 2758 | 56 | std::set<uint64_t> operationModuleIDs; | 2759 | 77 | for (const auto& op : operations) { | 2760 | 77 | operationModuleIDs.insert(op.first->ID); | 2761 | 77 | } | 2762 | | | 2763 | 56 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 56 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 56 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 56 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 56 | } | 2771 | 56 | #endif | 2772 | | | 2773 | 56 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 56 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 133 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 77 | auto& operation = operations[i]; | 2782 | | | 2783 | 77 | auto& module = operation.first; | 2784 | 77 | auto& op = operation.second; | 2785 | | | 2786 | 77 | if ( i > 0 ) { | 2787 | 46 | auto& prevModule = operations[i-1].first; | 2788 | 46 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 46 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 46 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 46 | 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 | 28 | } else { | 2797 | 846 | for (auto& c : curModifier) { | 2798 | 846 | c++; | 2799 | 846 | } | 2800 | 28 | } | 2801 | 46 | } | 2802 | 46 | } | 2803 | | | 2804 | 77 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 77 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 77 | const auto& result = results.back(); | 2811 | | | 2812 | 77 | 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 | 77 | 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 | 77 | if ( options.disableTests == false ) { | 2830 | 77 | tests::test(op, result.second); | 2831 | 77 | } | 2832 | | | 2833 | 77 | postprocess(module, op, result); | 2834 | 77 | } | 2835 | | | 2836 | 56 | if ( options.noCompare == false ) { | 2837 | 31 | compare(operations, results, data, size); | 2838 | 31 | } | 2839 | 56 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::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 | 201 | do { | 2725 | 201 | auto op = getOp(&parentDs, data, size); | 2726 | 201 | auto module = getModule(parentDs); | 2727 | 201 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 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 | 7 | break; | 2736 | 7 | } | 2737 | 201 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 95 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 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 | 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 | 95 | std::set<uint64_t> operationModuleIDs; | 2759 | 144 | for (const auto& op : operations) { | 2760 | 144 | operationModuleIDs.insert(op.first->ID); | 2761 | 144 | } | 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 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 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 | 239 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 144 | auto& operation = operations[i]; | 2782 | | | 2783 | 144 | auto& module = operation.first; | 2784 | 144 | auto& op = operation.second; | 2785 | | | 2786 | 144 | 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 | 76 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 76 | 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 | 40 | } else { | 2797 | 1.67k | for (auto& c : curModifier) { | 2798 | 1.67k | c++; | 2799 | 1.67k | } | 2800 | 40 | } | 2801 | 76 | } | 2802 | 76 | } | 2803 | | | 2804 | 144 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 144 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 144 | const auto& result = results.back(); | 2811 | | | 2812 | 144 | 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 | 144 | 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 | 144 | if ( options.disableTests == false ) { | 2830 | 144 | tests::test(op, result.second); | 2831 | 144 | } | 2832 | | | 2833 | 144 | postprocess(module, op, result); | 2834 | 144 | } | 2835 | | | 2836 | 95 | if ( options.noCompare == false ) { | 2837 | 68 | compare(operations, results, data, size); | 2838 | 68 | } | 2839 | 95 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 67 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 67 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 67 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 140 | do { | 2725 | 140 | auto op = getOp(&parentDs, data, size); | 2726 | 140 | auto module = getModule(parentDs); | 2727 | 140 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 140 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 140 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 140 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 67 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 67 | #if 1 | 2745 | 67 | { | 2746 | 67 | std::set<uint64_t> moduleIDs; | 2747 | 67 | for (const auto& m : modules ) { | 2748 | 38 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 38 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 38 | moduleIDs.insert(moduleID); | 2756 | 38 | } | 2757 | | | 2758 | 67 | std::set<uint64_t> operationModuleIDs; | 2759 | 78 | for (const auto& op : operations) { | 2760 | 78 | operationModuleIDs.insert(op.first->ID); | 2761 | 78 | } | 2762 | | | 2763 | 67 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 67 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 67 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 67 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 67 | } | 2771 | 67 | #endif | 2772 | | | 2773 | 67 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 67 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 145 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 78 | auto& operation = operations[i]; | 2782 | | | 2783 | 78 | auto& module = operation.first; | 2784 | 78 | auto& op = operation.second; | 2785 | | | 2786 | 78 | if ( i > 0 ) { | 2787 | 40 | auto& prevModule = operations[i-1].first; | 2788 | 40 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 40 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 40 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 40 | if ( curModifier.size() == 0 ) { | 2793 | 7.18k | for (size_t j = 0; j < 512; j++) { | 2794 | 7.16k | curModifier.push_back(1); | 2795 | 7.16k | } | 2796 | 26 | } else { | 2797 | 6.05k | for (auto& c : curModifier) { | 2798 | 6.05k | c++; | 2799 | 6.05k | } | 2800 | 26 | } | 2801 | 40 | } | 2802 | 40 | } | 2803 | | | 2804 | 78 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 78 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 78 | const auto& result = results.back(); | 2811 | | | 2812 | 78 | 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 | 78 | 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 | 78 | if ( options.disableTests == false ) { | 2830 | 78 | tests::test(op, result.second); | 2831 | 78 | } | 2832 | | | 2833 | 78 | postprocess(module, op, result); | 2834 | 78 | } | 2835 | | | 2836 | 67 | if ( options.noCompare == false ) { | 2837 | 38 | compare(operations, results, data, size); | 2838 | 38 | } | 2839 | 67 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 88 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 88 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 88 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 186 | do { | 2725 | 186 | auto op = getOp(&parentDs, data, size); | 2726 | 186 | auto module = getModule(parentDs); | 2727 | 186 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 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 | 5 | break; | 2736 | 5 | } | 2737 | 186 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 88 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 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 | 63 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 63 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 63 | moduleIDs.insert(moduleID); | 2756 | 63 | } | 2757 | | | 2758 | 88 | std::set<uint64_t> operationModuleIDs; | 2759 | 129 | for (const auto& op : operations) { | 2760 | 129 | operationModuleIDs.insert(op.first->ID); | 2761 | 129 | } | 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 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 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 | 217 | 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 | 66 | auto& prevModule = operations[i-1].first; | 2788 | 66 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 66 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 66 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 66 | if ( curModifier.size() == 0 ) { | 2793 | 16.9k | for (size_t j = 0; j < 512; j++) { | 2794 | 16.8k | curModifier.push_back(1); | 2795 | 16.8k | } | 2796 | 33 | } else { | 2797 | 2.59k | for (auto& c : curModifier) { | 2798 | 2.59k | c++; | 2799 | 2.59k | } | 2800 | 33 | } | 2801 | 66 | } | 2802 | 66 | } | 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 | 88 | if ( options.noCompare == false ) { | 2837 | 63 | compare(operations, results, data, size); | 2838 | 63 | } | 2839 | 88 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 77 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 77 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 77 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 159 | do { | 2725 | 159 | auto op = getOp(&parentDs, data, size); | 2726 | 159 | auto module = getModule(parentDs); | 2727 | 159 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 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 | 3 | break; | 2736 | 3 | } | 2737 | 159 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 77 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 77 | #if 1 | 2745 | 77 | { | 2746 | 77 | std::set<uint64_t> moduleIDs; | 2747 | 77 | for (const auto& m : modules ) { | 2748 | 49 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 49 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 49 | moduleIDs.insert(moduleID); | 2756 | 49 | } | 2757 | | | 2758 | 77 | std::set<uint64_t> operationModuleIDs; | 2759 | 96 | for (const auto& op : operations) { | 2760 | 96 | operationModuleIDs.insert(op.first->ID); | 2761 | 96 | } | 2762 | | | 2763 | 77 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 77 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 77 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 77 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 77 | } | 2771 | 77 | #endif | 2772 | | | 2773 | 77 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 77 | 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 | 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 | 47 | auto& prevModule = operations[i-1].first; | 2788 | 47 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 47 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 47 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 47 | 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 | 28 | } else { | 2797 | 712 | for (auto& c : curModifier) { | 2798 | 712 | c++; | 2799 | 712 | } | 2800 | 28 | } | 2801 | 47 | } | 2802 | 47 | } | 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 | 77 | if ( options.noCompare == false ) { | 2837 | 49 | compare(operations, results, data, size); | 2838 | 49 | } | 2839 | 77 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 120 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 120 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 120 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 234 | do { | 2725 | 234 | auto op = getOp(&parentDs, data, size); | 2726 | 234 | auto module = getModule(parentDs); | 2727 | 234 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 234 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 234 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 234 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 120 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 120 | #if 1 | 2745 | 120 | { | 2746 | 120 | std::set<uint64_t> moduleIDs; | 2747 | 120 | 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 | 120 | std::set<uint64_t> operationModuleIDs; | 2759 | 162 | for (const auto& op : operations) { | 2760 | 162 | operationModuleIDs.insert(op.first->ID); | 2761 | 162 | } | 2762 | | | 2763 | 120 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 120 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 120 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 120 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 120 | } | 2771 | 120 | #endif | 2772 | | | 2773 | 120 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 120 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 282 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 162 | auto& operation = operations[i]; | 2782 | | | 2783 | 162 | auto& module = operation.first; | 2784 | 162 | auto& op = operation.second; | 2785 | | | 2786 | 162 | if ( i > 0 ) { | 2787 | 72 | auto& prevModule = operations[i-1].first; | 2788 | 72 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 72 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 72 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 72 | 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 | 51 | } else { | 2797 | 2.49k | for (auto& c : curModifier) { | 2798 | 2.49k | c++; | 2799 | 2.49k | } | 2800 | 51 | } | 2801 | 72 | } | 2802 | 72 | } | 2803 | | | 2804 | 162 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 162 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 162 | const auto& result = results.back(); | 2811 | | | 2812 | 162 | 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 | 162 | 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 | 162 | if ( options.disableTests == false ) { | 2830 | 162 | tests::test(op, result.second); | 2831 | 162 | } | 2832 | | | 2833 | 162 | postprocess(module, op, result); | 2834 | 162 | } | 2835 | | | 2836 | 120 | if ( options.noCompare == false ) { | 2837 | 90 | compare(operations, results, data, size); | 2838 | 90 | } | 2839 | 120 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 81 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 81 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 81 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 160 | do { | 2725 | 160 | auto op = getOp(&parentDs, data, size); | 2726 | 160 | auto module = getModule(parentDs); | 2727 | 160 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 160 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 160 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 160 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 81 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 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 | 57 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 57 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 57 | moduleIDs.insert(moduleID); | 2756 | 57 | } | 2757 | | | 2758 | 81 | std::set<uint64_t> operationModuleIDs; | 2759 | 103 | for (const auto& op : operations) { | 2760 | 103 | operationModuleIDs.insert(op.first->ID); | 2761 | 103 | } | 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 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 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 | 184 | 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 | 46 | auto& prevModule = operations[i-1].first; | 2788 | 46 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 46 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 46 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 46 | 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 | 26 | } else { | 2797 | 7.02k | for (auto& c : curModifier) { | 2798 | 7.02k | c++; | 2799 | 7.02k | } | 2800 | 26 | } | 2801 | 46 | } | 2802 | 46 | } | 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 | 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 | 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 | 81 | if ( options.noCompare == false ) { | 2837 | 57 | compare(operations, results, data, size); | 2838 | 57 | } | 2839 | 81 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::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 | 295 | do { | 2725 | 295 | auto op = getOp(&parentDs, data, size); | 2726 | 295 | auto module = getModule(parentDs); | 2727 | 295 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 295 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 295 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 7 | break; | 2736 | 7 | } | 2737 | 295 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 151 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 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 | 151 | for (const auto& m : modules ) { | 2748 | 69 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 69 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 69 | moduleIDs.insert(moduleID); | 2756 | 69 | } | 2757 | | | 2758 | 151 | std::set<uint64_t> operationModuleIDs; | 2759 | 160 | for (const auto& op : operations) { | 2760 | 160 | operationModuleIDs.insert(op.first->ID); | 2761 | 160 | } | 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 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 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 | 311 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 160 | auto& operation = operations[i]; | 2782 | | | 2783 | 160 | auto& module = operation.first; | 2784 | 160 | auto& op = operation.second; | 2785 | | | 2786 | 160 | 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 | 91 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 91 | if ( curModifier.size() == 0 ) { | 2793 | 18.9k | for (size_t j = 0; j < 512; j++) { | 2794 | 18.9k | curModifier.push_back(1); | 2795 | 18.9k | } | 2796 | 54 | } else { | 2797 | 12.8k | for (auto& c : curModifier) { | 2798 | 12.8k | c++; | 2799 | 12.8k | } | 2800 | 54 | } | 2801 | 91 | } | 2802 | 91 | } | 2803 | | | 2804 | 160 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 160 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 160 | const auto& result = results.back(); | 2811 | | | 2812 | 160 | 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 | 160 | 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 | 160 | if ( options.disableTests == false ) { | 2830 | 160 | tests::test(op, result.second); | 2831 | 160 | } | 2832 | | | 2833 | 160 | postprocess(module, op, result); | 2834 | 160 | } | 2835 | | | 2836 | 151 | if ( options.noCompare == false ) { | 2837 | 69 | compare(operations, results, data, size); | 2838 | 69 | } | 2839 | 151 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 45 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 45 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 45 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 124 | do { | 2725 | 124 | auto op = getOp(&parentDs, data, size); | 2726 | 124 | auto module = getModule(parentDs); | 2727 | 124 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 124 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 124 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 124 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 45 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 45 | #if 1 | 2745 | 45 | { | 2746 | 45 | std::set<uint64_t> moduleIDs; | 2747 | 45 | for (const auto& m : modules ) { | 2748 | 19 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 19 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 19 | moduleIDs.insert(moduleID); | 2756 | 19 | } | 2757 | | | 2758 | 45 | std::set<uint64_t> operationModuleIDs; | 2759 | 56 | for (const auto& op : operations) { | 2760 | 56 | operationModuleIDs.insert(op.first->ID); | 2761 | 56 | } | 2762 | | | 2763 | 45 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 45 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 45 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 45 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 45 | } | 2771 | 45 | #endif | 2772 | | | 2773 | 45 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 45 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 101 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 56 | auto& operation = operations[i]; | 2782 | | | 2783 | 56 | auto& module = operation.first; | 2784 | 56 | auto& op = operation.second; | 2785 | | | 2786 | 56 | if ( i > 0 ) { | 2787 | 37 | auto& prevModule = operations[i-1].first; | 2788 | 37 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 37 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 37 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 37 | 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 | 21 | } else { | 2797 | 283 | for (auto& c : curModifier) { | 2798 | 283 | c++; | 2799 | 283 | } | 2800 | 21 | } | 2801 | 37 | } | 2802 | 37 | } | 2803 | | | 2804 | 56 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 56 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 56 | const auto& result = results.back(); | 2811 | | | 2812 | 56 | 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 | 56 | 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 | 56 | if ( options.disableTests == false ) { | 2830 | 56 | tests::test(op, result.second); | 2831 | 56 | } | 2832 | | | 2833 | 56 | postprocess(module, op, result); | 2834 | 56 | } | 2835 | | | 2836 | 45 | if ( options.noCompare == false ) { | 2837 | 19 | compare(operations, results, data, size); | 2838 | 19 | } | 2839 | 45 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 81 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 81 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 81 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 171 | do { | 2725 | 171 | auto op = getOp(&parentDs, data, size); | 2726 | 171 | auto module = getModule(parentDs); | 2727 | 171 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 171 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 171 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 171 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 81 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 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 | 23 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 23 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 23 | moduleIDs.insert(moduleID); | 2756 | 23 | } | 2757 | | | 2758 | 81 | std::set<uint64_t> operationModuleIDs; | 2759 | 81 | for (const auto& op : operations) { | 2760 | 70 | operationModuleIDs.insert(op.first->ID); | 2761 | 70 | } | 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 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 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 | 151 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 70 | auto& operation = operations[i]; | 2782 | | | 2783 | 70 | auto& module = operation.first; | 2784 | 70 | auto& op = operation.second; | 2785 | | | 2786 | 70 | if ( i > 0 ) { | 2787 | 47 | auto& prevModule = operations[i-1].first; | 2788 | 47 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 47 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 47 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 47 | 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 | 305 | for (auto& c : curModifier) { | 2798 | 305 | c++; | 2799 | 305 | } | 2800 | 20 | } | 2801 | 47 | } | 2802 | 47 | } | 2803 | | | 2804 | 70 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 70 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 70 | const auto& result = results.back(); | 2811 | | | 2812 | 70 | 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 | 70 | 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 | if ( options.disableTests == false ) { | 2830 | 70 | tests::test(op, result.second); | 2831 | 70 | } | 2832 | | | 2833 | 70 | postprocess(module, op, result); | 2834 | 70 | } | 2835 | | | 2836 | 81 | if ( options.noCompare == false ) { | 2837 | 23 | compare(operations, results, data, size); | 2838 | 23 | } | 2839 | 81 | } |
|
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 */ |