/src/cryptofuzz/executor.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | #include "executor.h" |
2 | | #include "tests.h" |
3 | | #include "mutatorpool.h" |
4 | | #include "config.h" |
5 | | #include <cryptofuzz/util.h> |
6 | | #include <fuzzing/memory.hpp> |
7 | | #include <algorithm> |
8 | | #include <set> |
9 | | #include <boost/multiprecision/cpp_int.hpp> |
10 | | |
11 | | uint32_t PRNG(void); |
12 | | |
13 | 141k | #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 | 9.21k | 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 | 9.21k | (void)module; |
53 | 9.21k | (void)op; |
54 | | |
55 | 9.21k | if ( result.second != std::nullopt ) { |
56 | 4.19k | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
57 | 4.19k | } |
58 | 9.21k | } |
59 | | |
60 | 9.21k | template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const { |
61 | 9.21k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
62 | | |
63 | 9.21k | return module->OpDigest(op); |
64 | 9.21k | } |
65 | | |
66 | | /* Specialization for operation::HMAC */ |
67 | 3.38k | 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 | 3.38k | (void)module; |
69 | 3.38k | (void)op; |
70 | | |
71 | 3.38k | if ( result.second != std::nullopt ) { |
72 | 2.11k | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
73 | 2.11k | } |
74 | 3.38k | } |
75 | | |
76 | 3.38k | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const { |
77 | 3.38k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
78 | | |
79 | 3.38k | return module->OpHMAC(op); |
80 | 3.38k | } |
81 | | |
82 | | /* Specialization for operation::UMAC */ |
83 | 5.39k | 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 | 5.39k | (void)module; |
85 | 5.39k | (void)op; |
86 | | |
87 | 5.39k | if ( result.second != std::nullopt ) { |
88 | 2.57k | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
89 | 2.57k | } |
90 | 5.39k | } |
91 | | |
92 | 5.39k | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const { |
93 | 5.39k | return module->OpUMAC(op); |
94 | 5.39k | } |
95 | | |
96 | | /* Specialization for operation::CMAC */ |
97 | 5.91k | template<> void ExecutorBase<component::MAC, operation::CMAC>::postprocess(std::shared_ptr<Module> module, operation::CMAC& op, const ExecutorBase<component::MAC, operation::CMAC>::ResultPair& result) const { |
98 | 5.91k | (void)module; |
99 | 5.91k | (void)op; |
100 | | |
101 | 5.91k | if ( result.second != std::nullopt ) { |
102 | 2.46k | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
103 | 2.46k | } |
104 | 5.91k | } |
105 | | |
106 | 5.91k | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const { |
107 | 5.91k | RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get()); |
108 | | |
109 | 5.91k | return module->OpCMAC(op); |
110 | 5.91k | } |
111 | | |
112 | | /* Specialization for operation::SymmetricEncrypt */ |
113 | 25.3k | 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 | 25.3k | if ( options.noDecrypt == true ) { |
115 | 0 | return; |
116 | 0 | } |
117 | | |
118 | 25.3k | if ( result.second != std::nullopt ) { |
119 | 7.77k | fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize()); |
120 | 7.77k | if ( result.second->tag != std::nullopt ) { |
121 | 3.58k | fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize()); |
122 | 3.58k | } |
123 | 7.77k | } |
124 | | |
125 | 25.3k | if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) { |
126 | 7.14k | using fuzzing::datasource::ID; |
127 | | |
128 | 7.14k | bool tryDecrypt = true; |
129 | | |
130 | 7.14k | 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 | 7.14k | if ( tryDecrypt == true ) { |
159 | | /* Try to decrypt the encrypted data */ |
160 | | |
161 | | /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */ |
162 | 7.14k | auto opDecrypt = operation::SymmetricDecrypt( |
163 | | /* The SymmetricEncrypt instance */ |
164 | 7.14k | op, |
165 | | |
166 | | /* The ciphertext generated by OpSymmetricEncrypt */ |
167 | 7.14k | *(result.second), |
168 | | |
169 | | /* The size of the output buffer that OpSymmetricDecrypt() must use. */ |
170 | 7.14k | op.cleartext.GetSize() + 32, |
171 | | |
172 | 7.14k | op.aad, |
173 | | |
174 | | /* Empty modifier */ |
175 | 7.14k | {}); |
176 | | |
177 | 7.14k | const auto cleartext = module->OpSymmetricDecrypt(opDecrypt); |
178 | | |
179 | 7.14k | 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 | 7.14k | } 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 | 7.14k | } |
208 | 7.14k | } |
209 | 25.3k | } |
210 | | |
211 | 25.3k | template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const { |
212 | 25.3k | RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get()); |
213 | | |
214 | 25.3k | return module->OpSymmetricEncrypt(op); |
215 | 25.3k | } |
216 | | |
217 | | /* Specialization for operation::SymmetricDecrypt */ |
218 | 16.8k | 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 | 16.8k | (void)module; |
220 | 16.8k | (void)op; |
221 | | |
222 | 16.8k | if ( result.second != std::nullopt ) { |
223 | 1.28k | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
224 | 1.28k | } |
225 | 16.8k | } |
226 | | |
227 | 16.8k | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const { |
228 | 16.8k | RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get()); |
229 | | |
230 | 16.8k | return module->OpSymmetricDecrypt(op); |
231 | 16.8k | } |
232 | | |
233 | | /* Specialization for operation::KDF_SCRYPT */ |
234 | 1.45k | 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 | 1.45k | (void)module; |
236 | 1.45k | (void)op; |
237 | | |
238 | 1.45k | if ( result.second != std::nullopt ) { |
239 | 457 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
240 | 457 | } |
241 | 1.45k | } |
242 | | |
243 | 1.45k | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const { |
244 | 1.45k | return module->OpKDF_SCRYPT(op); |
245 | 1.45k | } |
246 | | |
247 | | /* Specialization for operation::KDF_HKDF */ |
248 | 9.97k | 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 | 9.97k | (void)module; |
250 | 9.97k | (void)op; |
251 | | |
252 | 9.97k | if ( result.second != std::nullopt ) { |
253 | 4.95k | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
254 | 4.95k | } |
255 | 9.97k | } |
256 | | |
257 | 9.97k | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const { |
258 | 9.97k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
259 | | |
260 | 9.97k | return module->OpKDF_HKDF(op); |
261 | 9.97k | } |
262 | | |
263 | | /* Specialization for operation::KDF_PBKDF */ |
264 | 728 | 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 | 728 | (void)module; |
266 | 728 | (void)op; |
267 | | |
268 | 728 | if ( result.second != std::nullopt ) { |
269 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
270 | 0 | } |
271 | 728 | } |
272 | | |
273 | 728 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const { |
274 | 728 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
275 | | |
276 | 728 | return module->OpKDF_PBKDF(op); |
277 | 728 | } |
278 | | |
279 | | /* Specialization for operation::KDF_PBKDF1 */ |
280 | 716 | 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 | 716 | (void)module; |
282 | 716 | (void)op; |
283 | | |
284 | 716 | if ( result.second != std::nullopt ) { |
285 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
286 | 0 | } |
287 | 716 | } |
288 | | |
289 | 716 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const { |
290 | 716 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
291 | | |
292 | 716 | return module->OpKDF_PBKDF1(op); |
293 | 716 | } |
294 | | |
295 | | /* Specialization for operation::KDF_PBKDF2 */ |
296 | 3.62k | 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 | 3.62k | (void)module; |
298 | 3.62k | (void)op; |
299 | | |
300 | 3.62k | if ( result.second != std::nullopt ) { |
301 | 1.68k | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
302 | 1.68k | } |
303 | 3.62k | } |
304 | | |
305 | 3.62k | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const { |
306 | 3.62k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
307 | | |
308 | 3.62k | return module->OpKDF_PBKDF2(op); |
309 | 3.62k | } |
310 | | |
311 | | /* Specialization for operation::KDF_ARGON2 */ |
312 | 1.23k | 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 | 1.23k | (void)module; |
314 | 1.23k | (void)op; |
315 | | |
316 | 1.23k | if ( result.second != std::nullopt ) { |
317 | 588 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
318 | 588 | } |
319 | 1.23k | } |
320 | | |
321 | 1.23k | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const { |
322 | 1.23k | return module->OpKDF_ARGON2(op); |
323 | 1.23k | } |
324 | | |
325 | | /* Specialization for operation::KDF_SSH */ |
326 | 545 | 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 | 545 | (void)module; |
328 | 545 | (void)op; |
329 | | |
330 | 545 | if ( result.second != std::nullopt ) { |
331 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
332 | 0 | } |
333 | 545 | } |
334 | | |
335 | 545 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const { |
336 | 545 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
337 | | |
338 | 545 | return module->OpKDF_SSH(op); |
339 | 545 | } |
340 | | |
341 | | /* Specialization for operation::KDF_TLS1_PRF */ |
342 | 856 | 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 | 856 | (void)module; |
344 | 856 | (void)op; |
345 | | |
346 | 856 | if ( result.second != std::nullopt ) { |
347 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
348 | 0 | } |
349 | 856 | } |
350 | | |
351 | 856 | 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 | 856 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
353 | | |
354 | 856 | return module->OpKDF_TLS1_PRF(op); |
355 | 856 | } |
356 | | |
357 | | /* Specialization for operation::KDF_X963 */ |
358 | 826 | 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 | 826 | (void)module; |
360 | 826 | (void)op; |
361 | | |
362 | 826 | if ( result.second != std::nullopt ) { |
363 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
364 | 0 | } |
365 | 826 | } |
366 | | |
367 | 826 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const { |
368 | 826 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
369 | | |
370 | 826 | return module->OpKDF_X963(op); |
371 | 826 | } |
372 | | |
373 | | /* Specialization for operation::KDF_BCRYPT */ |
374 | 213 | 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 | 213 | (void)module; |
376 | 213 | (void)op; |
377 | | |
378 | 213 | if ( result.second != std::nullopt ) { |
379 | 68 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
380 | 68 | } |
381 | 213 | } |
382 | | |
383 | 213 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const { |
384 | 213 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
385 | | |
386 | 213 | return module->OpKDF_BCRYPT(op); |
387 | 213 | } |
388 | | |
389 | | /* Specialization for operation::KDF_SP_800_108 */ |
390 | 2.94k | 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 | 2.94k | (void)module; |
392 | 2.94k | (void)op; |
393 | | |
394 | 2.94k | if ( result.second != std::nullopt ) { |
395 | 1.37k | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
396 | 1.37k | } |
397 | 2.94k | } |
398 | | |
399 | 2.94k | 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 | 2.94k | if ( op.mech.mode == true ) { |
401 | 1.74k | RETURN_IF_DISABLED(options.digests, op.mech.type.Get()); |
402 | 1.74k | } |
403 | | |
404 | 2.94k | return module->OpKDF_SP_800_108(op); |
405 | 2.94k | } |
406 | | |
407 | | /* Specialization for operation::KDF_SRTP */ |
408 | 788 | 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 | 788 | (void)module; |
410 | 788 | (void)op; |
411 | 788 | (void)result; |
412 | 788 | } |
413 | | |
414 | 788 | template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const { |
415 | 788 | return module->OpKDF_SRTP(op); |
416 | 788 | } |
417 | | |
418 | | /* Specialization for operation::KDF_SRTCP */ |
419 | 677 | 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 | 677 | (void)module; |
421 | 677 | (void)op; |
422 | 677 | (void)result; |
423 | 677 | } |
424 | | |
425 | 677 | template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const { |
426 | 677 | return module->OpKDF_SRTCP(op); |
427 | 677 | } |
428 | | |
429 | | /* Specialization for operation::ECC_PrivateToPublic */ |
430 | 2.60k | 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 | 2.60k | (void)module; |
432 | | |
433 | 2.60k | if ( result.second != std::nullopt ) { |
434 | 764 | const auto curveID = op.curveType.Get(); |
435 | 764 | const auto privkey = op.priv.ToTrimmedString(); |
436 | 764 | const auto pub_x = result.second->first.ToTrimmedString(); |
437 | 764 | const auto pub_y = result.second->second.ToTrimmedString(); |
438 | | |
439 | 764 | Pool_CurvePrivkey.Set({ curveID, privkey }); |
440 | 764 | Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y }); |
441 | 764 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
442 | | |
443 | 764 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
444 | 764 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
445 | 764 | } |
446 | 2.60k | } |
447 | | |
448 | 2.60k | 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 | 2.60k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
450 | | |
451 | 2.60k | const size_t size = op.priv.ToTrimmedString().size(); |
452 | | |
453 | 2.60k | if ( size == 0 || size > 4096 ) { |
454 | 0 | return std::nullopt; |
455 | 0 | } |
456 | | |
457 | 2.60k | return module->OpECC_PrivateToPublic(op); |
458 | 2.60k | } |
459 | | |
460 | | /* Specialization for operation::ECC_ValidatePubkey */ |
461 | 2.07k | 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.07k | (void)module; |
463 | 2.07k | (void)op; |
464 | 2.07k | (void)result; |
465 | 2.07k | } |
466 | | |
467 | 2.07k | template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const { |
468 | 2.07k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
469 | | |
470 | 2.07k | return module->OpECC_ValidatePubkey(op); |
471 | 2.07k | } |
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 | 78 | 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 | 78 | (void)operations; |
479 | 78 | (void)results; |
480 | 78 | (void)data; |
481 | 78 | (void)size; |
482 | 78 | } |
483 | | |
484 | 2.70k | 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 | 2.70k | (void)module; |
486 | | |
487 | 2.70k | if ( result.second != std::nullopt ) { |
488 | 848 | const auto curveID = op.curveType.Get(); |
489 | 848 | const auto privkey = result.second->priv.ToTrimmedString(); |
490 | 848 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
491 | 848 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
492 | | |
493 | 848 | Pool_CurvePrivkey.Set({ curveID, privkey }); |
494 | 848 | Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y }); |
495 | 848 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
496 | | |
497 | 848 | { |
498 | 848 | auto opValidate = operation::ECC_ValidatePubkey( |
499 | 848 | op.curveType, |
500 | 848 | result.second->pub, |
501 | 848 | op.modifier); |
502 | | |
503 | 848 | const auto validateResult = module->OpECC_ValidatePubkey(opValidate); |
504 | 848 | CF_ASSERT( |
505 | 848 | validateResult == std::nullopt || |
506 | 848 | *validateResult == true, |
507 | 848 | "Cannot validate generated public key"); |
508 | 848 | } |
509 | 848 | } |
510 | 2.70k | } |
511 | | |
512 | 2.70k | 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 | 2.70k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
514 | | |
515 | 2.70k | return module->OpECC_GenerateKeyPair(op); |
516 | 2.70k | } |
517 | | |
518 | | /* Specialization for operation::ECCSI_Sign */ |
519 | 270 | 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 | 270 | (void)module; |
521 | | |
522 | 270 | 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 | 270 | } |
565 | | |
566 | 270 | 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 | 270 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
568 | 270 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
569 | | |
570 | 270 | const size_t size = op.priv.ToTrimmedString().size(); |
571 | | |
572 | 270 | if ( size == 0 || size > 4096 ) { |
573 | 4 | return std::nullopt; |
574 | 4 | } |
575 | | |
576 | 266 | return module->OpECCSI_Sign(op); |
577 | 270 | } |
578 | | |
579 | | /* Specialization for operation::ECDSA_Sign */ |
580 | 2.78k | 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 | 2.78k | (void)module; |
582 | | |
583 | 2.78k | if ( result.second != std::nullopt ) { |
584 | 1.29k | const auto curveID = op.curveType.Get(); |
585 | 1.29k | const auto cleartext = op.cleartext.ToHex(); |
586 | 1.29k | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
587 | 1.29k | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
588 | 1.29k | const auto sig_r = result.second->signature.first.ToTrimmedString(); |
589 | 1.29k | const auto sig_s = result.second->signature.second.ToTrimmedString(); |
590 | | |
591 | 1.29k | Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s}); |
592 | 1.29k | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
593 | 1.29k | Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s }); |
594 | | |
595 | 1.29k | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
596 | 1.29k | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
597 | 1.29k | if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); } |
598 | 1.29k | if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); } |
599 | | |
600 | 1.29k | { |
601 | 1.29k | auto opVerify = operation::ECDSA_Verify( |
602 | 1.29k | op, |
603 | 1.29k | *(result.second), |
604 | 1.29k | op.modifier); |
605 | | |
606 | 1.29k | const auto verifyResult = module->OpECDSA_Verify(opVerify); |
607 | 1.29k | CF_ASSERT( |
608 | 1.29k | verifyResult == std::nullopt || |
609 | 1.29k | *verifyResult == true, |
610 | 1.29k | "Cannot verify generated signature"); |
611 | 1.29k | } |
612 | 1.29k | } |
613 | 2.78k | } |
614 | | |
615 | 2.78k | 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 | 2.78k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
617 | 2.78k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
618 | | |
619 | 2.78k | const size_t size = op.priv.ToTrimmedString().size(); |
620 | | |
621 | 2.78k | if ( size == 0 || size > 4096 ) { |
622 | 4 | return std::nullopt; |
623 | 4 | } |
624 | | |
625 | 2.78k | return module->OpECDSA_Sign(op); |
626 | 2.78k | } |
627 | | |
628 | | /* Specialization for operation::ECGDSA_Sign */ |
629 | 466 | 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 | 466 | (void)module; |
631 | | |
632 | 466 | if ( result.second != std::nullopt ) { |
633 | 28 | const auto curveID = op.curveType.Get(); |
634 | 28 | const auto cleartext = op.cleartext.ToHex(); |
635 | 28 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
636 | 28 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
637 | 28 | const auto sig_r = result.second->signature.first.ToTrimmedString(); |
638 | 28 | const auto sig_s = result.second->signature.second.ToTrimmedString(); |
639 | | |
640 | 28 | Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s}); |
641 | 28 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
642 | 28 | Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s }); |
643 | | |
644 | 28 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
645 | 28 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
646 | 28 | if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); } |
647 | 28 | if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); } |
648 | 28 | } |
649 | 466 | } |
650 | | |
651 | 466 | 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 | 466 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
653 | 466 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
654 | | |
655 | 466 | const size_t size = op.priv.ToTrimmedString().size(); |
656 | | |
657 | 466 | if ( size == 0 || size > 4096 ) { |
658 | 0 | return std::nullopt; |
659 | 0 | } |
660 | | |
661 | 466 | return module->OpECGDSA_Sign(op); |
662 | 466 | } |
663 | | |
664 | | /* Specialization for operation::ECRDSA_Sign */ |
665 | 265 | 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 | 265 | (void)module; |
667 | | |
668 | 265 | 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 | 265 | } |
686 | | |
687 | 265 | 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 | 265 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
689 | 265 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
690 | | |
691 | 265 | const size_t size = op.priv.ToTrimmedString().size(); |
692 | | |
693 | 265 | if ( size == 0 || size > 4096 ) { |
694 | 0 | return std::nullopt; |
695 | 0 | } |
696 | | |
697 | 265 | return module->OpECRDSA_Sign(op); |
698 | 265 | } |
699 | | |
700 | | /* Specialization for operation::Schnorr_Sign */ |
701 | 265 | 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 | 265 | (void)module; |
703 | | |
704 | 265 | 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 | 265 | } |
722 | | |
723 | 265 | 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 | 265 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
725 | 265 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
726 | | |
727 | 265 | const size_t size = op.priv.ToTrimmedString().size(); |
728 | | |
729 | 265 | if ( size == 0 || size > 4096 ) { |
730 | 0 | return std::nullopt; |
731 | 0 | } |
732 | | |
733 | 265 | return module->OpSchnorr_Sign(op); |
734 | 265 | } |
735 | | |
736 | | /* Specialization for operation::ECCSI_Verify */ |
737 | 225 | 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 | 225 | (void)module; |
739 | 225 | (void)op; |
740 | 225 | (void)result; |
741 | 225 | } |
742 | | |
743 | 225 | template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const { |
744 | 225 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
745 | 225 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
746 | | |
747 | 225 | return module->OpECCSI_Verify(op); |
748 | 225 | } |
749 | | |
750 | | /* Specialization for operation::ECDSA_Verify */ |
751 | 1.58k | 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 | 1.58k | (void)module; |
753 | 1.58k | (void)op; |
754 | 1.58k | (void)result; |
755 | 1.58k | } |
756 | | |
757 | 1.58k | template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const { |
758 | 1.58k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
759 | 1.58k | 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 | 1.58k | return module->OpECDSA_Verify(op); |
772 | 1.58k | } |
773 | | |
774 | | /* Specialization for operation::ECGDSA_Verify */ |
775 | 773 | 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 | 773 | (void)module; |
777 | 773 | (void)op; |
778 | 773 | (void)result; |
779 | 773 | } |
780 | | |
781 | 773 | template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const { |
782 | 773 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
783 | 773 | 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 | 773 | return module->OpECGDSA_Verify(op); |
796 | 773 | } |
797 | | |
798 | | /* Specialization for operation::ECRDSA_Verify */ |
799 | 248 | 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 | 248 | (void)module; |
801 | 248 | (void)op; |
802 | 248 | (void)result; |
803 | 248 | } |
804 | | |
805 | 248 | template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const { |
806 | 248 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
807 | 248 | 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 | 248 | return module->OpECRDSA_Verify(op); |
820 | 248 | } |
821 | | |
822 | | /* Specialization for operation::Schnorr_Verify */ |
823 | 278 | 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 | 278 | (void)module; |
825 | 278 | (void)op; |
826 | 278 | (void)result; |
827 | 278 | } |
828 | | |
829 | 278 | template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const { |
830 | 278 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
831 | 278 | 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 | 278 | return module->OpSchnorr_Verify(op); |
844 | 278 | } |
845 | | |
846 | 2.05k | 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 | 2.05k | (void)module; |
848 | 2.05k | (void)op; |
849 | 2.05k | (void)result; |
850 | 2.05k | } |
851 | | |
852 | 2.05k | 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 | 2.05k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
854 | 2.05k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
855 | | |
856 | 2.05k | return module->OpECDSA_Recover(op); |
857 | 2.05k | } |
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 | 1.08k | 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 | 1.08k | (void)module; |
869 | 1.08k | (void)op; |
870 | 1.08k | (void)result; |
871 | 1.08k | } |
872 | | |
873 | 1.08k | template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const { |
874 | 1.08k | const std::vector<size_t> sizes = { |
875 | 1.08k | op.parameters.p.ToTrimmedString().size(), |
876 | 1.08k | op.parameters.q.ToTrimmedString().size(), |
877 | 1.08k | op.parameters.g.ToTrimmedString().size(), |
878 | 1.08k | op.pub.ToTrimmedString().size(), |
879 | 1.08k | op.signature.first.ToTrimmedString().size(), |
880 | 1.08k | op.signature.second.ToTrimmedString().size(), |
881 | 1.08k | }; |
882 | | |
883 | 6.48k | for (const auto& size : sizes) { |
884 | 6.48k | if ( size == 0 || size > 4096 ) { |
885 | 0 | return std::nullopt; |
886 | 0 | } |
887 | 6.48k | } |
888 | | |
889 | 1.08k | return module->OpDSA_Verify(op); |
890 | 1.08k | } |
891 | | |
892 | | /* Specialization for operation::DSA_Sign */ |
893 | | /* Do not compare DSA_Sign results, because the result can be produced indeterministically */ |
894 | | template <> |
895 | 90 | 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 | 90 | (void)operations; |
897 | 90 | (void)results; |
898 | 90 | (void)data; |
899 | 90 | (void)size; |
900 | 90 | } |
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 | 310 | 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 | 310 | (void)module; |
910 | 310 | (void)op; |
911 | 310 | 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 | 310 | } |
934 | | |
935 | 310 | 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 | 310 | const std::vector<size_t> sizes = { |
937 | 310 | op.parameters.p.ToTrimmedString().size(), |
938 | 310 | op.parameters.q.ToTrimmedString().size(), |
939 | 310 | op.parameters.g.ToTrimmedString().size(), |
940 | 310 | op.priv.ToTrimmedString().size(), |
941 | 310 | }; |
942 | | |
943 | 1.24k | for (const auto& size : sizes) { |
944 | 1.24k | if ( size == 0 || size > 4096 ) { |
945 | 0 | return std::nullopt; |
946 | 0 | } |
947 | 1.24k | } |
948 | | |
949 | 310 | return module->OpDSA_Sign(op); |
950 | 310 | } |
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 | 223 | 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 | 223 | (void)result; |
963 | 223 | (void)module; |
964 | 223 | (void)op; |
965 | 223 | if ( result.second != std::nullopt ) { |
966 | | //Pool_DSA_PubPriv.Set({pub, priv}); |
967 | 0 | } |
968 | 223 | } |
969 | | |
970 | 223 | template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const { |
971 | 223 | return module->OpDSA_PrivateToPublic(op); |
972 | 223 | } |
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 | 83 | 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 | 83 | (void)operations; |
980 | 83 | (void)results; |
981 | 83 | (void)data; |
982 | 83 | (void)size; |
983 | 83 | } |
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 | 289 | 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 | 289 | (void)result; |
994 | 289 | (void)module; |
995 | 289 | (void)op; |
996 | 289 | 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 | 289 | } |
1003 | | |
1004 | 289 | 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 | 289 | const std::vector<size_t> sizes = { |
1006 | 289 | op.p.ToTrimmedString().size(), |
1007 | 289 | op.q.ToTrimmedString().size(), |
1008 | 289 | op.g.ToTrimmedString().size(), |
1009 | 289 | }; |
1010 | | |
1011 | 867 | for (const auto& size : sizes) { |
1012 | 867 | if ( size == 0 || size > 4096 ) { |
1013 | 0 | return std::nullopt; |
1014 | 0 | } |
1015 | 867 | } |
1016 | | |
1017 | 289 | return module->OpDSA_GenerateKeyPair(op); |
1018 | 289 | } |
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 | 73 | 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 | 73 | (void)operations; |
1026 | 73 | (void)results; |
1027 | 73 | (void)data; |
1028 | 73 | (void)size; |
1029 | 73 | } |
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 | 257 | 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 | 257 | (void)result; |
1040 | 257 | (void)module; |
1041 | 257 | (void)op; |
1042 | 257 | 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 | 257 | } |
1054 | | |
1055 | 257 | 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 | 257 | return module->OpDSA_GenerateParameters(op); |
1057 | 257 | } |
1058 | | |
1059 | | /* Specialization for operation::ECDH_Derive */ |
1060 | 232 | 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 | 232 | (void)module; |
1062 | 232 | (void)op; |
1063 | 232 | (void)result; |
1064 | 232 | } |
1065 | | |
1066 | 232 | template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const { |
1067 | 232 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1068 | | |
1069 | 232 | return module->OpECDH_Derive(op); |
1070 | 232 | } |
1071 | | |
1072 | | /* Specialization for operation::ECIES_Encrypt */ |
1073 | | template <> |
1074 | 76 | 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 | 76 | (void)operations; |
1076 | 76 | (void)results; |
1077 | 76 | (void)data; |
1078 | 76 | (void)size; |
1079 | 76 | } |
1080 | 277 | 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 | 277 | (void)module; |
1082 | 277 | (void)op; |
1083 | 277 | (void)result; |
1084 | 277 | } |
1085 | | |
1086 | 277 | template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const { |
1087 | 277 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1088 | | |
1089 | 277 | return module->OpECIES_Encrypt(op); |
1090 | 277 | } |
1091 | | |
1092 | | /* Specialization for operation::ECIES_Decrypt */ |
1093 | 233 | 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 | 233 | (void)module; |
1095 | 233 | (void)op; |
1096 | 233 | (void)result; |
1097 | 233 | } |
1098 | | |
1099 | 233 | template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const { |
1100 | 233 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1101 | | |
1102 | 233 | return module->OpECIES_Decrypt(op); |
1103 | 233 | } |
1104 | | |
1105 | | /* Specialization for operation::ECC_Point_Add */ |
1106 | 492 | 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 | 492 | (void)module; |
1108 | | |
1109 | 492 | if ( result.second != std::nullopt ) { |
1110 | 55 | const auto curveID = op.curveType.Get(); |
1111 | 55 | const auto x = result.second->first.ToTrimmedString(); |
1112 | 55 | const auto y = result.second->second.ToTrimmedString(); |
1113 | | |
1114 | 55 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1115 | | |
1116 | 55 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1117 | 55 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1118 | 55 | } |
1119 | 492 | } |
1120 | | |
1121 | 492 | 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 | 492 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1123 | | |
1124 | 492 | return module->OpECC_Point_Add(op); |
1125 | 492 | } |
1126 | | |
1127 | | /* Specialization for operation::ECC_Point_Sub */ |
1128 | 465 | 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 | 465 | (void)module; |
1130 | | |
1131 | 465 | if ( result.second != std::nullopt ) { |
1132 | 45 | const auto curveID = op.curveType.Get(); |
1133 | 45 | const auto x = result.second->first.ToTrimmedString(); |
1134 | 45 | const auto y = result.second->second.ToTrimmedString(); |
1135 | | |
1136 | 45 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1137 | | |
1138 | 45 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1139 | 45 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1140 | 45 | } |
1141 | 465 | } |
1142 | | |
1143 | 465 | 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 | 465 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1145 | | |
1146 | 465 | return module->OpECC_Point_Sub(op); |
1147 | 465 | } |
1148 | | |
1149 | | /* Specialization for operation::ECC_Point_Mul */ |
1150 | 2.04k | 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.04k | (void)module; |
1152 | | |
1153 | 2.04k | if ( result.second != std::nullopt ) { |
1154 | 306 | const auto curveID = op.curveType.Get(); |
1155 | 306 | const auto x = result.second->first.ToTrimmedString(); |
1156 | 306 | const auto y = result.second->second.ToTrimmedString(); |
1157 | | |
1158 | 306 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1159 | | |
1160 | 306 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1161 | 306 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1162 | 306 | } |
1163 | 2.04k | } |
1164 | | |
1165 | 2.04k | 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.04k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1167 | | |
1168 | 2.04k | return module->OpECC_Point_Mul(op); |
1169 | 2.04k | } |
1170 | | |
1171 | | /* Specialization for operation::ECC_Point_Neg */ |
1172 | 404 | 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 | 404 | (void)module; |
1174 | | |
1175 | 404 | if ( result.second != std::nullopt ) { |
1176 | 75 | const auto curveID = op.curveType.Get(); |
1177 | 75 | const auto x = result.second->first.ToTrimmedString(); |
1178 | 75 | const auto y = result.second->second.ToTrimmedString(); |
1179 | | |
1180 | 75 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1181 | | |
1182 | 75 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1183 | 75 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1184 | 75 | } |
1185 | 404 | } |
1186 | | |
1187 | 404 | 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 | 404 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1189 | | |
1190 | 404 | return module->OpECC_Point_Neg(op); |
1191 | 404 | } |
1192 | | |
1193 | | /* Specialization for operation::ECC_Point_Dbl */ |
1194 | 425 | 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 | 425 | (void)module; |
1196 | | |
1197 | 425 | if ( result.second != std::nullopt ) { |
1198 | 45 | const auto curveID = op.curveType.Get(); |
1199 | 45 | const auto x = result.second->first.ToTrimmedString(); |
1200 | 45 | const auto y = result.second->second.ToTrimmedString(); |
1201 | | |
1202 | 45 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1203 | | |
1204 | 45 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1205 | 45 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1206 | 45 | } |
1207 | 425 | } |
1208 | | |
1209 | 425 | 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 | 425 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1211 | | |
1212 | 425 | return module->OpECC_Point_Dbl(op); |
1213 | 425 | } |
1214 | | |
1215 | | /* Specialization for operation::ECC_Point_Cmp */ |
1216 | 447 | 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 | 447 | (void)module; |
1218 | 447 | (void)result; |
1219 | 447 | (void)op; |
1220 | 447 | } |
1221 | | |
1222 | 447 | template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const { |
1223 | 447 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1224 | | |
1225 | 447 | return module->OpECC_Point_Cmp(op); |
1226 | 447 | } |
1227 | | |
1228 | | /* Specialization for operation::DH_Derive */ |
1229 | 1.08k | 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.08k | (void)module; |
1231 | 1.08k | (void)op; |
1232 | 1.08k | (void)result; |
1233 | 1.08k | } |
1234 | | |
1235 | 1.08k | template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const { |
1236 | 1.08k | if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1237 | 1.07k | if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1238 | 1.06k | if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1239 | 1.04k | if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1240 | | |
1241 | 1.03k | return module->OpDH_Derive(op); |
1242 | 1.04k | } |
1243 | | |
1244 | | /* Specialization for operation::DH_GenerateKeyPair */ |
1245 | 262 | 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 | 262 | (void)result; |
1247 | 262 | (void)op; |
1248 | 262 | (void)module; |
1249 | | |
1250 | 262 | if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) { |
1251 | 0 | const auto priv = result.second->first.ToTrimmedString(); |
1252 | 0 | const auto pub = result.second->second.ToTrimmedString(); |
1253 | |
|
1254 | 0 | Pool_DH_PrivateKey.Set(priv); |
1255 | 0 | Pool_DH_PublicKey.Set(pub); |
1256 | 0 | } |
1257 | 262 | } |
1258 | | |
1259 | 262 | 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 | 262 | if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1261 | 262 | if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1262 | | |
1263 | 260 | return module->OpDH_GenerateKeyPair(op); |
1264 | 262 | } |
1265 | | |
1266 | | /* Specialization for operation::BignumCalc */ |
1267 | 24.7k | 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 | 24.7k | (void)module; |
1269 | 24.7k | (void)op; |
1270 | | |
1271 | 24.7k | if ( result.second != std::nullopt ) { |
1272 | 6.75k | const auto bignum = result.second->ToTrimmedString(); |
1273 | | |
1274 | 6.75k | if ( bignum.size() <= config::kMaxBignumSize ) { |
1275 | 6.70k | Pool_Bignum.Set(bignum); |
1276 | 6.70k | if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) { |
1277 | 1.20k | Pool_Bignum_Primes.Set(bignum); |
1278 | 1.20k | } |
1279 | 6.70k | } |
1280 | 6.75k | if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) { |
1281 | 308 | if ( bignum == "1" ) { |
1282 | 160 | Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString()); |
1283 | 160 | } |
1284 | 308 | } |
1285 | 6.75k | } |
1286 | 24.7k | } |
1287 | | |
1288 | 24.7k | std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const { |
1289 | 24.7k | RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get()); |
1290 | | |
1291 | | /* Prevent timeouts */ |
1292 | 24.7k | if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1293 | 24.7k | if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1294 | 24.7k | if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1295 | 24.7k | if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1296 | | |
1297 | 24.7k | if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) { |
1298 | 2.53k | return std::nullopt; |
1299 | 2.53k | } |
1300 | | |
1301 | 22.1k | switch ( op.calcOp.Get() ) { |
1302 | 87 | case CF_CALCOP("SetBit(A,B)"): |
1303 | | /* Don't allow setting very high bit positions (risk of memory exhaustion) */ |
1304 | 87 | if ( op.bn1.GetSize() > 4 ) { |
1305 | 20 | return std::nullopt; |
1306 | 20 | } |
1307 | 67 | break; |
1308 | 154 | case CF_CALCOP("Exp(A,B)"): |
1309 | 154 | if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) { |
1310 | 42 | return std::nullopt; |
1311 | 42 | } |
1312 | 112 | break; |
1313 | 112 | case CF_CALCOP("ModLShift(A,B,C)"): |
1314 | 41 | if ( op.bn1.GetSize() > 4 ) { |
1315 | 21 | return std::nullopt; |
1316 | 21 | } |
1317 | 20 | break; |
1318 | 156 | case CF_CALCOP("Exp2(A)"): |
1319 | 156 | if ( op.bn0.GetSize() > 4 ) { |
1320 | 20 | return std::nullopt; |
1321 | 20 | } |
1322 | 136 | break; |
1323 | 22.1k | } |
1324 | | |
1325 | 22.0k | return module->OpBignumCalc(op); |
1326 | 22.1k | } |
1327 | | |
1328 | | /* Specialization for operation::BignumCalc_Fp2 */ |
1329 | 407 | 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 | 407 | (void)module; |
1331 | 407 | (void)op; |
1332 | | |
1333 | 407 | 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 | 407 | } |
1345 | | |
1346 | 407 | std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const { |
1347 | 407 | RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get()); |
1348 | | |
1349 | | /* Prevent timeouts */ |
1350 | 407 | if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1351 | 386 | if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1352 | 376 | if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1353 | 365 | if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1354 | 355 | if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1355 | 335 | if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1356 | 314 | if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1357 | 293 | if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1358 | | |
1359 | 279 | if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) { |
1360 | 0 | return std::nullopt; |
1361 | 0 | } |
1362 | | |
1363 | 279 | return module->OpBignumCalc_Fp2(op); |
1364 | 279 | } |
1365 | | |
1366 | | /* Specialization for operation::BignumCalc_Fp12 */ |
1367 | 1.47k | 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 | 1.47k | (void)module; |
1369 | 1.47k | (void)op; |
1370 | | |
1371 | 1.47k | 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 | 1.47k | } |
1400 | | |
1401 | 1.47k | std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const { |
1402 | 1.47k | RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get()); |
1403 | | |
1404 | | /* Prevent timeouts */ |
1405 | 1.47k | if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1406 | 1.45k | if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1407 | 1.43k | if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1408 | 1.41k | if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1409 | 1.40k | if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1410 | 1.38k | if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1411 | 1.36k | if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1412 | 1.34k | if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1413 | 1.31k | if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1414 | 1.30k | if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1415 | 1.27k | if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1416 | 1.25k | if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1417 | | |
1418 | 1.23k | if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1419 | 1.21k | if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1420 | 1.19k | if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1421 | 1.17k | if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1422 | 1.16k | if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1423 | 1.13k | if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1424 | 1.11k | if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1425 | 1.10k | if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1426 | 1.08k | if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1427 | 1.06k | if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1428 | 1.04k | if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1429 | 1.02k | if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1430 | | |
1431 | 1.00k | if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1432 | 981 | if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1433 | 964 | if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1434 | 944 | if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1435 | 926 | if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1436 | 906 | if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1437 | 888 | if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1438 | 868 | if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1439 | 848 | if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1440 | 827 | if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1441 | 807 | if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1442 | 788 | if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1443 | | |
1444 | 770 | if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1445 | 752 | if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1446 | 724 | if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1447 | 704 | if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1448 | 684 | if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1449 | 670 | if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1450 | 650 | if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1451 | 632 | if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1452 | 614 | if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1453 | 594 | if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1454 | 578 | if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1455 | 558 | if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1456 | | |
1457 | 540 | if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) { |
1458 | 0 | return std::nullopt; |
1459 | 0 | } |
1460 | | |
1461 | 540 | return module->OpBignumCalc_Fp12(op); |
1462 | 540 | } |
1463 | | |
1464 | | /* Specialization for operation::BLS_PrivateToPublic */ |
1465 | 284 | 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 | 284 | (void)module; |
1467 | | |
1468 | 284 | 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 | 284 | } |
1479 | | |
1480 | 284 | 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 | 284 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1482 | | |
1483 | 284 | const size_t size = op.priv.ToTrimmedString().size(); |
1484 | | |
1485 | 284 | if ( size == 0 || size > 4096 ) { |
1486 | 2 | return std::nullopt; |
1487 | 2 | } |
1488 | | |
1489 | 282 | return module->OpBLS_PrivateToPublic(op); |
1490 | 284 | } |
1491 | | |
1492 | | /* Specialization for operation::BLS_PrivateToPublic_G2 */ |
1493 | 329 | 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 | 329 | (void)module; |
1495 | 329 | 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 | 329 | } |
1510 | | |
1511 | 329 | 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 | 329 | const size_t size = op.priv.ToTrimmedString().size(); |
1513 | | |
1514 | 329 | if ( size == 0 || size > 4096 ) { |
1515 | 0 | return std::nullopt; |
1516 | 0 | } |
1517 | | |
1518 | 329 | return module->OpBLS_PrivateToPublic_G2(op); |
1519 | 329 | } |
1520 | | |
1521 | | /* Specialization for operation::BLS_Sign */ |
1522 | 295 | 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 | 295 | (void)module; |
1524 | | |
1525 | 295 | 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 | 295 | } |
1553 | | |
1554 | 295 | 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 | 295 | const size_t size = op.priv.ToTrimmedString().size(); |
1556 | | |
1557 | 295 | if ( size == 0 || size > 4096 ) { |
1558 | 0 | return std::nullopt; |
1559 | 0 | } |
1560 | | |
1561 | 295 | return module->OpBLS_Sign(op); |
1562 | 295 | } |
1563 | | |
1564 | | /* Specialization for operation::BLS_Verify */ |
1565 | 235 | 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 | 235 | (void)module; |
1567 | 235 | (void)op; |
1568 | 235 | (void)result; |
1569 | 235 | } |
1570 | | |
1571 | 235 | 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 | 235 | return module->OpBLS_Verify(op); |
1588 | 235 | } |
1589 | | |
1590 | | /* Specialization for operation::BLS_BatchSign */ |
1591 | 330 | 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 | 330 | (void)module; |
1593 | 330 | (void)op; |
1594 | | |
1595 | 330 | 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 | 330 | } |
1624 | | |
1625 | 330 | 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 | 330 | return module->OpBLS_BatchSign(op); |
1627 | 330 | } |
1628 | | |
1629 | | /* Specialization for operation::BLS_BatchVerify */ |
1630 | 286 | 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 | 286 | (void)module; |
1632 | 286 | (void)op; |
1633 | 286 | (void)result; |
1634 | 286 | } |
1635 | | |
1636 | 286 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const { |
1637 | 286 | return module->OpBLS_BatchVerify(op); |
1638 | 286 | } |
1639 | | |
1640 | | /* Specialization for operation::BLS_Aggregate_G1 */ |
1641 | 258 | 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 | 258 | (void)module; |
1643 | 258 | (void)op; |
1644 | 258 | (void)result; |
1645 | 258 | } |
1646 | | |
1647 | 258 | 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 | 258 | return module->OpBLS_Aggregate_G1(op); |
1649 | 258 | } |
1650 | | |
1651 | | /* Specialization for operation::BLS_Aggregate_G2 */ |
1652 | 249 | 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 | 249 | (void)module; |
1654 | 249 | (void)op; |
1655 | 249 | (void)result; |
1656 | 249 | } |
1657 | | |
1658 | 249 | 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 | 249 | return module->OpBLS_Aggregate_G2(op); |
1660 | 249 | } |
1661 | | |
1662 | | /* Specialization for operation::BLS_Pairing */ |
1663 | 224 | 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 | 224 | (void)module; |
1665 | 224 | (void)op; |
1666 | | |
1667 | 224 | 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 | 224 | } |
1684 | | |
1685 | 224 | template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const { |
1686 | 224 | return module->OpBLS_Pairing(op); |
1687 | 224 | } |
1688 | | |
1689 | | /* Specialization for operation::BLS_MillerLoop */ |
1690 | 235 | 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 | 235 | (void)module; |
1692 | 235 | (void)op; |
1693 | | |
1694 | 235 | 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 | 235 | } |
1711 | | |
1712 | 235 | template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const { |
1713 | 235 | return module->OpBLS_MillerLoop(op); |
1714 | 235 | } |
1715 | | |
1716 | | /* Specialization for operation::BLS_FinalExp */ |
1717 | 314 | 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 | 314 | (void)module; |
1719 | 314 | (void)op; |
1720 | | |
1721 | 314 | 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 | 314 | } |
1738 | | |
1739 | 314 | template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const { |
1740 | 314 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1741 | 314 | return module->OpBLS_FinalExp(op); |
1742 | 314 | } |
1743 | | |
1744 | | /* Specialization for operation::BLS_HashToG1 */ |
1745 | 261 | 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 | 261 | (void)module; |
1747 | | |
1748 | 261 | 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 | 261 | } |
1759 | | |
1760 | 261 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const { |
1761 | 261 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1762 | 261 | return module->OpBLS_HashToG1(op); |
1763 | 261 | } |
1764 | | |
1765 | | /* Specialization for operation::BLS_MapToG1 */ |
1766 | 236 | 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 | 236 | (void)module; |
1768 | | |
1769 | 236 | 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 | 236 | } |
1780 | | |
1781 | 236 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const { |
1782 | 236 | return module->OpBLS_MapToG1(op); |
1783 | 236 | } |
1784 | | |
1785 | | /* Specialization for operation::BLS_MapToG2 */ |
1786 | 268 | 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 | 268 | (void)module; |
1788 | | |
1789 | 268 | 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 | 268 | } |
1804 | | |
1805 | 268 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const { |
1806 | 268 | return module->OpBLS_MapToG2(op); |
1807 | 268 | } |
1808 | | |
1809 | | /* Specialization for operation::BLS_IsG1OnCurve */ |
1810 | 282 | 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 | 282 | (void)module; |
1812 | 282 | (void)op; |
1813 | 282 | (void)result; |
1814 | 282 | } |
1815 | | |
1816 | 282 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const { |
1817 | 282 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1818 | 282 | if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1819 | 282 | if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1820 | | |
1821 | 282 | return module->OpBLS_IsG1OnCurve(op); |
1822 | 282 | } |
1823 | | |
1824 | | /* Specialization for operation::BLS_IsG2OnCurve */ |
1825 | 293 | 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 | 293 | (void)module; |
1827 | 293 | (void)op; |
1828 | 293 | (void)result; |
1829 | 293 | } |
1830 | | |
1831 | 293 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const { |
1832 | 293 | if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1833 | 293 | if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1834 | 284 | if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1835 | 284 | if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1836 | | |
1837 | 284 | return module->OpBLS_IsG2OnCurve(op); |
1838 | 284 | } |
1839 | | |
1840 | | /* Specialization for operation::BLS_GenerateKeyPair */ |
1841 | 274 | 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 | 274 | (void)module; |
1843 | | |
1844 | 274 | 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 | 274 | } |
1857 | | |
1858 | 274 | 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 | 274 | return module->OpBLS_GenerateKeyPair(op); |
1860 | 274 | } |
1861 | | |
1862 | | /* Specialization for operation::BLS_Decompress_G1 */ |
1863 | 240 | 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 | 240 | (void)module; |
1865 | | |
1866 | 240 | 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 | 240 | } |
1877 | | |
1878 | 240 | 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 | 240 | return module->OpBLS_Decompress_G1(op); |
1880 | 240 | } |
1881 | | |
1882 | | /* Specialization for operation::BLS_Compress_G1 */ |
1883 | 227 | 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 | 227 | (void)module; |
1885 | 227 | (void)op; |
1886 | | |
1887 | 227 | 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 | 227 | } |
1893 | | |
1894 | 227 | 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 | 227 | return module->OpBLS_Compress_G1(op); |
1896 | 227 | } |
1897 | | |
1898 | | /* Specialization for operation::BLS_Decompress_G2 */ |
1899 | 218 | 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 | 218 | (void)module; |
1901 | | |
1902 | 218 | 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 | 218 | } |
1917 | | |
1918 | 218 | 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 | 218 | return module->OpBLS_Decompress_G2(op); |
1920 | 218 | } |
1921 | | |
1922 | | /* Specialization for operation::BLS_Compress_G2 */ |
1923 | 223 | 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 | 223 | (void)module; |
1925 | | |
1926 | 223 | 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 | 223 | } |
1937 | | |
1938 | 223 | 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 | 223 | return module->OpBLS_Compress_G2(op); |
1940 | 223 | } |
1941 | | |
1942 | | /* Specialization for operation::BLS_G1_Add */ |
1943 | 325 | 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 | 325 | (void)module; |
1945 | | |
1946 | 325 | 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 | 325 | } |
1957 | | |
1958 | 325 | 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 | 325 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1960 | 325 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1961 | 325 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1962 | 320 | if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1963 | 320 | if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1964 | | |
1965 | 320 | return module->OpBLS_G1_Add(op); |
1966 | 320 | } |
1967 | | |
1968 | | /* Specialization for operation::BLS_G1_Mul */ |
1969 | 233 | 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 | 233 | (void)module; |
1971 | | |
1972 | 233 | 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 | 233 | } |
1983 | | |
1984 | 233 | 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 | 233 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1986 | 233 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1987 | 233 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1988 | 233 | if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1989 | | |
1990 | 233 | return module->OpBLS_G1_Mul(op); |
1991 | 233 | } |
1992 | | |
1993 | | /* Specialization for operation::BLS_G1_IsEq */ |
1994 | 340 | 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 | 340 | (void)module; |
1996 | 340 | (void)op; |
1997 | 340 | (void)result; |
1998 | 340 | } |
1999 | | |
2000 | 340 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const { |
2001 | 340 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2002 | 340 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2003 | 340 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2004 | 329 | if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2005 | 320 | if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2006 | | |
2007 | 320 | return module->OpBLS_G1_IsEq(op); |
2008 | 320 | } |
2009 | | |
2010 | | /* Specialization for operation::BLS_G1_Neg */ |
2011 | 287 | 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 | 287 | (void)module; |
2013 | | |
2014 | 287 | 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 | 287 | } |
2025 | | |
2026 | 287 | 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 | 287 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2028 | 287 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2029 | 287 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2030 | | |
2031 | 287 | return module->OpBLS_G1_Neg(op); |
2032 | 287 | } |
2033 | | |
2034 | | /* Specialization for operation::BLS_G2_Add */ |
2035 | 493 | 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 | 493 | (void)module; |
2037 | | |
2038 | 493 | 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 | 493 | } |
2053 | | |
2054 | 493 | 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 | 493 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2056 | 493 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2057 | 488 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2058 | 469 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2059 | 460 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2060 | 439 | if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2061 | 422 | if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2062 | 404 | if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2063 | 386 | if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2064 | | |
2065 | 386 | return module->OpBLS_G2_Add(op); |
2066 | 386 | } |
2067 | | |
2068 | | /* Specialization for operation::BLS_G2_Mul */ |
2069 | 328 | 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 | 328 | (void)module; |
2071 | | |
2072 | 328 | 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 | 328 | } |
2087 | | |
2088 | 328 | 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 | 328 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2090 | 328 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2091 | 328 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2092 | 328 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2093 | 328 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2094 | 328 | if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2095 | | |
2096 | 328 | return module->OpBLS_G2_Mul(op); |
2097 | 328 | } |
2098 | | |
2099 | | /* Specialization for operation::BLS_G2_IsEq */ |
2100 | 447 | 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 | 447 | (void)module; |
2102 | 447 | (void)op; |
2103 | 447 | (void)result; |
2104 | 447 | } |
2105 | | |
2106 | 447 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const { |
2107 | 447 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2108 | 447 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2109 | 444 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2110 | 424 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2111 | 411 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2112 | 393 | if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2113 | 372 | if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2114 | 352 | if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2115 | 332 | if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2116 | | |
2117 | 314 | return module->OpBLS_G2_IsEq(op); |
2118 | 332 | } |
2119 | | |
2120 | | /* Specialization for operation::BLS_G2_Neg */ |
2121 | 323 | 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 | 323 | (void)module; |
2123 | | |
2124 | 323 | 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 | 323 | } |
2139 | | |
2140 | 323 | 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 | 323 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2142 | 323 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2143 | 323 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2144 | 313 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2145 | 308 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2146 | | |
2147 | 285 | return module->OpBLS_G2_Neg(op); |
2148 | 308 | } |
2149 | | |
2150 | | /* Specialization for operation::BLS_G1_MultiExp */ |
2151 | 346 | 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 | 346 | (void)module; |
2153 | | |
2154 | 346 | 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 | 346 | } |
2165 | | |
2166 | 346 | 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 | 346 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2168 | | |
2169 | 2.86k | for (const auto& point_scalar : op.points_scalars.points_scalars) { |
2170 | 2.86k | if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2171 | 2.85k | if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2172 | 2.84k | if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2173 | 2.84k | } |
2174 | | |
2175 | 328 | return module->OpBLS_G1_MultiExp(op); |
2176 | 346 | } |
2177 | | |
2178 | | /* Specialization for operation::Misc */ |
2179 | 223 | template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const { |
2180 | 223 | (void)module; |
2181 | 223 | (void)op; |
2182 | 223 | (void)result; |
2183 | 223 | } |
2184 | | |
2185 | 223 | template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const { |
2186 | 223 | return module->OpMisc(op); |
2187 | 223 | } |
2188 | | |
2189 | | /* Specialization for operation::BLS_HashToG2 */ |
2190 | 273 | 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 | 273 | (void)module; |
2192 | | |
2193 | 273 | 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 | 273 | } |
2208 | | |
2209 | 273 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const { |
2210 | 273 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2211 | 273 | return module->OpBLS_HashToG2(op); |
2212 | 273 | } |
2213 | | |
2214 | | ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2215 | | ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options) |
2216 | 46 | { } |
2217 | 44 | void ExecutorBignumCalc::SetModulo(const std::string& modulo) { |
2218 | 44 | this->modulo = component::Bignum(modulo); |
2219 | 44 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2223 | 2 | CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513")); |
2224 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2228 | 2 | CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787")); |
2229 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2233 | 2 | CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041")); |
2234 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2238 | 2 | CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177")); |
2239 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2243 | 2 | CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617")); |
2244 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2248 | 2 | CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583")); |
2249 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2253 | 2 | CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337")); |
2254 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2258 | 2 | CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097")); |
2259 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2263 | 2 | CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949")); |
2264 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2268 | 2 | CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601")); |
2269 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2273 | 2 | CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001")); |
2274 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2278 | 2 | CF_NORET(SetModulo("18446744069414584321")); |
2279 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2283 | 2 | CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137")); |
2284 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2288 | 2 | CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081")); |
2289 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2293 | 2 | CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081")); |
2294 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2298 | 2 | CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040")); |
2299 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2303 | 2 | CF_NORET(SetModulo("18446744073709551616")); |
2304 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2308 | 2 | CF_NORET(SetModulo("340282366920938463463374607431768211456")); |
2309 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2313 | 2 | CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936")); |
2314 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2318 | 2 | CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096")); |
2319 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2323 | 2 | CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337")); |
2324 | 2 | } |
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 | 2 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2328 | 2 | CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663")); |
2329 | 2 | } |
2330 | | |
2331 | | ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2332 | | ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options) |
2333 | 2 | { } |
2334 | 0 | void ExecutorBignumCalc_Fp2::SetModulo(const std::string& modulo) { |
2335 | 0 | this->modulo = component::Bignum(modulo); |
2336 | 0 | } |
2337 | | |
2338 | | ExecutorBignumCalc_Fp12::ExecutorBignumCalc_Fp12(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2339 | | ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options) |
2340 | 2 | { } |
2341 | 0 | void ExecutorBignumCalc_Fp12::SetModulo(const std::string& modulo) { |
2342 | 0 | this->modulo = component::Bignum(modulo); |
2343 | 0 | } |
2344 | | |
2345 | | template <class ResultType, class OperationType> |
2346 | | ExecutorBase<ResultType, OperationType>::ExecutorBase(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2347 | | operationID(operationID), |
2348 | | modules(modules), |
2349 | | options(options) |
2350 | 214 | { |
2351 | 214 | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 46 | { | 2351 | 46 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2350 | 2 | { | 2351 | 2 | } |
|
2352 | | |
2353 | | /* Specialization for operation::SR25519_Verify */ |
2354 | 302 | 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 | 302 | (void)module; |
2356 | 302 | (void)op; |
2357 | 302 | (void)result; |
2358 | 302 | } |
2359 | | |
2360 | 302 | template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const { |
2361 | 302 | return module->OpSR25519_Verify(op); |
2362 | 302 | } |
2363 | | |
2364 | | template <class ResultType, class OperationType> |
2365 | 214 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { |
2366 | 214 | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase() Line | Count | Source | 2365 | 46 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 46 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 2 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 2 | } |
|
2367 | | |
2368 | | /* Filter away the values in the set that are std::nullopt */ |
2369 | | template <class ResultType, class OperationType> |
2370 | 43.4k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { |
2371 | 43.4k | ResultSet ret; |
2372 | | |
2373 | 147k | for (const auto& result : results) { |
2374 | 147k | if ( result.second == std::nullopt ) { |
2375 | 105k | continue; |
2376 | 105k | } |
2377 | | |
2378 | 42.7k | ret.push_back(result); |
2379 | 42.7k | } |
2380 | | |
2381 | 43.4k | return ret; |
2382 | 43.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 | 3.31k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 3.31k | ResultSet ret; | 2372 | | | 2373 | 9.21k | for (const auto& result : results) { | 2374 | 9.21k | if ( result.second == std::nullopt ) { | 2375 | 5.02k | continue; | 2376 | 5.02k | } | 2377 | | | 2378 | 4.19k | ret.push_back(result); | 2379 | 4.19k | } | 2380 | | | 2381 | 3.31k | return ret; | 2382 | 3.31k | } |
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 | 812 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 812 | ResultSet ret; | 2372 | | | 2373 | 3.38k | for (const auto& result : results) { | 2374 | 3.38k | if ( result.second == std::nullopt ) { | 2375 | 1.26k | continue; | 2376 | 1.26k | } | 2377 | | | 2378 | 2.11k | ret.push_back(result); | 2379 | 2.11k | } | 2380 | | | 2381 | 812 | return ret; | 2382 | 812 | } |
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 | 932 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 932 | ResultSet ret; | 2372 | | | 2373 | 5.39k | for (const auto& result : results) { | 2374 | 5.39k | if ( result.second == std::nullopt ) { | 2375 | 2.82k | continue; | 2376 | 2.82k | } | 2377 | | | 2378 | 2.57k | ret.push_back(result); | 2379 | 2.57k | } | 2380 | | | 2381 | 932 | return ret; | 2382 | 932 | } |
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 | 1.54k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 1.54k | ResultSet ret; | 2372 | | | 2373 | 5.91k | for (const auto& result : results) { | 2374 | 5.91k | if ( result.second == std::nullopt ) { | 2375 | 3.44k | continue; | 2376 | 3.44k | } | 2377 | | | 2378 | 2.46k | ret.push_back(result); | 2379 | 2.46k | } | 2380 | | | 2381 | 1.54k | return ret; | 2382 | 1.54k | } |
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 | 6.15k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 6.15k | ResultSet ret; | 2372 | | | 2373 | 25.3k | for (const auto& result : results) { | 2374 | 25.3k | if ( result.second == std::nullopt ) { | 2375 | 17.5k | continue; | 2376 | 17.5k | } | 2377 | | | 2378 | 7.77k | ret.push_back(result); | 2379 | 7.77k | } | 2380 | | | 2381 | 6.15k | return ret; | 2382 | 6.15k | } |
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 | 3.89k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 3.89k | ResultSet ret; | 2372 | | | 2373 | 16.8k | for (const auto& result : results) { | 2374 | 16.8k | if ( result.second == std::nullopt ) { | 2375 | 15.5k | continue; | 2376 | 15.5k | } | 2377 | | | 2378 | 1.28k | ret.push_back(result); | 2379 | 1.28k | } | 2380 | | | 2381 | 3.89k | return ret; | 2382 | 3.89k | } |
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 | 258 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 258 | ResultSet ret; | 2372 | | | 2373 | 1.45k | for (const auto& result : results) { | 2374 | 1.45k | if ( result.second == std::nullopt ) { | 2375 | 999 | continue; | 2376 | 999 | } | 2377 | | | 2378 | 457 | ret.push_back(result); | 2379 | 457 | } | 2380 | | | 2381 | 258 | return ret; | 2382 | 258 | } |
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 | 2.79k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 2.79k | ResultSet ret; | 2372 | | | 2373 | 9.97k | for (const auto& result : results) { | 2374 | 9.97k | if ( result.second == std::nullopt ) { | 2375 | 5.02k | continue; | 2376 | 5.02k | } | 2377 | | | 2378 | 4.95k | ret.push_back(result); | 2379 | 4.95k | } | 2380 | | | 2381 | 2.79k | return ret; | 2382 | 2.79k | } |
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 | 178 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 178 | ResultSet ret; | 2372 | | | 2373 | 856 | for (const auto& result : results) { | 2374 | 856 | if ( result.second == std::nullopt ) { | 2375 | 856 | continue; | 2376 | 856 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 178 | return ret; | 2382 | 178 | } |
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 | 106 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 106 | ResultSet ret; | 2372 | | | 2373 | 728 | for (const auto& result : results) { | 2374 | 728 | if ( result.second == std::nullopt ) { | 2375 | 728 | continue; | 2376 | 728 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 106 | return ret; | 2382 | 106 | } |
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 | 112 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 112 | ResultSet ret; | 2372 | | | 2373 | 716 | for (const auto& result : results) { | 2374 | 716 | if ( result.second == std::nullopt ) { | 2375 | 716 | continue; | 2376 | 716 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 112 | return ret; | 2382 | 112 | } |
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 | 1.05k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 1.05k | ResultSet ret; | 2372 | | | 2373 | 3.62k | for (const auto& result : results) { | 2374 | 3.62k | if ( result.second == std::nullopt ) { | 2375 | 1.93k | continue; | 2376 | 1.93k | } | 2377 | | | 2378 | 1.68k | ret.push_back(result); | 2379 | 1.68k | } | 2380 | | | 2381 | 1.05k | return ret; | 2382 | 1.05k | } |
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 | 498 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 498 | ResultSet ret; | 2372 | | | 2373 | 1.23k | for (const auto& result : results) { | 2374 | 1.23k | if ( result.second == std::nullopt ) { | 2375 | 648 | continue; | 2376 | 648 | } | 2377 | | | 2378 | 588 | ret.push_back(result); | 2379 | 588 | } | 2380 | | | 2381 | 498 | return ret; | 2382 | 498 | } |
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 | 84 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 84 | ResultSet ret; | 2372 | | | 2373 | 545 | for (const auto& result : results) { | 2374 | 545 | if ( result.second == std::nullopt ) { | 2375 | 545 | continue; | 2376 | 545 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 84 | return ret; | 2382 | 84 | } |
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 | 106 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 106 | ResultSet ret; | 2372 | | | 2373 | 826 | for (const auto& result : results) { | 2374 | 826 | if ( result.second == std::nullopt ) { | 2375 | 826 | continue; | 2376 | 826 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 106 | return ret; | 2382 | 106 | } |
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 | 93 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 93 | ResultSet ret; | 2372 | | | 2373 | 213 | for (const auto& result : results) { | 2374 | 213 | if ( result.second == std::nullopt ) { | 2375 | 145 | continue; | 2376 | 145 | } | 2377 | | | 2378 | 68 | ret.push_back(result); | 2379 | 68 | } | 2380 | | | 2381 | 93 | return ret; | 2382 | 93 | } |
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 | 681 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 681 | ResultSet ret; | 2372 | | | 2373 | 2.94k | for (const auto& result : results) { | 2374 | 2.94k | if ( result.second == std::nullopt ) { | 2375 | 1.57k | continue; | 2376 | 1.57k | } | 2377 | | | 2378 | 1.37k | ret.push_back(result); | 2379 | 1.37k | } | 2380 | | | 2381 | 681 | return ret; | 2382 | 681 | } |
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 | 113 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 113 | ResultSet ret; | 2372 | | | 2373 | 788 | for (const auto& result : results) { | 2374 | 788 | if ( result.second == std::nullopt ) { | 2375 | 788 | continue; | 2376 | 788 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 113 | return ret; | 2382 | 113 | } |
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 | 93 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 93 | ResultSet ret; | 2372 | | | 2373 | 677 | for (const auto& result : results) { | 2374 | 677 | if ( result.second == std::nullopt ) { | 2375 | 677 | continue; | 2376 | 677 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 93 | return ret; | 2382 | 93 | } |
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 | 982 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 982 | ResultSet ret; | 2372 | | | 2373 | 2.60k | for (const auto& result : results) { | 2374 | 2.60k | if ( result.second == std::nullopt ) { | 2375 | 1.83k | continue; | 2376 | 1.83k | } | 2377 | | | 2378 | 764 | ret.push_back(result); | 2379 | 764 | } | 2380 | | | 2381 | 982 | return ret; | 2382 | 982 | } |
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 | 872 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 872 | ResultSet ret; | 2372 | | | 2373 | 2.07k | for (const auto& result : results) { | 2374 | 2.07k | if ( result.second == std::nullopt ) { | 2375 | 474 | continue; | 2376 | 474 | } | 2377 | | | 2378 | 1.59k | ret.push_back(result); | 2379 | 1.59k | } | 2380 | | | 2381 | 872 | return ret; | 2382 | 872 | } |
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 | 74 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 74 | ResultSet ret; | 2372 | | | 2373 | 270 | for (const auto& result : results) { | 2374 | 270 | if ( result.second == std::nullopt ) { | 2375 | 270 | continue; | 2376 | 270 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 74 | return ret; | 2382 | 74 | } |
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 | 943 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 943 | ResultSet ret; | 2372 | | | 2373 | 2.78k | for (const auto& result : results) { | 2374 | 2.78k | if ( result.second == std::nullopt ) { | 2375 | 1.48k | continue; | 2376 | 1.48k | } | 2377 | | | 2378 | 1.29k | ret.push_back(result); | 2379 | 1.29k | } | 2380 | | | 2381 | 943 | return ret; | 2382 | 943 | } |
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 | 142 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 142 | ResultSet ret; | 2372 | | | 2373 | 466 | for (const auto& result : results) { | 2374 | 466 | if ( result.second == std::nullopt ) { | 2375 | 438 | continue; | 2376 | 438 | } | 2377 | | | 2378 | 28 | ret.push_back(result); | 2379 | 28 | } | 2380 | | | 2381 | 142 | return ret; | 2382 | 142 | } |
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 | 73 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 73 | ResultSet ret; | 2372 | | | 2373 | 265 | for (const auto& result : results) { | 2374 | 265 | if ( result.second == std::nullopt ) { | 2375 | 265 | continue; | 2376 | 265 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 73 | return ret; | 2382 | 73 | } |
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 | 75 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 75 | ResultSet ret; | 2372 | | | 2373 | 265 | for (const auto& result : results) { | 2374 | 265 | if ( result.second == std::nullopt ) { | 2375 | 265 | continue; | 2376 | 265 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 75 | return ret; | 2382 | 75 | } |
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 | 61 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 61 | ResultSet ret; | 2372 | | | 2373 | 225 | for (const auto& result : results) { | 2374 | 225 | if ( result.second == std::nullopt ) { | 2375 | 225 | continue; | 2376 | 225 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 61 | return ret; | 2382 | 61 | } |
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 | 513 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 513 | ResultSet ret; | 2372 | | | 2373 | 1.58k | for (const auto& result : results) { | 2374 | 1.58k | if ( result.second == std::nullopt ) { | 2375 | 719 | continue; | 2376 | 719 | } | 2377 | | | 2378 | 870 | ret.push_back(result); | 2379 | 870 | } | 2380 | | | 2381 | 513 | return ret; | 2382 | 513 | } |
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 | 261 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 261 | ResultSet ret; | 2372 | | | 2373 | 773 | for (const auto& result : results) { | 2374 | 773 | if ( result.second == std::nullopt ) { | 2375 | 492 | continue; | 2376 | 492 | } | 2377 | | | 2378 | 281 | ret.push_back(result); | 2379 | 281 | } | 2380 | | | 2381 | 261 | return ret; | 2382 | 261 | } |
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 | 71 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 71 | ResultSet ret; | 2372 | | | 2373 | 248 | for (const auto& result : results) { | 2374 | 248 | if ( result.second == std::nullopt ) { | 2375 | 248 | continue; | 2376 | 248 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 71 | return ret; | 2382 | 71 | } |
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 | 74 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 74 | ResultSet ret; | 2372 | | | 2373 | 278 | for (const auto& result : results) { | 2374 | 278 | if ( result.second == std::nullopt ) { | 2375 | 278 | continue; | 2376 | 278 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 74 | return ret; | 2382 | 74 | } |
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 | 757 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 757 | ResultSet ret; | 2372 | | | 2373 | 2.05k | for (const auto& result : results) { | 2374 | 2.05k | if ( result.second == std::nullopt ) { | 2375 | 1.32k | continue; | 2376 | 1.32k | } | 2377 | | | 2378 | 728 | ret.push_back(result); | 2379 | 728 | } | 2380 | | | 2381 | 757 | return ret; | 2382 | 757 | } |
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 | 322 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 322 | ResultSet ret; | 2372 | | | 2373 | 1.08k | for (const auto& result : results) { | 2374 | 1.08k | if ( result.second == std::nullopt ) { | 2375 | 839 | continue; | 2376 | 839 | } | 2377 | | | 2378 | 242 | ret.push_back(result); | 2379 | 242 | } | 2380 | | | 2381 | 322 | return ret; | 2382 | 322 | } |
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 | 60 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 60 | ResultSet ret; | 2372 | | | 2373 | 223 | for (const auto& result : results) { | 2374 | 223 | if ( result.second == std::nullopt ) { | 2375 | 223 | continue; | 2376 | 223 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 60 | return ret; | 2382 | 60 | } |
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 | 66 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 66 | ResultSet ret; | 2372 | | | 2373 | 232 | for (const auto& result : results) { | 2374 | 232 | if ( result.second == std::nullopt ) { | 2375 | 232 | continue; | 2376 | 232 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 66 | return ret; | 2382 | 66 | } |
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 | 71 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 71 | 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 | 71 | return ret; | 2382 | 71 | } |
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 | 140 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 140 | ResultSet ret; | 2372 | | | 2373 | 492 | for (const auto& result : results) { | 2374 | 492 | if ( result.second == std::nullopt ) { | 2375 | 437 | continue; | 2376 | 437 | } | 2377 | | | 2378 | 55 | ret.push_back(result); | 2379 | 55 | } | 2380 | | | 2381 | 140 | return ret; | 2382 | 140 | } |
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 | 136 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 136 | ResultSet ret; | 2372 | | | 2373 | 465 | for (const auto& result : results) { | 2374 | 465 | if ( result.second == std::nullopt ) { | 2375 | 420 | continue; | 2376 | 420 | } | 2377 | | | 2378 | 45 | ret.push_back(result); | 2379 | 45 | } | 2380 | | | 2381 | 136 | return ret; | 2382 | 136 | } |
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 | 694 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 694 | ResultSet ret; | 2372 | | | 2373 | 2.04k | for (const auto& result : results) { | 2374 | 2.04k | if ( result.second == std::nullopt ) { | 2375 | 1.74k | continue; | 2376 | 1.74k | } | 2377 | | | 2378 | 306 | ret.push_back(result); | 2379 | 306 | } | 2380 | | | 2381 | 694 | return ret; | 2382 | 694 | } |
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 | 115 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 115 | ResultSet ret; | 2372 | | | 2373 | 404 | for (const auto& result : results) { | 2374 | 404 | if ( result.second == std::nullopt ) { | 2375 | 329 | continue; | 2376 | 329 | } | 2377 | | | 2378 | 75 | ret.push_back(result); | 2379 | 75 | } | 2380 | | | 2381 | 115 | return ret; | 2382 | 115 | } |
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 | 126 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 126 | ResultSet ret; | 2372 | | | 2373 | 425 | for (const auto& result : results) { | 2374 | 425 | if ( result.second == std::nullopt ) { | 2375 | 380 | continue; | 2376 | 380 | } | 2377 | | | 2378 | 45 | ret.push_back(result); | 2379 | 45 | } | 2380 | | | 2381 | 126 | return ret; | 2382 | 126 | } |
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 | 125 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 125 | ResultSet ret; | 2372 | | | 2373 | 447 | for (const auto& result : results) { | 2374 | 447 | if ( result.second == std::nullopt ) { | 2375 | 408 | continue; | 2376 | 408 | } | 2377 | | | 2378 | 39 | ret.push_back(result); | 2379 | 39 | } | 2380 | | | 2381 | 125 | return ret; | 2382 | 125 | } |
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 | 365 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 365 | ResultSet ret; | 2372 | | | 2373 | 1.08k | for (const auto& result : results) { | 2374 | 1.08k | if ( result.second == std::nullopt ) { | 2375 | 1.00k | continue; | 2376 | 1.00k | } | 2377 | | | 2378 | 79 | ret.push_back(result); | 2379 | 79 | } | 2380 | | | 2381 | 365 | return ret; | 2382 | 365 | } |
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 | 10.0k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 10.0k | ResultSet ret; | 2372 | | | 2373 | 24.7k | for (const auto& result : results) { | 2374 | 24.7k | if ( result.second == std::nullopt ) { | 2375 | 17.9k | continue; | 2376 | 17.9k | } | 2377 | | | 2378 | 6.75k | ret.push_back(result); | 2379 | 6.75k | } | 2380 | | | 2381 | 10.0k | return ret; | 2382 | 10.0k | } |
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 | 132 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 132 | ResultSet ret; | 2372 | | | 2373 | 407 | for (const auto& result : results) { | 2374 | 407 | if ( result.second == std::nullopt ) { | 2375 | 407 | continue; | 2376 | 407 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 132 | return ret; | 2382 | 132 | } |
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 | 504 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 504 | ResultSet ret; | 2372 | | | 2373 | 1.47k | for (const auto& result : results) { | 2374 | 1.47k | if ( result.second == std::nullopt ) { | 2375 | 1.47k | continue; | 2376 | 1.47k | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 504 | return ret; | 2382 | 504 | } |
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 | 94 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 94 | ResultSet ret; | 2372 | | | 2373 | 284 | for (const auto& result : results) { | 2374 | 284 | if ( result.second == std::nullopt ) { | 2375 | 284 | continue; | 2376 | 284 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 94 | return ret; | 2382 | 94 | } |
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 | 103 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 103 | ResultSet ret; | 2372 | | | 2373 | 329 | for (const auto& result : results) { | 2374 | 329 | if ( result.second == std::nullopt ) { | 2375 | 329 | continue; | 2376 | 329 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 103 | return ret; | 2382 | 103 | } |
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 | 87 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 87 | ResultSet ret; | 2372 | | | 2373 | 295 | for (const auto& result : results) { | 2374 | 295 | if ( result.second == std::nullopt ) { | 2375 | 295 | continue; | 2376 | 295 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 87 | return ret; | 2382 | 87 | } |
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 | 63 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 63 | ResultSet ret; | 2372 | | | 2373 | 235 | for (const auto& result : results) { | 2374 | 235 | if ( result.second == std::nullopt ) { | 2375 | 235 | continue; | 2376 | 235 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 63 | return ret; | 2382 | 63 | } |
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 | 94 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 94 | ResultSet ret; | 2372 | | | 2373 | 330 | for (const auto& result : results) { | 2374 | 330 | if ( result.second == std::nullopt ) { | 2375 | 330 | continue; | 2376 | 330 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 94 | return ret; | 2382 | 94 | } |
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 | 80 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 80 | ResultSet ret; | 2372 | | | 2373 | 286 | for (const auto& result : results) { | 2374 | 286 | if ( result.second == std::nullopt ) { | 2375 | 286 | continue; | 2376 | 286 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 80 | return ret; | 2382 | 80 | } |
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 | 72 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 72 | ResultSet ret; | 2372 | | | 2373 | 258 | for (const auto& result : results) { | 2374 | 258 | if ( result.second == std::nullopt ) { | 2375 | 258 | continue; | 2376 | 258 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 72 | return ret; | 2382 | 72 | } |
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 | 69 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 69 | ResultSet ret; | 2372 | | | 2373 | 249 | for (const auto& result : results) { | 2374 | 249 | if ( result.second == std::nullopt ) { | 2375 | 249 | continue; | 2376 | 249 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 69 | return ret; | 2382 | 69 | } |
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 | 64 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 64 | ResultSet ret; | 2372 | | | 2373 | 224 | for (const auto& result : results) { | 2374 | 224 | if ( result.second == std::nullopt ) { | 2375 | 224 | continue; | 2376 | 224 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 64 | return ret; | 2382 | 64 | } |
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 | 63 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 63 | ResultSet ret; | 2372 | | | 2373 | 235 | for (const auto& result : results) { | 2374 | 235 | if ( result.second == std::nullopt ) { | 2375 | 235 | continue; | 2376 | 235 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 63 | return ret; | 2382 | 63 | } |
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 | 93 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 93 | ResultSet ret; | 2372 | | | 2373 | 314 | for (const auto& result : results) { | 2374 | 314 | if ( result.second == std::nullopt ) { | 2375 | 314 | continue; | 2376 | 314 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 93 | return ret; | 2382 | 93 | } |
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 | 70 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 70 | ResultSet ret; | 2372 | | | 2373 | 261 | for (const auto& result : results) { | 2374 | 261 | if ( result.second == std::nullopt ) { | 2375 | 261 | continue; | 2376 | 261 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 70 | return ret; | 2382 | 70 | } |
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 | 74 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 74 | ResultSet ret; | 2372 | | | 2373 | 273 | for (const auto& result : results) { | 2374 | 273 | if ( result.second == std::nullopt ) { | 2375 | 273 | continue; | 2376 | 273 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 74 | return ret; | 2382 | 74 | } |
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 | 63 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 63 | ResultSet ret; | 2372 | | | 2373 | 236 | for (const auto& result : results) { | 2374 | 236 | if ( result.second == std::nullopt ) { | 2375 | 236 | continue; | 2376 | 236 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 63 | return ret; | 2382 | 63 | } |
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 | 75 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 75 | ResultSet ret; | 2372 | | | 2373 | 268 | for (const auto& result : results) { | 2374 | 268 | if ( result.second == std::nullopt ) { | 2375 | 268 | continue; | 2376 | 268 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 75 | return ret; | 2382 | 75 | } |
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 | 87 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 87 | ResultSet ret; | 2372 | | | 2373 | 282 | for (const auto& result : results) { | 2374 | 282 | if ( result.second == std::nullopt ) { | 2375 | 282 | continue; | 2376 | 282 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 87 | return ret; | 2382 | 87 | } |
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 | 90 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 90 | ResultSet ret; | 2372 | | | 2373 | 293 | for (const auto& result : results) { | 2374 | 293 | if ( result.second == std::nullopt ) { | 2375 | 293 | continue; | 2376 | 293 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 90 | return ret; | 2382 | 90 | } |
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 | 77 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 77 | ResultSet ret; | 2372 | | | 2373 | 274 | for (const auto& result : results) { | 2374 | 274 | if ( result.second == std::nullopt ) { | 2375 | 274 | continue; | 2376 | 274 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 77 | return ret; | 2382 | 77 | } |
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 | 64 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 64 | ResultSet ret; | 2372 | | | 2373 | 240 | for (const auto& result : results) { | 2374 | 240 | if ( result.second == std::nullopt ) { | 2375 | 240 | continue; | 2376 | 240 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 64 | return ret; | 2382 | 64 | } |
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 | 66 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 66 | ResultSet ret; | 2372 | | | 2373 | 227 | for (const auto& result : results) { | 2374 | 227 | if ( result.second == std::nullopt ) { | 2375 | 227 | continue; | 2376 | 227 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 66 | return ret; | 2382 | 66 | } |
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 | 64 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 64 | ResultSet ret; | 2372 | | | 2373 | 218 | for (const auto& result : results) { | 2374 | 218 | if ( result.second == std::nullopt ) { | 2375 | 218 | continue; | 2376 | 218 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 64 | return ret; | 2382 | 64 | } |
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 | 65 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 65 | ResultSet ret; | 2372 | | | 2373 | 223 | for (const auto& result : results) { | 2374 | 223 | if ( result.second == std::nullopt ) { | 2375 | 223 | continue; | 2376 | 223 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 65 | return ret; | 2382 | 65 | } |
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 | 102 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 102 | ResultSet ret; | 2372 | | | 2373 | 325 | for (const auto& result : results) { | 2374 | 325 | if ( result.second == std::nullopt ) { | 2375 | 325 | continue; | 2376 | 325 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 102 | return ret; | 2382 | 102 | } |
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 | 71 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 71 | 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 | 71 | return ret; | 2382 | 71 | } |
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 | 115 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 115 | ResultSet ret; | 2372 | | | 2373 | 340 | for (const auto& result : results) { | 2374 | 340 | if ( result.second == std::nullopt ) { | 2375 | 340 | continue; | 2376 | 340 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 115 | return ret; | 2382 | 115 | } |
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 | 88 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 88 | ResultSet ret; | 2372 | | | 2373 | 287 | for (const auto& result : results) { | 2374 | 287 | if ( result.second == std::nullopt ) { | 2375 | 287 | continue; | 2376 | 287 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 88 | return ret; | 2382 | 88 | } |
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 | 163 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 163 | ResultSet ret; | 2372 | | | 2373 | 493 | for (const auto& result : results) { | 2374 | 493 | if ( result.second == std::nullopt ) { | 2375 | 493 | continue; | 2376 | 493 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 163 | return ret; | 2382 | 163 | } |
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 | 113 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 113 | ResultSet ret; | 2372 | | | 2373 | 328 | for (const auto& result : results) { | 2374 | 328 | if ( result.second == std::nullopt ) { | 2375 | 328 | continue; | 2376 | 328 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 113 | return ret; | 2382 | 113 | } |
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 | 144 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 144 | ResultSet ret; | 2372 | | | 2373 | 447 | for (const auto& result : results) { | 2374 | 447 | if ( result.second == std::nullopt ) { | 2375 | 447 | continue; | 2376 | 447 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 144 | return ret; | 2382 | 144 | } |
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 | 104 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 104 | ResultSet ret; | 2372 | | | 2373 | 323 | for (const auto& result : results) { | 2374 | 323 | if ( result.second == std::nullopt ) { | 2375 | 323 | continue; | 2376 | 323 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 104 | return ret; | 2382 | 104 | } |
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 | 106 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 106 | ResultSet ret; | 2372 | | | 2373 | 346 | for (const auto& result : results) { | 2374 | 346 | if ( result.second == std::nullopt ) { | 2375 | 346 | continue; | 2376 | 346 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 106 | return ret; | 2382 | 106 | } |
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 | 58 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 58 | ResultSet ret; | 2372 | | | 2373 | 223 | for (const auto& result : results) { | 2374 | 223 | if ( result.second == std::nullopt ) { | 2375 | 223 | continue; | 2376 | 223 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 58 | return ret; | 2382 | 58 | } |
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 | 83 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 83 | ResultSet ret; | 2372 | | | 2373 | 302 | for (const auto& result : results) { | 2374 | 302 | if ( result.second == std::nullopt ) { | 2375 | 302 | continue; | 2376 | 302 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 83 | return ret; | 2382 | 83 | } |
|
2383 | | |
2384 | | /* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */ |
2385 | | template <> |
2386 | 1.20k | 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 | 1.20k | (void)operations; |
2388 | 1.20k | (void)results; |
2389 | 1.20k | (void)data; |
2390 | 1.20k | (void)size; |
2391 | 1.20k | } |
2392 | | |
2393 | | template <class ResultType, class OperationType> |
2394 | 4.70k | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { |
2395 | 4.70k | (void)operation; |
2396 | | |
2397 | 4.70k | return false; |
2398 | 4.70k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const Line | Count | Source | 2394 | 997 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 997 | (void)operation; | 2396 | | | 2397 | 997 | return false; | 2398 | 997 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const Line | Count | Source | 2394 | 368 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 368 | (void)operation; | 2396 | | | 2397 | 368 | return false; | 2398 | 368 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const Line | Count | Source | 2394 | 54 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 54 | (void)operation; | 2396 | | | 2397 | 54 | return false; | 2398 | 54 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const Line | Count | Source | 2394 | 1.12k | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 1.12k | (void)operation; | 2396 | | | 2397 | 1.12k | return false; | 2398 | 1.12k | } |
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 | 313 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 313 | (void)operation; | 2396 | | | 2397 | 313 | return false; | 2398 | 313 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const Line | Count | Source | 2394 | 97 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 97 | (void)operation; | 2396 | | | 2397 | 97 | return false; | 2398 | 97 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::dontCompare(cryptofuzz::operation::KDF_SSH const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::dontCompare(cryptofuzz::operation::KDF_X963 const&) const cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::dontCompare(cryptofuzz::operation::KDF_BCRYPT const&) const Line | Count | Source | 2394 | 11 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 11 | (void)operation; | 2396 | | | 2397 | 11 | return false; | 2398 | 11 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const Line | Count | Source | 2394 | 183 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 183 | (void)operation; | 2396 | | | 2397 | 183 | return false; | 2398 | 183 | } |
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 | 236 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 236 | (void)operation; | 2396 | | | 2397 | 236 | return false; | 2398 | 236 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const Line | Count | Source | 2394 | 658 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 658 | (void)operation; | 2396 | | | 2397 | 658 | return false; | 2398 | 658 | } |
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 | 240 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 240 | (void)operation; | 2396 | | | 2397 | 240 | return false; | 2398 | 240 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const Line | Count | Source | 2394 | 60 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 60 | (void)operation; | 2396 | | | 2397 | 60 | return false; | 2398 | 60 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::dontCompare(cryptofuzz::operation::ECRDSA_Verify const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::dontCompare(cryptofuzz::operation::Schnorr_Verify const&) const cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::dontCompare(cryptofuzz::operation::ECDSA_Recover const&) const Line | Count | Source | 2394 | 131 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 131 | (void)operation; | 2396 | | | 2397 | 131 | return false; | 2398 | 131 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const Line | Count | Source | 2394 | 74 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 74 | (void)operation; | 2396 | | | 2397 | 74 | return false; | 2398 | 74 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::dontCompare(cryptofuzz::operation::DSA_Sign const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::dontCompare(cryptofuzz::operation::DSA_GenerateParameters const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::dontCompare(cryptofuzz::operation::DSA_PrivateToPublic const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DSA_GenerateKeyPair const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::dontCompare(cryptofuzz::operation::ECDH_Derive const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::dontCompare(cryptofuzz::operation::ECIES_Encrypt const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::dontCompare(cryptofuzz::operation::ECIES_Decrypt const&) const cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::dontCompare(cryptofuzz::operation::ECC_Point_Add const&) const Line | Count | Source | 2394 | 15 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 15 | (void)operation; | 2396 | | | 2397 | 15 | return false; | 2398 | 15 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::dontCompare(cryptofuzz::operation::ECC_Point_Sub const&) const Line | Count | Source | 2394 | 11 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 11 | (void)operation; | 2396 | | | 2397 | 11 | return false; | 2398 | 11 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const Line | Count | Source | 2394 | 83 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 83 | (void)operation; | 2396 | | | 2397 | 83 | return false; | 2398 | 83 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg 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 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const Line | Count | Source | 2394 | 9 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 9 | (void)operation; | 2396 | | | 2397 | 9 | return false; | 2398 | 9 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp 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 | } |
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 | 14 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 14 | (void)operation; | 2396 | | | 2397 | 14 | return false; | 2398 | 14 | } |
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.47k | bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const { |
2402 | 1.47k | if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; } |
2403 | 1.47k | if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; } |
2404 | 1.47k | if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; } |
2405 | 1.22k | if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; } |
2406 | | |
2407 | 1.21k | return false; |
2408 | 1.22k | } |
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 | 273 | bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const { |
2418 | 273 | if ( |
2419 | 273 | operation.curveType.Get() != CF_ECC_CURVE("ed25519") && |
2420 | 273 | operation.curveType.Get() != CF_ECC_CURVE("ed448") ) { |
2421 | 156 | if ( operation.UseRandomNonce() ) { |
2422 | | /* Don't compare ECDSA signatures comptued from a randomly generated nonce */ |
2423 | 109 | return true; |
2424 | 109 | } |
2425 | 156 | } |
2426 | | |
2427 | 164 | return false; |
2428 | 273 | } |
2429 | | |
2430 | | template <> |
2431 | 1 | bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const { |
2432 | 1 | if ( |
2433 | 1 | operation.curveType.Get() != CF_ECC_CURVE("ed25519") && |
2434 | 1 | operation.curveType.Get() != CF_ECC_CURVE("ed448") ) { |
2435 | 1 | if ( operation.UseRandomNonce() ) { |
2436 | | /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */ |
2437 | 1 | return true; |
2438 | 1 | } |
2439 | 1 | } |
2440 | | |
2441 | 0 | return false; |
2442 | 1 | } |
2443 | | |
2444 | | template <> |
2445 | 0 | bool ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::dontCompare(const operation::ECRDSA_Sign& operation) const { |
2446 | 0 | if ( |
2447 | 0 | operation.curveType.Get() != CF_ECC_CURVE("ed25519") && |
2448 | 0 | operation.curveType.Get() != CF_ECC_CURVE("ed448") ) { |
2449 | 0 | if ( operation.UseRandomNonce() ) { |
2450 | | /* Don't compare ECRDSA signatures comptued from a randomly generated nonce */ |
2451 | 0 | return true; |
2452 | 0 | } |
2453 | 0 | } |
2454 | | |
2455 | 0 | return false; |
2456 | 0 | } |
2457 | | |
2458 | | /* OpenSSL DES_EDE3_WRAP randomizes the IV, result is different each time */ |
2459 | | template <> |
2460 | 1.20k | bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const { |
2461 | 1.20k | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; } |
2462 | | |
2463 | 1.20k | return false; |
2464 | 1.20k | } |
2465 | | |
2466 | | template <> |
2467 | 200 | bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const { |
2468 | 200 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true; |
2469 | | |
2470 | 200 | return false; |
2471 | 200 | } |
2472 | | |
2473 | | template <> |
2474 | 379 | bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const { |
2475 | 379 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true; |
2476 | | |
2477 | 379 | return false; |
2478 | 379 | } |
2479 | | |
2480 | | template <> |
2481 | 460 | bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const { |
2482 | 460 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true; |
2483 | | |
2484 | 457 | return false; |
2485 | 460 | } |
2486 | | |
2487 | | template <class ResultType, class OperationType> |
2488 | 43.4k | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { |
2489 | 43.4k | if ( results.size() < 2 ) { |
2490 | | /* Nothing to compare. Don't even bother filtering. */ |
2491 | 0 | return; |
2492 | 0 | } |
2493 | | |
2494 | 43.4k | const auto filtered = filter(results); |
2495 | | |
2496 | 43.4k | if ( filtered.size() < 2 ) { |
2497 | | /* Nothing to compare */ |
2498 | 34.7k | return; |
2499 | 34.7k | } |
2500 | | |
2501 | 8.69k | if ( dontCompare(operations[0].second) == true ) { |
2502 | 370 | return; |
2503 | 370 | } |
2504 | | |
2505 | 34.6k | for (size_t i = 1; i < filtered.size(); i++) { |
2506 | 26.3k | const std::optional<ResultType>& prev = filtered[i-1].second; |
2507 | 26.3k | const std::optional<ResultType>& cur = filtered[i].second; |
2508 | | |
2509 | 26.3k | const bool equal = *prev == *cur; |
2510 | | |
2511 | 26.3k | 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 | 26.3k | } |
2528 | 8.32k | } 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 | 3.31k | 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 | 3.31k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 3.31k | const auto filtered = filter(results); | 2495 | | | 2496 | 3.31k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 2.31k | return; | 2499 | 2.31k | } | 2500 | | | 2501 | 997 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 3.75k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 2.75k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 2.75k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 2.75k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 2.75k | 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.75k | } | 2528 | 997 | } |
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 | 812 | 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 | 812 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 812 | const auto filtered = filter(results); | 2495 | | | 2496 | 812 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 352 | return; | 2499 | 352 | } | 2500 | | | 2501 | 460 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 3 | return; | 2503 | 3 | } | 2504 | | | 2505 | 1.95k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 1.49k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 1.49k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 1.49k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 1.49k | 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.49k | } | 2528 | 457 | } |
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 | 932 | 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 | 932 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 932 | const auto filtered = filter(results); | 2495 | | | 2496 | 932 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 564 | return; | 2499 | 564 | } | 2500 | | | 2501 | 368 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 2.33k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 1.96k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 1.96k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 1.96k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 1.96k | 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.96k | } | 2528 | 368 | } |
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 | 1.54k | 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.54k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 1.54k | const auto filtered = filter(results); | 2495 | | | 2496 | 1.54k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 1.16k | return; | 2499 | 1.16k | } | 2500 | | | 2501 | 379 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 2.16k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 1.79k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 1.79k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 1.79k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 1.79k | 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.79k | } | 2528 | 379 | } |
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 | 6.15k | 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 | 6.15k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 6.15k | const auto filtered = filter(results); | 2495 | | | 2496 | 6.15k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 4.95k | return; | 2499 | 4.95k | } | 2500 | | | 2501 | 1.20k | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 7.30k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 6.10k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 6.10k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 6.10k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 6.10k | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 6.10k | } | 2528 | 1.20k | } |
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 | 3.89k | 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 | 3.89k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 3.89k | const auto filtered = filter(results); | 2495 | | | 2496 | 3.89k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 3.69k | return; | 2499 | 3.69k | } | 2500 | | | 2501 | 200 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 1.12k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 924 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 924 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 924 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 924 | 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 | 924 | } | 2528 | 200 | } |
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 | 258 | 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 | 258 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 258 | const auto filtered = filter(results); | 2495 | | | 2496 | 258 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 204 | return; | 2499 | 204 | } | 2500 | | | 2501 | 54 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 376 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 322 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 322 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 322 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 322 | 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 | 322 | } | 2528 | 54 | } |
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 | 2.79k | 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.79k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 2.79k | const auto filtered = filter(results); | 2495 | | | 2496 | 2.79k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 1.67k | return; | 2499 | 1.67k | } | 2500 | | | 2501 | 1.12k | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 4.55k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 3.43k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 3.43k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 3.43k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 3.43k | 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 | 3.43k | } | 2528 | 1.12k | } |
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 | 178 | 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 | 178 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 178 | const auto filtered = filter(results); | 2495 | | | 2496 | 178 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 178 | return; | 2499 | 178 | } | 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 | 106 | 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 | 106 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 106 | const auto filtered = filter(results); | 2495 | | | 2496 | 106 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 106 | return; | 2499 | 106 | } | 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 | 112 | 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 | 112 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 112 | const auto filtered = filter(results); | 2495 | | | 2496 | 112 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 112 | return; | 2499 | 112 | } | 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 | 1.05k | 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.05k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 1.05k | const auto filtered = filter(results); | 2495 | | | 2496 | 1.05k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 740 | return; | 2499 | 740 | } | 2500 | | | 2501 | 313 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 1.34k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 1.02k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 1.02k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 1.02k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 1.02k | 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.02k | } | 2528 | 313 | } |
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 | 498 | 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 | 498 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 498 | const auto filtered = filter(results); | 2495 | | | 2496 | 498 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 401 | return; | 2499 | 401 | } | 2500 | | | 2501 | 97 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 263 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 166 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 166 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 166 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 166 | 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 | 166 | } | 2528 | 97 | } |
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 | 84 | 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 | 84 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 84 | const auto filtered = filter(results); | 2495 | | | 2496 | 84 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 84 | return; | 2499 | 84 | } | 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 | 106 | 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 | 106 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 106 | const auto filtered = filter(results); | 2495 | | | 2496 | 106 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 106 | return; | 2499 | 106 | } | 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 | 93 | 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 | 93 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 93 | const auto filtered = filter(results); | 2495 | | | 2496 | 93 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 82 | return; | 2499 | 82 | } | 2500 | | | 2501 | 11 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 22 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 11 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 11 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 11 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 11 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 11 | } | 2528 | 11 | } |
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 | 681 | 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 | 681 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 681 | const auto filtered = filter(results); | 2495 | | | 2496 | 681 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 498 | return; | 2499 | 498 | } | 2500 | | | 2501 | 183 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 1.02k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 839 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 839 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 839 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 839 | 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 | 839 | } | 2528 | 183 | } |
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 | 113 | 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 | 113 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 113 | const auto filtered = filter(results); | 2495 | | | 2496 | 113 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 113 | return; | 2499 | 113 | } | 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 | 93 | 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 | 93 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 93 | const auto filtered = filter(results); | 2495 | | | 2496 | 93 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 93 | return; | 2499 | 93 | } | 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 | 982 | 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 | 982 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 982 | const auto filtered = filter(results); | 2495 | | | 2496 | 982 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 746 | return; | 2499 | 746 | } | 2500 | | | 2501 | 236 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 621 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 385 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 385 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 385 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 385 | 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 | 385 | } | 2528 | 236 | } |
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 | 872 | 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 | 872 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 872 | const auto filtered = filter(results); | 2495 | | | 2496 | 872 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 214 | return; | 2499 | 214 | } | 2500 | | | 2501 | 658 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 1.51k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 853 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 853 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 853 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 853 | 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 | 853 | } | 2528 | 658 | } |
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 | 74 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 74 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 74 | const auto filtered = filter(results); | 2495 | | | 2496 | 74 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 74 | return; | 2499 | 74 | } | 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 | 943 | 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 | 943 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 943 | const auto filtered = filter(results); | 2495 | | | 2496 | 943 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 670 | return; | 2499 | 670 | } | 2500 | | | 2501 | 273 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 109 | return; | 2503 | 109 | } | 2504 | | | 2505 | 549 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 385 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 385 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 385 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 385 | 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 | 385 | } | 2528 | 164 | } |
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 | 142 | 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 | 142 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 142 | const auto filtered = filter(results); | 2495 | | | 2496 | 142 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 141 | return; | 2499 | 141 | } | 2500 | | | 2501 | 1 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 1 | return; | 2503 | 1 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 73 | 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 | 73 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 73 | const auto filtered = filter(results); | 2495 | | | 2496 | 73 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 73 | return; | 2499 | 73 | } | 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 | 75 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 75 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 75 | const auto filtered = filter(results); | 2495 | | | 2496 | 75 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 75 | return; | 2499 | 75 | } | 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 | 61 | 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 | 61 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 61 | const auto filtered = filter(results); | 2495 | | | 2496 | 61 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 61 | return; | 2499 | 61 | } | 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 | 513 | 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 | 513 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 513 | const auto filtered = filter(results); | 2495 | | | 2496 | 513 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 273 | return; | 2499 | 273 | } | 2500 | | | 2501 | 240 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 729 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 489 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 489 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 489 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 489 | 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 | 489 | } | 2528 | 240 | } |
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 | 261 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 261 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 261 | const auto filtered = filter(results); | 2495 | | | 2496 | 261 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 201 | return; | 2499 | 201 | } | 2500 | | | 2501 | 60 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 192 | 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 | 60 | } |
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 | 71 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 71 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 71 | const auto filtered = filter(results); | 2495 | | | 2496 | 71 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 71 | return; | 2499 | 71 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<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 | 74 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 74 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 74 | const auto filtered = filter(results); | 2495 | | | 2496 | 74 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 74 | return; | 2499 | 74 | } | 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 | 757 | 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 | 757 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 757 | const auto filtered = filter(results); | 2495 | | | 2496 | 757 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 626 | return; | 2499 | 626 | } | 2500 | | | 2501 | 131 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 401 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 270 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 270 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 270 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 270 | 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 | 270 | } | 2528 | 131 | } |
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 | 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 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 322 | const auto filtered = filter(results); | 2495 | | | 2496 | 322 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 248 | return; | 2499 | 248 | } | 2500 | | | 2501 | 74 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 220 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 146 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 146 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 146 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 146 | 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 | 146 | } | 2528 | 74 | } |
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 | 60 | 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 | 60 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 60 | const auto filtered = filter(results); | 2495 | | | 2496 | 60 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 60 | return; | 2499 | 60 | } | 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 | 66 | 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 | 66 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 66 | const auto filtered = filter(results); | 2495 | | | 2496 | 66 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 66 | return; | 2499 | 66 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Decrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Decrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 71 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 71 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 71 | const auto filtered = filter(results); | 2495 | | | 2496 | 71 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 71 | return; | 2499 | 71 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::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 | 140 | 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 | 140 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 140 | const auto filtered = filter(results); | 2495 | | | 2496 | 140 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 125 | return; | 2499 | 125 | } | 2500 | | | 2501 | 15 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 47 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 32 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 32 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 32 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 32 | 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 | 32 | } | 2528 | 15 | } |
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 | 136 | 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 | 136 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 136 | const auto filtered = filter(results); | 2495 | | | 2496 | 136 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 125 | return; | 2499 | 125 | } | 2500 | | | 2501 | 11 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 35 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 24 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 24 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 24 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 24 | 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 | 24 | } | 2528 | 11 | } |
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 | 694 | 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 | 694 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 694 | const auto filtered = filter(results); | 2495 | | | 2496 | 694 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 611 | return; | 2499 | 611 | } | 2500 | | | 2501 | 83 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 261 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 178 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 178 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 178 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 178 | 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 | 178 | } | 2528 | 83 | } |
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 | 115 | 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 | 115 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 115 | const auto filtered = filter(results); | 2495 | | | 2496 | 115 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 96 | return; | 2499 | 96 | } | 2500 | | | 2501 | 19 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 60 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 41 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 41 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 41 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 41 | 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 | 41 | } | 2528 | 19 | } |
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 | 126 | 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 | 126 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 126 | const auto filtered = filter(results); | 2495 | | | 2496 | 126 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 117 | return; | 2499 | 117 | } | 2500 | | | 2501 | 9 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 31 | 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 | 9 | } |
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 | 125 | 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 | 125 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 125 | const auto filtered = filter(results); | 2495 | | | 2496 | 125 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 115 | return; | 2499 | 115 | } | 2500 | | | 2501 | 10 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 33 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 23 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 23 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 23 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 23 | 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 | 23 | } | 2528 | 10 | } |
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 | 365 | 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 | 365 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 365 | const auto filtered = filter(results); | 2495 | | | 2496 | 365 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 351 | return; | 2499 | 351 | } | 2500 | | | 2501 | 14 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 44 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 30 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 30 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 30 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 30 | 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 | 30 | } | 2528 | 14 | } |
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 | 10.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 | 10.0k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 10.0k | const auto filtered = filter(results); | 2495 | | | 2496 | 10.0k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 8.53k | return; | 2499 | 8.53k | } | 2500 | | | 2501 | 1.47k | if ( dontCompare(operations[0].second) == true ) { | 2502 | 257 | return; | 2503 | 257 | } | 2504 | | | 2505 | 3.71k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 2.49k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 2.49k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 2.49k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 2.49k | 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.49k | } | 2528 | 1.21k | } |
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 | 132 | 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 | 132 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 132 | const auto filtered = filter(results); | 2495 | | | 2496 | 132 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 132 | return; | 2499 | 132 | } | 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 | 504 | 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 | 504 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 504 | const auto filtered = filter(results); | 2495 | | | 2496 | 504 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 504 | return; | 2499 | 504 | } | 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 | 94 | 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 | 94 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 94 | const auto filtered = filter(results); | 2495 | | | 2496 | 94 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 94 | return; | 2499 | 94 | } | 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 | 103 | 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 | 103 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 103 | const auto filtered = filter(results); | 2495 | | | 2496 | 103 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 103 | return; | 2499 | 103 | } | 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 | 87 | 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 | 87 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 87 | const auto filtered = filter(results); | 2495 | | | 2496 | 87 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 87 | return; | 2499 | 87 | } | 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 | 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 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 63 | const auto filtered = filter(results); | 2495 | | | 2496 | 63 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 63 | return; | 2499 | 63 | } | 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 | 94 | 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 | 94 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 94 | const auto filtered = filter(results); | 2495 | | | 2496 | 94 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 94 | return; | 2499 | 94 | } | 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 | 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 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 80 | const auto filtered = filter(results); | 2495 | | | 2496 | 80 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 80 | return; | 2499 | 80 | } | 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 | 72 | 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 | 72 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 72 | const auto filtered = filter(results); | 2495 | | | 2496 | 72 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 72 | return; | 2499 | 72 | } | 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 | 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 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 69 | const auto filtered = filter(results); | 2495 | | | 2496 | 69 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 69 | return; | 2499 | 69 | } | 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 | 64 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 64 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 64 | const auto filtered = filter(results); | 2495 | | | 2496 | 64 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 64 | return; | 2499 | 64 | } | 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 | 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 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 63 | const auto filtered = filter(results); | 2495 | | | 2496 | 63 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 63 | return; | 2499 | 63 | } | 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 | 93 | 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 | 93 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 93 | const auto filtered = filter(results); | 2495 | | | 2496 | 93 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 93 | return; | 2499 | 93 | } | 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 | 70 | 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 | 70 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 70 | const auto filtered = filter(results); | 2495 | | | 2496 | 70 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 70 | return; | 2499 | 70 | } | 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 | 74 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 74 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 74 | const auto filtered = filter(results); | 2495 | | | 2496 | 74 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 74 | return; | 2499 | 74 | } | 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 | 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 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 63 | const auto filtered = filter(results); | 2495 | | | 2496 | 63 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 63 | return; | 2499 | 63 | } | 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 | 75 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 75 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 75 | const auto filtered = filter(results); | 2495 | | | 2496 | 75 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 75 | return; | 2499 | 75 | } | 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 | 87 | 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 | 87 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 87 | const auto filtered = filter(results); | 2495 | | | 2496 | 87 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 87 | return; | 2499 | 87 | } | 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 | 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 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 90 | const auto filtered = filter(results); | 2495 | | | 2496 | 90 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 90 | return; | 2499 | 90 | } | 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 | 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 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 77 | const auto filtered = filter(results); | 2495 | | | 2496 | 77 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 77 | return; | 2499 | 77 | } | 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 | 64 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 64 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 64 | const auto filtered = filter(results); | 2495 | | | 2496 | 64 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 64 | return; | 2499 | 64 | } | 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 | 66 | 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 | 66 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 66 | const auto filtered = filter(results); | 2495 | | | 2496 | 66 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 66 | return; | 2499 | 66 | } | 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 | 64 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 64 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 64 | const auto filtered = filter(results); | 2495 | | | 2496 | 64 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 64 | return; | 2499 | 64 | } | 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 | 65 | 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 | 65 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 65 | const auto filtered = filter(results); | 2495 | | | 2496 | 65 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 65 | return; | 2499 | 65 | } | 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 | 102 | 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 | 102 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 102 | const auto filtered = filter(results); | 2495 | | | 2496 | 102 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 102 | return; | 2499 | 102 | } | 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 | 71 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 71 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 71 | const auto filtered = filter(results); | 2495 | | | 2496 | 71 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 71 | return; | 2499 | 71 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<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 | 115 | 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 | 115 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 115 | const auto filtered = filter(results); | 2495 | | | 2496 | 115 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 115 | return; | 2499 | 115 | } | 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 | 88 | 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 | 88 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 88 | const auto filtered = filter(results); | 2495 | | | 2496 | 88 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 88 | return; | 2499 | 88 | } | 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 | 163 | 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 | 163 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 163 | const auto filtered = filter(results); | 2495 | | | 2496 | 163 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 163 | return; | 2499 | 163 | } | 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 | 113 | 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 | 113 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 113 | const auto filtered = filter(results); | 2495 | | | 2496 | 113 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 113 | return; | 2499 | 113 | } | 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 | 144 | 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 | 144 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 144 | const auto filtered = filter(results); | 2495 | | | 2496 | 144 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 144 | return; | 2499 | 144 | } | 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 | 104 | 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 | 104 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 104 | const auto filtered = filter(results); | 2495 | | | 2496 | 104 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 104 | return; | 2499 | 104 | } | 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 | 106 | 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 | 106 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 106 | const auto filtered = filter(results); | 2495 | | | 2496 | 106 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 106 | return; | 2499 | 106 | } | 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 | 58 | 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 | 58 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 58 | const auto filtered = filter(results); | 2495 | | | 2496 | 58 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 58 | return; | 2499 | 58 | } | 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 | 83 | 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 | 83 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 0 | return; | 2492 | 0 | } | 2493 | | | 2494 | 83 | const auto filtered = filter(results); | 2495 | | | 2496 | 83 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 83 | return; | 2499 | 83 | } | 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 | 456k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { |
2550 | 456k | (void)parentDs; |
2551 | 456k | return op; |
2552 | 456k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const Line | Count | Source | 2549 | 9.56k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 9.56k | (void)parentDs; | 2551 | 9.56k | return op; | 2552 | 9.56k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const Line | Count | Source | 2549 | 7.17k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 7.17k | (void)parentDs; | 2551 | 7.17k | return op; | 2552 | 7.17k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const Line | Count | Source | 2549 | 9.73k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 9.73k | (void)parentDs; | 2551 | 9.73k | return op; | 2552 | 9.73k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const Line | Count | Source | 2549 | 9.66k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 9.66k | (void)parentDs; | 2551 | 9.66k | return op; | 2552 | 9.66k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const Line | Count | Source | 2549 | 32.2k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 32.2k | (void)parentDs; | 2551 | 32.2k | return op; | 2552 | 32.2k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const Line | Count | Source | 2549 | 21.2k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 21.2k | (void)parentDs; | 2551 | 21.2k | return op; | 2552 | 21.2k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) 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::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const Line | Count | Source | 2549 | 13.7k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 13.7k | (void)parentDs; | 2551 | 13.7k | return op; | 2552 | 13.7k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const Line | Count | Source | 2549 | 5.45k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 5.45k | (void)parentDs; | 2551 | 5.45k | return op; | 2552 | 5.45k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const Line | Count | Source | 2549 | 4.60k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.60k | (void)parentDs; | 2551 | 4.60k | return op; | 2552 | 4.60k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const Line | Count | Source | 2549 | 4.89k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.89k | (void)parentDs; | 2551 | 4.89k | return op; | 2552 | 4.89k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const Line | Count | Source | 2549 | 7.00k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 7.00k | (void)parentDs; | 2551 | 7.00k | return op; | 2552 | 7.00k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const Line | Count | Source | 2549 | 5.19k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 5.19k | (void)parentDs; | 2551 | 5.19k | return op; | 2552 | 5.19k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const Line | Count | Source | 2549 | 4.92k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.92k | (void)parentDs; | 2551 | 4.92k | return op; | 2552 | 4.92k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const Line | Count | Source | 2549 | 4.93k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.93k | (void)parentDs; | 2551 | 4.93k | return op; | 2552 | 4.93k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const Line | Count | Source | 2549 | 4.93k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.93k | (void)parentDs; | 2551 | 4.93k | return op; | 2552 | 4.93k | } |
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 | 6.75k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 6.75k | (void)parentDs; | 2551 | 6.75k | return op; | 2552 | 6.75k | } |
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 | 4.45k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.45k | (void)parentDs; | 2551 | 4.45k | return op; | 2552 | 4.45k | } |
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 | 4.67k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.67k | (void)parentDs; | 2551 | 4.67k | return op; | 2552 | 4.67k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const Line | Count | Source | 2549 | 4.91k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.91k | (void)parentDs; | 2551 | 4.91k | return op; | 2552 | 4.91k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const Line | Count | Source | 2549 | 4.56k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.56k | (void)parentDs; | 2551 | 4.56k | return op; | 2552 | 4.56k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const Line | Count | Source | 2549 | 4.28k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.28k | (void)parentDs; | 2551 | 4.28k | return op; | 2552 | 4.28k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const Line | Count | Source | 2549 | 4.55k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.55k | (void)parentDs; | 2551 | 4.55k | return op; | 2552 | 4.55k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const Line | Count | Source | 2549 | 6.07k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 6.07k | (void)parentDs; | 2551 | 6.07k | return op; | 2552 | 6.07k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const Line | Count | Source | 2549 | 4.24k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.24k | (void)parentDs; | 2551 | 4.24k | return op; | 2552 | 4.24k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const Line | Count | Source | 2549 | 4.45k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.45k | (void)parentDs; | 2551 | 4.45k | return op; | 2552 | 4.45k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const Line | Count | Source | 2549 | 4.48k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.48k | (void)parentDs; | 2551 | 4.48k | return op; | 2552 | 4.48k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const Line | Count | Source | 2549 | 4.63k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.63k | (void)parentDs; | 2551 | 4.63k | return op; | 2552 | 4.63k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const Line | Count | Source | 2549 | 4.44k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.44k | (void)parentDs; | 2551 | 4.44k | return op; | 2552 | 4.44k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const Line | Count | Source | 2549 | 4.69k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.69k | (void)parentDs; | 2551 | 4.69k | return op; | 2552 | 4.69k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const Line | Count | Source | 2549 | 4.31k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.31k | (void)parentDs; | 2551 | 4.31k | return op; | 2552 | 4.31k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const Line | Count | Source | 2549 | 4.54k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.54k | (void)parentDs; | 2551 | 4.54k | return op; | 2552 | 4.54k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const Line | Count | Source | 2549 | 5.56k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 5.56k | (void)parentDs; | 2551 | 5.56k | return op; | 2552 | 5.56k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const Line | Count | Source | 2549 | 4.51k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.51k | (void)parentDs; | 2551 | 4.51k | return op; | 2552 | 4.51k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const Line | Count | Source | 2549 | 4.41k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.41k | (void)parentDs; | 2551 | 4.41k | return op; | 2552 | 4.41k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const Line | Count | Source | 2549 | 3.10k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.10k | (void)parentDs; | 2551 | 3.10k | return op; | 2552 | 3.10k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const Line | Count | Source | 2549 | 5.18k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 5.18k | (void)parentDs; | 2551 | 5.18k | return op; | 2552 | 5.18k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) 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<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const Line | Count | Source | 2549 | 4.63k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.63k | (void)parentDs; | 2551 | 4.63k | return op; | 2552 | 4.63k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const Line | Count | Source | 2549 | 5.01k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 5.01k | (void)parentDs; | 2551 | 5.01k | return op; | 2552 | 5.01k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const Line | Count | Source | 2549 | 5.52k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 5.52k | (void)parentDs; | 2551 | 5.52k | return op; | 2552 | 5.52k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const Line | Count | Source | 2549 | 3.60k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.60k | (void)parentDs; | 2551 | 3.60k | return op; | 2552 | 3.60k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const Line | Count | Source | 2549 | 4.05k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.05k | (void)parentDs; | 2551 | 4.05k | return op; | 2552 | 4.05k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const Line | Count | Source | 2549 | 5.86k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 5.86k | (void)parentDs; | 2551 | 5.86k | return op; | 2552 | 5.86k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const Line | Count | Source | 2549 | 3.59k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.59k | (void)parentDs; | 2551 | 3.59k | return op; | 2552 | 3.59k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const Line | Count | Source | 2549 | 3.30k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.30k | (void)parentDs; | 2551 | 3.30k | return op; | 2552 | 3.30k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const Line | Count | Source | 2549 | 3.86k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.86k | (void)parentDs; | 2551 | 3.86k | return op; | 2552 | 3.86k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const Line | Count | Source | 2549 | 4.60k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.60k | (void)parentDs; | 2551 | 4.60k | return op; | 2552 | 4.60k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const Line | Count | Source | 2549 | 5.89k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 5.89k | (void)parentDs; | 2551 | 5.89k | return op; | 2552 | 5.89k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const Line | Count | Source | 2549 | 15.2k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 15.2k | (void)parentDs; | 2551 | 15.2k | return op; | 2552 | 15.2k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const Line | Count | Source | 2549 | 4.52k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.52k | (void)parentDs; | 2551 | 4.52k | return op; | 2552 | 4.52k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const Line | Count | Source | 2549 | 5.07k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 5.07k | (void)parentDs; | 2551 | 5.07k | return op; | 2552 | 5.07k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const Line | Count | Source | 2549 | 2.99k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.99k | (void)parentDs; | 2551 | 2.99k | return op; | 2552 | 2.99k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const Line | Count | Source | 2549 | 3.10k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.10k | (void)parentDs; | 2551 | 3.10k | return op; | 2552 | 3.10k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const Line | Count | Source | 2549 | 5.17k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 5.17k | (void)parentDs; | 2551 | 5.17k | return op; | 2552 | 5.17k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const Line | Count | Source | 2549 | 4.84k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.84k | (void)parentDs; | 2551 | 4.84k | return op; | 2552 | 4.84k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const Line | Count | Source | 2549 | 4.17k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.17k | (void)parentDs; | 2551 | 4.17k | return op; | 2552 | 4.17k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const Line | Count | Source | 2549 | 3.88k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.88k | (void)parentDs; | 2551 | 3.88k | return op; | 2552 | 3.88k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const Line | Count | Source | 2549 | 3.58k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.58k | (void)parentDs; | 2551 | 3.58k | return op; | 2552 | 3.58k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const Line | Count | Source | 2549 | 4.04k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.04k | (void)parentDs; | 2551 | 4.04k | return op; | 2552 | 4.04k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const Line | Count | Source | 2549 | 3.86k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.86k | (void)parentDs; | 2551 | 3.86k | return op; | 2552 | 3.86k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const Line | Count | Source | 2549 | 3.66k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.66k | (void)parentDs; | 2551 | 3.66k | return op; | 2552 | 3.66k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const Line | Count | Source | 2549 | 3.90k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.90k | (void)parentDs; | 2551 | 3.90k | return op; | 2552 | 3.90k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const Line | Count | Source | 2549 | 3.94k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.94k | (void)parentDs; | 2551 | 3.94k | return op; | 2552 | 3.94k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const Line | Count | Source | 2549 | 4.89k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.89k | (void)parentDs; | 2551 | 4.89k | return op; | 2552 | 4.89k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const Line | Count | Source | 2549 | 4.94k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.94k | (void)parentDs; | 2551 | 4.94k | return op; | 2552 | 4.94k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const Line | Count | Source | 2549 | 3.47k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.47k | (void)parentDs; | 2551 | 3.47k | return op; | 2552 | 3.47k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const Line | Count | Source | 2549 | 2.73k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.73k | (void)parentDs; | 2551 | 2.73k | return op; | 2552 | 2.73k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const Line | Count | Source | 2549 | 3.77k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.77k | (void)parentDs; | 2551 | 3.77k | return op; | 2552 | 3.77k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const Line | Count | Source | 2549 | 4.78k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.78k | (void)parentDs; | 2551 | 4.78k | return op; | 2552 | 4.78k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const Line | Count | Source | 2549 | 2.83k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.83k | (void)parentDs; | 2551 | 2.83k | return op; | 2552 | 2.83k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const Line | Count | Source | 2549 | 3.04k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.04k | (void)parentDs; | 2551 | 3.04k | return op; | 2552 | 3.04k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const Line | Count | Source | 2549 | 3.10k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.10k | (void)parentDs; | 2551 | 3.10k | return op; | 2552 | 3.10k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const Line | Count | Source | 2549 | 4.46k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.46k | (void)parentDs; | 2551 | 4.46k | return op; | 2552 | 4.46k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const Line | Count | Source | 2549 | 4.10k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.10k | (void)parentDs; | 2551 | 4.10k | return op; | 2552 | 4.10k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const Line | Count | Source | 2549 | 4.28k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.28k | (void)parentDs; | 2551 | 4.28k | return op; | 2552 | 4.28k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const Line | Count | Source | 2549 | 3.98k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.98k | (void)parentDs; | 2551 | 3.98k | return op; | 2552 | 3.98k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const Line | Count | Source | 2549 | 2.75k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.75k | (void)parentDs; | 2551 | 2.75k | return op; | 2552 | 2.75k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const Line | Count | Source | 2549 | 4.71k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.71k | (void)parentDs; | 2551 | 4.71k | return op; | 2552 | 4.71k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const Line | Count | Source | 2549 | 4.27k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.27k | (void)parentDs; | 2551 | 4.27k | return op; | 2552 | 4.27k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const Line | Count | Source | 2549 | 4.99k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.99k | (void)parentDs; | 2551 | 4.99k | return op; | 2552 | 4.99k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const Line | Count | Source | 2549 | 3.34k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.34k | (void)parentDs; | 2551 | 3.34k | return op; | 2552 | 3.34k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const Line | Count | Source | 2549 | 3.92k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.92k | (void)parentDs; | 2551 | 3.92k | return op; | 2552 | 3.92k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const Line | Count | Source | 2549 | 2.06k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.06k | (void)parentDs; | 2551 | 2.06k | return op; | 2552 | 2.06k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const Line | Count | Source | 2549 | 4.75k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.75k | (void)parentDs; | 2551 | 4.75k | return op; | 2552 | 4.75k | } |
|
2553 | | |
2554 | 483 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2555 | 483 | (void)parentDs; |
2556 | 483 | op.modulo = modulo; |
2557 | 483 | return op; |
2558 | 483 | } |
2559 | | |
2560 | 875 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2561 | 875 | (void)parentDs; |
2562 | 875 | op.modulo = modulo; |
2563 | 875 | return op; |
2564 | 875 | } |
2565 | | |
2566 | 430 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2567 | 430 | (void)parentDs; |
2568 | 430 | op.modulo = modulo; |
2569 | 430 | return op; |
2570 | 430 | } |
2571 | | |
2572 | 815 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2573 | 815 | (void)parentDs; |
2574 | 815 | op.modulo = modulo; |
2575 | 815 | return op; |
2576 | 815 | } |
2577 | | |
2578 | 568 | operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2579 | 568 | (void)parentDs; |
2580 | 568 | op.modulo = modulo; |
2581 | 568 | return op; |
2582 | 568 | } |
2583 | | |
2584 | 638 | operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2585 | 638 | (void)parentDs; |
2586 | 638 | op.modulo = modulo; |
2587 | 638 | return op; |
2588 | 638 | } |
2589 | | |
2590 | 977 | operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2591 | 977 | (void)parentDs; |
2592 | 977 | op.modulo = modulo; |
2593 | 977 | return op; |
2594 | 977 | } |
2595 | | |
2596 | 511 | operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2597 | 511 | (void)parentDs; |
2598 | 511 | op.modulo = modulo; |
2599 | 511 | return op; |
2600 | 511 | } |
2601 | | |
2602 | 753 | operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2603 | 753 | (void)parentDs; |
2604 | 753 | op.modulo = modulo; |
2605 | 753 | return op; |
2606 | 753 | } |
2607 | | |
2608 | 1.10k | operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2609 | 1.10k | (void)parentDs; |
2610 | 1.10k | op.modulo = modulo; |
2611 | 1.10k | return op; |
2612 | 1.10k | } |
2613 | | |
2614 | 617 | operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2615 | 617 | (void)parentDs; |
2616 | 617 | op.modulo = modulo; |
2617 | 617 | return op; |
2618 | 617 | } |
2619 | | |
2620 | 877 | operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2621 | 877 | (void)parentDs; |
2622 | 877 | op.modulo = modulo; |
2623 | 877 | return op; |
2624 | 877 | } |
2625 | | |
2626 | 684 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2627 | 684 | (void)parentDs; |
2628 | 684 | op.modulo = modulo; |
2629 | 684 | return op; |
2630 | 684 | } |
2631 | | |
2632 | 440 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2633 | 440 | (void)parentDs; |
2634 | 440 | op.modulo = modulo; |
2635 | 440 | return op; |
2636 | 440 | } |
2637 | | |
2638 | 797 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2639 | 797 | (void)parentDs; |
2640 | 797 | op.modulo = modulo; |
2641 | 797 | return op; |
2642 | 797 | } |
2643 | | |
2644 | 546 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2645 | 546 | (void)parentDs; |
2646 | 546 | op.modulo = modulo; |
2647 | 546 | return op; |
2648 | 546 | } |
2649 | | |
2650 | 506 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2651 | 506 | (void)parentDs; |
2652 | 506 | op.modulo = modulo; |
2653 | 506 | return op; |
2654 | 506 | } |
2655 | | |
2656 | 752 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2657 | 752 | (void)parentDs; |
2658 | 752 | op.modulo = modulo; |
2659 | 752 | return op; |
2660 | 752 | } |
2661 | | |
2662 | 690 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2663 | 690 | (void)parentDs; |
2664 | 690 | op.modulo = modulo; |
2665 | 690 | return op; |
2666 | 690 | } |
2667 | | |
2668 | 654 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2669 | 654 | (void)parentDs; |
2670 | 654 | op.modulo = modulo; |
2671 | 654 | return op; |
2672 | 654 | } |
2673 | | |
2674 | 801 | operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2675 | 801 | (void)parentDs; |
2676 | 801 | op.modulo = modulo; |
2677 | 801 | return op; |
2678 | 801 | } |
2679 | | |
2680 | 468 | operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2681 | 468 | (void)parentDs; |
2682 | 468 | op.modulo = modulo; |
2683 | 468 | return op; |
2684 | 468 | } |
2685 | | |
2686 | | template <class ResultType, class OperationType> |
2687 | 476k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { |
2688 | 476k | Datasource ds(data, size); |
2689 | 476k | if ( parentDs != nullptr ) { |
2690 | 476k | auto modifier = parentDs->GetData(0); |
2691 | 476k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); |
2692 | 476k | } else { |
2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); |
2694 | 0 | } |
2695 | 476k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 9.60k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 9.60k | Datasource ds(data, size); | 2689 | 9.60k | if ( parentDs != nullptr ) { | 2690 | 9.60k | auto modifier = parentDs->GetData(0); | 2691 | 9.60k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 9.60k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 9.60k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 7.22k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 7.22k | Datasource ds(data, size); | 2689 | 7.22k | if ( parentDs != nullptr ) { | 2690 | 7.22k | auto modifier = parentDs->GetData(0); | 2691 | 7.22k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 7.22k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 7.22k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 9.79k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 9.79k | Datasource ds(data, size); | 2689 | 9.79k | if ( parentDs != nullptr ) { | 2690 | 9.79k | auto modifier = parentDs->GetData(0); | 2691 | 9.79k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 9.79k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 9.79k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 9.70k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 9.70k | Datasource ds(data, size); | 2689 | 9.70k | if ( parentDs != nullptr ) { | 2690 | 9.70k | auto modifier = parentDs->GetData(0); | 2691 | 9.70k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 9.70k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 9.70k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 32.2k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 32.2k | Datasource ds(data, size); | 2689 | 32.2k | if ( parentDs != nullptr ) { | 2690 | 32.2k | auto modifier = parentDs->GetData(0); | 2691 | 32.2k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 32.2k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 32.2k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 21.2k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 21.2k | Datasource ds(data, size); | 2689 | 21.2k | if ( parentDs != nullptr ) { | 2690 | 21.2k | auto modifier = parentDs->GetData(0); | 2691 | 21.2k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 21.2k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 21.2k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.11k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.11k | Datasource ds(data, size); | 2689 | 5.11k | if ( parentDs != nullptr ) { | 2690 | 5.11k | auto modifier = parentDs->GetData(0); | 2691 | 5.11k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.11k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.11k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 13.8k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 13.8k | Datasource ds(data, size); | 2689 | 13.8k | if ( parentDs != nullptr ) { | 2690 | 13.8k | auto modifier = parentDs->GetData(0); | 2691 | 13.8k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 13.8k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 13.8k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.51k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.51k | Datasource ds(data, size); | 2689 | 5.51k | if ( parentDs != nullptr ) { | 2690 | 5.51k | auto modifier = parentDs->GetData(0); | 2691 | 5.51k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.51k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.51k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.64k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.64k | Datasource ds(data, size); | 2689 | 4.64k | if ( parentDs != nullptr ) { | 2690 | 4.64k | auto modifier = parentDs->GetData(0); | 2691 | 4.64k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.64k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.64k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.96k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.96k | Datasource ds(data, size); | 2689 | 4.96k | if ( parentDs != nullptr ) { | 2690 | 4.96k | auto modifier = parentDs->GetData(0); | 2691 | 4.96k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.96k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.96k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 7.04k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 7.04k | Datasource ds(data, size); | 2689 | 7.04k | if ( parentDs != nullptr ) { | 2690 | 7.04k | auto modifier = parentDs->GetData(0); | 2691 | 7.04k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 7.04k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 7.04k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.23k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.23k | Datasource ds(data, size); | 2689 | 5.23k | if ( parentDs != nullptr ) { | 2690 | 5.23k | auto modifier = parentDs->GetData(0); | 2691 | 5.23k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.23k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.23k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.97k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.97k | Datasource ds(data, size); | 2689 | 4.97k | if ( parentDs != nullptr ) { | 2690 | 4.97k | auto modifier = parentDs->GetData(0); | 2691 | 4.97k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.97k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.97k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.97k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.97k | Datasource ds(data, size); | 2689 | 4.97k | if ( parentDs != nullptr ) { | 2690 | 4.97k | auto modifier = parentDs->GetData(0); | 2691 | 4.97k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.97k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.97k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.97k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.97k | Datasource ds(data, size); | 2689 | 4.97k | if ( parentDs != nullptr ) { | 2690 | 4.97k | auto modifier = parentDs->GetData(0); | 2691 | 4.97k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.97k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.97k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 6.80k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 6.80k | Datasource ds(data, size); | 2689 | 6.80k | if ( parentDs != nullptr ) { | 2690 | 6.80k | auto modifier = parentDs->GetData(0); | 2691 | 6.80k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 6.80k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 6.80k | } |
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 | 4.51k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.51k | Datasource ds(data, size); | 2689 | 4.51k | if ( parentDs != nullptr ) { | 2690 | 4.51k | auto modifier = parentDs->GetData(0); | 2691 | 4.51k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.51k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.51k | } |
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 | 4.71k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.71k | Datasource ds(data, size); | 2689 | 4.71k | if ( parentDs != nullptr ) { | 2690 | 4.71k | auto modifier = parentDs->GetData(0); | 2691 | 4.71k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.71k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.71k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.95k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.95k | Datasource ds(data, size); | 2689 | 4.95k | if ( parentDs != nullptr ) { | 2690 | 4.95k | auto modifier = parentDs->GetData(0); | 2691 | 4.95k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.95k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.95k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.59k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.59k | Datasource ds(data, size); | 2689 | 4.59k | if ( parentDs != nullptr ) { | 2690 | 4.59k | auto modifier = parentDs->GetData(0); | 2691 | 4.59k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.59k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.59k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.31k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.31k | Datasource ds(data, size); | 2689 | 4.31k | if ( parentDs != nullptr ) { | 2690 | 4.31k | auto modifier = parentDs->GetData(0); | 2691 | 4.31k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.31k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.31k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.59k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.59k | Datasource ds(data, size); | 2689 | 4.59k | if ( parentDs != nullptr ) { | 2690 | 4.59k | auto modifier = parentDs->GetData(0); | 2691 | 4.59k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.59k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.59k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 6.10k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 6.10k | Datasource ds(data, size); | 2689 | 6.10k | if ( parentDs != nullptr ) { | 2690 | 6.10k | auto modifier = parentDs->GetData(0); | 2691 | 6.10k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 6.10k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 6.10k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.29k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.29k | Datasource ds(data, size); | 2689 | 4.29k | if ( parentDs != nullptr ) { | 2690 | 4.29k | auto modifier = parentDs->GetData(0); | 2691 | 4.29k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.29k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.29k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.51k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.51k | Datasource ds(data, size); | 2689 | 4.51k | if ( parentDs != nullptr ) { | 2690 | 4.51k | auto modifier = parentDs->GetData(0); | 2691 | 4.51k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.51k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.51k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.52k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.52k | Datasource ds(data, size); | 2689 | 4.52k | if ( parentDs != nullptr ) { | 2690 | 4.52k | auto modifier = parentDs->GetData(0); | 2691 | 4.52k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.52k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.52k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.68k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.68k | Datasource ds(data, size); | 2689 | 4.68k | if ( parentDs != nullptr ) { | 2690 | 4.68k | auto modifier = parentDs->GetData(0); | 2691 | 4.68k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.68k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.68k | } |
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 | 4.73k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.73k | Datasource ds(data, size); | 2689 | 4.73k | if ( parentDs != nullptr ) { | 2690 | 4.73k | auto modifier = parentDs->GetData(0); | 2691 | 4.73k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.73k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.73k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.35k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.35k | Datasource ds(data, size); | 2689 | 4.35k | if ( parentDs != nullptr ) { | 2690 | 4.35k | auto modifier = parentDs->GetData(0); | 2691 | 4.35k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.35k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.35k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.58k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.58k | Datasource ds(data, size); | 2689 | 4.58k | if ( parentDs != nullptr ) { | 2690 | 4.58k | auto modifier = parentDs->GetData(0); | 2691 | 4.58k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.58k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.58k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.60k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.60k | Datasource ds(data, size); | 2689 | 5.60k | if ( parentDs != nullptr ) { | 2690 | 5.60k | auto modifier = parentDs->GetData(0); | 2691 | 5.60k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.60k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.60k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.55k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.55k | Datasource ds(data, size); | 2689 | 4.55k | if ( parentDs != nullptr ) { | 2690 | 4.55k | auto modifier = parentDs->GetData(0); | 2691 | 4.55k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.55k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.55k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.45k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.45k | Datasource ds(data, size); | 2689 | 4.45k | if ( parentDs != nullptr ) { | 2690 | 4.45k | auto modifier = parentDs->GetData(0); | 2691 | 4.45k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.45k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.45k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.14k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.14k | Datasource ds(data, size); | 2689 | 3.14k | if ( parentDs != nullptr ) { | 2690 | 3.14k | auto modifier = parentDs->GetData(0); | 2691 | 3.14k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.14k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.14k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.23k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.23k | Datasource ds(data, size); | 2689 | 5.23k | if ( parentDs != nullptr ) { | 2690 | 5.23k | auto modifier = parentDs->GetData(0); | 2691 | 5.23k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.23k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.23k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.44k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.44k | Datasource ds(data, size); | 2689 | 4.44k | if ( parentDs != nullptr ) { | 2690 | 4.44k | auto modifier = parentDs->GetData(0); | 2691 | 4.44k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.44k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.44k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.68k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.68k | Datasource ds(data, size); | 2689 | 4.68k | if ( parentDs != nullptr ) { | 2690 | 4.68k | auto modifier = parentDs->GetData(0); | 2691 | 4.68k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.68k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.68k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.06k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.06k | Datasource ds(data, size); | 2689 | 5.06k | if ( parentDs != nullptr ) { | 2690 | 5.06k | auto modifier = parentDs->GetData(0); | 2691 | 5.06k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.06k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.06k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.58k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.58k | Datasource ds(data, size); | 2689 | 5.58k | if ( parentDs != nullptr ) { | 2690 | 5.58k | auto modifier = parentDs->GetData(0); | 2691 | 5.58k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.58k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.58k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.64k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.64k | Datasource ds(data, size); | 2689 | 3.64k | if ( parentDs != nullptr ) { | 2690 | 3.64k | auto modifier = parentDs->GetData(0); | 2691 | 3.64k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.64k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.64k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.10k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.10k | Datasource ds(data, size); | 2689 | 4.10k | if ( parentDs != nullptr ) { | 2690 | 4.10k | auto modifier = parentDs->GetData(0); | 2691 | 4.10k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.10k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.10k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.90k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.90k | Datasource ds(data, size); | 2689 | 5.90k | if ( parentDs != nullptr ) { | 2690 | 5.90k | auto modifier = parentDs->GetData(0); | 2691 | 5.90k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.90k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.90k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.63k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.63k | Datasource ds(data, size); | 2689 | 3.63k | if ( parentDs != nullptr ) { | 2690 | 3.63k | auto modifier = parentDs->GetData(0); | 2691 | 3.63k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.63k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.63k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.34k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.34k | Datasource ds(data, size); | 2689 | 3.34k | if ( parentDs != nullptr ) { | 2690 | 3.34k | auto modifier = parentDs->GetData(0); | 2691 | 3.34k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.34k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.34k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.90k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.90k | Datasource ds(data, size); | 2689 | 3.90k | if ( parentDs != nullptr ) { | 2690 | 3.90k | auto modifier = parentDs->GetData(0); | 2691 | 3.90k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.90k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.90k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.65k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.65k | Datasource ds(data, size); | 2689 | 4.65k | if ( parentDs != nullptr ) { | 2690 | 4.65k | auto modifier = parentDs->GetData(0); | 2691 | 4.65k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.65k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.65k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.94k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.94k | Datasource ds(data, size); | 2689 | 5.94k | if ( parentDs != nullptr ) { | 2690 | 5.94k | auto modifier = parentDs->GetData(0); | 2691 | 5.94k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.94k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.94k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 30.4k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 30.4k | Datasource ds(data, size); | 2689 | 30.4k | if ( parentDs != nullptr ) { | 2690 | 30.4k | auto modifier = parentDs->GetData(0); | 2691 | 30.4k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 30.4k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 30.4k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.57k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.57k | Datasource ds(data, size); | 2689 | 4.57k | if ( parentDs != nullptr ) { | 2690 | 4.57k | auto modifier = parentDs->GetData(0); | 2691 | 4.57k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.57k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.57k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.16k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.16k | Datasource ds(data, size); | 2689 | 5.16k | if ( parentDs != nullptr ) { | 2690 | 5.16k | auto modifier = parentDs->GetData(0); | 2691 | 5.16k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.16k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.16k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.03k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.03k | Datasource ds(data, size); | 2689 | 3.03k | if ( parentDs != nullptr ) { | 2690 | 3.03k | auto modifier = parentDs->GetData(0); | 2691 | 3.03k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.03k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.03k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.14k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.14k | Datasource ds(data, size); | 2689 | 3.14k | if ( parentDs != nullptr ) { | 2690 | 3.14k | auto modifier = parentDs->GetData(0); | 2691 | 3.14k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.14k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.14k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.25k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.25k | Datasource ds(data, size); | 2689 | 5.25k | if ( parentDs != nullptr ) { | 2690 | 5.25k | auto modifier = parentDs->GetData(0); | 2691 | 5.25k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.25k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.25k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.90k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.90k | Datasource ds(data, size); | 2689 | 4.90k | if ( parentDs != nullptr ) { | 2690 | 4.90k | auto modifier = parentDs->GetData(0); | 2691 | 4.90k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.90k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.90k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.27k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.27k | Datasource ds(data, size); | 2689 | 4.27k | if ( parentDs != nullptr ) { | 2690 | 4.27k | auto modifier = parentDs->GetData(0); | 2691 | 4.27k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.27k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.27k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.01k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.01k | Datasource ds(data, size); | 2689 | 4.01k | if ( parentDs != nullptr ) { | 2690 | 4.01k | auto modifier = parentDs->GetData(0); | 2691 | 4.01k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.01k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.01k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.69k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.69k | Datasource ds(data, size); | 2689 | 3.69k | if ( parentDs != nullptr ) { | 2690 | 3.69k | auto modifier = parentDs->GetData(0); | 2691 | 3.69k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.69k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.69k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.11k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.11k | Datasource ds(data, size); | 2689 | 4.11k | if ( parentDs != nullptr ) { | 2690 | 4.11k | auto modifier = parentDs->GetData(0); | 2691 | 4.11k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.11k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.11k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.91k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.91k | Datasource ds(data, size); | 2689 | 3.91k | if ( parentDs != nullptr ) { | 2690 | 3.91k | auto modifier = parentDs->GetData(0); | 2691 | 3.91k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.91k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.91k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.70k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.70k | Datasource ds(data, size); | 2689 | 3.70k | if ( parentDs != nullptr ) { | 2690 | 3.70k | auto modifier = parentDs->GetData(0); | 2691 | 3.70k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.70k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.70k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.99k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.99k | Datasource ds(data, size); | 2689 | 3.99k | if ( parentDs != nullptr ) { | 2690 | 3.99k | auto modifier = parentDs->GetData(0); | 2691 | 3.99k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.99k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.99k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.99k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.99k | Datasource ds(data, size); | 2689 | 3.99k | if ( parentDs != nullptr ) { | 2690 | 3.99k | auto modifier = parentDs->GetData(0); | 2691 | 3.99k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.99k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.99k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.93k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.93k | Datasource ds(data, size); | 2689 | 4.93k | if ( parentDs != nullptr ) { | 2690 | 4.93k | auto modifier = parentDs->GetData(0); | 2691 | 4.93k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.93k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.93k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.99k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.99k | Datasource ds(data, size); | 2689 | 4.99k | if ( parentDs != nullptr ) { | 2690 | 4.99k | auto modifier = parentDs->GetData(0); | 2691 | 4.99k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.99k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.99k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.50k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.50k | Datasource ds(data, size); | 2689 | 3.50k | if ( parentDs != nullptr ) { | 2690 | 3.50k | auto modifier = parentDs->GetData(0); | 2691 | 3.50k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.50k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.50k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.77k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.77k | Datasource ds(data, size); | 2689 | 2.77k | if ( parentDs != nullptr ) { | 2690 | 2.77k | auto modifier = parentDs->GetData(0); | 2691 | 2.77k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.77k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.77k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.81k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.81k | Datasource ds(data, size); | 2689 | 3.81k | if ( parentDs != nullptr ) { | 2690 | 3.81k | auto modifier = parentDs->GetData(0); | 2691 | 3.81k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.81k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.81k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.85k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.85k | Datasource ds(data, size); | 2689 | 4.85k | if ( parentDs != nullptr ) { | 2690 | 4.85k | auto modifier = parentDs->GetData(0); | 2691 | 4.85k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.85k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.85k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.87k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.87k | Datasource ds(data, size); | 2689 | 2.87k | if ( parentDs != nullptr ) { | 2690 | 2.87k | auto modifier = parentDs->GetData(0); | 2691 | 2.87k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.87k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.87k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.08k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.08k | Datasource ds(data, size); | 2689 | 3.08k | if ( parentDs != nullptr ) { | 2690 | 3.08k | auto modifier = parentDs->GetData(0); | 2691 | 3.08k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.08k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.08k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.14k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.14k | Datasource ds(data, size); | 2689 | 3.14k | if ( parentDs != nullptr ) { | 2690 | 3.14k | auto modifier = parentDs->GetData(0); | 2691 | 3.14k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.14k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.14k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.52k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.52k | Datasource ds(data, size); | 2689 | 4.52k | if ( parentDs != nullptr ) { | 2690 | 4.52k | auto modifier = parentDs->GetData(0); | 2691 | 4.52k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.52k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.52k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.15k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.15k | Datasource ds(data, size); | 2689 | 4.15k | if ( parentDs != nullptr ) { | 2690 | 4.15k | auto modifier = parentDs->GetData(0); | 2691 | 4.15k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.15k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.15k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.33k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.33k | Datasource ds(data, size); | 2689 | 4.33k | if ( parentDs != nullptr ) { | 2690 | 4.33k | auto modifier = parentDs->GetData(0); | 2691 | 4.33k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.33k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.33k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.01k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.01k | Datasource ds(data, size); | 2689 | 4.01k | if ( parentDs != nullptr ) { | 2690 | 4.01k | auto modifier = parentDs->GetData(0); | 2691 | 4.01k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.01k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.01k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::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::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.77k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.77k | Datasource ds(data, size); | 2689 | 4.77k | if ( parentDs != nullptr ) { | 2690 | 4.77k | auto modifier = parentDs->GetData(0); | 2691 | 4.77k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.77k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.77k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.30k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.30k | Datasource ds(data, size); | 2689 | 4.30k | if ( parentDs != nullptr ) { | 2690 | 4.30k | auto modifier = parentDs->GetData(0); | 2691 | 4.30k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.30k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.30k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.05k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.05k | Datasource ds(data, size); | 2689 | 5.05k | if ( parentDs != nullptr ) { | 2690 | 5.05k | auto modifier = parentDs->GetData(0); | 2691 | 5.05k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.05k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.05k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.39k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.39k | Datasource ds(data, size); | 2689 | 3.39k | if ( parentDs != nullptr ) { | 2690 | 3.39k | auto modifier = parentDs->GetData(0); | 2691 | 3.39k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.39k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.39k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.05k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.05k | Datasource ds(data, size); | 2689 | 4.05k | if ( parentDs != nullptr ) { | 2690 | 4.05k | auto modifier = parentDs->GetData(0); | 2691 | 4.05k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.05k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.05k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 2.09k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 2.09k | Datasource ds(data, size); | 2689 | 2.09k | if ( parentDs != nullptr ) { | 2690 | 2.09k | auto modifier = parentDs->GetData(0); | 2691 | 2.09k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 2.09k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 2.09k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 4.80k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 4.80k | Datasource ds(data, size); | 2689 | 4.80k | if ( parentDs != nullptr ) { | 2690 | 4.80k | auto modifier = parentDs->GetData(0); | 2691 | 4.80k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 4.80k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 4.80k | } |
|
2696 | | |
2697 | | template <class ResultType, class OperationType> |
2698 | 471k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { |
2699 | 471k | auto moduleID = ds.Get<uint64_t>(); |
2700 | | |
2701 | | /* Override the extracted module ID with the preferred one, if specified */ |
2702 | 471k | if ( options.forceModule != std::nullopt ) { |
2703 | 0 | moduleID = *options.forceModule; |
2704 | 0 | } |
2705 | | |
2706 | | /* Skip if this is a disabled module */ |
2707 | 471k | if ( options.disableModules.HaveExplicit(moduleID) ) { |
2708 | 0 | return nullptr; |
2709 | 0 | } |
2710 | | |
2711 | 471k | if ( modules.find(moduleID) == modules.end() ) { |
2712 | 350k | return nullptr; |
2713 | 350k | } |
2714 | | |
2715 | 121k | return modules.at(moduleID); |
2716 | 471k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 9.56k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 9.56k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 9.56k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 9.56k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 9.56k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.41k | return nullptr; | 2713 | 3.41k | } | 2714 | | | 2715 | 6.15k | return modules.at(moduleID); | 2716 | 9.56k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 7.17k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 7.17k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 7.17k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 7.17k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 7.17k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.43k | return nullptr; | 2713 | 4.43k | } | 2714 | | | 2715 | 2.73k | return modules.at(moduleID); | 2716 | 7.17k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 9.73k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 9.73k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 9.73k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 9.73k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 9.73k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.82k | return nullptr; | 2713 | 4.82k | } | 2714 | | | 2715 | 4.91k | return modules.at(moduleID); | 2716 | 9.73k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 9.66k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 9.66k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 9.66k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 9.66k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 9.66k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 5.00k | return nullptr; | 2713 | 5.00k | } | 2714 | | | 2715 | 4.66k | return modules.at(moduleID); | 2716 | 9.66k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 32.2k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 32.2k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 32.2k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 32.2k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 32.2k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 12.4k | return nullptr; | 2713 | 12.4k | } | 2714 | | | 2715 | 19.7k | return modules.at(moduleID); | 2716 | 32.2k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 21.2k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 21.2k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 21.2k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 21.2k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 21.2k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 7.86k | return nullptr; | 2713 | 7.86k | } | 2714 | | | 2715 | 13.3k | return modules.at(moduleID); | 2716 | 21.2k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::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 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 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 | 3.56k | return nullptr; | 2713 | 3.56k | } | 2714 | | | 2715 | 1.49k | return modules.at(moduleID); | 2716 | 5.05k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 13.7k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 13.7k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 13.7k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 13.7k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 13.7k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 6.18k | return nullptr; | 2713 | 6.18k | } | 2714 | | | 2715 | 7.59k | return modules.at(moduleID); | 2716 | 13.7k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 5.45k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 5.45k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 5.45k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 5.45k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 5.45k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.37k | return nullptr; | 2713 | 4.37k | } | 2714 | | | 2715 | 1.08k | return modules.at(moduleID); | 2716 | 5.45k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.60k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.60k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.60k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.60k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.60k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.73k | return nullptr; | 2713 | 3.73k | } | 2714 | | | 2715 | 873 | return modules.at(moduleID); | 2716 | 4.60k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.89k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.89k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.89k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.89k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.89k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.97k | return nullptr; | 2713 | 3.97k | } | 2714 | | | 2715 | 923 | return modules.at(moduleID); | 2716 | 4.89k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 7.00k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 7.00k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 7.00k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 7.00k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 7.00k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.13k | return nullptr; | 2713 | 4.13k | } | 2714 | | | 2715 | 2.87k | return modules.at(moduleID); | 2716 | 7.00k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 5.19k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 5.19k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 5.19k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 5.19k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 5.19k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.34k | return nullptr; | 2713 | 4.34k | } | 2714 | | | 2715 | 847 | return modules.at(moduleID); | 2716 | 5.19k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.92k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.92k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.92k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.92k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.92k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.16k | return nullptr; | 2713 | 4.16k | } | 2714 | | | 2715 | 760 | return modules.at(moduleID); | 2716 | 4.92k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.93k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.93k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.93k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.93k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.93k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.84k | return nullptr; | 2713 | 3.84k | } | 2714 | | | 2715 | 1.08k | return modules.at(moduleID); | 2716 | 4.93k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.93k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.93k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.93k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.93k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.93k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.75k | return nullptr; | 2713 | 4.75k | } | 2714 | | | 2715 | 174 | return modules.at(moduleID); | 2716 | 4.93k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 6.75k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 6.75k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 6.75k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 6.75k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 6.75k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.16k | return nullptr; | 2713 | 4.16k | } | 2714 | | | 2715 | 2.58k | return modules.at(moduleID); | 2716 | 6.75k | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.45k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.45k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.45k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.45k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.45k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.40k | return nullptr; | 2713 | 3.40k | } | 2714 | | | 2715 | 1.05k | return modules.at(moduleID); | 2716 | 4.45k | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.67k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.67k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.67k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.67k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.67k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.78k | return nullptr; | 2713 | 3.78k | } | 2714 | | | 2715 | 894 | return modules.at(moduleID); | 2716 | 4.67k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.91k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.91k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.91k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.91k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.91k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.14k | return nullptr; | 2713 | 3.14k | } | 2714 | | | 2715 | 1.77k | return modules.at(moduleID); | 2716 | 4.91k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.56k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.56k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.56k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.56k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.56k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.24k | return nullptr; | 2713 | 3.24k | } | 2714 | | | 2715 | 1.31k | return modules.at(moduleID); | 2716 | 4.56k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.28k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.28k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.28k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.28k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.28k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.70k | return nullptr; | 2713 | 2.70k | } | 2714 | | | 2715 | 1.58k | return modules.at(moduleID); | 2716 | 4.28k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.55k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.55k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.55k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.55k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.55k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.26k | return nullptr; | 2713 | 4.26k | } | 2714 | | | 2715 | 293 | return modules.at(moduleID); | 2716 | 4.55k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 6.07k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 6.07k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 6.07k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 6.07k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 6.07k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.13k | return nullptr; | 2713 | 4.13k | } | 2714 | | | 2715 | 1.94k | return modules.at(moduleID); | 2716 | 6.07k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.24k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.24k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.24k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.24k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.24k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.83k | return nullptr; | 2713 | 3.83k | } | 2714 | | | 2715 | 414 | return modules.at(moduleID); | 2716 | 4.24k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.45k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.45k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.45k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.45k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.45k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.15k | return nullptr; | 2713 | 4.15k | } | 2714 | | | 2715 | 301 | return modules.at(moduleID); | 2716 | 4.45k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.48k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.48k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.48k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.48k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.48k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.19k | return nullptr; | 2713 | 4.19k | } | 2714 | | | 2715 | 289 | return modules.at(moduleID); | 2716 | 4.48k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.63k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.63k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.63k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.63k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.63k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.33k | return nullptr; | 2713 | 4.33k | } | 2714 | | | 2715 | 300 | return modules.at(moduleID); | 2716 | 4.63k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.44k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.44k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.44k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.44k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.44k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.25k | return nullptr; | 2713 | 3.25k | } | 2714 | | | 2715 | 1.18k | return modules.at(moduleID); | 2716 | 4.44k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.69k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.69k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.69k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.69k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.69k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.07k | return nullptr; | 2713 | 4.07k | } | 2714 | | | 2715 | 614 | return modules.at(moduleID); | 2716 | 4.69k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.31k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.31k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.31k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.31k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.31k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.02k | return nullptr; | 2713 | 4.02k | } | 2714 | | | 2715 | 290 | return modules.at(moduleID); | 2716 | 4.31k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.54k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.54k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.54k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.54k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.54k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.22k | return nullptr; | 2713 | 4.22k | } | 2714 | | | 2715 | 327 | return modules.at(moduleID); | 2716 | 4.54k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 5.56k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 5.56k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 5.56k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 5.56k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 5.56k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.17k | return nullptr; | 2713 | 4.17k | } | 2714 | | | 2715 | 1.38k | return modules.at(moduleID); | 2716 | 5.56k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.51k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.51k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.51k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.51k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.51k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.63k | return nullptr; | 2713 | 3.63k | } | 2714 | | | 2715 | 878 | return modules.at(moduleID); | 2716 | 4.51k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.41k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.41k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.41k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.41k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.41k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.07k | return nullptr; | 2713 | 4.07k | } | 2714 | | | 2715 | 343 | return modules.at(moduleID); | 2716 | 4.41k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.10k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.10k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.10k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.10k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.10k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.80k | return nullptr; | 2713 | 2.80k | } | 2714 | | | 2715 | 296 | return modules.at(moduleID); | 2716 | 3.10k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 5.18k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 5.18k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 5.18k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 5.18k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 5.18k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.87k | return nullptr; | 2713 | 4.87k | } | 2714 | | | 2715 | 311 | return modules.at(moduleID); | 2716 | 5.18k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::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 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 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 | 4.08k | return nullptr; | 2713 | 4.08k | } | 2714 | | | 2715 | 306 | return modules.at(moduleID); | 2716 | 4.38k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.63k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.63k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.63k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.63k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.63k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.34k | return nullptr; | 2713 | 4.34k | } | 2714 | | | 2715 | 290 | return modules.at(moduleID); | 2716 | 4.63k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 5.01k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 5.01k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 5.01k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 5.01k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 5.01k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.67k | return nullptr; | 2713 | 4.67k | } | 2714 | | | 2715 | 347 | return modules.at(moduleID); | 2716 | 5.01k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 5.52k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 5.52k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 5.52k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 5.52k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 5.52k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 5.18k | return nullptr; | 2713 | 5.18k | } | 2714 | | | 2715 | 349 | return modules.at(moduleID); | 2716 | 5.52k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.60k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.60k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.60k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.60k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.60k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.11k | return nullptr; | 2713 | 3.11k | } | 2714 | | | 2715 | 486 | return modules.at(moduleID); | 2716 | 3.60k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.05k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.05k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.05k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.05k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.05k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.55k | return nullptr; | 2713 | 3.55k | } | 2714 | | | 2715 | 497 | return modules.at(moduleID); | 2716 | 4.05k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 5.86k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 5.86k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 5.86k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 5.86k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 5.86k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.39k | return nullptr; | 2713 | 4.39k | } | 2714 | | | 2715 | 1.47k | return modules.at(moduleID); | 2716 | 5.86k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.59k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.59k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.59k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.59k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.59k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.19k | return nullptr; | 2713 | 3.19k | } | 2714 | | | 2715 | 397 | return modules.at(moduleID); | 2716 | 3.59k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.30k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.30k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.30k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.30k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.30k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.90k | return nullptr; | 2713 | 2.90k | } | 2714 | | | 2715 | 405 | return modules.at(moduleID); | 2716 | 3.30k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.86k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.86k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.86k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.86k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.86k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.44k | return nullptr; | 2713 | 3.44k | } | 2714 | | | 2715 | 422 | return modules.at(moduleID); | 2716 | 3.86k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.60k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.60k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.60k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.60k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.60k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.30k | return nullptr; | 2713 | 4.30k | } | 2714 | | | 2715 | 301 | return modules.at(moduleID); | 2716 | 4.60k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 5.89k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 5.89k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 5.89k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 5.89k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 5.89k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 5.03k | return nullptr; | 2713 | 5.03k | } | 2714 | | | 2715 | 862 | return modules.at(moduleID); | 2716 | 5.89k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 30.2k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 30.2k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 30.2k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 30.2k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 30.2k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 15.0k | return nullptr; | 2713 | 15.0k | } | 2714 | | | 2715 | 15.2k | return modules.at(moduleID); | 2716 | 30.2k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.52k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.52k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.52k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.52k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.52k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.12k | return nullptr; | 2713 | 4.12k | } | 2714 | | | 2715 | 403 | return modules.at(moduleID); | 2716 | 4.52k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 5.07k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 5.07k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 5.07k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 5.07k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 5.07k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.03k | return nullptr; | 2713 | 4.03k | } | 2714 | | | 2715 | 1.04k | return modules.at(moduleID); | 2716 | 5.07k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.99k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.99k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.99k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.99k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.99k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.70k | return nullptr; | 2713 | 2.70k | } | 2714 | | | 2715 | 295 | return modules.at(moduleID); | 2716 | 2.99k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.10k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.10k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.10k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.10k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.10k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.75k | return nullptr; | 2713 | 2.75k | } | 2714 | | | 2715 | 354 | return modules.at(moduleID); | 2716 | 3.10k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 5.17k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 5.17k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 5.17k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 5.17k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 5.17k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.81k | return nullptr; | 2713 | 4.81k | } | 2714 | | | 2715 | 365 | return modules.at(moduleID); | 2716 | 5.17k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.84k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.84k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.84k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.84k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.84k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.58k | return nullptr; | 2713 | 4.58k | } | 2714 | | | 2715 | 263 | return modules.at(moduleID); | 2716 | 4.84k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.17k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.17k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.17k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.17k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.17k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.77k | return nullptr; | 2713 | 3.77k | } | 2714 | | | 2715 | 399 | return modules.at(moduleID); | 2716 | 4.17k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.88k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.88k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.88k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.88k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.88k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.49k | return nullptr; | 2713 | 3.49k | } | 2714 | | | 2715 | 388 | return modules.at(moduleID); | 2716 | 3.88k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.58k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.58k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.58k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.58k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.58k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.23k | return nullptr; | 2713 | 3.23k | } | 2714 | | | 2715 | 349 | return modules.at(moduleID); | 2716 | 3.58k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.04k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.04k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.04k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.04k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.04k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.73k | return nullptr; | 2713 | 3.73k | } | 2714 | | | 2715 | 318 | return modules.at(moduleID); | 2716 | 4.04k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.86k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.86k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.86k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.86k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.86k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.55k | return nullptr; | 2713 | 3.55k | } | 2714 | | | 2715 | 306 | return modules.at(moduleID); | 2716 | 3.86k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.66k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.66k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.66k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.66k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.66k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.33k | return nullptr; | 2713 | 3.33k | } | 2714 | | | 2715 | 328 | return modules.at(moduleID); | 2716 | 3.66k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.90k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.90k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.90k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.90k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.90k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.51k | return nullptr; | 2713 | 3.51k | } | 2714 | | | 2715 | 392 | return modules.at(moduleID); | 2716 | 3.90k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.94k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.94k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.94k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.94k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.94k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.64k | return nullptr; | 2713 | 3.64k | } | 2714 | | | 2715 | 307 | return modules.at(moduleID); | 2716 | 3.94k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.89k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.89k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.89k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.89k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.89k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.56k | return nullptr; | 2713 | 4.56k | } | 2714 | | | 2715 | 329 | return modules.at(moduleID); | 2716 | 4.89k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.94k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.94k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.94k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.94k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.94k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.66k | return nullptr; | 2713 | 4.66k | } | 2714 | | | 2715 | 275 | return modules.at(moduleID); | 2716 | 4.94k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.47k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.47k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.47k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.47k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.47k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.11k | return nullptr; | 2713 | 3.11k | } | 2714 | | | 2715 | 360 | return modules.at(moduleID); | 2716 | 3.47k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.73k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.73k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.73k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.73k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.73k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.42k | return nullptr; | 2713 | 2.42k | } | 2714 | | | 2715 | 313 | return modules.at(moduleID); | 2716 | 2.73k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.77k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.77k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.77k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.77k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.77k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.41k | return nullptr; | 2713 | 3.41k | } | 2714 | | | 2715 | 367 | return modules.at(moduleID); | 2716 | 3.77k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.78k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.78k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.78k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.78k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.78k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.46k | return nullptr; | 2713 | 4.46k | } | 2714 | | | 2715 | 315 | return modules.at(moduleID); | 2716 | 4.78k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.83k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.83k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.83k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.83k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.83k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.51k | return nullptr; | 2713 | 2.51k | } | 2714 | | | 2715 | 316 | return modules.at(moduleID); | 2716 | 2.83k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.04k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.04k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.04k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.04k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.04k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.75k | return nullptr; | 2713 | 2.75k | } | 2714 | | | 2715 | 289 | return modules.at(moduleID); | 2716 | 3.04k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.10k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.10k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.10k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.10k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.10k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.84k | return nullptr; | 2713 | 2.84k | } | 2714 | | | 2715 | 262 | return modules.at(moduleID); | 2716 | 3.10k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.46k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.46k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.46k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.46k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.46k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.14k | return nullptr; | 2713 | 4.14k | } | 2714 | | | 2715 | 316 | return modules.at(moduleID); | 2716 | 4.46k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.10k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.10k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.10k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.10k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.10k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.71k | return nullptr; | 2713 | 3.71k | } | 2714 | | | 2715 | 387 | return modules.at(moduleID); | 2716 | 4.10k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.28k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.28k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.28k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.28k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.28k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.01k | return nullptr; | 2713 | 4.01k | } | 2714 | | | 2715 | 275 | return modules.at(moduleID); | 2716 | 4.28k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.98k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.98k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.98k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.98k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.98k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.61k | return nullptr; | 2713 | 3.61k | } | 2714 | | | 2715 | 369 | return modules.at(moduleID); | 2716 | 3.98k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.75k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.75k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.75k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.75k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.75k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.44k | return nullptr; | 2713 | 2.44k | } | 2714 | | | 2715 | 311 | return modules.at(moduleID); | 2716 | 2.75k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.71k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.71k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.71k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.71k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.71k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.19k | return nullptr; | 2713 | 4.19k | } | 2714 | | | 2715 | 527 | return modules.at(moduleID); | 2716 | 4.71k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.27k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.27k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.27k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.27k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.27k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.95k | return nullptr; | 2713 | 3.95k | } | 2714 | | | 2715 | 313 | return modules.at(moduleID); | 2716 | 4.27k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.99k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.99k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.99k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.99k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.99k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.47k | return nullptr; | 2713 | 4.47k | } | 2714 | | | 2715 | 527 | return modules.at(moduleID); | 2716 | 4.99k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.34k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.34k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.34k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.34k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.34k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 2.97k | return nullptr; | 2713 | 2.97k | } | 2714 | | | 2715 | 362 | return modules.at(moduleID); | 2716 | 3.34k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.92k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.92k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.92k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.92k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.92k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 3.50k | return nullptr; | 2713 | 3.50k | } | 2714 | | | 2715 | 418 | return modules.at(moduleID); | 2716 | 3.92k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.06k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.06k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.06k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.06k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.06k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 1.80k | return nullptr; | 2713 | 1.80k | } | 2714 | | | 2715 | 262 | return modules.at(moduleID); | 2716 | 2.06k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.75k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.75k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.75k | if ( options.forceModule != std::nullopt ) { | 2703 | 0 | moduleID = *options.forceModule; | 2704 | 0 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.75k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.75k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 4.36k | return nullptr; | 2713 | 4.36k | } | 2714 | | | 2715 | 383 | return modules.at(moduleID); | 2716 | 4.75k | } |
|
2717 | | |
2718 | | template <class ResultType, class OperationType> |
2719 | 59.3k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { |
2720 | 59.3k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; |
2721 | | |
2722 | 59.3k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; |
2723 | | |
2724 | 476k | do { |
2725 | 476k | auto op = getOp(&parentDs, data, size); |
2726 | 476k | auto module = getModule(parentDs); |
2727 | 476k | if ( module == nullptr ) { |
2728 | 350k | continue; |
2729 | 350k | } |
2730 | | |
2731 | 126k | operations.push_back( {module, op} ); |
2732 | | |
2733 | | /* Limit number of operations per run to prevent time-outs */ |
2734 | 126k | if ( operations.size() == OperationType::MaxOperations() ) { |
2735 | 1.70k | break; |
2736 | 1.70k | } |
2737 | 474k | } while ( parentDs.Get<bool>() == true ); |
2738 | | |
2739 | 59.3k | if ( operations.empty() == true ) { |
2740 | 2.51k | return; |
2741 | 2.51k | } |
2742 | | |
2743 | | /* Enable this to run every operation on every loaded module */ |
2744 | 56.8k | #if 1 |
2745 | 56.8k | { |
2746 | 56.8k | std::set<uint64_t> moduleIDs; |
2747 | 90.0k | for (const auto& m : modules ) { |
2748 | 90.0k | const auto moduleID = m.first; |
2749 | | |
2750 | | /* Skip if this is a disabled module */ |
2751 | 90.0k | if ( options.disableModules.HaveExplicit(moduleID) ) { |
2752 | 0 | continue; |
2753 | 0 | } |
2754 | | |
2755 | 90.0k | moduleIDs.insert(moduleID); |
2756 | 90.0k | } |
2757 | | |
2758 | 56.8k | std::set<uint64_t> operationModuleIDs; |
2759 | 109k | for (const auto& op : operations) { |
2760 | 109k | operationModuleIDs.insert(op.first->ID); |
2761 | 109k | } |
2762 | | |
2763 | 56.8k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); |
2764 | 56.8k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); |
2765 | 56.8k | addModuleIDs.resize(it - addModuleIDs.begin()); |
2766 | | |
2767 | 56.8k | for (const auto& id : addModuleIDs) { |
2768 | 42.4k | operations.push_back({ modules.at(id), operations[0].second}); |
2769 | 42.4k | } |
2770 | 56.8k | } |
2771 | 56.8k | #endif |
2772 | | |
2773 | 56.8k | if ( operations.size() < options.minModules ) { |
2774 | 0 | return; |
2775 | 0 | } |
2776 | | |
2777 | 56.8k | if ( options.debug == true && !operations.empty() ) { |
2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); |
2779 | 0 | } |
2780 | 208k | for (size_t i = 0; i < operations.size(); i++) { |
2781 | 151k | auto& operation = operations[i]; |
2782 | | |
2783 | 151k | auto& module = operation.first; |
2784 | 151k | auto& op = operation.second; |
2785 | | |
2786 | 151k | if ( i > 0 ) { |
2787 | 106k | auto& prevModule = operations[i-1].first; |
2788 | 106k | auto& prevOp = operations[i].second; |
2789 | | |
2790 | 106k | if ( prevModule == module && prevOp.modifier == op.modifier ) { |
2791 | 59.1k | auto& curModifier = op.modifier.GetVectorPtr(); |
2792 | 59.1k | if ( curModifier.size() == 0 ) { |
2793 | 21.2M | for (size_t j = 0; j < 512; j++) { |
2794 | 21.2M | curModifier.push_back(1); |
2795 | 21.2M | } |
2796 | 41.5k | } else { |
2797 | 699k | for (auto& c : curModifier) { |
2798 | 699k | c++; |
2799 | 699k | } |
2800 | 17.5k | } |
2801 | 59.1k | } |
2802 | 106k | } |
2803 | | |
2804 | 151k | if ( options.debug == true ) { |
2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); |
2806 | 0 | } |
2807 | | |
2808 | 151k | results.push_back( {module, std::move(callModule(module, op))} ); |
2809 | | |
2810 | 151k | const auto& result = results.back(); |
2811 | | |
2812 | 151k | if ( result.second != std::nullopt ) { |
2813 | 43.6k | if ( options.jsonDumpFP != std::nullopt ) { |
2814 | 0 | nlohmann::json j; |
2815 | 0 | j["operation"] = op.ToJSON(); |
2816 | 0 | j["result"] = util::ToJSON(*result.second); |
2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); |
2818 | 0 | } |
2819 | 43.6k | } |
2820 | | |
2821 | 151k | 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 | 151k | if ( options.disableTests == false ) { |
2830 | 151k | tests::test(op, result.second); |
2831 | 151k | } |
2832 | | |
2833 | 151k | postprocess(module, op, result); |
2834 | 151k | } |
2835 | | |
2836 | 56.8k | if ( options.noCompare == false ) { |
2837 | 45.0k | compare(operations, results, data, size); |
2838 | 45.0k | } |
2839 | 56.8k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 3.51k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 3.51k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 3.51k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 9.60k | do { | 2725 | 9.60k | auto op = getOp(&parentDs, data, size); | 2726 | 9.60k | auto module = getModule(parentDs); | 2727 | 9.60k | if ( module == nullptr ) { | 2728 | 3.41k | continue; | 2729 | 3.41k | } | 2730 | | | 2731 | 6.19k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 6.19k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 13 | break; | 2736 | 13 | } | 2737 | 9.59k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 3.51k | if ( operations.empty() == true ) { | 2740 | 41 | return; | 2741 | 41 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 3.47k | #if 1 | 2745 | 3.47k | { | 2746 | 3.47k | std::set<uint64_t> moduleIDs; | 2747 | 6.62k | for (const auto& m : modules ) { | 2748 | 6.62k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 6.62k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 6.62k | moduleIDs.insert(moduleID); | 2756 | 6.62k | } | 2757 | | | 2758 | 3.47k | std::set<uint64_t> operationModuleIDs; | 2759 | 5.95k | for (const auto& op : operations) { | 2760 | 5.95k | operationModuleIDs.insert(op.first->ID); | 2761 | 5.95k | } | 2762 | | | 2763 | 3.47k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 3.47k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 3.47k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 3.47k | for (const auto& id : addModuleIDs) { | 2768 | 3.26k | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 3.26k | } | 2770 | 3.47k | } | 2771 | 3.47k | #endif | 2772 | | | 2773 | 3.47k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 3.47k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 12.6k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 9.21k | auto& operation = operations[i]; | 2782 | | | 2783 | 9.21k | auto& module = operation.first; | 2784 | 9.21k | auto& op = operation.second; | 2785 | | | 2786 | 9.21k | if ( i > 0 ) { | 2787 | 5.90k | auto& prevModule = operations[i-1].first; | 2788 | 5.90k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 5.90k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 2.48k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 2.48k | if ( curModifier.size() == 0 ) { | 2793 | 1.02M | for (size_t j = 0; j < 512; j++) { | 2794 | 1.02M | curModifier.push_back(1); | 2795 | 1.02M | } | 2796 | 1.99k | } else { | 2797 | 7.99k | for (auto& c : curModifier) { | 2798 | 7.99k | c++; | 2799 | 7.99k | } | 2800 | 486 | } | 2801 | 2.48k | } | 2802 | 5.90k | } | 2803 | | | 2804 | 9.21k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 9.21k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 9.21k | const auto& result = results.back(); | 2811 | | | 2812 | 9.21k | if ( result.second != std::nullopt ) { | 2813 | 4.19k | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 4.19k | } | 2820 | | | 2821 | 9.21k | 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 | 9.21k | if ( options.disableTests == false ) { | 2830 | 9.21k | tests::test(op, result.second); | 2831 | 9.21k | } | 2832 | | | 2833 | 9.21k | postprocess(module, op, result); | 2834 | 9.21k | } | 2835 | | | 2836 | 3.47k | if ( options.noCompare == false ) { | 2837 | 3.31k | compare(operations, results, data, size); | 2838 | 3.31k | } | 2839 | 3.47k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 962 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 962 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 962 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 7.22k | do { | 2725 | 7.22k | auto op = getOp(&parentDs, data, size); | 2726 | 7.22k | auto module = getModule(parentDs); | 2727 | 7.22k | if ( module == nullptr ) { | 2728 | 4.43k | continue; | 2729 | 4.43k | } | 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 | 9 | break; | 2736 | 9 | } | 2737 | 7.21k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 962 | if ( operations.empty() == true ) { | 2740 | 30 | return; | 2741 | 30 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 932 | #if 1 | 2745 | 932 | { | 2746 | 932 | std::set<uint64_t> moduleIDs; | 2747 | 1.62k | for (const auto& m : modules ) { | 2748 | 1.62k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.62k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.62k | moduleIDs.insert(moduleID); | 2756 | 1.62k | } | 2757 | | | 2758 | 932 | std::set<uint64_t> operationModuleIDs; | 2759 | 2.63k | for (const auto& op : operations) { | 2760 | 2.63k | operationModuleIDs.insert(op.first->ID); | 2761 | 2.63k | } | 2762 | | | 2763 | 932 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 932 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 932 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 932 | for (const auto& id : addModuleIDs) { | 2768 | 752 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 752 | } | 2770 | 932 | } | 2771 | 932 | #endif | 2772 | | | 2773 | 932 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 932 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 4.31k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 3.38k | auto& operation = operations[i]; | 2782 | | | 2783 | 3.38k | auto& module = operation.first; | 2784 | 3.38k | auto& op = operation.second; | 2785 | | | 2786 | 3.38k | if ( i > 0 ) { | 2787 | 2.57k | auto& prevModule = operations[i-1].first; | 2788 | 2.57k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 2.57k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 1.66k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 1.66k | if ( curModifier.size() == 0 ) { | 2793 | 646k | for (size_t j = 0; j < 512; j++) { | 2794 | 645k | curModifier.push_back(1); | 2795 | 645k | } | 2796 | 1.26k | } else { | 2797 | 52.3k | for (auto& c : curModifier) { | 2798 | 52.3k | c++; | 2799 | 52.3k | } | 2800 | 401 | } | 2801 | 1.66k | } | 2802 | 2.57k | } | 2803 | | | 2804 | 3.38k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 3.38k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 3.38k | const auto& result = results.back(); | 2811 | | | 2812 | 3.38k | if ( result.second != std::nullopt ) { | 2813 | 2.11k | 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.11k | } | 2820 | | | 2821 | 3.38k | 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.38k | if ( options.disableTests == false ) { | 2830 | 3.38k | tests::test(op, result.second); | 2831 | 3.38k | } | 2832 | | | 2833 | 3.38k | postprocess(module, op, result); | 2834 | 3.38k | } | 2835 | | | 2836 | 932 | if ( options.noCompare == false ) { | 2837 | 812 | compare(operations, results, data, size); | 2838 | 812 | } | 2839 | 932 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.08k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.08k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.08k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 9.79k | do { | 2725 | 9.79k | auto op = getOp(&parentDs, data, size); | 2726 | 9.79k | auto module = getModule(parentDs); | 2727 | 9.79k | if ( module == nullptr ) { | 2728 | 4.82k | continue; | 2729 | 4.82k | } | 2730 | | | 2731 | 4.96k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 4.96k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 9.78k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.08k | if ( operations.empty() == true ) { | 2740 | 24 | return; | 2741 | 24 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 1.06k | #if 1 | 2745 | 1.06k | { | 2746 | 1.06k | std::set<uint64_t> moduleIDs; | 2747 | 1.86k | for (const auto& m : modules ) { | 2748 | 1.86k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.86k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.86k | moduleIDs.insert(moduleID); | 2756 | 1.86k | } | 2757 | | | 2758 | 1.06k | std::set<uint64_t> operationModuleIDs; | 2759 | 4.50k | for (const auto& op : operations) { | 2760 | 4.50k | operationModuleIDs.insert(op.first->ID); | 2761 | 4.50k | } | 2762 | | | 2763 | 1.06k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 1.06k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 1.06k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 1.06k | for (const auto& id : addModuleIDs) { | 2768 | 894 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 894 | } | 2770 | 1.06k | } | 2771 | 1.06k | #endif | 2772 | | | 2773 | 1.06k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 1.06k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 6.45k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 5.39k | auto& operation = operations[i]; | 2782 | | | 2783 | 5.39k | auto& module = operation.first; | 2784 | 5.39k | auto& op = operation.second; | 2785 | | | 2786 | 5.39k | if ( i > 0 ) { | 2787 | 4.46k | auto& prevModule = operations[i-1].first; | 2788 | 4.46k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 4.46k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 3.47k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 3.47k | if ( curModifier.size() == 0 ) { | 2793 | 1.45M | for (size_t j = 0; j < 512; j++) { | 2794 | 1.45M | curModifier.push_back(1); | 2795 | 1.45M | } | 2796 | 2.83k | } else { | 2797 | 11.3k | for (auto& c : curModifier) { | 2798 | 11.3k | c++; | 2799 | 11.3k | } | 2800 | 639 | } | 2801 | 3.47k | } | 2802 | 4.46k | } | 2803 | | | 2804 | 5.39k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 5.39k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 5.39k | const auto& result = results.back(); | 2811 | | | 2812 | 5.39k | if ( result.second != std::nullopt ) { | 2813 | 2.57k | 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.57k | } | 2820 | | | 2821 | 5.39k | 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 | 5.39k | if ( options.disableTests == false ) { | 2830 | 5.39k | tests::test(op, result.second); | 2831 | 5.39k | } | 2832 | | | 2833 | 5.39k | postprocess(module, op, result); | 2834 | 5.39k | } | 2835 | | | 2836 | 1.06k | if ( options.noCompare == false ) { | 2837 | 932 | compare(operations, results, data, size); | 2838 | 932 | } | 2839 | 1.06k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.72k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.72k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.72k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 9.70k | do { | 2725 | 9.70k | auto op = getOp(&parentDs, data, size); | 2726 | 9.70k | auto module = getModule(parentDs); | 2727 | 9.70k | if ( module == nullptr ) { | 2728 | 5.00k | continue; | 2729 | 5.00k | } | 2730 | | | 2731 | 4.70k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 4.70k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 9 | break; | 2736 | 9 | } | 2737 | 9.69k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.72k | if ( operations.empty() == true ) { | 2740 | 51 | return; | 2741 | 51 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 1.66k | #if 1 | 2745 | 1.66k | { | 2746 | 1.66k | std::set<uint64_t> moduleIDs; | 2747 | 3.08k | for (const auto& m : modules ) { | 2748 | 3.08k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 3.08k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 3.08k | moduleIDs.insert(moduleID); | 2756 | 3.08k | } | 2757 | | | 2758 | 1.66k | std::set<uint64_t> operationModuleIDs; | 2759 | 4.43k | for (const auto& op : operations) { | 2760 | 4.43k | operationModuleIDs.insert(op.first->ID); | 2761 | 4.43k | } | 2762 | | | 2763 | 1.66k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 1.66k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 1.66k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 1.66k | for (const auto& id : addModuleIDs) { | 2768 | 1.47k | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 1.47k | } | 2770 | 1.66k | } | 2771 | 1.66k | #endif | 2772 | | | 2773 | 1.66k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 1.66k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 7.58k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 5.91k | auto& operation = operations[i]; | 2782 | | | 2783 | 5.91k | auto& module = operation.first; | 2784 | 5.91k | auto& op = operation.second; | 2785 | | | 2786 | 5.91k | if ( i > 0 ) { | 2787 | 4.37k | auto& prevModule = operations[i-1].first; | 2788 | 4.37k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 4.37k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 2.74k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 2.74k | if ( curModifier.size() == 0 ) { | 2793 | 988k | for (size_t j = 0; j < 512; j++) { | 2794 | 986k | curModifier.push_back(1); | 2795 | 986k | } | 2796 | 1.92k | } else { | 2797 | 5.35k | for (auto& c : curModifier) { | 2798 | 5.35k | c++; | 2799 | 5.35k | } | 2800 | 820 | } | 2801 | 2.74k | } | 2802 | 4.37k | } | 2803 | | | 2804 | 5.91k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 5.91k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 5.91k | const auto& result = results.back(); | 2811 | | | 2812 | 5.91k | if ( result.second != std::nullopt ) { | 2813 | 2.46k | 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.46k | } | 2820 | | | 2821 | 5.91k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 5.91k | if ( options.disableTests == false ) { | 2830 | 5.91k | tests::test(op, result.second); | 2831 | 5.91k | } | 2832 | | | 2833 | 5.91k | postprocess(module, op, result); | 2834 | 5.91k | } | 2835 | | | 2836 | 1.66k | if ( options.noCompare == false ) { | 2837 | 1.54k | compare(operations, results, data, size); | 2838 | 1.54k | } | 2839 | 1.66k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 6.33k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 6.33k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 6.33k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 32.2k | do { | 2725 | 32.2k | auto op = getOp(&parentDs, data, size); | 2726 | 32.2k | auto module = getModule(parentDs); | 2727 | 32.2k | if ( module == nullptr ) { | 2728 | 12.4k | continue; | 2729 | 12.4k | } | 2730 | | | 2731 | 19.7k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 19.7k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 19 | break; | 2736 | 19 | } | 2737 | 32.2k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 6.33k | if ( operations.empty() == true ) { | 2740 | 41 | return; | 2741 | 41 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 6.29k | #if 1 | 2745 | 6.29k | { | 2746 | 6.29k | std::set<uint64_t> moduleIDs; | 2747 | 12.3k | for (const auto& m : modules ) { | 2748 | 12.3k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 12.3k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 12.3k | moduleIDs.insert(moduleID); | 2756 | 12.3k | } | 2757 | | | 2758 | 6.29k | std::set<uint64_t> operationModuleIDs; | 2759 | 19.3k | for (const auto& op : operations) { | 2760 | 19.3k | operationModuleIDs.insert(op.first->ID); | 2761 | 19.3k | } | 2762 | | | 2763 | 6.29k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 6.29k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 6.29k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 6.29k | for (const auto& id : addModuleIDs) { | 2768 | 6.03k | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 6.03k | } | 2770 | 6.29k | } | 2771 | 6.29k | #endif | 2772 | | | 2773 | 6.29k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 6.29k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 31.6k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 25.3k | auto& operation = operations[i]; | 2782 | | | 2783 | 25.3k | auto& module = operation.first; | 2784 | 25.3k | auto& op = operation.second; | 2785 | | | 2786 | 25.3k | if ( i > 0 ) { | 2787 | 19.1k | auto& prevModule = operations[i-1].first; | 2788 | 19.1k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 19.1k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 12.8k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 12.8k | if ( curModifier.size() == 0 ) { | 2793 | 5.07M | for (size_t j = 0; j < 512; j++) { | 2794 | 5.06M | curModifier.push_back(1); | 2795 | 5.06M | } | 2796 | 9.89k | } else { | 2797 | 50.5k | for (auto& c : curModifier) { | 2798 | 50.5k | c++; | 2799 | 50.5k | } | 2800 | 2.91k | } | 2801 | 12.8k | } | 2802 | 19.1k | } | 2803 | | | 2804 | 25.3k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 25.3k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 25.3k | const auto& result = results.back(); | 2811 | | | 2812 | 25.3k | if ( result.second != std::nullopt ) { | 2813 | 7.77k | 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.77k | } | 2820 | | | 2821 | 25.3k | 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 | 25.3k | if ( options.disableTests == false ) { | 2830 | 25.3k | tests::test(op, result.second); | 2831 | 25.3k | } | 2832 | | | 2833 | 25.3k | postprocess(module, op, result); | 2834 | 25.3k | } | 2835 | | | 2836 | 6.29k | if ( options.noCompare == false ) { | 2837 | 6.15k | compare(operations, results, data, size); | 2838 | 6.15k | } | 2839 | 6.29k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 4.07k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 4.07k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 4.07k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 21.2k | do { | 2725 | 21.2k | auto op = getOp(&parentDs, data, size); | 2726 | 21.2k | auto module = getModule(parentDs); | 2727 | 21.2k | if ( module == nullptr ) { | 2728 | 7.86k | continue; | 2729 | 7.86k | } | 2730 | | | 2731 | 13.4k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 13.4k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 13 | break; | 2736 | 13 | } | 2737 | 21.2k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 4.07k | if ( operations.empty() == true ) { | 2740 | 29 | return; | 2741 | 29 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 4.04k | #if 1 | 2745 | 4.04k | { | 2746 | 4.04k | std::set<uint64_t> moduleIDs; | 2747 | 7.79k | for (const auto& m : modules ) { | 2748 | 7.79k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 7.79k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 7.79k | moduleIDs.insert(moduleID); | 2756 | 7.79k | } | 2757 | | | 2758 | 4.04k | std::set<uint64_t> operationModuleIDs; | 2759 | 13.0k | for (const auto& op : operations) { | 2760 | 13.0k | operationModuleIDs.insert(op.first->ID); | 2761 | 13.0k | } | 2762 | | | 2763 | 4.04k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 4.04k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 4.04k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 4.04k | for (const auto& id : addModuleIDs) { | 2768 | 3.78k | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 3.78k | } | 2770 | 4.04k | } | 2771 | 4.04k | #endif | 2772 | | | 2773 | 4.04k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 4.04k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 20.8k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 16.8k | auto& operation = operations[i]; | 2782 | | | 2783 | 16.8k | auto& module = operation.first; | 2784 | 16.8k | auto& op = operation.second; | 2785 | | | 2786 | 16.8k | if ( i > 0 ) { | 2787 | 12.9k | auto& prevModule = operations[i-1].first; | 2788 | 12.9k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 12.9k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 8.90k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 8.90k | if ( curModifier.size() == 0 ) { | 2793 | 3.44M | for (size_t j = 0; j < 512; j++) { | 2794 | 3.44M | curModifier.push_back(1); | 2795 | 3.44M | } | 2796 | 6.71k | } else { | 2797 | 26.3k | for (auto& c : curModifier) { | 2798 | 26.3k | c++; | 2799 | 26.3k | } | 2800 | 2.18k | } | 2801 | 8.90k | } | 2802 | 12.9k | } | 2803 | | | 2804 | 16.8k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 16.8k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 16.8k | const auto& result = results.back(); | 2811 | | | 2812 | 16.8k | if ( result.second != std::nullopt ) { | 2813 | 1.28k | 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.28k | } | 2820 | | | 2821 | 16.8k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 16.8k | if ( options.disableTests == false ) { | 2830 | 16.8k | tests::test(op, result.second); | 2831 | 16.8k | } | 2832 | | | 2833 | 16.8k | postprocess(module, op, result); | 2834 | 16.8k | } | 2835 | | | 2836 | 4.04k | if ( options.noCompare == false ) { | 2837 | 3.89k | compare(operations, results, data, size); | 2838 | 3.89k | } | 2839 | 4.04k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 398 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 398 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 398 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.11k | do { | 2725 | 5.11k | auto op = getOp(&parentDs, data, size); | 2726 | 5.11k | auto module = getModule(parentDs); | 2727 | 5.11k | if ( module == nullptr ) { | 2728 | 3.56k | continue; | 2729 | 3.56k | } | 2730 | | | 2731 | 1.54k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.54k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 5.10k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 398 | if ( operations.empty() == true ) { | 2740 | 29 | return; | 2741 | 29 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 369 | #if 1 | 2745 | 369 | { | 2746 | 369 | std::set<uint64_t> moduleIDs; | 2747 | 516 | for (const auto& m : modules ) { | 2748 | 516 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 516 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 516 | moduleIDs.insert(moduleID); | 2756 | 516 | } | 2757 | | | 2758 | 369 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.23k | for (const auto& op : operations) { | 2760 | 1.23k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.23k | } | 2762 | | | 2763 | 369 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 369 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 369 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 369 | for (const auto& id : addModuleIDs) { | 2768 | 224 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 224 | } | 2770 | 369 | } | 2771 | 369 | #endif | 2772 | | | 2773 | 369 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 369 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.82k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.45k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.45k | auto& module = operation.first; | 2784 | 1.45k | auto& op = operation.second; | 2785 | | | 2786 | 1.45k | if ( i > 0 ) { | 2787 | 1.19k | auto& prevModule = operations[i-1].first; | 2788 | 1.19k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 1.19k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 866 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 866 | if ( curModifier.size() == 0 ) { | 2793 | 337k | for (size_t j = 0; j < 512; j++) { | 2794 | 336k | curModifier.push_back(1); | 2795 | 336k | } | 2796 | 658 | } else { | 2797 | 1.38k | for (auto& c : curModifier) { | 2798 | 1.38k | c++; | 2799 | 1.38k | } | 2800 | 208 | } | 2801 | 866 | } | 2802 | 1.19k | } | 2803 | | | 2804 | 1.45k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.45k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.45k | const auto& result = results.back(); | 2811 | | | 2812 | 1.45k | if ( result.second != std::nullopt ) { | 2813 | 457 | 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 | 457 | } | 2820 | | | 2821 | 1.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 | 1.45k | if ( options.disableTests == false ) { | 2830 | 1.45k | tests::test(op, result.second); | 2831 | 1.45k | } | 2832 | | | 2833 | 1.45k | postprocess(module, op, result); | 2834 | 1.45k | } | 2835 | | | 2836 | 369 | if ( options.noCompare == false ) { | 2837 | 258 | compare(operations, results, data, size); | 2838 | 258 | } | 2839 | 369 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 3.10k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 3.10k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 3.10k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 13.8k | do { | 2725 | 13.8k | auto op = getOp(&parentDs, data, size); | 2726 | 13.8k | auto module = getModule(parentDs); | 2727 | 13.8k | if ( module == nullptr ) { | 2728 | 6.18k | continue; | 2729 | 6.18k | } | 2730 | | | 2731 | 7.65k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 7.65k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 9 | break; | 2736 | 9 | } | 2737 | 13.8k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 3.10k | if ( operations.empty() == true ) { | 2740 | 105 | return; | 2741 | 105 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 2.99k | #if 1 | 2745 | 2.99k | { | 2746 | 2.99k | std::set<uint64_t> moduleIDs; | 2747 | 5.58k | for (const auto& m : modules ) { | 2748 | 5.58k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 5.58k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 5.58k | moduleIDs.insert(moduleID); | 2756 | 5.58k | } | 2757 | | | 2758 | 2.99k | std::set<uint64_t> operationModuleIDs; | 2759 | 7.26k | for (const auto& op : operations) { | 2760 | 7.26k | operationModuleIDs.insert(op.first->ID); | 2761 | 7.26k | } | 2762 | | | 2763 | 2.99k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 2.99k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 2.99k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 2.99k | for (const auto& id : addModuleIDs) { | 2768 | 2.71k | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 2.71k | } | 2770 | 2.99k | } | 2771 | 2.99k | #endif | 2772 | | | 2773 | 2.99k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 2.99k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 12.9k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 9.97k | auto& operation = operations[i]; | 2782 | | | 2783 | 9.97k | auto& module = operation.first; | 2784 | 9.97k | auto& op = operation.second; | 2785 | | | 2786 | 9.97k | if ( i > 0 ) { | 2787 | 7.18k | auto& prevModule = operations[i-1].first; | 2788 | 7.18k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 7.18k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 4.26k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 4.26k | if ( curModifier.size() == 0 ) { | 2793 | 1.66M | for (size_t j = 0; j < 512; j++) { | 2794 | 1.65M | curModifier.push_back(1); | 2795 | 1.65M | } | 2796 | 3.23k | } else { | 2797 | 3.73k | for (auto& c : curModifier) { | 2798 | 3.73k | c++; | 2799 | 3.73k | } | 2800 | 1.02k | } | 2801 | 4.26k | } | 2802 | 7.18k | } | 2803 | | | 2804 | 9.97k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 9.97k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 9.97k | const auto& result = results.back(); | 2811 | | | 2812 | 9.97k | if ( result.second != std::nullopt ) { | 2813 | 4.95k | 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 | 4.95k | } | 2820 | | | 2821 | 9.97k | 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 | 9.97k | if ( options.disableTests == false ) { | 2830 | 9.97k | tests::test(op, result.second); | 2831 | 9.97k | } | 2832 | | | 2833 | 9.97k | postprocess(module, op, result); | 2834 | 9.97k | } | 2835 | | | 2836 | 2.99k | if ( options.noCompare == false ) { | 2837 | 2.79k | compare(operations, results, data, size); | 2838 | 2.79k | } | 2839 | 2.99k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 354 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 354 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 354 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.51k | do { | 2725 | 5.51k | auto op = getOp(&parentDs, data, size); | 2726 | 5.51k | auto module = getModule(parentDs); | 2727 | 5.51k | if ( module == nullptr ) { | 2728 | 4.37k | continue; | 2729 | 4.37k | } | 2730 | | | 2731 | 1.14k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.14k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 5.50k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 354 | if ( operations.empty() == true ) { | 2740 | 37 | return; | 2741 | 37 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 317 | #if 1 | 2745 | 317 | { | 2746 | 317 | std::set<uint64_t> moduleIDs; | 2747 | 356 | for (const auto& m : modules ) { | 2748 | 356 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 356 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 356 | moduleIDs.insert(moduleID); | 2756 | 356 | } | 2757 | | | 2758 | 317 | std::set<uint64_t> operationModuleIDs; | 2759 | 716 | for (const auto& op : operations) { | 2760 | 716 | operationModuleIDs.insert(op.first->ID); | 2761 | 716 | } | 2762 | | | 2763 | 317 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 317 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 317 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 317 | for (const auto& id : addModuleIDs) { | 2768 | 140 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 140 | } | 2770 | 317 | } | 2771 | 317 | #endif | 2772 | | | 2773 | 317 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 317 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.17k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 856 | auto& operation = operations[i]; | 2782 | | | 2783 | 856 | auto& module = operation.first; | 2784 | 856 | auto& op = operation.second; | 2785 | | | 2786 | 856 | if ( i > 0 ) { | 2787 | 678 | auto& prevModule = operations[i-1].first; | 2788 | 678 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 678 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 359 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 359 | if ( curModifier.size() == 0 ) { | 2793 | 102k | for (size_t j = 0; j < 512; j++) { | 2794 | 101k | curModifier.push_back(1); | 2795 | 101k | } | 2796 | 199 | } else { | 2797 | 1.01k | for (auto& c : curModifier) { | 2798 | 1.01k | c++; | 2799 | 1.01k | } | 2800 | 160 | } | 2801 | 359 | } | 2802 | 678 | } | 2803 | | | 2804 | 856 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 856 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 856 | const auto& result = results.back(); | 2811 | | | 2812 | 856 | 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 | 856 | 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 | 856 | if ( options.disableTests == false ) { | 2830 | 856 | tests::test(op, result.second); | 2831 | 856 | } | 2832 | | | 2833 | 856 | postprocess(module, op, result); | 2834 | 856 | } | 2835 | | | 2836 | 317 | if ( options.noCompare == false ) { | 2837 | 178 | compare(operations, results, data, size); | 2838 | 178 | } | 2839 | 317 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 224 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 224 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 224 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.64k | do { | 2725 | 4.64k | auto op = getOp(&parentDs, data, size); | 2726 | 4.64k | auto module = getModule(parentDs); | 2727 | 4.64k | if ( module == nullptr ) { | 2728 | 3.73k | continue; | 2729 | 3.73k | } | 2730 | | | 2731 | 914 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 914 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 4.64k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 224 | if ( operations.empty() == true ) { | 2740 | 20 | return; | 2741 | 20 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 204 | #if 1 | 2745 | 204 | { | 2746 | 204 | std::set<uint64_t> moduleIDs; | 2747 | 212 | for (const auto& m : modules ) { | 2748 | 212 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 212 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 212 | moduleIDs.insert(moduleID); | 2756 | 212 | } | 2757 | | | 2758 | 204 | std::set<uint64_t> operationModuleIDs; | 2759 | 674 | for (const auto& op : operations) { | 2760 | 674 | operationModuleIDs.insert(op.first->ID); | 2761 | 674 | } | 2762 | | | 2763 | 204 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 204 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 204 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 204 | for (const auto& id : addModuleIDs) { | 2768 | 54 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 54 | } | 2770 | 204 | } | 2771 | 204 | #endif | 2772 | | | 2773 | 204 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 204 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 932 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 728 | auto& operation = operations[i]; | 2782 | | | 2783 | 728 | auto& module = operation.first; | 2784 | 728 | auto& op = operation.second; | 2785 | | | 2786 | 728 | if ( i > 0 ) { | 2787 | 622 | auto& prevModule = operations[i-1].first; | 2788 | 622 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 622 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 411 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 411 | if ( curModifier.size() == 0 ) { | 2793 | 106k | for (size_t j = 0; j < 512; j++) { | 2794 | 106k | curModifier.push_back(1); | 2795 | 106k | } | 2796 | 208 | } else { | 2797 | 1.38k | for (auto& c : curModifier) { | 2798 | 1.38k | c++; | 2799 | 1.38k | } | 2800 | 203 | } | 2801 | 411 | } | 2802 | 622 | } | 2803 | | | 2804 | 728 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 728 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 728 | const auto& result = results.back(); | 2811 | | | 2812 | 728 | 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 | 728 | 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 | 728 | if ( options.disableTests == false ) { | 2830 | 728 | tests::test(op, result.second); | 2831 | 728 | } | 2832 | | | 2833 | 728 | postprocess(module, op, result); | 2834 | 728 | } | 2835 | | | 2836 | 204 | if ( options.noCompare == false ) { | 2837 | 106 | compare(operations, results, data, size); | 2838 | 106 | } | 2839 | 204 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 298 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 298 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 298 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.96k | do { | 2725 | 4.96k | auto op = getOp(&parentDs, data, size); | 2726 | 4.96k | auto module = getModule(parentDs); | 2727 | 4.96k | if ( module == nullptr ) { | 2728 | 3.97k | continue; | 2729 | 3.97k | } | 2730 | | | 2731 | 988 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 988 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 4.95k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 298 | if ( operations.empty() == true ) { | 2740 | 43 | return; | 2741 | 43 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 255 | #if 1 | 2745 | 255 | { | 2746 | 255 | std::set<uint64_t> moduleIDs; | 2747 | 255 | 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 | 255 | std::set<uint64_t> operationModuleIDs; | 2759 | 643 | for (const auto& op : operations) { | 2760 | 643 | operationModuleIDs.insert(op.first->ID); | 2761 | 643 | } | 2762 | | | 2763 | 255 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 255 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 255 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 255 | for (const auto& id : addModuleIDs) { | 2768 | 73 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 73 | } | 2770 | 255 | } | 2771 | 255 | #endif | 2772 | | | 2773 | 255 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 255 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 971 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 716 | auto& operation = operations[i]; | 2782 | | | 2783 | 716 | auto& module = operation.first; | 2784 | 716 | auto& op = operation.second; | 2785 | | | 2786 | 716 | if ( i > 0 ) { | 2787 | 604 | auto& prevModule = operations[i-1].first; | 2788 | 604 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 604 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 420 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 420 | if ( curModifier.size() == 0 ) { | 2793 | 88.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 88.0k | curModifier.push_back(1); | 2795 | 88.0k | } | 2796 | 248 | } else { | 2797 | 1.48k | for (auto& c : curModifier) { | 2798 | 1.48k | c++; | 2799 | 1.48k | } | 2800 | 248 | } | 2801 | 420 | } | 2802 | 604 | } | 2803 | | | 2804 | 716 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 716 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 716 | const auto& result = results.back(); | 2811 | | | 2812 | 716 | 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 | 716 | 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 | 716 | if ( options.disableTests == false ) { | 2830 | 716 | tests::test(op, result.second); | 2831 | 716 | } | 2832 | | | 2833 | 716 | postprocess(module, op, result); | 2834 | 716 | } | 2835 | | | 2836 | 255 | if ( options.noCompare == false ) { | 2837 | 112 | compare(operations, results, data, size); | 2838 | 112 | } | 2839 | 255 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.20k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.20k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.20k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 7.04k | do { | 2725 | 7.04k | auto op = getOp(&parentDs, data, size); | 2726 | 7.04k | auto module = getModule(parentDs); | 2727 | 7.04k | if ( module == nullptr ) { | 2728 | 4.13k | continue; | 2729 | 4.13k | } | 2730 | | | 2731 | 2.91k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 2.91k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 7.04k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.20k | if ( operations.empty() == true ) { | 2740 | 29 | return; | 2741 | 29 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 1.17k | #if 1 | 2745 | 1.17k | { | 2746 | 1.17k | std::set<uint64_t> moduleIDs; | 2747 | 2.10k | for (const auto& m : modules ) { | 2748 | 2.10k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 2.10k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 2.10k | moduleIDs.insert(moduleID); | 2756 | 2.10k | } | 2757 | | | 2758 | 1.17k | std::set<uint64_t> operationModuleIDs; | 2759 | 2.61k | for (const auto& op : operations) { | 2760 | 2.61k | operationModuleIDs.insert(op.first->ID); | 2761 | 2.61k | } | 2762 | | | 2763 | 1.17k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 1.17k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 1.17k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 1.17k | for (const auto& id : addModuleIDs) { | 2768 | 1.00k | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 1.00k | } | 2770 | 1.17k | } | 2771 | 1.17k | #endif | 2772 | | | 2773 | 1.17k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 1.17k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 4.79k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 3.62k | auto& operation = operations[i]; | 2782 | | | 2783 | 3.62k | auto& module = operation.first; | 2784 | 3.62k | auto& op = operation.second; | 2785 | | | 2786 | 3.62k | if ( i > 0 ) { | 2787 | 2.57k | auto& prevModule = operations[i-1].first; | 2788 | 2.57k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 2.57k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 1.43k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 1.43k | if ( curModifier.size() == 0 ) { | 2793 | 555k | for (size_t j = 0; j < 512; j++) { | 2794 | 553k | curModifier.push_back(1); | 2795 | 553k | } | 2796 | 1.08k | } else { | 2797 | 71.5k | for (auto& c : curModifier) { | 2798 | 71.5k | c++; | 2799 | 71.5k | } | 2800 | 349 | } | 2801 | 1.43k | } | 2802 | 2.57k | } | 2803 | | | 2804 | 3.62k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 3.62k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 3.62k | const auto& result = results.back(); | 2811 | | | 2812 | 3.62k | if ( result.second != std::nullopt ) { | 2813 | 1.68k | 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.68k | } | 2820 | | | 2821 | 3.62k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 3.62k | if ( options.disableTests == false ) { | 2830 | 3.62k | tests::test(op, result.second); | 2831 | 3.62k | } | 2832 | | | 2833 | 3.62k | postprocess(module, op, result); | 2834 | 3.62k | } | 2835 | | | 2836 | 1.17k | if ( options.noCompare == false ) { | 2837 | 1.05k | compare(operations, results, data, size); | 2838 | 1.05k | } | 2839 | 1.17k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 667 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 667 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 667 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.23k | do { | 2725 | 5.23k | auto op = getOp(&parentDs, data, size); | 2726 | 5.23k | auto module = getModule(parentDs); | 2727 | 5.23k | if ( module == nullptr ) { | 2728 | 4.34k | continue; | 2729 | 4.34k | } | 2730 | | | 2731 | 890 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 890 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 96 | break; | 2736 | 96 | } | 2737 | 5.14k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 667 | if ( operations.empty() == true ) { | 2740 | 46 | return; | 2741 | 46 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 621 | #if 1 | 2745 | 621 | { | 2746 | 621 | std::set<uint64_t> moduleIDs; | 2747 | 996 | for (const auto& m : modules ) { | 2748 | 996 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 996 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 996 | moduleIDs.insert(moduleID); | 2756 | 996 | } | 2757 | | | 2758 | 621 | std::set<uint64_t> operationModuleIDs; | 2759 | 750 | for (const auto& op : operations) { | 2760 | 750 | operationModuleIDs.insert(op.first->ID); | 2761 | 750 | } | 2762 | | | 2763 | 621 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 621 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 621 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 621 | for (const auto& id : addModuleIDs) { | 2768 | 486 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 486 | } | 2770 | 621 | } | 2771 | 621 | #endif | 2772 | | | 2773 | 621 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 621 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.85k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.23k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.23k | auto& module = operation.first; | 2784 | 1.23k | auto& op = operation.second; | 2785 | | | 2786 | 1.23k | if ( i > 0 ) { | 2787 | 738 | auto& prevModule = operations[i-1].first; | 2788 | 738 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 738 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 238 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 238 | if ( curModifier.size() == 0 ) { | 2793 | 102k | for (size_t j = 0; j < 512; j++) { | 2794 | 102k | curModifier.push_back(1); | 2795 | 102k | } | 2796 | 200 | } else { | 2797 | 973 | for (auto& c : curModifier) { | 2798 | 973 | c++; | 2799 | 973 | } | 2800 | 38 | } | 2801 | 238 | } | 2802 | 738 | } | 2803 | | | 2804 | 1.23k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.23k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.23k | const auto& result = results.back(); | 2811 | | | 2812 | 1.23k | if ( result.second != std::nullopt ) { | 2813 | 588 | 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 | 588 | } | 2820 | | | 2821 | 1.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 | 1.23k | if ( options.disableTests == false ) { | 2830 | 1.23k | tests::test(op, result.second); | 2831 | 1.23k | } | 2832 | | | 2833 | 1.23k | postprocess(module, op, result); | 2834 | 1.23k | } | 2835 | | | 2836 | 621 | if ( options.noCompare == false ) { | 2837 | 498 | compare(operations, results, data, size); | 2838 | 498 | } | 2839 | 621 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 224 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 224 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 224 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.97k | do { | 2725 | 4.97k | auto op = getOp(&parentDs, data, size); | 2726 | 4.97k | auto module = getModule(parentDs); | 2727 | 4.97k | if ( module == nullptr ) { | 2728 | 4.16k | continue; | 2729 | 4.16k | } | 2730 | | | 2731 | 812 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 812 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 4.97k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 224 | if ( operations.empty() == true ) { | 2740 | 12 | return; | 2741 | 12 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 212 | #if 1 | 2745 | 212 | { | 2746 | 212 | std::set<uint64_t> moduleIDs; | 2747 | 212 | for (const auto& m : modules ) { | 2748 | 168 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 168 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 168 | moduleIDs.insert(moduleID); | 2756 | 168 | } | 2757 | | | 2758 | 212 | std::set<uint64_t> operationModuleIDs; | 2759 | 491 | for (const auto& op : operations) { | 2760 | 491 | operationModuleIDs.insert(op.first->ID); | 2761 | 491 | } | 2762 | | | 2763 | 212 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 212 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 212 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 212 | for (const auto& id : addModuleIDs) { | 2768 | 54 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 54 | } | 2770 | 212 | } | 2771 | 212 | #endif | 2772 | | | 2773 | 212 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 212 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 757 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 545 | auto& operation = operations[i]; | 2782 | | | 2783 | 545 | auto& module = operation.first; | 2784 | 545 | auto& op = operation.second; | 2785 | | | 2786 | 545 | if ( i > 0 ) { | 2787 | 461 | auto& prevModule = operations[i-1].first; | 2788 | 461 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 461 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 332 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 332 | if ( curModifier.size() == 0 ) { | 2793 | 113k | for (size_t j = 0; j < 512; j++) { | 2794 | 113k | curModifier.push_back(1); | 2795 | 113k | } | 2796 | 222 | } else { | 2797 | 1.34k | for (auto& c : curModifier) { | 2798 | 1.34k | c++; | 2799 | 1.34k | } | 2800 | 110 | } | 2801 | 332 | } | 2802 | 461 | } | 2803 | | | 2804 | 545 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 545 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 545 | const auto& result = results.back(); | 2811 | | | 2812 | 545 | 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 | 545 | 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 | 545 | if ( options.disableTests == false ) { | 2830 | 545 | tests::test(op, result.second); | 2831 | 545 | } | 2832 | | | 2833 | 545 | postprocess(module, op, result); | 2834 | 545 | } | 2835 | | | 2836 | 212 | if ( options.noCompare == false ) { | 2837 | 84 | compare(operations, results, data, size); | 2838 | 84 | } | 2839 | 212 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 238 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 238 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 238 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.97k | do { | 2725 | 4.97k | auto op = getOp(&parentDs, data, size); | 2726 | 4.97k | auto module = getModule(parentDs); | 2727 | 4.97k | if ( module == nullptr ) { | 2728 | 3.84k | continue; | 2729 | 3.84k | } | 2730 | | | 2731 | 1.12k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.12k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 4.96k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 238 | if ( operations.empty() == true ) { | 2740 | 15 | return; | 2741 | 15 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 223 | #if 1 | 2745 | 223 | { | 2746 | 223 | std::set<uint64_t> moduleIDs; | 2747 | 223 | for (const auto& m : modules ) { | 2748 | 212 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 212 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 212 | moduleIDs.insert(moduleID); | 2756 | 212 | } | 2757 | | | 2758 | 223 | std::set<uint64_t> operationModuleIDs; | 2759 | 760 | for (const auto& op : operations) { | 2760 | 760 | operationModuleIDs.insert(op.first->ID); | 2761 | 760 | } | 2762 | | | 2763 | 223 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 223 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 223 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 223 | for (const auto& id : addModuleIDs) { | 2768 | 66 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 66 | } | 2770 | 223 | } | 2771 | 223 | #endif | 2772 | | | 2773 | 223 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 223 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.04k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 826 | auto& operation = operations[i]; | 2782 | | | 2783 | 826 | auto& module = operation.first; | 2784 | 826 | auto& op = operation.second; | 2785 | | | 2786 | 826 | if ( i > 0 ) { | 2787 | 720 | auto& prevModule = operations[i-1].first; | 2788 | 720 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 720 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 520 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 520 | if ( curModifier.size() == 0 ) { | 2793 | 145k | for (size_t j = 0; j < 512; j++) { | 2794 | 144k | curModifier.push_back(1); | 2795 | 144k | } | 2796 | 283 | } else { | 2797 | 1.22k | for (auto& c : curModifier) { | 2798 | 1.22k | c++; | 2799 | 1.22k | } | 2800 | 237 | } | 2801 | 520 | } | 2802 | 720 | } | 2803 | | | 2804 | 826 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 826 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 826 | const auto& result = results.back(); | 2811 | | | 2812 | 826 | 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 | 826 | 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 | 826 | if ( options.disableTests == false ) { | 2830 | 826 | tests::test(op, result.second); | 2831 | 826 | } | 2832 | | | 2833 | 826 | postprocess(module, op, result); | 2834 | 826 | } | 2835 | | | 2836 | 223 | if ( options.noCompare == false ) { | 2837 | 106 | compare(operations, results, data, size); | 2838 | 106 | } | 2839 | 223 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 221 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 221 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 221 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.97k | do { | 2725 | 4.97k | auto op = getOp(&parentDs, data, size); | 2726 | 4.97k | auto module = getModule(parentDs); | 2727 | 4.97k | if ( module == nullptr ) { | 2728 | 4.75k | continue; | 2729 | 4.75k | } | 2730 | | | 2731 | 214 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 214 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 32 | break; | 2736 | 32 | } | 2737 | 4.93k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 221 | if ( operations.empty() == true ) { | 2740 | 22 | return; | 2741 | 22 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 199 | #if 1 | 2745 | 199 | { | 2746 | 199 | std::set<uint64_t> moduleIDs; | 2747 | 199 | for (const auto& m : modules ) { | 2748 | 186 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 186 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 186 | moduleIDs.insert(moduleID); | 2756 | 186 | } | 2757 | | | 2758 | 199 | std::set<uint64_t> operationModuleIDs; | 2759 | 199 | for (const auto& op : operations) { | 2760 | 125 | operationModuleIDs.insert(op.first->ID); | 2761 | 125 | } | 2762 | | | 2763 | 199 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 199 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 199 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 199 | for (const auto& id : addModuleIDs) { | 2768 | 88 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 88 | } | 2770 | 199 | } | 2771 | 199 | #endif | 2772 | | | 2773 | 199 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 199 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 412 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 213 | auto& operation = operations[i]; | 2782 | | | 2783 | 213 | auto& module = operation.first; | 2784 | 213 | auto& op = operation.second; | 2785 | | | 2786 | 213 | if ( i > 0 ) { | 2787 | 120 | auto& prevModule = operations[i-1].first; | 2788 | 120 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 120 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 27 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 27 | 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 | 16 | } else { | 2797 | 524 | for (auto& c : curModifier) { | 2798 | 524 | c++; | 2799 | 524 | } | 2800 | 16 | } | 2801 | 27 | } | 2802 | 120 | } | 2803 | | | 2804 | 213 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 213 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 213 | const auto& result = results.back(); | 2811 | | | 2812 | 213 | if ( result.second != std::nullopt ) { | 2813 | 68 | 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 | 68 | } | 2820 | | | 2821 | 213 | 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 | 213 | if ( options.disableTests == false ) { | 2830 | 213 | tests::test(op, result.second); | 2831 | 213 | } | 2832 | | | 2833 | 213 | postprocess(module, op, result); | 2834 | 213 | } | 2835 | | | 2836 | 199 | if ( options.noCompare == false ) { | 2837 | 93 | compare(operations, results, data, size); | 2838 | 93 | } | 2839 | 199 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 833 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 833 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 833 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 6.80k | do { | 2725 | 6.80k | auto op = getOp(&parentDs, data, size); | 2726 | 6.80k | auto module = getModule(parentDs); | 2727 | 6.80k | if ( module == nullptr ) { | 2728 | 4.16k | continue; | 2729 | 4.16k | } | 2730 | | | 2731 | 2.63k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 2.63k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 6.79k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 833 | if ( operations.empty() == true ) { | 2740 | 29 | return; | 2741 | 29 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 804 | #if 1 | 2745 | 804 | { | 2746 | 804 | std::set<uint64_t> moduleIDs; | 2747 | 1.36k | 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 | 804 | std::set<uint64_t> operationModuleIDs; | 2759 | 2.30k | for (const auto& op : operations) { | 2760 | 2.30k | operationModuleIDs.insert(op.first->ID); | 2761 | 2.30k | } | 2762 | | | 2763 | 804 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 804 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 804 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 804 | for (const auto& id : addModuleIDs) { | 2768 | 642 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 642 | } | 2770 | 804 | } | 2771 | 804 | #endif | 2772 | | | 2773 | 804 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 804 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 3.75k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 2.94k | auto& operation = operations[i]; | 2782 | | | 2783 | 2.94k | auto& module = operation.first; | 2784 | 2.94k | auto& op = operation.second; | 2785 | | | 2786 | 2.94k | if ( i > 0 ) { | 2787 | 2.26k | auto& prevModule = operations[i-1].first; | 2788 | 2.26k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 2.26k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 1.52k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 1.52k | if ( curModifier.size() == 0 ) { | 2793 | 595k | for (size_t j = 0; j < 512; j++) { | 2794 | 594k | curModifier.push_back(1); | 2795 | 594k | } | 2796 | 1.16k | } else { | 2797 | 38.9k | for (auto& c : curModifier) { | 2798 | 38.9k | c++; | 2799 | 38.9k | } | 2800 | 361 | } | 2801 | 1.52k | } | 2802 | 2.26k | } | 2803 | | | 2804 | 2.94k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 2.94k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 2.94k | const auto& result = results.back(); | 2811 | | | 2812 | 2.94k | if ( result.second != std::nullopt ) { | 2813 | 1.37k | 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.37k | } | 2820 | | | 2821 | 2.94k | 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.94k | if ( options.disableTests == false ) { | 2830 | 2.94k | tests::test(op, result.second); | 2831 | 2.94k | } | 2832 | | | 2833 | 2.94k | postprocess(module, op, result); | 2834 | 2.94k | } | 2835 | | | 2836 | 804 | if ( options.noCompare == false ) { | 2837 | 681 | compare(operations, results, data, size); | 2838 | 681 | } | 2839 | 804 | } |
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 | 267 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 267 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 267 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.51k | do { | 2725 | 4.51k | auto op = getOp(&parentDs, data, size); | 2726 | 4.51k | auto module = getModule(parentDs); | 2727 | 4.51k | if ( module == nullptr ) { | 2728 | 3.40k | continue; | 2729 | 3.40k | } | 2730 | | | 2731 | 1.11k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.11k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 4.50k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 267 | if ( operations.empty() == true ) { | 2740 | 19 | return; | 2741 | 19 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 248 | #if 1 | 2745 | 248 | { | 2746 | 248 | std::set<uint64_t> moduleIDs; | 2747 | 248 | for (const auto& m : modules ) { | 2748 | 226 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 226 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 226 | moduleIDs.insert(moduleID); | 2756 | 226 | } | 2757 | | | 2758 | 248 | std::set<uint64_t> operationModuleIDs; | 2759 | 721 | for (const auto& op : operations) { | 2760 | 721 | operationModuleIDs.insert(op.first->ID); | 2761 | 721 | } | 2762 | | | 2763 | 248 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 248 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 248 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 248 | for (const auto& id : addModuleIDs) { | 2768 | 67 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 67 | } | 2770 | 248 | } | 2771 | 248 | #endif | 2772 | | | 2773 | 248 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 248 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.03k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 788 | auto& operation = operations[i]; | 2782 | | | 2783 | 788 | auto& module = operation.first; | 2784 | 788 | auto& op = operation.second; | 2785 | | | 2786 | 788 | if ( i > 0 ) { | 2787 | 675 | auto& prevModule = operations[i-1].first; | 2788 | 675 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 675 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 398 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 398 | if ( curModifier.size() == 0 ) { | 2793 | 93.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 93.1k | curModifier.push_back(1); | 2795 | 93.1k | } | 2796 | 216 | } else { | 2797 | 1.41k | for (auto& c : curModifier) { | 2798 | 1.41k | c++; | 2799 | 1.41k | } | 2800 | 216 | } | 2801 | 398 | } | 2802 | 675 | } | 2803 | | | 2804 | 788 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 788 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 788 | const auto& result = results.back(); | 2811 | | | 2812 | 788 | 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 | 788 | 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 | 788 | if ( options.disableTests == false ) { | 2830 | 788 | tests::test(op, result.second); | 2831 | 788 | } | 2832 | | | 2833 | 788 | postprocess(module, op, result); | 2834 | 788 | } | 2835 | | | 2836 | 248 | if ( options.noCompare == false ) { | 2837 | 113 | compare(operations, results, data, size); | 2838 | 113 | } | 2839 | 248 | } |
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 | 228 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 228 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 228 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.71k | do { | 2725 | 4.71k | auto op = getOp(&parentDs, data, size); | 2726 | 4.71k | auto module = getModule(parentDs); | 2727 | 4.71k | if ( module == nullptr ) { | 2728 | 3.78k | continue; | 2729 | 3.78k | } | 2730 | | | 2731 | 933 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 933 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 4.71k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 228 | if ( operations.empty() == true ) { | 2740 | 19 | return; | 2741 | 19 | } | 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 | 186 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 186 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 186 | moduleIDs.insert(moduleID); | 2756 | 186 | } | 2757 | | | 2758 | 209 | std::set<uint64_t> operationModuleIDs; | 2759 | 620 | for (const auto& op : operations) { | 2760 | 620 | operationModuleIDs.insert(op.first->ID); | 2761 | 620 | } | 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 | 57 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 57 | } | 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 | 886 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 677 | auto& operation = operations[i]; | 2782 | | | 2783 | 677 | auto& module = operation.first; | 2784 | 677 | auto& op = operation.second; | 2785 | | | 2786 | 677 | if ( i > 0 ) { | 2787 | 584 | auto& prevModule = operations[i-1].first; | 2788 | 584 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 584 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 423 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 423 | if ( curModifier.size() == 0 ) { | 2793 | 146k | for (size_t j = 0; j < 512; j++) { | 2794 | 146k | curModifier.push_back(1); | 2795 | 146k | } | 2796 | 286 | } else { | 2797 | 750 | for (auto& c : curModifier) { | 2798 | 750 | c++; | 2799 | 750 | } | 2800 | 137 | } | 2801 | 423 | } | 2802 | 584 | } | 2803 | | | 2804 | 677 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 677 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 677 | const auto& result = results.back(); | 2811 | | | 2812 | 677 | 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 | 677 | 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 | 677 | if ( options.disableTests == false ) { | 2830 | 677 | tests::test(op, result.second); | 2831 | 677 | } | 2832 | | | 2833 | 677 | postprocess(module, op, result); | 2834 | 677 | } | 2835 | | | 2836 | 209 | if ( options.noCompare == false ) { | 2837 | 93 | compare(operations, results, data, size); | 2838 | 93 | } | 2839 | 209 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.19k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.19k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.19k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.95k | do { | 2725 | 4.95k | auto op = getOp(&parentDs, data, size); | 2726 | 4.95k | auto module = getModule(parentDs); | 2727 | 4.95k | if ( module == nullptr ) { | 2728 | 3.14k | continue; | 2729 | 3.14k | } | 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 | 32 | break; | 2736 | 32 | } | 2737 | 4.92k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.19k | if ( operations.empty() == true ) { | 2740 | 64 | return; | 2741 | 64 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 1.12k | #if 1 | 2745 | 1.12k | { | 2746 | 1.12k | std::set<uint64_t> moduleIDs; | 2747 | 1.96k | for (const auto& m : modules ) { | 2748 | 1.96k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.96k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.96k | moduleIDs.insert(moduleID); | 2756 | 1.96k | } | 2757 | | | 2758 | 1.12k | std::set<uint64_t> operationModuleIDs; | 2759 | 1.64k | for (const auto& op : operations) { | 2760 | 1.64k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.64k | } | 2762 | | | 2763 | 1.12k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 1.12k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 1.12k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 1.12k | for (const auto& id : addModuleIDs) { | 2768 | 954 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 954 | } | 2770 | 1.12k | } | 2771 | 1.12k | #endif | 2772 | | | 2773 | 1.12k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 1.12k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 3.72k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 2.60k | auto& operation = operations[i]; | 2782 | | | 2783 | 2.60k | auto& module = operation.first; | 2784 | 2.60k | auto& op = operation.second; | 2785 | | | 2786 | 2.60k | if ( i > 0 ) { | 2787 | 1.61k | auto& prevModule = operations[i-1].first; | 2788 | 1.61k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 1.61k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 621 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 621 | if ( curModifier.size() == 0 ) { | 2793 | 244k | for (size_t j = 0; j < 512; j++) { | 2794 | 243k | curModifier.push_back(1); | 2795 | 243k | } | 2796 | 476 | } else { | 2797 | 33.7k | for (auto& c : curModifier) { | 2798 | 33.7k | c++; | 2799 | 33.7k | } | 2800 | 145 | } | 2801 | 621 | } | 2802 | 1.61k | } | 2803 | | | 2804 | 2.60k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 2.60k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 2.60k | const auto& result = results.back(); | 2811 | | | 2812 | 2.60k | if ( result.second != std::nullopt ) { | 2813 | 764 | 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 | 764 | } | 2820 | | | 2821 | 2.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 | 2.60k | if ( options.disableTests == false ) { | 2830 | 2.60k | tests::test(op, result.second); | 2831 | 2.60k | } | 2832 | | | 2833 | 2.60k | postprocess(module, op, result); | 2834 | 2.60k | } | 2835 | | | 2836 | 1.12k | if ( options.noCompare == false ) { | 2837 | 982 | compare(operations, results, data, size); | 2838 | 982 | } | 2839 | 1.12k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.01k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.01k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.01k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.59k | do { | 2725 | 4.59k | auto op = getOp(&parentDs, data, size); | 2726 | 4.59k | auto module = getModule(parentDs); | 2727 | 4.59k | if ( module == nullptr ) { | 2728 | 3.24k | continue; | 2729 | 3.24k | } | 2730 | | | 2731 | 1.35k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.35k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 26 | break; | 2736 | 26 | } | 2737 | 4.57k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.01k | if ( operations.empty() == true ) { | 2740 | 20 | return; | 2741 | 20 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 992 | #if 1 | 2745 | 992 | { | 2746 | 992 | std::set<uint64_t> moduleIDs; | 2747 | 1.74k | for (const auto& m : modules ) { | 2748 | 1.74k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.74k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.74k | moduleIDs.insert(moduleID); | 2756 | 1.74k | } | 2757 | | | 2758 | 992 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.22k | for (const auto& op : operations) { | 2760 | 1.22k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.22k | } | 2762 | | | 2763 | 992 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 992 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 992 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 992 | for (const auto& id : addModuleIDs) { | 2768 | 847 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 847 | } | 2770 | 992 | } | 2771 | 992 | #endif | 2772 | | | 2773 | 992 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 992 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 3.06k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 2.07k | auto& operation = operations[i]; | 2782 | | | 2783 | 2.07k | auto& module = operation.first; | 2784 | 2.07k | auto& op = operation.second; | 2785 | | | 2786 | 2.07k | if ( i > 0 ) { | 2787 | 1.19k | auto& prevModule = operations[i-1].first; | 2788 | 1.19k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 1.19k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 312 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 312 | if ( curModifier.size() == 0 ) { | 2793 | 103k | for (size_t j = 0; j < 512; j++) { | 2794 | 103k | curModifier.push_back(1); | 2795 | 103k | } | 2796 | 202 | } else { | 2797 | 905 | for (auto& c : curModifier) { | 2798 | 905 | c++; | 2799 | 905 | } | 2800 | 110 | } | 2801 | 312 | } | 2802 | 1.19k | } | 2803 | | | 2804 | 2.07k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 2.07k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 2.07k | const auto& result = results.back(); | 2811 | | | 2812 | 2.07k | if ( result.second != std::nullopt ) { | 2813 | 1.59k | 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.59k | } | 2820 | | | 2821 | 2.07k | 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.07k | if ( options.disableTests == false ) { | 2830 | 2.07k | tests::test(op, result.second); | 2831 | 2.07k | } | 2832 | | | 2833 | 2.07k | postprocess(module, op, result); | 2834 | 2.07k | } | 2835 | | | 2836 | 992 | if ( options.noCompare == false ) { | 2837 | 872 | compare(operations, results, data, size); | 2838 | 872 | } | 2839 | 992 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.45k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.45k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.45k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.31k | do { | 2725 | 4.31k | auto op = getOp(&parentDs, data, size); | 2726 | 4.31k | auto module = getModule(parentDs); | 2727 | 4.31k | if ( module == nullptr ) { | 2728 | 2.70k | continue; | 2729 | 2.70k | } | 2730 | | | 2731 | 1.61k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.61k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 31 | break; | 2736 | 31 | } | 2737 | 4.28k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.45k | if ( operations.empty() == true ) { | 2740 | 105 | return; | 2741 | 105 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 1.35k | #if 1 | 2745 | 1.35k | { | 2746 | 1.35k | std::set<uint64_t> moduleIDs; | 2747 | 2.40k | for (const auto& m : modules ) { | 2748 | 2.40k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 2.40k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 2.40k | moduleIDs.insert(moduleID); | 2756 | 2.40k | } | 2757 | | | 2758 | 1.35k | std::set<uint64_t> operationModuleIDs; | 2759 | 1.52k | for (const auto& op : operations) { | 2760 | 1.52k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.52k | } | 2762 | | | 2763 | 1.35k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 1.35k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 1.35k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 1.35k | for (const auto& id : addModuleIDs) { | 2768 | 1.18k | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 1.18k | } | 2770 | 1.35k | } | 2771 | 1.35k | #endif | 2772 | | | 2773 | 1.35k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 1.35k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 4.05k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 2.70k | auto& operation = operations[i]; | 2782 | | | 2783 | 2.70k | auto& module = operation.first; | 2784 | 2.70k | auto& op = operation.second; | 2785 | | | 2786 | 2.70k | if ( i > 0 ) { | 2787 | 1.50k | auto& prevModule = operations[i-1].first; | 2788 | 1.50k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 1.50k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 283 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 283 | if ( curModifier.size() == 0 ) { | 2793 | 105k | for (size_t j = 0; j < 512; j++) { | 2794 | 105k | curModifier.push_back(1); | 2795 | 105k | } | 2796 | 206 | } else { | 2797 | 21.2k | for (auto& c : curModifier) { | 2798 | 21.2k | c++; | 2799 | 21.2k | } | 2800 | 77 | } | 2801 | 283 | } | 2802 | 1.50k | } | 2803 | | | 2804 | 2.70k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 2.70k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 2.70k | const auto& result = results.back(); | 2811 | | | 2812 | 2.70k | if ( result.second != std::nullopt ) { | 2813 | 848 | 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 | 848 | } | 2820 | | | 2821 | 2.70k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 2.70k | if ( options.disableTests == false ) { | 2830 | 2.70k | tests::test(op, result.second); | 2831 | 2.70k | } | 2832 | | | 2833 | 2.70k | postprocess(module, op, result); | 2834 | 2.70k | } | 2835 | | | 2836 | 1.35k | if ( options.noCompare == false ) { | 2837 | 1.20k | compare(operations, results, data, size); | 2838 | 1.20k | } | 2839 | 1.35k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 199 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 199 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 199 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.59k | do { | 2725 | 4.59k | auto op = getOp(&parentDs, data, size); | 2726 | 4.59k | auto module = getModule(parentDs); | 2727 | 4.59k | if ( module == nullptr ) { | 2728 | 4.26k | continue; | 2729 | 4.26k | } | 2730 | | | 2731 | 338 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 338 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 12 | break; | 2736 | 12 | } | 2737 | 4.58k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 199 | if ( operations.empty() == true ) { | 2740 | 23 | return; | 2741 | 23 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 176 | #if 1 | 2745 | 176 | { | 2746 | 176 | std::set<uint64_t> moduleIDs; | 2747 | 176 | for (const auto& m : modules ) { | 2748 | 148 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 148 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 148 | moduleIDs.insert(moduleID); | 2756 | 148 | } | 2757 | | | 2758 | 176 | std::set<uint64_t> operationModuleIDs; | 2759 | 218 | for (const auto& op : operations) { | 2760 | 218 | operationModuleIDs.insert(op.first->ID); | 2761 | 218 | } | 2762 | | | 2763 | 176 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 176 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 176 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 176 | for (const auto& id : addModuleIDs) { | 2768 | 52 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 52 | } | 2770 | 176 | } | 2771 | 176 | #endif | 2772 | | | 2773 | 176 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 176 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 446 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 270 | auto& operation = operations[i]; | 2782 | | | 2783 | 270 | auto& module = operation.first; | 2784 | 270 | auto& op = operation.second; | 2785 | | | 2786 | 270 | if ( i > 0 ) { | 2787 | 196 | auto& prevModule = operations[i-1].first; | 2788 | 196 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 196 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 109 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 109 | if ( curModifier.size() == 0 ) { | 2793 | 31.8k | for (size_t j = 0; j < 512; j++) { | 2794 | 31.7k | curModifier.push_back(1); | 2795 | 31.7k | } | 2796 | 62 | } else { | 2797 | 788 | for (auto& c : curModifier) { | 2798 | 788 | c++; | 2799 | 788 | } | 2800 | 47 | } | 2801 | 109 | } | 2802 | 196 | } | 2803 | | | 2804 | 270 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 270 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 270 | const auto& result = results.back(); | 2811 | | | 2812 | 270 | 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 | 270 | 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 | 270 | if ( options.disableTests == false ) { | 2830 | 270 | tests::test(op, result.second); | 2831 | 270 | } | 2832 | | | 2833 | 270 | postprocess(module, op, result); | 2834 | 270 | } | 2835 | | | 2836 | 176 | if ( options.noCompare == false ) { | 2837 | 74 | compare(operations, results, data, size); | 2838 | 74 | } | 2839 | 176 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.05k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.05k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.05k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 6.10k | do { | 2725 | 6.10k | auto op = getOp(&parentDs, data, size); | 2726 | 6.10k | auto module = getModule(parentDs); | 2727 | 6.10k | if ( module == nullptr ) { | 2728 | 4.13k | continue; | 2729 | 4.13k | } | 2730 | | | 2731 | 1.97k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.97k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 92 | break; | 2736 | 92 | } | 2737 | 6.01k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.05k | if ( operations.empty() == true ) { | 2740 | 22 | return; | 2741 | 22 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 1.03k | #if 1 | 2745 | 1.03k | { | 2746 | 1.03k | std::set<uint64_t> moduleIDs; | 2747 | 1.88k | for (const auto& m : modules ) { | 2748 | 1.88k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.88k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.88k | moduleIDs.insert(moduleID); | 2756 | 1.88k | } | 2757 | | | 2758 | 1.03k | std::set<uint64_t> operationModuleIDs; | 2759 | 1.86k | for (const auto& op : operations) { | 2760 | 1.86k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.86k | } | 2762 | | | 2763 | 1.03k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 1.03k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 1.03k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 1.03k | for (const auto& id : addModuleIDs) { | 2768 | 919 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 919 | } | 2770 | 1.03k | } | 2771 | 1.03k | #endif | 2772 | | | 2773 | 1.03k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 1.03k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 3.81k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 2.78k | auto& operation = operations[i]; | 2782 | | | 2783 | 2.78k | auto& module = operation.first; | 2784 | 2.78k | auto& op = operation.second; | 2785 | | | 2786 | 2.78k | if ( i > 0 ) { | 2787 | 1.84k | auto& prevModule = operations[i-1].first; | 2788 | 1.84k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 1.84k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 886 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 886 | if ( curModifier.size() == 0 ) { | 2793 | 288k | for (size_t j = 0; j < 512; j++) { | 2794 | 288k | curModifier.push_back(1); | 2795 | 288k | } | 2796 | 563 | } else { | 2797 | 21.9k | for (auto& c : curModifier) { | 2798 | 21.9k | c++; | 2799 | 21.9k | } | 2800 | 323 | } | 2801 | 886 | } | 2802 | 1.84k | } | 2803 | | | 2804 | 2.78k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 2.78k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 2.78k | const auto& result = results.back(); | 2811 | | | 2812 | 2.78k | if ( result.second != std::nullopt ) { | 2813 | 1.29k | 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.29k | } | 2820 | | | 2821 | 2.78k | 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.78k | if ( options.disableTests == false ) { | 2830 | 2.78k | tests::test(op, result.second); | 2831 | 2.78k | } | 2832 | | | 2833 | 2.78k | postprocess(module, op, result); | 2834 | 2.78k | } | 2835 | | | 2836 | 1.03k | if ( options.noCompare == false ) { | 2837 | 943 | compare(operations, results, data, size); | 2838 | 943 | } | 2839 | 1.03k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 271 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 271 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 271 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.29k | do { | 2725 | 4.29k | auto op = getOp(&parentDs, data, size); | 2726 | 4.29k | auto module = getModule(parentDs); | 2727 | 4.29k | if ( module == nullptr ) { | 2728 | 3.83k | continue; | 2729 | 3.83k | } | 2730 | | | 2731 | 464 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 464 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 18 | break; | 2736 | 18 | } | 2737 | 4.28k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 271 | if ( operations.empty() == true ) { | 2740 | 27 | return; | 2741 | 27 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 244 | #if 1 | 2745 | 244 | { | 2746 | 244 | std::set<uint64_t> moduleIDs; | 2747 | 284 | for (const auto& m : modules ) { | 2748 | 284 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 284 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 284 | moduleIDs.insert(moduleID); | 2756 | 284 | } | 2757 | | | 2758 | 244 | std::set<uint64_t> operationModuleIDs; | 2759 | 345 | for (const auto& op : operations) { | 2760 | 345 | operationModuleIDs.insert(op.first->ID); | 2761 | 345 | } | 2762 | | | 2763 | 244 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 244 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 244 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 244 | for (const auto& id : addModuleIDs) { | 2768 | 121 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 121 | } | 2770 | 244 | } | 2771 | 244 | #endif | 2772 | | | 2773 | 244 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 244 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 710 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 466 | auto& operation = operations[i]; | 2782 | | | 2783 | 466 | auto& module = operation.first; | 2784 | 466 | auto& op = operation.second; | 2785 | | | 2786 | 466 | if ( i > 0 ) { | 2787 | 324 | auto& prevModule = operations[i-1].first; | 2788 | 324 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 324 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 167 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 167 | if ( curModifier.size() == 0 ) { | 2793 | 50.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 50.1k | curModifier.push_back(1); | 2795 | 50.1k | } | 2796 | 98 | } else { | 2797 | 2.56k | for (auto& c : curModifier) { | 2798 | 2.56k | c++; | 2799 | 2.56k | } | 2800 | 69 | } | 2801 | 167 | } | 2802 | 324 | } | 2803 | | | 2804 | 466 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 466 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 466 | const auto& result = results.back(); | 2811 | | | 2812 | 466 | if ( result.second != std::nullopt ) { | 2813 | 28 | 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 | 28 | } | 2820 | | | 2821 | 466 | 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 | 466 | if ( options.disableTests == false ) { | 2830 | 466 | tests::test(op, result.second); | 2831 | 466 | } | 2832 | | | 2833 | 466 | postprocess(module, op, result); | 2834 | 466 | } | 2835 | | | 2836 | 244 | if ( options.noCompare == false ) { | 2837 | 142 | compare(operations, results, data, size); | 2838 | 142 | } | 2839 | 244 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 215 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 215 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 215 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.51k | do { | 2725 | 4.51k | auto op = getOp(&parentDs, data, size); | 2726 | 4.51k | auto module = getModule(parentDs); | 2727 | 4.51k | if ( module == nullptr ) { | 2728 | 4.15k | continue; | 2729 | 4.15k | } | 2730 | | | 2731 | 360 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 360 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 15 | break; | 2736 | 15 | } | 2737 | 4.50k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 215 | if ( operations.empty() == true ) { | 2740 | 26 | return; | 2741 | 26 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 189 | #if 1 | 2745 | 189 | { | 2746 | 189 | std::set<uint64_t> moduleIDs; | 2747 | 189 | for (const auto& m : modules ) { | 2748 | 146 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 146 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 146 | moduleIDs.insert(moduleID); | 2756 | 146 | } | 2757 | | | 2758 | 189 | std::set<uint64_t> operationModuleIDs; | 2759 | 215 | for (const auto& op : operations) { | 2760 | 215 | operationModuleIDs.insert(op.first->ID); | 2761 | 215 | } | 2762 | | | 2763 | 189 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 189 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 189 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 189 | for (const auto& id : addModuleIDs) { | 2768 | 50 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 50 | } | 2770 | 189 | } | 2771 | 189 | #endif | 2772 | | | 2773 | 189 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 189 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 454 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 265 | auto& operation = operations[i]; | 2782 | | | 2783 | 265 | auto& module = operation.first; | 2784 | 265 | auto& op = operation.second; | 2785 | | | 2786 | 265 | if ( i > 0 ) { | 2787 | 192 | auto& prevModule = operations[i-1].first; | 2788 | 192 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 192 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 101 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 101 | if ( curModifier.size() == 0 ) { | 2793 | 23.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 23.0k | curModifier.push_back(1); | 2795 | 23.0k | } | 2796 | 56 | } else { | 2797 | 1.52k | for (auto& c : curModifier) { | 2798 | 1.52k | c++; | 2799 | 1.52k | } | 2800 | 56 | } | 2801 | 101 | } | 2802 | 192 | } | 2803 | | | 2804 | 265 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 265 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 265 | const auto& result = results.back(); | 2811 | | | 2812 | 265 | 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 | 265 | 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 | 265 | if ( options.disableTests == false ) { | 2830 | 265 | tests::test(op, result.second); | 2831 | 265 | } | 2832 | | | 2833 | 265 | postprocess(module, op, result); | 2834 | 265 | } | 2835 | | | 2836 | 189 | if ( options.noCompare == false ) { | 2837 | 73 | compare(operations, results, data, size); | 2838 | 73 | } | 2839 | 189 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 202 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 202 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 202 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.52k | do { | 2725 | 4.52k | auto op = getOp(&parentDs, data, size); | 2726 | 4.52k | auto module = getModule(parentDs); | 2727 | 4.52k | if ( module == nullptr ) { | 2728 | 4.19k | continue; | 2729 | 4.19k | } | 2730 | | | 2731 | 330 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 330 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 14 | break; | 2736 | 14 | } | 2737 | 4.51k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 202 | if ( operations.empty() == true ) { | 2740 | 22 | return; | 2741 | 22 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 180 | #if 1 | 2745 | 180 | { | 2746 | 180 | std::set<uint64_t> moduleIDs; | 2747 | 180 | for (const auto& m : modules ) { | 2748 | 150 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 150 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 150 | moduleIDs.insert(moduleID); | 2756 | 150 | } | 2757 | | | 2758 | 180 | std::set<uint64_t> operationModuleIDs; | 2759 | 214 | for (const auto& op : operations) { | 2760 | 214 | operationModuleIDs.insert(op.first->ID); | 2761 | 214 | } | 2762 | | | 2763 | 180 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 180 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 180 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 180 | for (const auto& id : addModuleIDs) { | 2768 | 51 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 51 | } | 2770 | 180 | } | 2771 | 180 | #endif | 2772 | | | 2773 | 180 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 180 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 445 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 265 | auto& operation = operations[i]; | 2782 | | | 2783 | 265 | auto& module = operation.first; | 2784 | 265 | auto& op = operation.second; | 2785 | | | 2786 | 265 | if ( i > 0 ) { | 2787 | 190 | auto& prevModule = operations[i-1].first; | 2788 | 190 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 190 | 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 | 1.26k | for (auto& c : curModifier) { | 2798 | 1.26k | c++; | 2799 | 1.26k | } | 2800 | 50 | } | 2801 | 99 | } | 2802 | 190 | } | 2803 | | | 2804 | 265 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 265 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 265 | const auto& result = results.back(); | 2811 | | | 2812 | 265 | 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 | 265 | 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 | 265 | if ( options.disableTests == false ) { | 2830 | 265 | tests::test(op, result.second); | 2831 | 265 | } | 2832 | | | 2833 | 265 | postprocess(module, op, result); | 2834 | 265 | } | 2835 | | | 2836 | 180 | if ( options.noCompare == false ) { | 2837 | 75 | compare(operations, results, data, size); | 2838 | 75 | } | 2839 | 180 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 189 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 189 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 189 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.68k | do { | 2725 | 4.68k | auto op = getOp(&parentDs, data, size); | 2726 | 4.68k | auto module = getModule(parentDs); | 2727 | 4.68k | if ( module == nullptr ) { | 2728 | 4.33k | continue; | 2729 | 4.33k | } | 2730 | | | 2731 | 350 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 350 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 14 | break; | 2736 | 14 | } | 2737 | 4.67k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 189 | if ( operations.empty() == true ) { | 2740 | 22 | return; | 2741 | 22 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 167 | #if 1 | 2745 | 167 | { | 2746 | 167 | std::set<uint64_t> moduleIDs; | 2747 | 167 | for (const auto& m : modules ) { | 2748 | 122 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 122 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 122 | moduleIDs.insert(moduleID); | 2756 | 122 | } | 2757 | | | 2758 | 167 | std::set<uint64_t> operationModuleIDs; | 2759 | 185 | for (const auto& op : operations) { | 2760 | 185 | operationModuleIDs.insert(op.first->ID); | 2761 | 185 | } | 2762 | | | 2763 | 167 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 167 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 167 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 167 | for (const auto& id : addModuleIDs) { | 2768 | 40 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 40 | } | 2770 | 167 | } | 2771 | 167 | #endif | 2772 | | | 2773 | 167 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 167 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 392 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 225 | auto& operation = operations[i]; | 2782 | | | 2783 | 225 | auto& module = operation.first; | 2784 | 225 | auto& op = operation.second; | 2785 | | | 2786 | 225 | if ( i > 0 ) { | 2787 | 164 | auto& prevModule = operations[i-1].first; | 2788 | 164 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 164 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 91 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 91 | if ( curModifier.size() == 0 ) { | 2793 | 21.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 20.9k | curModifier.push_back(1); | 2795 | 20.9k | } | 2796 | 50 | } else { | 2797 | 721 | for (auto& c : curModifier) { | 2798 | 721 | c++; | 2799 | 721 | } | 2800 | 50 | } | 2801 | 91 | } | 2802 | 164 | } | 2803 | | | 2804 | 225 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 225 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 225 | const auto& result = results.back(); | 2811 | | | 2812 | 225 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 225 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 225 | if ( options.disableTests == false ) { | 2830 | 225 | tests::test(op, result.second); | 2831 | 225 | } | 2832 | | | 2833 | 225 | postprocess(module, op, result); | 2834 | 225 | } | 2835 | | | 2836 | 167 | if ( options.noCompare == false ) { | 2837 | 61 | compare(operations, results, data, size); | 2838 | 61 | } | 2839 | 167 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 607 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 607 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 607 | 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 | 3.25k | continue; | 2729 | 3.25k | } | 2730 | | | 2731 | 1.22k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.22k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 43 | break; | 2736 | 43 | } | 2737 | 4.43k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 607 | if ( operations.empty() == true ) { | 2740 | 14 | return; | 2741 | 14 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 593 | #if 1 | 2745 | 593 | { | 2746 | 593 | std::set<uint64_t> moduleIDs; | 2747 | 1.02k | for (const auto& m : modules ) { | 2748 | 1.02k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.02k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.02k | moduleIDs.insert(moduleID); | 2756 | 1.02k | } | 2757 | | | 2758 | 593 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.10k | for (const auto& op : operations) { | 2760 | 1.10k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.10k | } | 2762 | | | 2763 | 593 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 593 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 593 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 593 | for (const auto& id : addModuleIDs) { | 2768 | 482 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 482 | } | 2770 | 593 | } | 2771 | 593 | #endif | 2772 | | | 2773 | 593 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 593 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 2.18k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.58k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.58k | auto& module = operation.first; | 2784 | 1.58k | auto& op = operation.second; | 2785 | | | 2786 | 1.58k | 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 | 544 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 544 | if ( curModifier.size() == 0 ) { | 2793 | 181k | for (size_t j = 0; j < 512; j++) { | 2794 | 181k | curModifier.push_back(1); | 2795 | 181k | } | 2796 | 354 | } else { | 2797 | 1.22k | for (auto& c : curModifier) { | 2798 | 1.22k | c++; | 2799 | 1.22k | } | 2800 | 190 | } | 2801 | 544 | } | 2802 | 1.07k | } | 2803 | | | 2804 | 1.58k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.58k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.58k | const auto& result = results.back(); | 2811 | | | 2812 | 1.58k | if ( result.second != std::nullopt ) { | 2813 | 870 | 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 | 870 | } | 2820 | | | 2821 | 1.58k | 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.58k | if ( options.disableTests == false ) { | 2830 | 1.58k | tests::test(op, result.second); | 2831 | 1.58k | } | 2832 | | | 2833 | 1.58k | postprocess(module, op, result); | 2834 | 1.58k | } | 2835 | | | 2836 | 593 | if ( options.noCompare == false ) { | 2837 | 513 | compare(operations, results, data, size); | 2838 | 513 | } | 2839 | 593 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 376 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 376 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 376 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.73k | do { | 2725 | 4.73k | auto op = getOp(&parentDs, data, size); | 2726 | 4.73k | auto module = getModule(parentDs); | 2727 | 4.73k | if ( module == nullptr ) { | 2728 | 4.07k | continue; | 2729 | 4.07k | } | 2730 | | | 2731 | 661 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 661 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 19 | break; | 2736 | 19 | } | 2737 | 4.71k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 376 | if ( operations.empty() == true ) { | 2740 | 21 | return; | 2741 | 21 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 355 | #if 1 | 2745 | 355 | { | 2746 | 355 | std::set<uint64_t> moduleIDs; | 2747 | 522 | for (const auto& m : modules ) { | 2748 | 522 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 522 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 522 | moduleIDs.insert(moduleID); | 2756 | 522 | } | 2757 | | | 2758 | 355 | std::set<uint64_t> operationModuleIDs; | 2759 | 538 | for (const auto& op : operations) { | 2760 | 538 | operationModuleIDs.insert(op.first->ID); | 2761 | 538 | } | 2762 | | | 2763 | 355 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 355 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 355 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 355 | for (const auto& id : addModuleIDs) { | 2768 | 235 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 235 | } | 2770 | 355 | } | 2771 | 355 | #endif | 2772 | | | 2773 | 355 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 355 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.12k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 773 | auto& operation = operations[i]; | 2782 | | | 2783 | 773 | auto& module = operation.first; | 2784 | 773 | auto& op = operation.second; | 2785 | | | 2786 | 773 | if ( i > 0 ) { | 2787 | 512 | auto& prevModule = operations[i-1].first; | 2788 | 512 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 512 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 235 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 235 | 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 | 1.39k | for (auto& c : curModifier) { | 2798 | 1.39k | c++; | 2799 | 1.39k | } | 2800 | 108 | } | 2801 | 235 | } | 2802 | 512 | } | 2803 | | | 2804 | 773 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 773 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 773 | const auto& result = results.back(); | 2811 | | | 2812 | 773 | if ( result.second != std::nullopt ) { | 2813 | 281 | 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 | 281 | } | 2820 | | | 2821 | 773 | 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 | 773 | if ( options.disableTests == false ) { | 2830 | 773 | tests::test(op, result.second); | 2831 | 773 | } | 2832 | | | 2833 | 773 | postprocess(module, op, result); | 2834 | 773 | } | 2835 | | | 2836 | 355 | if ( options.noCompare == false ) { | 2837 | 261 | compare(operations, results, data, size); | 2838 | 261 | } | 2839 | 355 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 168 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 168 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 168 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.35k | do { | 2725 | 4.35k | auto op = getOp(&parentDs, data, size); | 2726 | 4.35k | auto module = getModule(parentDs); | 2727 | 4.35k | if ( module == nullptr ) { | 2728 | 4.02k | continue; | 2729 | 4.02k | } | 2730 | | | 2731 | 328 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 328 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 12 | break; | 2736 | 12 | } | 2737 | 4.34k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 168 | if ( operations.empty() == true ) { | 2740 | 15 | return; | 2741 | 15 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 153 | #if 1 | 2745 | 153 | { | 2746 | 153 | std::set<uint64_t> moduleIDs; | 2747 | 153 | for (const auto& m : modules ) { | 2748 | 142 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 142 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 142 | moduleIDs.insert(moduleID); | 2756 | 142 | } | 2757 | | | 2758 | 153 | std::set<uint64_t> operationModuleIDs; | 2759 | 199 | for (const auto& op : operations) { | 2760 | 199 | operationModuleIDs.insert(op.first->ID); | 2761 | 199 | } | 2762 | | | 2763 | 153 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 153 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 153 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 153 | for (const auto& id : addModuleIDs) { | 2768 | 49 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 49 | } | 2770 | 153 | } | 2771 | 153 | #endif | 2772 | | | 2773 | 153 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 153 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 401 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 248 | auto& operation = operations[i]; | 2782 | | | 2783 | 248 | auto& module = operation.first; | 2784 | 248 | auto& op = operation.second; | 2785 | | | 2786 | 248 | 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 | 89 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 89 | if ( curModifier.size() == 0 ) { | 2793 | 21.5k | for (size_t j = 0; j < 512; j++) { | 2794 | 21.5k | curModifier.push_back(1); | 2795 | 21.5k | } | 2796 | 47 | } else { | 2797 | 1.12k | for (auto& c : curModifier) { | 2798 | 1.12k | c++; | 2799 | 1.12k | } | 2800 | 47 | } | 2801 | 89 | } | 2802 | 177 | } | 2803 | | | 2804 | 248 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 248 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 248 | const auto& result = results.back(); | 2811 | | | 2812 | 248 | 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 | 248 | 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 | 248 | if ( options.disableTests == false ) { | 2830 | 248 | tests::test(op, result.second); | 2831 | 248 | } | 2832 | | | 2833 | 248 | postprocess(module, op, result); | 2834 | 248 | } | 2835 | | | 2836 | 153 | if ( options.noCompare == false ) { | 2837 | 71 | compare(operations, results, data, size); | 2838 | 71 | } | 2839 | 153 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::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 | 4.58k | do { | 2725 | 4.58k | auto op = getOp(&parentDs, data, size); | 2726 | 4.58k | auto module = getModule(parentDs); | 2727 | 4.58k | if ( module == nullptr ) { | 2728 | 4.22k | continue; | 2729 | 4.22k | } | 2730 | | | 2731 | 369 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 369 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 15 | break; | 2736 | 15 | } | 2737 | 4.57k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 182 | if ( operations.empty() == true ) { | 2740 | 16 | return; | 2741 | 16 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 166 | #if 1 | 2745 | 166 | { | 2746 | 166 | std::set<uint64_t> moduleIDs; | 2747 | 166 | for (const auto& m : modules ) { | 2748 | 148 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 148 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 148 | moduleIDs.insert(moduleID); | 2756 | 148 | } | 2757 | | | 2758 | 166 | std::set<uint64_t> operationModuleIDs; | 2759 | 228 | for (const auto& op : operations) { | 2760 | 228 | operationModuleIDs.insert(op.first->ID); | 2761 | 228 | } | 2762 | | | 2763 | 166 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 166 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 166 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 166 | for (const auto& id : addModuleIDs) { | 2768 | 50 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 50 | } | 2770 | 166 | } | 2771 | 166 | #endif | 2772 | | | 2773 | 166 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 166 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 444 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 278 | auto& operation = operations[i]; | 2782 | | | 2783 | 278 | auto& module = operation.first; | 2784 | 278 | auto& op = operation.second; | 2785 | | | 2786 | 278 | if ( i > 0 ) { | 2787 | 204 | auto& prevModule = operations[i-1].first; | 2788 | 204 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 204 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 115 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 115 | if ( curModifier.size() == 0 ) { | 2793 | 33.8k | for (size_t j = 0; j < 512; j++) { | 2794 | 33.7k | curModifier.push_back(1); | 2795 | 33.7k | } | 2796 | 66 | } else { | 2797 | 5.25k | for (auto& c : curModifier) { | 2798 | 5.25k | c++; | 2799 | 5.25k | } | 2800 | 49 | } | 2801 | 115 | } | 2802 | 204 | } | 2803 | | | 2804 | 278 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 278 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 278 | const auto& result = results.back(); | 2811 | | | 2812 | 278 | 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 | 278 | 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 | 278 | if ( options.disableTests == false ) { | 2830 | 278 | tests::test(op, result.second); | 2831 | 278 | } | 2832 | | | 2833 | 278 | postprocess(module, op, result); | 2834 | 278 | } | 2835 | | | 2836 | 166 | if ( options.noCompare == false ) { | 2837 | 74 | compare(operations, results, data, size); | 2838 | 74 | } | 2839 | 166 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 875 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 875 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 875 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.60k | do { | 2725 | 5.60k | auto op = getOp(&parentDs, data, size); | 2726 | 5.60k | auto module = getModule(parentDs); | 2727 | 5.60k | if ( module == nullptr ) { | 2728 | 4.17k | continue; | 2729 | 4.17k | } | 2730 | | | 2731 | 1.42k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.42k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 39 | break; | 2736 | 39 | } | 2737 | 5.56k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 875 | if ( operations.empty() == true ) { | 2740 | 27 | return; | 2741 | 27 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 848 | #if 1 | 2745 | 848 | { | 2746 | 848 | std::set<uint64_t> moduleIDs; | 2747 | 1.51k | for (const auto& m : modules ) { | 2748 | 1.51k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.51k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.51k | moduleIDs.insert(moduleID); | 2756 | 1.51k | } | 2757 | | | 2758 | 848 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.31k | for (const auto& op : operations) { | 2760 | 1.31k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.31k | } | 2762 | | | 2763 | 848 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 848 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 848 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 848 | for (const auto& id : addModuleIDs) { | 2768 | 732 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 732 | } | 2770 | 848 | } | 2771 | 848 | #endif | 2772 | | | 2773 | 848 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 848 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 2.89k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 2.05k | auto& operation = operations[i]; | 2782 | | | 2783 | 2.05k | auto& module = operation.first; | 2784 | 2.05k | auto& op = operation.second; | 2785 | | | 2786 | 2.05k | if ( i > 0 ) { | 2787 | 1.29k | auto& prevModule = operations[i-1].first; | 2788 | 1.29k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 1.29k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 517 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 517 | if ( curModifier.size() == 0 ) { | 2793 | 198k | for (size_t j = 0; j < 512; j++) { | 2794 | 197k | curModifier.push_back(1); | 2795 | 197k | } | 2796 | 386 | } else { | 2797 | 2.45k | for (auto& c : curModifier) { | 2798 | 2.45k | c++; | 2799 | 2.45k | } | 2800 | 131 | } | 2801 | 517 | } | 2802 | 1.29k | } | 2803 | | | 2804 | 2.05k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 2.05k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 2.05k | const auto& result = results.back(); | 2811 | | | 2812 | 2.05k | if ( result.second != std::nullopt ) { | 2813 | 728 | 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 | 728 | } | 2820 | | | 2821 | 2.05k | 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.05k | if ( options.disableTests == false ) { | 2830 | 2.05k | tests::test(op, result.second); | 2831 | 2.05k | } | 2832 | | | 2833 | 2.05k | postprocess(module, op, result); | 2834 | 2.05k | } | 2835 | | | 2836 | 848 | if ( options.noCompare == false ) { | 2837 | 757 | compare(operations, results, data, size); | 2838 | 757 | } | 2839 | 848 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 434 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 434 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 434 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.55k | do { | 2725 | 4.55k | auto op = getOp(&parentDs, data, size); | 2726 | 4.55k | auto module = getModule(parentDs); | 2727 | 4.55k | if ( module == nullptr ) { | 2728 | 3.63k | continue; | 2729 | 3.63k | } | 2730 | | | 2731 | 921 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 921 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 20 | break; | 2736 | 20 | } | 2737 | 4.53k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 434 | if ( operations.empty() == true ) { | 2740 | 12 | return; | 2741 | 12 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 422 | #if 1 | 2745 | 422 | { | 2746 | 422 | std::set<uint64_t> moduleIDs; | 2747 | 644 | for (const auto& m : modules ) { | 2748 | 644 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 644 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 644 | moduleIDs.insert(moduleID); | 2756 | 644 | } | 2757 | | | 2758 | 422 | std::set<uint64_t> operationModuleIDs; | 2759 | 784 | for (const auto& op : operations) { | 2760 | 784 | operationModuleIDs.insert(op.first->ID); | 2761 | 784 | } | 2762 | | | 2763 | 422 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 422 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 422 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 422 | for (const auto& id : addModuleIDs) { | 2768 | 297 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 297 | } | 2770 | 422 | } | 2771 | 422 | #endif | 2772 | | | 2773 | 422 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 422 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.50k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.08k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.08k | auto& module = operation.first; | 2784 | 1.08k | auto& op = operation.second; | 2785 | | | 2786 | 1.08k | if ( i > 0 ) { | 2787 | 759 | auto& prevModule = operations[i-1].first; | 2788 | 759 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 759 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 423 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 423 | if ( curModifier.size() == 0 ) { | 2793 | 149k | for (size_t j = 0; j < 512; j++) { | 2794 | 148k | curModifier.push_back(1); | 2795 | 148k | } | 2796 | 291 | } else { | 2797 | 9.30k | for (auto& c : curModifier) { | 2798 | 9.30k | c++; | 2799 | 9.30k | } | 2800 | 132 | } | 2801 | 423 | } | 2802 | 759 | } | 2803 | | | 2804 | 1.08k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.08k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.08k | const auto& result = results.back(); | 2811 | | | 2812 | 1.08k | if ( result.second != std::nullopt ) { | 2813 | 242 | 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 | 242 | } | 2820 | | | 2821 | 1.08k | 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.08k | if ( options.disableTests == false ) { | 2830 | 1.08k | tests::test(op, result.second); | 2831 | 1.08k | } | 2832 | | | 2833 | 1.08k | postprocess(module, op, result); | 2834 | 1.08k | } | 2835 | | | 2836 | 422 | if ( options.noCompare == false ) { | 2837 | 322 | compare(operations, results, data, size); | 2838 | 322 | } | 2839 | 422 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 242 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 242 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 242 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.45k | do { | 2725 | 4.45k | auto op = getOp(&parentDs, data, size); | 2726 | 4.45k | auto module = getModule(parentDs); | 2727 | 4.45k | if ( module == nullptr ) { | 2728 | 4.07k | continue; | 2729 | 4.07k | } | 2730 | | | 2731 | 383 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 383 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 14 | break; | 2736 | 14 | } | 2737 | 4.44k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 242 | if ( operations.empty() == true ) { | 2740 | 22 | return; | 2741 | 22 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 220 | #if 1 | 2745 | 220 | { | 2746 | 220 | std::set<uint64_t> moduleIDs; | 2747 | 220 | for (const auto& m : modules ) { | 2748 | 180 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 180 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 180 | moduleIDs.insert(moduleID); | 2756 | 180 | } | 2757 | | | 2758 | 220 | std::set<uint64_t> operationModuleIDs; | 2759 | 244 | for (const auto& op : operations) { | 2760 | 244 | operationModuleIDs.insert(op.first->ID); | 2761 | 244 | } | 2762 | | | 2763 | 220 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 220 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 220 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 220 | for (const auto& id : addModuleIDs) { | 2768 | 66 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 66 | } | 2770 | 220 | } | 2771 | 220 | #endif | 2772 | | | 2773 | 220 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 220 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 530 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 310 | auto& operation = operations[i]; | 2782 | | | 2783 | 310 | auto& module = operation.first; | 2784 | 310 | auto& op = operation.second; | 2785 | | | 2786 | 310 | if ( i > 0 ) { | 2787 | 220 | auto& prevModule = operations[i-1].first; | 2788 | 220 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 220 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 114 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 114 | if ( curModifier.size() == 0 ) { | 2793 | 23.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 23.0k | curModifier.push_back(1); | 2795 | 23.0k | } | 2796 | 69 | } else { | 2797 | 2.96k | for (auto& c : curModifier) { | 2798 | 2.96k | c++; | 2799 | 2.96k | } | 2800 | 69 | } | 2801 | 114 | } | 2802 | 220 | } | 2803 | | | 2804 | 310 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 310 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 310 | const auto& result = results.back(); | 2811 | | | 2812 | 310 | 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 | 310 | 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 | 310 | if ( options.disableTests == false ) { | 2830 | 310 | tests::test(op, result.second); | 2831 | 310 | } | 2832 | | | 2833 | 310 | postprocess(module, op, result); | 2834 | 310 | } | 2835 | | | 2836 | 220 | if ( options.noCompare == false ) { | 2837 | 90 | compare(operations, results, data, size); | 2838 | 90 | } | 2839 | 220 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 345 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 345 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 345 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.14k | do { | 2725 | 3.14k | auto op = getOp(&parentDs, data, size); | 2726 | 3.14k | auto module = getModule(parentDs); | 2727 | 3.14k | if ( module == nullptr ) { | 2728 | 2.80k | continue; | 2729 | 2.80k | } | 2730 | | | 2731 | 343 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 343 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 13 | break; | 2736 | 13 | } | 2737 | 3.13k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 345 | if ( operations.empty() == true ) { | 2740 | 40 | return; | 2741 | 40 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 305 | #if 1 | 2745 | 305 | { | 2746 | 305 | std::set<uint64_t> moduleIDs; | 2747 | 305 | for (const auto& m : modules ) { | 2748 | 146 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 146 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 146 | moduleIDs.insert(moduleID); | 2756 | 146 | } | 2757 | | | 2758 | 305 | std::set<uint64_t> operationModuleIDs; | 2759 | 305 | for (const auto& op : operations) { | 2760 | 211 | operationModuleIDs.insert(op.first->ID); | 2761 | 211 | } | 2762 | | | 2763 | 305 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 305 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 305 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 305 | for (const auto& id : addModuleIDs) { | 2768 | 46 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 46 | } | 2770 | 305 | } | 2771 | 305 | #endif | 2772 | | | 2773 | 305 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 305 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 562 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 257 | auto& operation = operations[i]; | 2782 | | | 2783 | 257 | auto& module = operation.first; | 2784 | 257 | auto& op = operation.second; | 2785 | | | 2786 | 257 | if ( i > 0 ) { | 2787 | 184 | auto& prevModule = operations[i-1].first; | 2788 | 184 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 184 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 98 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 98 | if ( curModifier.size() == 0 ) { | 2793 | 25.6k | for (size_t j = 0; j < 512; j++) { | 2794 | 25.6k | curModifier.push_back(1); | 2795 | 25.6k | } | 2796 | 50 | } else { | 2797 | 624 | for (auto& c : curModifier) { | 2798 | 624 | c++; | 2799 | 624 | } | 2800 | 48 | } | 2801 | 98 | } | 2802 | 184 | } | 2803 | | | 2804 | 257 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 257 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 257 | const auto& result = results.back(); | 2811 | | | 2812 | 257 | 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 | 257 | 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 | 257 | if ( options.disableTests == false ) { | 2830 | 257 | tests::test(op, result.second); | 2831 | 257 | } | 2832 | | | 2833 | 257 | postprocess(module, op, result); | 2834 | 257 | } | 2835 | | | 2836 | 305 | if ( options.noCompare == false ) { | 2837 | 73 | compare(operations, results, data, size); | 2838 | 73 | } | 2839 | 305 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 248 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 248 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 248 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.23k | do { | 2725 | 5.23k | auto op = getOp(&parentDs, data, size); | 2726 | 5.23k | auto module = getModule(parentDs); | 2727 | 5.23k | if ( module == nullptr ) { | 2728 | 4.87k | continue; | 2729 | 4.87k | } | 2730 | | | 2731 | 360 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 360 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 14 | break; | 2736 | 14 | } | 2737 | 5.22k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 248 | if ( operations.empty() == true ) { | 2740 | 23 | return; | 2741 | 23 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 225 | #if 1 | 2745 | 225 | { | 2746 | 225 | std::set<uint64_t> moduleIDs; | 2747 | 225 | for (const auto& m : modules ) { | 2748 | 120 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 120 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 120 | moduleIDs.insert(moduleID); | 2756 | 120 | } | 2757 | | | 2758 | 225 | std::set<uint64_t> operationModuleIDs; | 2759 | 225 | for (const auto& op : operations) { | 2760 | 188 | operationModuleIDs.insert(op.first->ID); | 2761 | 188 | } | 2762 | | | 2763 | 225 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 225 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 225 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 225 | for (const auto& id : addModuleIDs) { | 2768 | 35 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 35 | } | 2770 | 225 | } | 2771 | 225 | #endif | 2772 | | | 2773 | 225 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 225 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 448 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 223 | auto& operation = operations[i]; | 2782 | | | 2783 | 223 | auto& module = operation.first; | 2784 | 223 | auto& op = operation.second; | 2785 | | | 2786 | 223 | 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 | 88 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 88 | if ( curModifier.size() == 0 ) { | 2793 | 20.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 19.9k | curModifier.push_back(1); | 2795 | 19.9k | } | 2796 | 49 | } else { | 2797 | 958 | for (auto& c : curModifier) { | 2798 | 958 | c++; | 2799 | 958 | } | 2800 | 49 | } | 2801 | 88 | } | 2802 | 163 | } | 2803 | | | 2804 | 223 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 223 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 223 | const auto& result = results.back(); | 2811 | | | 2812 | 223 | 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 | 223 | 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 | 223 | if ( options.disableTests == false ) { | 2830 | 223 | tests::test(op, result.second); | 2831 | 223 | } | 2832 | | | 2833 | 223 | postprocess(module, op, result); | 2834 | 223 | } | 2835 | | | 2836 | 225 | if ( options.noCompare == false ) { | 2837 | 60 | compare(operations, results, data, size); | 2838 | 60 | } | 2839 | 225 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 252 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 252 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 252 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.44k | do { | 2725 | 4.44k | auto op = getOp(&parentDs, data, size); | 2726 | 4.44k | auto module = getModule(parentDs); | 2727 | 4.44k | if ( module == nullptr ) { | 2728 | 4.08k | continue; | 2729 | 4.08k | } | 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 | 16 | break; | 2736 | 16 | } | 2737 | 4.42k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 252 | if ( operations.empty() == true ) { | 2740 | 20 | return; | 2741 | 20 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 232 | #if 1 | 2745 | 232 | { | 2746 | 232 | std::set<uint64_t> moduleIDs; | 2747 | 232 | for (const auto& m : modules ) { | 2748 | 166 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 166 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 166 | moduleIDs.insert(moduleID); | 2756 | 166 | } | 2757 | | | 2758 | 232 | std::set<uint64_t> operationModuleIDs; | 2759 | 232 | for (const auto& op : operations) { | 2760 | 226 | operationModuleIDs.insert(op.first->ID); | 2761 | 226 | } | 2762 | | | 2763 | 232 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 232 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 232 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 232 | for (const auto& id : addModuleIDs) { | 2768 | 63 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 63 | } | 2770 | 232 | } | 2771 | 232 | #endif | 2772 | | | 2773 | 232 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 232 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 521 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 289 | auto& operation = operations[i]; | 2782 | | | 2783 | 289 | auto& module = operation.first; | 2784 | 289 | auto& op = operation.second; | 2785 | | | 2786 | 289 | if ( i > 0 ) { | 2787 | 206 | auto& prevModule = operations[i-1].first; | 2788 | 206 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 206 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 109 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 109 | if ( curModifier.size() == 0 ) { | 2793 | 26.1k | for (size_t j = 0; j < 512; j++) { | 2794 | 26.1k | curModifier.push_back(1); | 2795 | 26.1k | } | 2796 | 58 | } else { | 2797 | 3.05k | for (auto& c : curModifier) { | 2798 | 3.05k | c++; | 2799 | 3.05k | } | 2800 | 58 | } | 2801 | 109 | } | 2802 | 206 | } | 2803 | | | 2804 | 289 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 289 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 289 | const auto& result = results.back(); | 2811 | | | 2812 | 289 | 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 | 289 | 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 | 289 | if ( options.disableTests == false ) { | 2830 | 289 | tests::test(op, result.second); | 2831 | 289 | } | 2832 | | | 2833 | 289 | postprocess(module, op, result); | 2834 | 289 | } | 2835 | | | 2836 | 232 | if ( options.noCompare == false ) { | 2837 | 83 | compare(operations, results, data, size); | 2838 | 83 | } | 2839 | 232 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 278 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 278 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 278 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.68k | do { | 2725 | 4.68k | auto op = getOp(&parentDs, data, size); | 2726 | 4.68k | auto module = getModule(parentDs); | 2727 | 4.68k | if ( module == nullptr ) { | 2728 | 4.34k | continue; | 2729 | 4.34k | } | 2730 | | | 2731 | 337 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 337 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 11 | break; | 2736 | 11 | } | 2737 | 4.66k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 278 | if ( operations.empty() == true ) { | 2740 | 73 | return; | 2741 | 73 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 205 | #if 1 | 2745 | 205 | { | 2746 | 205 | std::set<uint64_t> moduleIDs; | 2747 | 205 | for (const auto& m : modules ) { | 2748 | 132 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 132 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 132 | moduleIDs.insert(moduleID); | 2756 | 132 | } | 2757 | | | 2758 | 205 | std::set<uint64_t> operationModuleIDs; | 2759 | 205 | for (const auto& op : operations) { | 2760 | 189 | operationModuleIDs.insert(op.first->ID); | 2761 | 189 | } | 2762 | | | 2763 | 205 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 205 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 205 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 205 | for (const auto& id : addModuleIDs) { | 2768 | 43 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 43 | } | 2770 | 205 | } | 2771 | 205 | #endif | 2772 | | | 2773 | 205 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 205 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 437 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 232 | auto& operation = operations[i]; | 2782 | | | 2783 | 232 | auto& module = operation.first; | 2784 | 232 | auto& op = operation.second; | 2785 | | | 2786 | 232 | if ( i > 0 ) { | 2787 | 166 | auto& prevModule = operations[i-1].first; | 2788 | 166 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 166 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 87 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 87 | if ( curModifier.size() == 0 ) { | 2793 | 21.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 20.9k | curModifier.push_back(1); | 2795 | 20.9k | } | 2796 | 46 | } else { | 2797 | 1.59k | for (auto& c : curModifier) { | 2798 | 1.59k | c++; | 2799 | 1.59k | } | 2800 | 46 | } | 2801 | 87 | } | 2802 | 166 | } | 2803 | | | 2804 | 232 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 232 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 232 | const auto& result = results.back(); | 2811 | | | 2812 | 232 | 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 | 232 | 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 | 232 | if ( options.disableTests == false ) { | 2830 | 232 | tests::test(op, result.second); | 2831 | 232 | } | 2832 | | | 2833 | 232 | postprocess(module, op, result); | 2834 | 232 | } | 2835 | | | 2836 | 205 | if ( options.noCompare == false ) { | 2837 | 66 | compare(operations, results, data, size); | 2838 | 66 | } | 2839 | 205 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 204 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 204 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 204 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.06k | do { | 2725 | 5.06k | auto op = getOp(&parentDs, data, size); | 2726 | 5.06k | auto module = getModule(parentDs); | 2727 | 5.06k | if ( module == nullptr ) { | 2728 | 4.67k | continue; | 2729 | 4.67k | } | 2730 | | | 2731 | 394 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 394 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 16 | break; | 2736 | 16 | } | 2737 | 5.05k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 204 | if ( operations.empty() == true ) { | 2740 | 20 | return; | 2741 | 20 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 184 | #if 1 | 2745 | 184 | { | 2746 | 184 | std::set<uint64_t> moduleIDs; | 2747 | 184 | for (const auto& m : modules ) { | 2748 | 152 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 152 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 152 | moduleIDs.insert(moduleID); | 2756 | 152 | } | 2757 | | | 2758 | 184 | std::set<uint64_t> operationModuleIDs; | 2759 | 221 | for (const auto& op : operations) { | 2760 | 221 | operationModuleIDs.insert(op.first->ID); | 2761 | 221 | } | 2762 | | | 2763 | 184 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 184 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 184 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 184 | for (const auto& id : addModuleIDs) { | 2768 | 56 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 56 | } | 2770 | 184 | } | 2771 | 184 | #endif | 2772 | | | 2773 | 184 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 184 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 461 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 277 | auto& operation = operations[i]; | 2782 | | | 2783 | 277 | auto& module = operation.first; | 2784 | 277 | auto& op = operation.second; | 2785 | | | 2786 | 277 | 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 | 109 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 109 | if ( curModifier.size() == 0 ) { | 2793 | 33.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 33.2k | curModifier.push_back(1); | 2795 | 33.2k | } | 2796 | 65 | } else { | 2797 | 1.68k | for (auto& c : curModifier) { | 2798 | 1.68k | c++; | 2799 | 1.68k | } | 2800 | 44 | } | 2801 | 109 | } | 2802 | 201 | } | 2803 | | | 2804 | 277 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 277 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 277 | const auto& result = results.back(); | 2811 | | | 2812 | 277 | 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 | 277 | 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 | 277 | if ( options.disableTests == false ) { | 2830 | 277 | tests::test(op, result.second); | 2831 | 277 | } | 2832 | | | 2833 | 277 | postprocess(module, op, result); | 2834 | 277 | } | 2835 | | | 2836 | 184 | if ( options.noCompare == false ) { | 2837 | 76 | compare(operations, results, data, size); | 2838 | 76 | } | 2839 | 184 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 236 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 236 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 236 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.58k | do { | 2725 | 5.58k | auto op = getOp(&parentDs, data, size); | 2726 | 5.58k | auto module = getModule(parentDs); | 2727 | 5.58k | if ( module == nullptr ) { | 2728 | 5.18k | continue; | 2729 | 5.18k | } | 2730 | | | 2731 | 406 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 406 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 11 | break; | 2736 | 11 | } | 2737 | 5.57k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 236 | if ( operations.empty() == true ) { | 2740 | 27 | return; | 2741 | 27 | } | 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 | 142 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 142 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 142 | moduleIDs.insert(moduleID); | 2756 | 142 | } | 2757 | | | 2758 | 209 | std::set<uint64_t> operationModuleIDs; | 2759 | 209 | for (const auto& op : operations) { | 2760 | 186 | operationModuleIDs.insert(op.first->ID); | 2761 | 186 | } | 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 | 47 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 47 | } | 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 | 442 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 233 | auto& operation = operations[i]; | 2782 | | | 2783 | 233 | auto& module = operation.first; | 2784 | 233 | auto& op = operation.second; | 2785 | | | 2786 | 233 | if ( i > 0 ) { | 2787 | 162 | auto& prevModule = operations[i-1].first; | 2788 | 162 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 162 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 76 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 76 | if ( curModifier.size() == 0 ) { | 2793 | 17.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 17.4k | curModifier.push_back(1); | 2795 | 17.4k | } | 2796 | 42 | } else { | 2797 | 1.23k | for (auto& c : curModifier) { | 2798 | 1.23k | c++; | 2799 | 1.23k | } | 2800 | 42 | } | 2801 | 76 | } | 2802 | 162 | } | 2803 | | | 2804 | 233 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 233 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 233 | const auto& result = results.back(); | 2811 | | | 2812 | 233 | 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 | 233 | 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 | 233 | if ( options.disableTests == false ) { | 2830 | 233 | tests::test(op, result.second); | 2831 | 233 | } | 2832 | | | 2833 | 233 | postprocess(module, op, result); | 2834 | 233 | } | 2835 | | | 2836 | 209 | if ( options.noCompare == false ) { | 2837 | 71 | compare(operations, results, data, size); | 2838 | 71 | } | 2839 | 209 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 273 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 273 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 273 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.64k | do { | 2725 | 3.64k | auto op = getOp(&parentDs, data, size); | 2726 | 3.64k | auto module = getModule(parentDs); | 2727 | 3.64k | if ( module == nullptr ) { | 2728 | 3.11k | continue; | 2729 | 3.11k | } | 2730 | | | 2731 | 526 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 526 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 22 | break; | 2736 | 22 | } | 2737 | 3.62k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 273 | if ( operations.empty() == true ) { | 2740 | 20 | return; | 2741 | 20 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 253 | #if 1 | 2745 | 253 | { | 2746 | 253 | std::set<uint64_t> moduleIDs; | 2747 | 280 | for (const auto& m : modules ) { | 2748 | 280 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 280 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 280 | moduleIDs.insert(moduleID); | 2756 | 280 | } | 2757 | | | 2758 | 253 | std::set<uint64_t> operationModuleIDs; | 2759 | 378 | for (const auto& op : operations) { | 2760 | 378 | operationModuleIDs.insert(op.first->ID); | 2761 | 378 | } | 2762 | | | 2763 | 253 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 253 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 253 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 253 | for (const auto& id : addModuleIDs) { | 2768 | 114 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 114 | } | 2770 | 253 | } | 2771 | 253 | #endif | 2772 | | | 2773 | 253 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 253 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 745 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 492 | auto& operation = operations[i]; | 2782 | | | 2783 | 492 | auto& module = operation.first; | 2784 | 492 | auto& op = operation.second; | 2785 | | | 2786 | 492 | if ( i > 0 ) { | 2787 | 352 | auto& prevModule = operations[i-1].first; | 2788 | 352 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 352 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 192 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 192 | if ( curModifier.size() == 0 ) { | 2793 | 44.6k | for (size_t j = 0; j < 512; j++) { | 2794 | 44.5k | curModifier.push_back(1); | 2795 | 44.5k | } | 2796 | 105 | } else { | 2797 | 990 | for (auto& c : curModifier) { | 2798 | 990 | c++; | 2799 | 990 | } | 2800 | 105 | } | 2801 | 192 | } | 2802 | 352 | } | 2803 | | | 2804 | 492 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 492 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 492 | const auto& result = results.back(); | 2811 | | | 2812 | 492 | if ( result.second != std::nullopt ) { | 2813 | 55 | 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 | 55 | } | 2820 | | | 2821 | 492 | 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 | 492 | if ( options.disableTests == false ) { | 2830 | 492 | tests::test(op, result.second); | 2831 | 492 | } | 2832 | | | 2833 | 492 | postprocess(module, op, result); | 2834 | 492 | } | 2835 | | | 2836 | 253 | if ( options.noCompare == false ) { | 2837 | 140 | compare(operations, results, data, size); | 2838 | 140 | } | 2839 | 253 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 296 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 296 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 296 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.10k | do { | 2725 | 4.10k | auto op = getOp(&parentDs, data, size); | 2726 | 4.10k | auto module = getModule(parentDs); | 2727 | 4.10k | if ( module == nullptr ) { | 2728 | 3.55k | continue; | 2729 | 3.55k | } | 2730 | | | 2731 | 549 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 549 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 17 | break; | 2736 | 17 | } | 2737 | 4.08k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 296 | if ( operations.empty() == true ) { | 2740 | 24 | return; | 2741 | 24 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 272 | #if 1 | 2745 | 272 | { | 2746 | 272 | std::set<uint64_t> moduleIDs; | 2747 | 272 | for (const auto& m : modules ) { | 2748 | 272 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 272 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 272 | moduleIDs.insert(moduleID); | 2756 | 272 | } | 2757 | | | 2758 | 272 | std::set<uint64_t> operationModuleIDs; | 2759 | 354 | for (const auto& op : operations) { | 2760 | 354 | operationModuleIDs.insert(op.first->ID); | 2761 | 354 | } | 2762 | | | 2763 | 272 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 272 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 272 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 272 | for (const auto& id : addModuleIDs) { | 2768 | 111 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 111 | } | 2770 | 272 | } | 2771 | 272 | #endif | 2772 | | | 2773 | 272 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 272 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 737 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 465 | auto& operation = operations[i]; | 2782 | | | 2783 | 465 | auto& module = operation.first; | 2784 | 465 | auto& op = operation.second; | 2785 | | | 2786 | 465 | if ( i > 0 ) { | 2787 | 329 | auto& prevModule = operations[i-1].first; | 2788 | 329 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 329 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 177 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 177 | if ( curModifier.size() == 0 ) { | 2793 | 46.6k | for (size_t j = 0; j < 512; j++) { | 2794 | 46.5k | curModifier.push_back(1); | 2795 | 46.5k | } | 2796 | 91 | } else { | 2797 | 1.60k | for (auto& c : curModifier) { | 2798 | 1.60k | c++; | 2799 | 1.60k | } | 2800 | 86 | } | 2801 | 177 | } | 2802 | 329 | } | 2803 | | | 2804 | 465 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 465 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 465 | const auto& result = results.back(); | 2811 | | | 2812 | 465 | 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 | 465 | 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 | 465 | if ( options.disableTests == false ) { | 2830 | 465 | tests::test(op, result.second); | 2831 | 465 | } | 2832 | | | 2833 | 465 | postprocess(module, op, result); | 2834 | 465 | } | 2835 | | | 2836 | 272 | if ( options.noCompare == false ) { | 2837 | 136 | compare(operations, results, data, size); | 2838 | 136 | } | 2839 | 272 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 827 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 827 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 827 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.90k | do { | 2725 | 5.90k | auto op = getOp(&parentDs, data, size); | 2726 | 5.90k | auto module = getModule(parentDs); | 2727 | 5.90k | if ( module == nullptr ) { | 2728 | 4.39k | continue; | 2729 | 4.39k | } | 2730 | | | 2731 | 1.51k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.51k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 36 | break; | 2736 | 36 | } | 2737 | 5.87k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 827 | if ( operations.empty() == true ) { | 2740 | 29 | return; | 2741 | 29 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 798 | #if 1 | 2745 | 798 | { | 2746 | 798 | std::set<uint64_t> moduleIDs; | 2747 | 1.38k | for (const auto& m : modules ) { | 2748 | 1.38k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.38k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.38k | moduleIDs.insert(moduleID); | 2756 | 1.38k | } | 2757 | | | 2758 | 798 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.38k | for (const auto& op : operations) { | 2760 | 1.38k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.38k | } | 2762 | | | 2763 | 798 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 798 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 798 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 798 | for (const auto& id : addModuleIDs) { | 2768 | 665 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 665 | } | 2770 | 798 | } | 2771 | 798 | #endif | 2772 | | | 2773 | 798 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 798 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 2.84k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 2.04k | auto& operation = operations[i]; | 2782 | | | 2783 | 2.04k | auto& module = operation.first; | 2784 | 2.04k | auto& op = operation.second; | 2785 | | | 2786 | 2.04k | if ( i > 0 ) { | 2787 | 1.35k | auto& prevModule = operations[i-1].first; | 2788 | 1.35k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 1.35k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 640 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 640 | if ( curModifier.size() == 0 ) { | 2793 | 271k | for (size_t j = 0; j < 512; j++) { | 2794 | 270k | curModifier.push_back(1); | 2795 | 270k | } | 2796 | 529 | } else { | 2797 | 5.27k | for (auto& c : curModifier) { | 2798 | 5.27k | c++; | 2799 | 5.27k | } | 2800 | 111 | } | 2801 | 640 | } | 2802 | 1.35k | } | 2803 | | | 2804 | 2.04k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 2.04k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 2.04k | const auto& result = results.back(); | 2811 | | | 2812 | 2.04k | if ( result.second != std::nullopt ) { | 2813 | 306 | 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 | 306 | } | 2820 | | | 2821 | 2.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 | 2.04k | if ( options.disableTests == false ) { | 2830 | 2.04k | tests::test(op, result.second); | 2831 | 2.04k | } | 2832 | | | 2833 | 2.04k | postprocess(module, op, result); | 2834 | 2.04k | } | 2835 | | | 2836 | 798 | if ( options.noCompare == false ) { | 2837 | 694 | compare(operations, results, data, size); | 2838 | 694 | } | 2839 | 798 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 314 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 314 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 314 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.63k | do { | 2725 | 3.63k | auto op = getOp(&parentDs, data, size); | 2726 | 3.63k | auto module = getModule(parentDs); | 2727 | 3.63k | if ( module == nullptr ) { | 2728 | 3.19k | continue; | 2729 | 3.19k | } | 2730 | | | 2731 | 434 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 434 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 17 | break; | 2736 | 17 | } | 2737 | 3.61k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 314 | if ( operations.empty() == true ) { | 2740 | 50 | return; | 2741 | 50 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 264 | #if 1 | 2745 | 264 | { | 2746 | 264 | std::set<uint64_t> moduleIDs; | 2747 | 264 | for (const auto& m : modules ) { | 2748 | 230 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 230 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 230 | moduleIDs.insert(moduleID); | 2756 | 230 | } | 2757 | | | 2758 | 264 | std::set<uint64_t> operationModuleIDs; | 2759 | 313 | for (const auto& op : operations) { | 2760 | 313 | operationModuleIDs.insert(op.first->ID); | 2761 | 313 | } | 2762 | | | 2763 | 264 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 264 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 264 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 264 | for (const auto& id : addModuleIDs) { | 2768 | 91 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 91 | } | 2770 | 264 | } | 2771 | 264 | #endif | 2772 | | | 2773 | 264 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 264 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 668 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 404 | auto& operation = operations[i]; | 2782 | | | 2783 | 404 | auto& module = operation.first; | 2784 | 404 | auto& op = operation.second; | 2785 | | | 2786 | 404 | if ( i > 0 ) { | 2787 | 289 | auto& prevModule = operations[i-1].first; | 2788 | 289 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 289 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 159 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 159 | if ( curModifier.size() == 0 ) { | 2793 | 39.5k | for (size_t j = 0; j < 512; j++) { | 2794 | 39.4k | curModifier.push_back(1); | 2795 | 39.4k | } | 2796 | 82 | } else { | 2797 | 1.03k | for (auto& c : curModifier) { | 2798 | 1.03k | c++; | 2799 | 1.03k | } | 2800 | 82 | } | 2801 | 159 | } | 2802 | 289 | } | 2803 | | | 2804 | 404 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 404 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 404 | const auto& result = results.back(); | 2811 | | | 2812 | 404 | if ( result.second != std::nullopt ) { | 2813 | 75 | 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 | 75 | } | 2820 | | | 2821 | 404 | 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 | 404 | if ( options.disableTests == false ) { | 2830 | 404 | tests::test(op, result.second); | 2831 | 404 | } | 2832 | | | 2833 | 404 | postprocess(module, op, result); | 2834 | 404 | } | 2835 | | | 2836 | 264 | if ( options.noCompare == false ) { | 2837 | 115 | compare(operations, results, data, size); | 2838 | 115 | } | 2839 | 264 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 310 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 310 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 310 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.34k | do { | 2725 | 3.34k | auto op = getOp(&parentDs, data, size); | 2726 | 3.34k | auto module = getModule(parentDs); | 2727 | 3.34k | if ( module == nullptr ) { | 2728 | 2.90k | continue; | 2729 | 2.90k | } | 2730 | | | 2731 | 445 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 445 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 17 | break; | 2736 | 17 | } | 2737 | 3.32k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 310 | if ( operations.empty() == true ) { | 2740 | 48 | return; | 2741 | 48 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 262 | #if 1 | 2745 | 262 | { | 2746 | 262 | std::set<uint64_t> moduleIDs; | 2747 | 262 | for (const auto& m : modules ) { | 2748 | 252 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 252 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 252 | moduleIDs.insert(moduleID); | 2756 | 252 | } | 2757 | | | 2758 | 262 | std::set<uint64_t> operationModuleIDs; | 2759 | 321 | for (const auto& op : operations) { | 2760 | 321 | operationModuleIDs.insert(op.first->ID); | 2761 | 321 | } | 2762 | | | 2763 | 262 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 262 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 262 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 262 | for (const auto& id : addModuleIDs) { | 2768 | 104 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 104 | } | 2770 | 262 | } | 2771 | 262 | #endif | 2772 | | | 2773 | 262 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 262 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 687 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 425 | auto& operation = operations[i]; | 2782 | | | 2783 | 425 | auto& module = operation.first; | 2784 | 425 | auto& op = operation.second; | 2785 | | | 2786 | 425 | if ( i > 0 ) { | 2787 | 299 | auto& prevModule = operations[i-1].first; | 2788 | 299 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 299 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 157 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 157 | if ( curModifier.size() == 0 ) { | 2793 | 36.9k | for (size_t j = 0; j < 512; j++) { | 2794 | 36.8k | curModifier.push_back(1); | 2795 | 36.8k | } | 2796 | 85 | } else { | 2797 | 993 | for (auto& c : curModifier) { | 2798 | 993 | c++; | 2799 | 993 | } | 2800 | 85 | } | 2801 | 157 | } | 2802 | 299 | } | 2803 | | | 2804 | 425 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 425 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 425 | const auto& result = results.back(); | 2811 | | | 2812 | 425 | 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 | 425 | 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 | 425 | if ( options.disableTests == false ) { | 2830 | 425 | tests::test(op, result.second); | 2831 | 425 | } | 2832 | | | 2833 | 425 | postprocess(module, op, result); | 2834 | 425 | } | 2835 | | | 2836 | 262 | if ( options.noCompare == false ) { | 2837 | 126 | compare(operations, results, data, size); | 2838 | 126 | } | 2839 | 262 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 242 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 242 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 242 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.90k | do { | 2725 | 3.90k | auto op = getOp(&parentDs, data, size); | 2726 | 3.90k | auto module = getModule(parentDs); | 2727 | 3.90k | if ( module == nullptr ) { | 2728 | 3.44k | continue; | 2729 | 3.44k | } | 2730 | | | 2731 | 459 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 459 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 14 | break; | 2736 | 14 | } | 2737 | 3.89k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 242 | if ( operations.empty() == true ) { | 2740 | 14 | return; | 2741 | 14 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 228 | #if 1 | 2745 | 228 | { | 2746 | 228 | std::set<uint64_t> moduleIDs; | 2747 | 250 | for (const auto& m : modules ) { | 2748 | 250 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 250 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 250 | moduleIDs.insert(moduleID); | 2756 | 250 | } | 2757 | | | 2758 | 228 | std::set<uint64_t> operationModuleIDs; | 2759 | 344 | for (const auto& op : operations) { | 2760 | 344 | operationModuleIDs.insert(op.first->ID); | 2761 | 344 | } | 2762 | | | 2763 | 228 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 228 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 228 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 228 | for (const auto& id : addModuleIDs) { | 2768 | 103 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 103 | } | 2770 | 228 | } | 2771 | 228 | #endif | 2772 | | | 2773 | 228 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 228 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 675 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 447 | auto& operation = operations[i]; | 2782 | | | 2783 | 447 | auto& module = operation.first; | 2784 | 447 | auto& op = operation.second; | 2785 | | | 2786 | 447 | if ( i > 0 ) { | 2787 | 322 | auto& prevModule = operations[i-1].first; | 2788 | 322 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 322 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 185 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 185 | if ( curModifier.size() == 0 ) { | 2793 | 60.5k | for (size_t j = 0; j < 512; j++) { | 2794 | 60.4k | curModifier.push_back(1); | 2795 | 60.4k | } | 2796 | 118 | } else { | 2797 | 1.15k | for (auto& c : curModifier) { | 2798 | 1.15k | c++; | 2799 | 1.15k | } | 2800 | 67 | } | 2801 | 185 | } | 2802 | 322 | } | 2803 | | | 2804 | 447 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 447 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 447 | const auto& result = results.back(); | 2811 | | | 2812 | 447 | 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 | 447 | 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 | 447 | if ( options.disableTests == false ) { | 2830 | 447 | tests::test(op, result.second); | 2831 | 447 | } | 2832 | | | 2833 | 447 | postprocess(module, op, result); | 2834 | 447 | } | 2835 | | | 2836 | 228 | if ( options.noCompare == false ) { | 2837 | 125 | compare(operations, results, data, size); | 2838 | 125 | } | 2839 | 228 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 289 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 289 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 289 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.65k | do { | 2725 | 4.65k | auto op = getOp(&parentDs, data, size); | 2726 | 4.65k | auto module = getModule(parentDs); | 2727 | 4.65k | if ( module == nullptr ) { | 2728 | 4.30k | continue; | 2729 | 4.30k | } | 2730 | | | 2731 | 354 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 354 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 16 | break; | 2736 | 16 | } | 2737 | 4.63k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 289 | if ( operations.empty() == true ) { | 2740 | 37 | return; | 2741 | 37 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 252 | #if 1 | 2745 | 252 | { | 2746 | 252 | std::set<uint64_t> moduleIDs; | 2747 | 252 | for (const auto& m : modules ) { | 2748 | 156 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 156 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 156 | moduleIDs.insert(moduleID); | 2756 | 156 | } | 2757 | | | 2758 | 252 | std::set<uint64_t> operationModuleIDs; | 2759 | 252 | for (const auto& op : operations) { | 2760 | 208 | operationModuleIDs.insert(op.first->ID); | 2761 | 208 | } | 2762 | | | 2763 | 252 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 252 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 252 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 252 | for (const auto& id : addModuleIDs) { | 2768 | 54 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 54 | } | 2770 | 252 | } | 2771 | 252 | #endif | 2772 | | | 2773 | 252 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 252 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 514 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 262 | auto& operation = operations[i]; | 2782 | | | 2783 | 262 | auto& module = operation.first; | 2784 | 262 | auto& op = operation.second; | 2785 | | | 2786 | 262 | if ( i > 0 ) { | 2787 | 184 | auto& prevModule = operations[i-1].first; | 2788 | 184 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 184 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 88 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 88 | if ( curModifier.size() == 0 ) { | 2793 | 19.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 19.4k | curModifier.push_back(1); | 2795 | 19.4k | } | 2796 | 50 | } else { | 2797 | 1.33k | for (auto& c : curModifier) { | 2798 | 1.33k | c++; | 2799 | 1.33k | } | 2800 | 50 | } | 2801 | 88 | } | 2802 | 184 | } | 2803 | | | 2804 | 262 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 262 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 262 | const auto& result = results.back(); | 2811 | | | 2812 | 262 | 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 | 262 | 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 | 262 | if ( options.disableTests == false ) { | 2830 | 262 | tests::test(op, result.second); | 2831 | 262 | } | 2832 | | | 2833 | 262 | postprocess(module, op, result); | 2834 | 262 | } | 2835 | | | 2836 | 252 | if ( options.noCompare == false ) { | 2837 | 78 | compare(operations, results, data, size); | 2838 | 78 | } | 2839 | 252 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 519 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 519 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 519 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.94k | do { | 2725 | 5.94k | auto op = getOp(&parentDs, data, size); | 2726 | 5.94k | auto module = getModule(parentDs); | 2727 | 5.94k | if ( module == nullptr ) { | 2728 | 5.03k | continue; | 2729 | 5.03k | } | 2730 | | | 2731 | 911 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 911 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 22 | break; | 2736 | 22 | } | 2737 | 5.92k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 519 | if ( operations.empty() == true ) { | 2740 | 9 | return; | 2741 | 9 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 510 | #if 1 | 2745 | 510 | { | 2746 | 510 | std::set<uint64_t> moduleIDs; | 2747 | 730 | for (const auto& m : modules ) { | 2748 | 730 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 730 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 730 | moduleIDs.insert(moduleID); | 2756 | 730 | } | 2757 | | | 2758 | 510 | std::set<uint64_t> operationModuleIDs; | 2759 | 748 | for (const auto& op : operations) { | 2760 | 748 | operationModuleIDs.insert(op.first->ID); | 2761 | 748 | } | 2762 | | | 2763 | 510 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 510 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 510 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 510 | for (const auto& id : addModuleIDs) { | 2768 | 340 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 340 | } | 2770 | 510 | } | 2771 | 510 | #endif | 2772 | | | 2773 | 510 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 510 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.59k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.08k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.08k | auto& module = operation.first; | 2784 | 1.08k | auto& op = operation.second; | 2785 | | | 2786 | 1.08k | if ( i > 0 ) { | 2787 | 723 | auto& prevModule = operations[i-1].first; | 2788 | 723 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 723 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 344 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 344 | if ( curModifier.size() == 0 ) { | 2793 | 71.8k | for (size_t j = 0; j < 512; j++) { | 2794 | 71.6k | curModifier.push_back(1); | 2795 | 71.6k | } | 2796 | 204 | } else { | 2797 | 6.99k | for (auto& c : curModifier) { | 2798 | 6.99k | c++; | 2799 | 6.99k | } | 2800 | 204 | } | 2801 | 344 | } | 2802 | 723 | } | 2803 | | | 2804 | 1.08k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.08k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.08k | const auto& result = results.back(); | 2811 | | | 2812 | 1.08k | if ( result.second != std::nullopt ) { | 2813 | 79 | 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 | 79 | } | 2820 | | | 2821 | 1.08k | 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.08k | if ( options.disableTests == false ) { | 2830 | 1.08k | tests::test(op, result.second); | 2831 | 1.08k | } | 2832 | | | 2833 | 1.08k | postprocess(module, op, result); | 2834 | 1.08k | } | 2835 | | | 2836 | 510 | if ( options.noCompare == false ) { | 2837 | 365 | compare(operations, results, data, size); | 2838 | 365 | } | 2839 | 510 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 10.6k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 10.6k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 10.6k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 30.4k | do { | 2725 | 30.4k | auto op = getOp(&parentDs, data, size); | 2726 | 30.4k | auto module = getModule(parentDs); | 2727 | 30.4k | if ( module == nullptr ) { | 2728 | 15.0k | continue; | 2729 | 15.0k | } | 2730 | | | 2731 | 15.3k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 15.3k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 245 | break; | 2736 | 245 | } | 2737 | 30.1k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 10.6k | if ( operations.empty() == true ) { | 2740 | 150 | return; | 2741 | 150 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 10.5k | #if 1 | 2745 | 10.5k | { | 2746 | 10.5k | std::set<uint64_t> moduleIDs; | 2747 | 20.0k | for (const auto& m : modules ) { | 2748 | 20.0k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 20.0k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 20.0k | moduleIDs.insert(moduleID); | 2756 | 20.0k | } | 2757 | | | 2758 | 10.5k | std::set<uint64_t> operationModuleIDs; | 2759 | 14.7k | for (const auto& op : operations) { | 2760 | 14.7k | operationModuleIDs.insert(op.first->ID); | 2761 | 14.7k | } | 2762 | | | 2763 | 10.5k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 10.5k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 10.5k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 10.5k | for (const auto& id : addModuleIDs) { | 2768 | 9.96k | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 9.96k | } | 2770 | 10.5k | } | 2771 | 10.5k | #endif | 2772 | | | 2773 | 10.5k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 10.5k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 35.2k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 24.7k | auto& operation = operations[i]; | 2782 | | | 2783 | 24.7k | auto& module = operation.first; | 2784 | 24.7k | auto& op = operation.second; | 2785 | | | 2786 | 24.7k | if ( i > 0 ) { | 2787 | 14.7k | auto& prevModule = operations[i-1].first; | 2788 | 14.7k | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 14.7k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 4.69k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 4.69k | if ( curModifier.size() == 0 ) { | 2793 | 1.24M | for (size_t j = 0; j < 512; j++) { | 2794 | 1.24M | curModifier.push_back(1); | 2795 | 1.24M | } | 2796 | 2.43k | } else { | 2797 | 120k | for (auto& c : curModifier) { | 2798 | 120k | c++; | 2799 | 120k | } | 2800 | 2.25k | } | 2801 | 4.69k | } | 2802 | 14.7k | } | 2803 | | | 2804 | 24.7k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 24.7k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 24.7k | const auto& result = results.back(); | 2811 | | | 2812 | 24.7k | if ( result.second != std::nullopt ) { | 2813 | 6.75k | 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 | 6.75k | } | 2820 | | | 2821 | 24.7k | 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 | 24.7k | if ( options.disableTests == false ) { | 2830 | 24.7k | tests::test(op, result.second); | 2831 | 24.7k | } | 2832 | | | 2833 | 24.7k | postprocess(module, op, result); | 2834 | 24.7k | } | 2835 | | | 2836 | 10.5k | if ( options.noCompare == false ) { | 2837 | 10.0k | compare(operations, results, data, size); | 2838 | 10.0k | } | 2839 | 10.5k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 242 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 242 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 242 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.57k | do { | 2725 | 4.57k | auto op = getOp(&parentDs, data, size); | 2726 | 4.57k | auto module = getModule(parentDs); | 2727 | 4.57k | if ( module == nullptr ) { | 2728 | 4.12k | continue; | 2729 | 4.12k | } | 2730 | | | 2731 | 454 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 454 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 15 | break; | 2736 | 15 | } | 2737 | 4.56k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 242 | if ( operations.empty() == true ) { | 2740 | 9 | return; | 2741 | 9 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 233 | #if 1 | 2745 | 233 | { | 2746 | 233 | std::set<uint64_t> moduleIDs; | 2747 | 264 | for (const auto& m : modules ) { | 2748 | 264 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 264 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 264 | moduleIDs.insert(moduleID); | 2756 | 264 | } | 2757 | | | 2758 | 233 | std::set<uint64_t> operationModuleIDs; | 2759 | 297 | for (const auto& op : operations) { | 2760 | 297 | operationModuleIDs.insert(op.first->ID); | 2761 | 297 | } | 2762 | | | 2763 | 233 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 233 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 233 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 233 | for (const auto& id : addModuleIDs) { | 2768 | 110 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 110 | } | 2770 | 233 | } | 2771 | 233 | #endif | 2772 | | | 2773 | 233 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 233 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 640 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 407 | auto& operation = operations[i]; | 2782 | | | 2783 | 407 | auto& module = operation.first; | 2784 | 407 | auto& op = operation.second; | 2785 | | | 2786 | 407 | if ( i > 0 ) { | 2787 | 275 | auto& prevModule = operations[i-1].first; | 2788 | 275 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 275 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 131 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 131 | if ( curModifier.size() == 0 ) { | 2793 | 41.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 40.9k | curModifier.push_back(1); | 2795 | 40.9k | } | 2796 | 80 | } else { | 2797 | 1.66k | for (auto& c : curModifier) { | 2798 | 1.66k | c++; | 2799 | 1.66k | } | 2800 | 51 | } | 2801 | 131 | } | 2802 | 275 | } | 2803 | | | 2804 | 407 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 407 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 407 | const auto& result = results.back(); | 2811 | | | 2812 | 407 | 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 | 407 | 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 | 407 | if ( options.disableTests == false ) { | 2830 | 407 | tests::test(op, result.second); | 2831 | 407 | } | 2832 | | | 2833 | 407 | postprocess(module, op, result); | 2834 | 407 | } | 2835 | | | 2836 | 233 | if ( options.noCompare == false ) { | 2837 | 132 | compare(operations, results, data, size); | 2838 | 132 | } | 2839 | 233 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 640 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 640 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 640 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.16k | do { | 2725 | 5.16k | auto op = getOp(&parentDs, data, size); | 2726 | 5.16k | auto module = getModule(parentDs); | 2727 | 5.16k | if ( module == nullptr ) { | 2728 | 4.03k | continue; | 2729 | 4.03k | } | 2730 | | | 2731 | 1.12k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.12k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 48 | break; | 2736 | 48 | } | 2737 | 5.11k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 640 | if ( operations.empty() == true ) { | 2740 | 27 | return; | 2741 | 27 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 613 | #if 1 | 2745 | 613 | { | 2746 | 613 | std::set<uint64_t> moduleIDs; | 2747 | 1.00k | for (const auto& m : modules ) { | 2748 | 1.00k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.00k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.00k | moduleIDs.insert(moduleID); | 2756 | 1.00k | } | 2757 | | | 2758 | 613 | std::set<uint64_t> operationModuleIDs; | 2759 | 990 | for (const auto& op : operations) { | 2760 | 990 | operationModuleIDs.insert(op.first->ID); | 2761 | 990 | } | 2762 | | | 2763 | 613 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 613 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 613 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 613 | for (const auto& id : addModuleIDs) { | 2768 | 480 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 480 | } | 2770 | 613 | } | 2771 | 613 | #endif | 2772 | | | 2773 | 613 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 613 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 2.08k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.47k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.47k | auto& module = operation.first; | 2784 | 1.47k | auto& op = operation.second; | 2785 | | | 2786 | 1.47k | if ( i > 0 ) { | 2787 | 966 | auto& prevModule = operations[i-1].first; | 2788 | 966 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 966 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 447 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 447 | if ( curModifier.size() == 0 ) { | 2793 | 195k | for (size_t j = 0; j < 512; j++) { | 2794 | 195k | curModifier.push_back(1); | 2795 | 195k | } | 2796 | 382 | } else { | 2797 | 34.0k | for (auto& c : curModifier) { | 2798 | 34.0k | c++; | 2799 | 34.0k | } | 2800 | 65 | } | 2801 | 447 | } | 2802 | 966 | } | 2803 | | | 2804 | 1.47k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.47k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.47k | const auto& result = results.back(); | 2811 | | | 2812 | 1.47k | 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 | 1.47k | 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.47k | if ( options.disableTests == false ) { | 2830 | 1.47k | tests::test(op, result.second); | 2831 | 1.47k | } | 2832 | | | 2833 | 1.47k | postprocess(module, op, result); | 2834 | 1.47k | } | 2835 | | | 2836 | 613 | if ( options.noCompare == false ) { | 2837 | 504 | compare(operations, results, data, size); | 2838 | 504 | } | 2839 | 613 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 244 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 244 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 244 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.03k | do { | 2725 | 3.03k | auto op = getOp(&parentDs, data, size); | 2726 | 3.03k | auto module = getModule(parentDs); | 2727 | 3.03k | if ( module == nullptr ) { | 2728 | 2.70k | continue; | 2729 | 2.70k | } | 2730 | | | 2731 | 335 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 335 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 15 | break; | 2736 | 15 | } | 2737 | 3.02k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 244 | if ( operations.empty() == true ) { | 2740 | 28 | return; | 2741 | 28 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 216 | #if 1 | 2745 | 216 | { | 2746 | 216 | std::set<uint64_t> moduleIDs; | 2747 | 216 | 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 | 216 | std::set<uint64_t> operationModuleIDs; | 2759 | 216 | for (const auto& op : operations) { | 2760 | 210 | operationModuleIDs.insert(op.first->ID); | 2761 | 210 | } | 2762 | | | 2763 | 216 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 216 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 216 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 216 | for (const auto& id : addModuleIDs) { | 2768 | 74 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 74 | } | 2770 | 216 | } | 2771 | 216 | #endif | 2772 | | | 2773 | 216 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 216 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 500 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 284 | auto& operation = operations[i]; | 2782 | | | 2783 | 284 | auto& module = operation.first; | 2784 | 284 | auto& op = operation.second; | 2785 | | | 2786 | 284 | if ( i > 0 ) { | 2787 | 190 | auto& prevModule = operations[i-1].first; | 2788 | 190 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 190 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 82 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 82 | if ( curModifier.size() == 0 ) { | 2793 | 15.9k | for (size_t j = 0; j < 512; j++) { | 2794 | 15.8k | curModifier.push_back(1); | 2795 | 15.8k | } | 2796 | 51 | } else { | 2797 | 25.4k | for (auto& c : curModifier) { | 2798 | 25.4k | c++; | 2799 | 25.4k | } | 2800 | 51 | } | 2801 | 82 | } | 2802 | 190 | } | 2803 | | | 2804 | 284 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 284 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 284 | const auto& result = results.back(); | 2811 | | | 2812 | 284 | 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 | 284 | 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 | 284 | if ( options.disableTests == false ) { | 2830 | 284 | tests::test(op, result.second); | 2831 | 284 | } | 2832 | | | 2833 | 284 | postprocess(module, op, result); | 2834 | 284 | } | 2835 | | | 2836 | 216 | if ( options.noCompare == false ) { | 2837 | 94 | compare(operations, results, data, size); | 2838 | 94 | } | 2839 | 216 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 252 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 252 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 252 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.14k | do { | 2725 | 3.14k | auto op = getOp(&parentDs, data, size); | 2726 | 3.14k | auto module = getModule(parentDs); | 2727 | 3.14k | if ( module == nullptr ) { | 2728 | 2.75k | continue; | 2729 | 2.75k | } | 2730 | | | 2731 | 393 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 393 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 17 | break; | 2736 | 17 | } | 2737 | 3.12k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 252 | if ( operations.empty() == true ) { | 2740 | 22 | return; | 2741 | 22 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 230 | #if 1 | 2745 | 230 | { | 2746 | 230 | std::set<uint64_t> moduleIDs; | 2747 | 230 | for (const auto& m : modules ) { | 2748 | 206 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 206 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 206 | moduleIDs.insert(moduleID); | 2756 | 206 | } | 2757 | | | 2758 | 230 | std::set<uint64_t> operationModuleIDs; | 2759 | 248 | for (const auto& op : operations) { | 2760 | 248 | operationModuleIDs.insert(op.first->ID); | 2761 | 248 | } | 2762 | | | 2763 | 230 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 230 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 230 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 230 | for (const auto& id : addModuleIDs) { | 2768 | 81 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 81 | } | 2770 | 230 | } | 2771 | 230 | #endif | 2772 | | | 2773 | 230 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 230 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 559 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 329 | auto& operation = operations[i]; | 2782 | | | 2783 | 329 | auto& module = operation.first; | 2784 | 329 | auto& op = operation.second; | 2785 | | | 2786 | 329 | if ( i > 0 ) { | 2787 | 226 | auto& prevModule = operations[i-1].first; | 2788 | 226 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 226 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 105 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 105 | 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 | 56 | } else { | 2797 | 1.36k | for (auto& c : curModifier) { | 2798 | 1.36k | c++; | 2799 | 1.36k | } | 2800 | 56 | } | 2801 | 105 | } | 2802 | 226 | } | 2803 | | | 2804 | 329 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 329 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 329 | const auto& result = results.back(); | 2811 | | | 2812 | 329 | 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 | 329 | 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 | 329 | if ( options.disableTests == false ) { | 2830 | 329 | tests::test(op, result.second); | 2831 | 329 | } | 2832 | | | 2833 | 329 | postprocess(module, op, result); | 2834 | 329 | } | 2835 | | | 2836 | 230 | if ( options.noCompare == false ) { | 2837 | 103 | compare(operations, results, data, size); | 2838 | 103 | } | 2839 | 230 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 329 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 329 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 329 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.25k | do { | 2725 | 5.25k | auto op = getOp(&parentDs, data, size); | 2726 | 5.25k | auto module = getModule(parentDs); | 2727 | 5.25k | if ( module == nullptr ) { | 2728 | 4.81k | continue; | 2729 | 4.81k | } | 2730 | | | 2731 | 447 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 447 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 14 | break; | 2736 | 14 | } | 2737 | 5.24k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 329 | if ( operations.empty() == true ) { | 2740 | 60 | return; | 2741 | 60 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 269 | #if 1 | 2745 | 269 | { | 2746 | 269 | std::set<uint64_t> moduleIDs; | 2747 | 269 | for (const auto& m : modules ) { | 2748 | 174 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 174 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 174 | moduleIDs.insert(moduleID); | 2756 | 174 | } | 2757 | | | 2758 | 269 | std::set<uint64_t> operationModuleIDs; | 2759 | 269 | for (const auto& op : operations) { | 2760 | 232 | operationModuleIDs.insert(op.first->ID); | 2761 | 232 | } | 2762 | | | 2763 | 269 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 269 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 269 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 269 | for (const auto& id : addModuleIDs) { | 2768 | 63 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 63 | } | 2770 | 269 | } | 2771 | 269 | #endif | 2772 | | | 2773 | 269 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 269 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 564 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 295 | auto& operation = operations[i]; | 2782 | | | 2783 | 295 | auto& module = operation.first; | 2784 | 295 | auto& op = operation.second; | 2785 | | | 2786 | 295 | if ( i > 0 ) { | 2787 | 208 | auto& prevModule = operations[i-1].first; | 2788 | 208 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 208 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 105 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 105 | if ( curModifier.size() == 0 ) { | 2793 | 19.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 19.4k | curModifier.push_back(1); | 2795 | 19.4k | } | 2796 | 67 | } else { | 2797 | 904 | for (auto& c : curModifier) { | 2798 | 904 | c++; | 2799 | 904 | } | 2800 | 67 | } | 2801 | 105 | } | 2802 | 208 | } | 2803 | | | 2804 | 295 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 295 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 295 | const auto& result = results.back(); | 2811 | | | 2812 | 295 | 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 | 295 | 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 | 295 | if ( options.disableTests == false ) { | 2830 | 295 | tests::test(op, result.second); | 2831 | 295 | } | 2832 | | | 2833 | 295 | postprocess(module, op, result); | 2834 | 295 | } | 2835 | | | 2836 | 269 | if ( options.noCompare == false ) { | 2837 | 87 | compare(operations, results, data, size); | 2838 | 87 | } | 2839 | 269 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 192 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 192 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 192 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.90k | do { | 2725 | 4.90k | auto op = getOp(&parentDs, data, size); | 2726 | 4.90k | auto module = getModule(parentDs); | 2727 | 4.90k | if ( module == nullptr ) { | 2728 | 4.58k | continue; | 2729 | 4.58k | } | 2730 | | | 2731 | 321 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 321 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 17 | break; | 2736 | 17 | } | 2737 | 4.88k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 192 | if ( operations.empty() == true ) { | 2740 | 15 | return; | 2741 | 15 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 177 | #if 1 | 2745 | 177 | { | 2746 | 177 | std::set<uint64_t> moduleIDs; | 2747 | 177 | for (const auto& m : modules ) { | 2748 | 126 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 126 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 126 | moduleIDs.insert(moduleID); | 2756 | 126 | } | 2757 | | | 2758 | 177 | std::set<uint64_t> operationModuleIDs; | 2759 | 191 | for (const auto& op : operations) { | 2760 | 191 | operationModuleIDs.insert(op.first->ID); | 2761 | 191 | } | 2762 | | | 2763 | 177 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 177 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 177 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 177 | for (const auto& id : addModuleIDs) { | 2768 | 44 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 44 | } | 2770 | 177 | } | 2771 | 177 | #endif | 2772 | | | 2773 | 177 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 177 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 412 | 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 | 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 | 95 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 95 | if ( curModifier.size() == 0 ) { | 2793 | 21.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 20.9k | curModifier.push_back(1); | 2795 | 20.9k | } | 2796 | 54 | } else { | 2797 | 4.98k | for (auto& c : curModifier) { | 2798 | 4.98k | c++; | 2799 | 4.98k | } | 2800 | 54 | } | 2801 | 95 | } | 2802 | 172 | } | 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 | 177 | if ( options.noCompare == false ) { | 2837 | 63 | compare(operations, results, data, size); | 2838 | 63 | } | 2839 | 177 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 332 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 332 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 332 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.27k | do { | 2725 | 4.27k | auto op = getOp(&parentDs, data, size); | 2726 | 4.27k | auto module = getModule(parentDs); | 2727 | 4.27k | if ( module == nullptr ) { | 2728 | 3.77k | continue; | 2729 | 3.77k | } | 2730 | | | 2731 | 498 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 498 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 20 | break; | 2736 | 20 | } | 2737 | 4.25k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 332 | if ( operations.empty() == true ) { | 2740 | 19 | return; | 2741 | 19 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 313 | #if 1 | 2745 | 313 | { | 2746 | 313 | std::set<uint64_t> moduleIDs; | 2747 | 313 | 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 | 313 | std::set<uint64_t> operationModuleIDs; | 2759 | 313 | for (const auto& op : operations) { | 2760 | 260 | operationModuleIDs.insert(op.first->ID); | 2761 | 260 | } | 2762 | | | 2763 | 313 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 313 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 313 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 313 | for (const auto& id : addModuleIDs) { | 2768 | 70 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 70 | } | 2770 | 313 | } | 2771 | 313 | #endif | 2772 | | | 2773 | 313 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 313 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 643 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 330 | auto& operation = operations[i]; | 2782 | | | 2783 | 330 | auto& module = operation.first; | 2784 | 330 | auto& op = operation.second; | 2785 | | | 2786 | 330 | if ( i > 0 ) { | 2787 | 236 | auto& prevModule = operations[i-1].first; | 2788 | 236 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 236 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 124 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 124 | if ( curModifier.size() == 0 ) { | 2793 | 31.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 31.2k | curModifier.push_back(1); | 2795 | 31.2k | } | 2796 | 63 | } else { | 2797 | 2.37k | for (auto& c : curModifier) { | 2798 | 2.37k | c++; | 2799 | 2.37k | } | 2800 | 63 | } | 2801 | 124 | } | 2802 | 236 | } | 2803 | | | 2804 | 330 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 330 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 330 | const auto& result = results.back(); | 2811 | | | 2812 | 330 | 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 | 330 | 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 | 330 | if ( options.disableTests == false ) { | 2830 | 330 | tests::test(op, result.second); | 2831 | 330 | } | 2832 | | | 2833 | 330 | postprocess(module, op, result); | 2834 | 330 | } | 2835 | | | 2836 | 313 | if ( options.noCompare == false ) { | 2837 | 94 | compare(operations, results, data, size); | 2838 | 94 | } | 2839 | 313 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 407 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 407 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 407 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.01k | do { | 2725 | 4.01k | auto op = getOp(&parentDs, data, size); | 2726 | 4.01k | auto module = getModule(parentDs); | 2727 | 4.01k | if ( module == nullptr ) { | 2728 | 3.49k | continue; | 2729 | 3.49k | } | 2730 | | | 2731 | 517 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 517 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 17 | break; | 2736 | 17 | } | 2737 | 3.99k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 407 | if ( operations.empty() == true ) { | 2740 | 17 | return; | 2741 | 17 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 390 | #if 1 | 2745 | 390 | { | 2746 | 390 | std::set<uint64_t> moduleIDs; | 2747 | 390 | for (const auto& m : modules ) { | 2748 | 160 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 160 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 160 | moduleIDs.insert(moduleID); | 2756 | 160 | } | 2757 | | | 2758 | 390 | std::set<uint64_t> operationModuleIDs; | 2759 | 390 | for (const auto& op : operations) { | 2760 | 232 | operationModuleIDs.insert(op.first->ID); | 2761 | 232 | } | 2762 | | | 2763 | 390 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 390 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 390 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 390 | for (const auto& id : addModuleIDs) { | 2768 | 54 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 54 | } | 2770 | 390 | } | 2771 | 390 | #endif | 2772 | | | 2773 | 390 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 390 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 676 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 286 | auto& operation = operations[i]; | 2782 | | | 2783 | 286 | auto& module = operation.first; | 2784 | 286 | auto& op = operation.second; | 2785 | | | 2786 | 286 | if ( i > 0 ) { | 2787 | 206 | auto& prevModule = operations[i-1].first; | 2788 | 206 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 206 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 105 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 105 | if ( curModifier.size() == 0 ) { | 2793 | 24.1k | for (size_t j = 0; j < 512; j++) { | 2794 | 24.0k | curModifier.push_back(1); | 2795 | 24.0k | } | 2796 | 58 | } else { | 2797 | 1.19k | for (auto& c : curModifier) { | 2798 | 1.19k | c++; | 2799 | 1.19k | } | 2800 | 58 | } | 2801 | 105 | } | 2802 | 206 | } | 2803 | | | 2804 | 286 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 286 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 286 | const auto& result = results.back(); | 2811 | | | 2812 | 286 | 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 | 286 | 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 | 286 | if ( options.disableTests == false ) { | 2830 | 286 | tests::test(op, result.second); | 2831 | 286 | } | 2832 | | | 2833 | 286 | postprocess(module, op, result); | 2834 | 286 | } | 2835 | | | 2836 | 390 | if ( options.noCompare == false ) { | 2837 | 80 | compare(operations, results, data, size); | 2838 | 80 | } | 2839 | 390 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 348 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 348 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 348 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.69k | do { | 2725 | 3.69k | auto op = getOp(&parentDs, data, size); | 2726 | 3.69k | auto module = getModule(parentDs); | 2727 | 3.69k | if ( module == nullptr ) { | 2728 | 3.23k | continue; | 2729 | 3.23k | } | 2730 | | | 2731 | 460 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 460 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 11 | break; | 2736 | 11 | } | 2737 | 3.68k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 348 | if ( operations.empty() == true ) { | 2740 | 28 | return; | 2741 | 28 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 320 | #if 1 | 2745 | 320 | { | 2746 | 320 | std::set<uint64_t> moduleIDs; | 2747 | 320 | for (const auto& m : modules ) { | 2748 | 144 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 144 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 144 | moduleIDs.insert(moduleID); | 2756 | 144 | } | 2757 | | | 2758 | 320 | std::set<uint64_t> operationModuleIDs; | 2759 | 320 | for (const auto& op : operations) { | 2760 | 207 | operationModuleIDs.insert(op.first->ID); | 2761 | 207 | } | 2762 | | | 2763 | 320 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 320 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 320 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 320 | for (const auto& id : addModuleIDs) { | 2768 | 51 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 51 | } | 2770 | 320 | } | 2771 | 320 | #endif | 2772 | | | 2773 | 320 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 320 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 578 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 258 | auto& operation = operations[i]; | 2782 | | | 2783 | 258 | auto& module = operation.first; | 2784 | 258 | auto& op = operation.second; | 2785 | | | 2786 | 258 | if ( i > 0 ) { | 2787 | 186 | auto& prevModule = operations[i-1].first; | 2788 | 186 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 186 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 98 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 98 | if ( curModifier.size() == 0 ) { | 2793 | 25.6k | for (size_t j = 0; j < 512; j++) { | 2794 | 25.6k | curModifier.push_back(1); | 2795 | 25.6k | } | 2796 | 50 | } else { | 2797 | 941 | for (auto& c : curModifier) { | 2798 | 941 | c++; | 2799 | 941 | } | 2800 | 48 | } | 2801 | 98 | } | 2802 | 186 | } | 2803 | | | 2804 | 258 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 258 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 258 | const auto& result = results.back(); | 2811 | | | 2812 | 258 | 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 | 258 | 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 | 258 | if ( options.disableTests == false ) { | 2830 | 258 | tests::test(op, result.second); | 2831 | 258 | } | 2832 | | | 2833 | 258 | postprocess(module, op, result); | 2834 | 258 | } | 2835 | | | 2836 | 320 | if ( options.noCompare == false ) { | 2837 | 72 | compare(operations, results, data, size); | 2838 | 72 | } | 2839 | 320 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 270 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 270 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 270 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.11k | do { | 2725 | 4.11k | auto op = getOp(&parentDs, data, size); | 2726 | 4.11k | auto module = getModule(parentDs); | 2727 | 4.11k | if ( module == nullptr ) { | 2728 | 3.73k | continue; | 2729 | 3.73k | } | 2730 | | | 2731 | 385 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 385 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 15 | break; | 2736 | 15 | } | 2737 | 4.10k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 270 | if ( operations.empty() == true ) { | 2740 | 26 | return; | 2741 | 26 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 244 | #if 1 | 2745 | 244 | { | 2746 | 244 | std::set<uint64_t> moduleIDs; | 2747 | 244 | for (const auto& m : modules ) { | 2748 | 138 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 138 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 138 | moduleIDs.insert(moduleID); | 2756 | 138 | } | 2757 | | | 2758 | 244 | std::set<uint64_t> operationModuleIDs; | 2759 | 244 | for (const auto& op : operations) { | 2760 | 205 | operationModuleIDs.insert(op.first->ID); | 2761 | 205 | } | 2762 | | | 2763 | 244 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 244 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 244 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 244 | for (const auto& id : addModuleIDs) { | 2768 | 44 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 44 | } | 2770 | 244 | } | 2771 | 244 | #endif | 2772 | | | 2773 | 244 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 244 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 493 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 249 | auto& operation = operations[i]; | 2782 | | | 2783 | 249 | auto& module = operation.first; | 2784 | 249 | auto& op = operation.second; | 2785 | | | 2786 | 249 | if ( i > 0 ) { | 2787 | 180 | auto& prevModule = operations[i-1].first; | 2788 | 180 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 180 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 90 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 90 | if ( curModifier.size() == 0 ) { | 2793 | 26.6k | for (size_t j = 0; j < 512; j++) { | 2794 | 26.6k | curModifier.push_back(1); | 2795 | 26.6k | } | 2796 | 52 | } else { | 2797 | 495 | for (auto& c : curModifier) { | 2798 | 495 | c++; | 2799 | 495 | } | 2800 | 38 | } | 2801 | 90 | } | 2802 | 180 | } | 2803 | | | 2804 | 249 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 249 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 249 | const auto& result = results.back(); | 2811 | | | 2812 | 249 | 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 | 249 | 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 | 249 | if ( options.disableTests == false ) { | 2830 | 249 | tests::test(op, result.second); | 2831 | 249 | } | 2832 | | | 2833 | 249 | postprocess(module, op, result); | 2834 | 249 | } | 2835 | | | 2836 | 244 | if ( options.noCompare == false ) { | 2837 | 69 | compare(operations, results, data, size); | 2838 | 69 | } | 2839 | 244 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 256 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 256 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 256 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.91k | do { | 2725 | 3.91k | auto op = getOp(&parentDs, data, size); | 2726 | 3.91k | auto module = getModule(parentDs); | 2727 | 3.91k | if ( module == nullptr ) { | 2728 | 3.55k | continue; | 2729 | 3.55k | } | 2730 | | | 2731 | 357 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 357 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 13 | break; | 2736 | 13 | } | 2737 | 3.90k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 256 | if ( operations.empty() == true ) { | 2740 | 39 | return; | 2741 | 39 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 217 | #if 1 | 2745 | 217 | { | 2746 | 217 | std::set<uint64_t> moduleIDs; | 2747 | 217 | for (const auto& m : modules ) { | 2748 | 128 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 128 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 128 | moduleIDs.insert(moduleID); | 2756 | 128 | } | 2757 | | | 2758 | 217 | std::set<uint64_t> operationModuleIDs; | 2759 | 217 | for (const auto& op : operations) { | 2760 | 184 | operationModuleIDs.insert(op.first->ID); | 2761 | 184 | } | 2762 | | | 2763 | 217 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 217 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 217 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 217 | for (const auto& id : addModuleIDs) { | 2768 | 40 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 40 | } | 2770 | 217 | } | 2771 | 217 | #endif | 2772 | | | 2773 | 217 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 217 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 441 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 224 | auto& operation = operations[i]; | 2782 | | | 2783 | 224 | auto& module = operation.first; | 2784 | 224 | auto& op = operation.second; | 2785 | | | 2786 | 224 | if ( i > 0 ) { | 2787 | 160 | auto& prevModule = operations[i-1].first; | 2788 | 160 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 160 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 77 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 77 | if ( curModifier.size() == 0 ) { | 2793 | 17.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 17.4k | curModifier.push_back(1); | 2795 | 17.4k | } | 2796 | 43 | } else { | 2797 | 1.35k | for (auto& c : curModifier) { | 2798 | 1.35k | c++; | 2799 | 1.35k | } | 2800 | 43 | } | 2801 | 77 | } | 2802 | 160 | } | 2803 | | | 2804 | 224 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 224 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 224 | const auto& result = results.back(); | 2811 | | | 2812 | 224 | 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 | 224 | 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 | 224 | if ( options.disableTests == false ) { | 2830 | 224 | tests::test(op, result.second); | 2831 | 224 | } | 2832 | | | 2833 | 224 | postprocess(module, op, result); | 2834 | 224 | } | 2835 | | | 2836 | 217 | if ( options.noCompare == false ) { | 2837 | 64 | compare(operations, results, data, size); | 2838 | 64 | } | 2839 | 217 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 218 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 218 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 218 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.70k | do { | 2725 | 3.70k | auto op = getOp(&parentDs, data, size); | 2726 | 3.70k | auto module = getModule(parentDs); | 2727 | 3.70k | if ( module == nullptr ) { | 2728 | 3.33k | continue; | 2729 | 3.33k | } | 2730 | | | 2731 | 367 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 367 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 17 | break; | 2736 | 17 | } | 2737 | 3.68k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 218 | if ( operations.empty() == true ) { | 2740 | 20 | return; | 2741 | 20 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 198 | #if 1 | 2745 | 198 | { | 2746 | 198 | std::set<uint64_t> moduleIDs; | 2747 | 198 | for (const auto& m : modules ) { | 2748 | 126 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 126 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 126 | moduleIDs.insert(moduleID); | 2756 | 126 | } | 2757 | | | 2758 | 198 | std::set<uint64_t> operationModuleIDs; | 2759 | 198 | for (const auto& op : operations) { | 2760 | 196 | operationModuleIDs.insert(op.first->ID); | 2761 | 196 | } | 2762 | | | 2763 | 198 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 198 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 198 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 198 | for (const auto& id : addModuleIDs) { | 2768 | 39 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 39 | } | 2770 | 198 | } | 2771 | 198 | #endif | 2772 | | | 2773 | 198 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 198 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 433 | 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 | 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 | 88 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 88 | if ( curModifier.size() == 0 ) { | 2793 | 17.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 17.4k | curModifier.push_back(1); | 2795 | 17.4k | } | 2796 | 54 | } else { | 2797 | 25.0k | for (auto& c : curModifier) { | 2798 | 25.0k | c++; | 2799 | 25.0k | } | 2800 | 54 | } | 2801 | 88 | } | 2802 | 172 | } | 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 | 198 | if ( options.noCompare == false ) { | 2837 | 63 | compare(operations, results, data, size); | 2838 | 63 | } | 2839 | 198 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 300 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 300 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 300 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.99k | do { | 2725 | 3.99k | auto op = getOp(&parentDs, data, size); | 2726 | 3.99k | auto module = getModule(parentDs); | 2727 | 3.99k | if ( module == nullptr ) { | 2728 | 3.51k | continue; | 2729 | 3.51k | } | 2730 | | | 2731 | 478 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 478 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 15 | break; | 2736 | 15 | } | 2737 | 3.97k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 300 | if ( operations.empty() == true ) { | 2740 | 38 | return; | 2741 | 38 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 262 | #if 1 | 2745 | 262 | { | 2746 | 262 | std::set<uint64_t> moduleIDs; | 2747 | 262 | for (const auto& m : modules ) { | 2748 | 186 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 186 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 186 | moduleIDs.insert(moduleID); | 2756 | 186 | } | 2757 | | | 2758 | 262 | std::set<uint64_t> operationModuleIDs; | 2759 | 262 | for (const auto& op : operations) { | 2760 | 247 | operationModuleIDs.insert(op.first->ID); | 2761 | 247 | } | 2762 | | | 2763 | 262 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 262 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 262 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 262 | for (const auto& id : addModuleIDs) { | 2768 | 67 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 67 | } | 2770 | 262 | } | 2771 | 262 | #endif | 2772 | | | 2773 | 262 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 262 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 576 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 314 | auto& operation = operations[i]; | 2782 | | | 2783 | 314 | auto& module = operation.first; | 2784 | 314 | auto& op = operation.second; | 2785 | | | 2786 | 314 | if ( i > 0 ) { | 2787 | 221 | auto& prevModule = operations[i-1].first; | 2788 | 221 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 221 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 111 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 111 | if ( curModifier.size() == 0 ) { | 2793 | 29.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 29.1k | curModifier.push_back(1); | 2795 | 29.1k | } | 2796 | 57 | } else { | 2797 | 2.50k | for (auto& c : curModifier) { | 2798 | 2.50k | c++; | 2799 | 2.50k | } | 2800 | 54 | } | 2801 | 111 | } | 2802 | 221 | } | 2803 | | | 2804 | 314 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 314 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 314 | const auto& result = results.back(); | 2811 | | | 2812 | 314 | 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 | 314 | 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 | 314 | if ( options.disableTests == false ) { | 2830 | 314 | tests::test(op, result.second); | 2831 | 314 | } | 2832 | | | 2833 | 314 | postprocess(module, op, result); | 2834 | 314 | } | 2835 | | | 2836 | 262 | if ( options.noCompare == false ) { | 2837 | 93 | compare(operations, results, data, size); | 2838 | 93 | } | 2839 | 262 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 208 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 208 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 208 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.99k | do { | 2725 | 3.99k | auto op = getOp(&parentDs, data, size); | 2726 | 3.99k | auto module = getModule(parentDs); | 2727 | 3.99k | if ( module == nullptr ) { | 2728 | 3.64k | continue; | 2729 | 3.64k | } | 2730 | | | 2731 | 352 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 352 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 17 | break; | 2736 | 17 | } | 2737 | 3.97k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 208 | if ( operations.empty() == true ) { | 2740 | 21 | return; | 2741 | 21 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 187 | #if 1 | 2745 | 187 | { | 2746 | 187 | std::set<uint64_t> moduleIDs; | 2747 | 187 | for (const auto& m : modules ) { | 2748 | 140 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 140 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 140 | moduleIDs.insert(moduleID); | 2756 | 140 | } | 2757 | | | 2758 | 187 | std::set<uint64_t> operationModuleIDs; | 2759 | 208 | for (const auto& op : operations) { | 2760 | 208 | operationModuleIDs.insert(op.first->ID); | 2761 | 208 | } | 2762 | | | 2763 | 187 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 187 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 187 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 187 | for (const auto& id : addModuleIDs) { | 2768 | 53 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 53 | } | 2770 | 187 | } | 2771 | 187 | #endif | 2772 | | | 2773 | 187 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 187 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 448 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 261 | auto& operation = operations[i]; | 2782 | | | 2783 | 261 | auto& module = operation.first; | 2784 | 261 | auto& op = operation.second; | 2785 | | | 2786 | 261 | if ( i > 0 ) { | 2787 | 191 | auto& prevModule = operations[i-1].first; | 2788 | 191 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 191 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 105 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 105 | if ( curModifier.size() == 0 ) { | 2793 | 22.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 22.0k | curModifier.push_back(1); | 2795 | 22.0k | } | 2796 | 62 | } else { | 2797 | 836 | for (auto& c : curModifier) { | 2798 | 836 | c++; | 2799 | 836 | } | 2800 | 62 | } | 2801 | 105 | } | 2802 | 191 | } | 2803 | | | 2804 | 261 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 261 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 261 | const auto& result = results.back(); | 2811 | | | 2812 | 261 | 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 | 261 | 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 | 261 | if ( options.disableTests == false ) { | 2830 | 261 | tests::test(op, result.second); | 2831 | 261 | } | 2832 | | | 2833 | 261 | postprocess(module, op, result); | 2834 | 261 | } | 2835 | | | 2836 | 187 | if ( options.noCompare == false ) { | 2837 | 70 | compare(operations, results, data, size); | 2838 | 70 | } | 2839 | 187 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 241 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 241 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 241 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.93k | do { | 2725 | 4.93k | auto op = getOp(&parentDs, data, size); | 2726 | 4.93k | auto module = getModule(parentDs); | 2727 | 4.93k | if ( module == nullptr ) { | 2728 | 4.56k | continue; | 2729 | 4.56k | } | 2730 | | | 2731 | 366 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 366 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 13 | break; | 2736 | 13 | } | 2737 | 4.92k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 241 | if ( operations.empty() == true ) { | 2740 | 38 | return; | 2741 | 38 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 203 | #if 1 | 2745 | 203 | { | 2746 | 203 | std::set<uint64_t> moduleIDs; | 2747 | 203 | for (const auto& m : modules ) { | 2748 | 148 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 148 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 148 | moduleIDs.insert(moduleID); | 2756 | 148 | } | 2757 | | | 2758 | 203 | std::set<uint64_t> operationModuleIDs; | 2759 | 218 | for (const auto& op : operations) { | 2760 | 218 | operationModuleIDs.insert(op.first->ID); | 2761 | 218 | } | 2762 | | | 2763 | 203 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 203 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 203 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 203 | for (const auto& id : addModuleIDs) { | 2768 | 55 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 55 | } | 2770 | 203 | } | 2771 | 203 | #endif | 2772 | | | 2773 | 203 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 203 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 476 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 273 | auto& operation = operations[i]; | 2782 | | | 2783 | 273 | auto& module = operation.first; | 2784 | 273 | auto& op = operation.second; | 2785 | | | 2786 | 273 | if ( i > 0 ) { | 2787 | 199 | auto& prevModule = operations[i-1].first; | 2788 | 199 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 199 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 113 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 113 | if ( curModifier.size() == 0 ) { | 2793 | 25.6k | for (size_t j = 0; j < 512; j++) { | 2794 | 25.6k | curModifier.push_back(1); | 2795 | 25.6k | } | 2796 | 63 | } else { | 2797 | 1.60k | for (auto& c : curModifier) { | 2798 | 1.60k | c++; | 2799 | 1.60k | } | 2800 | 63 | } | 2801 | 113 | } | 2802 | 199 | } | 2803 | | | 2804 | 273 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 273 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 273 | const auto& result = results.back(); | 2811 | | | 2812 | 273 | 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 | 273 | 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 | 273 | if ( options.disableTests == false ) { | 2830 | 273 | tests::test(op, result.second); | 2831 | 273 | } | 2832 | | | 2833 | 273 | postprocess(module, op, result); | 2834 | 273 | } | 2835 | | | 2836 | 203 | if ( options.noCompare == false ) { | 2837 | 74 | compare(operations, results, data, size); | 2838 | 74 | } | 2839 | 203 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 215 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 215 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 215 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.99k | do { | 2725 | 4.99k | auto op = getOp(&parentDs, data, size); | 2726 | 4.99k | auto module = getModule(parentDs); | 2727 | 4.99k | if ( module == nullptr ) { | 2728 | 4.66k | continue; | 2729 | 4.66k | } | 2730 | | | 2731 | 322 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 322 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 13 | break; | 2736 | 13 | } | 2737 | 4.97k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 215 | if ( operations.empty() == true ) { | 2740 | 30 | return; | 2741 | 30 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 185 | #if 1 | 2745 | 185 | { | 2746 | 185 | std::set<uint64_t> moduleIDs; | 2747 | 185 | for (const auto& m : modules ) { | 2748 | 126 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 126 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 126 | moduleIDs.insert(moduleID); | 2756 | 126 | } | 2757 | | | 2758 | 185 | std::set<uint64_t> operationModuleIDs; | 2759 | 192 | for (const auto& op : operations) { | 2760 | 192 | operationModuleIDs.insert(op.first->ID); | 2761 | 192 | } | 2762 | | | 2763 | 185 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 185 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 185 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 185 | for (const auto& id : addModuleIDs) { | 2768 | 44 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 44 | } | 2770 | 185 | } | 2771 | 185 | #endif | 2772 | | | 2773 | 185 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 185 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 421 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 236 | auto& operation = operations[i]; | 2782 | | | 2783 | 236 | auto& module = operation.first; | 2784 | 236 | auto& op = operation.second; | 2785 | | | 2786 | 236 | if ( i > 0 ) { | 2787 | 173 | auto& prevModule = operations[i-1].first; | 2788 | 173 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 173 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 98 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 98 | if ( curModifier.size() == 0 ) { | 2793 | 19.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 19.4k | curModifier.push_back(1); | 2795 | 19.4k | } | 2796 | 60 | } else { | 2797 | 758 | for (auto& c : curModifier) { | 2798 | 758 | c++; | 2799 | 758 | } | 2800 | 60 | } | 2801 | 98 | } | 2802 | 173 | } | 2803 | | | 2804 | 236 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 236 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 236 | const auto& result = results.back(); | 2811 | | | 2812 | 236 | 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 | 236 | 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 | 236 | if ( options.disableTests == false ) { | 2830 | 236 | tests::test(op, result.second); | 2831 | 236 | } | 2832 | | | 2833 | 236 | postprocess(module, op, result); | 2834 | 236 | } | 2835 | | | 2836 | 185 | if ( options.noCompare == false ) { | 2837 | 63 | compare(operations, results, data, size); | 2838 | 63 | } | 2839 | 185 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::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 | 3.50k | do { | 2725 | 3.50k | auto op = getOp(&parentDs, data, size); | 2726 | 3.50k | auto module = getModule(parentDs); | 2727 | 3.50k | if ( module == nullptr ) { | 2728 | 3.11k | continue; | 2729 | 3.11k | } | 2730 | | | 2731 | 392 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 392 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 14 | break; | 2736 | 14 | } | 2737 | 3.48k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 209 | if ( operations.empty() == true ) { | 2740 | 13 | return; | 2741 | 13 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 196 | #if 1 | 2745 | 196 | { | 2746 | 196 | std::set<uint64_t> moduleIDs; | 2747 | 196 | for (const auto& m : modules ) { | 2748 | 150 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 150 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 150 | moduleIDs.insert(moduleID); | 2756 | 150 | } | 2757 | | | 2758 | 196 | std::set<uint64_t> operationModuleIDs; | 2759 | 221 | for (const auto& op : operations) { | 2760 | 221 | operationModuleIDs.insert(op.first->ID); | 2761 | 221 | } | 2762 | | | 2763 | 196 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 196 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 196 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 196 | for (const auto& id : addModuleIDs) { | 2768 | 47 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 47 | } | 2770 | 196 | } | 2771 | 196 | #endif | 2772 | | | 2773 | 196 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 196 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 464 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 268 | auto& operation = operations[i]; | 2782 | | | 2783 | 268 | auto& module = operation.first; | 2784 | 268 | auto& op = operation.second; | 2785 | | | 2786 | 268 | if ( i > 0 ) { | 2787 | 193 | auto& prevModule = operations[i-1].first; | 2788 | 193 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 193 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 103 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 103 | if ( curModifier.size() == 0 ) { | 2793 | 20.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 19.9k | curModifier.push_back(1); | 2795 | 19.9k | } | 2796 | 64 | } else { | 2797 | 846 | for (auto& c : curModifier) { | 2798 | 846 | c++; | 2799 | 846 | } | 2800 | 64 | } | 2801 | 103 | } | 2802 | 193 | } | 2803 | | | 2804 | 268 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 268 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 268 | const auto& result = results.back(); | 2811 | | | 2812 | 268 | 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 | 268 | 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 | 268 | if ( options.disableTests == false ) { | 2830 | 268 | tests::test(op, result.second); | 2831 | 268 | } | 2832 | | | 2833 | 268 | postprocess(module, op, result); | 2834 | 268 | } | 2835 | | | 2836 | 196 | if ( options.noCompare == false ) { | 2837 | 75 | compare(operations, results, data, size); | 2838 | 75 | } | 2839 | 196 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 289 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 289 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 289 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.77k | do { | 2725 | 2.77k | auto op = getOp(&parentDs, data, size); | 2726 | 2.77k | auto module = getModule(parentDs); | 2727 | 2.77k | if ( module == nullptr ) { | 2728 | 2.42k | continue; | 2729 | 2.42k | } | 2730 | | | 2731 | 352 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 352 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 15 | break; | 2736 | 15 | } | 2737 | 2.76k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 289 | if ( operations.empty() == true ) { | 2740 | 44 | return; | 2741 | 44 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 245 | #if 1 | 2745 | 245 | { | 2746 | 245 | std::set<uint64_t> moduleIDs; | 2747 | 245 | for (const auto& m : modules ) { | 2748 | 174 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 174 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 174 | moduleIDs.insert(moduleID); | 2756 | 174 | } | 2757 | | | 2758 | 245 | std::set<uint64_t> operationModuleIDs; | 2759 | 245 | for (const auto& op : operations) { | 2760 | 220 | operationModuleIDs.insert(op.first->ID); | 2761 | 220 | } | 2762 | | | 2763 | 245 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 245 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 245 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 245 | for (const auto& id : addModuleIDs) { | 2768 | 62 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 62 | } | 2770 | 245 | } | 2771 | 245 | #endif | 2772 | | | 2773 | 245 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 245 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 527 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 282 | auto& operation = operations[i]; | 2782 | | | 2783 | 282 | auto& module = operation.first; | 2784 | 282 | auto& op = operation.second; | 2785 | | | 2786 | 282 | if ( i > 0 ) { | 2787 | 195 | auto& prevModule = operations[i-1].first; | 2788 | 195 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 195 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 95 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 95 | 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 | 49 | } else { | 2797 | 697 | for (auto& c : curModifier) { | 2798 | 697 | c++; | 2799 | 697 | } | 2800 | 46 | } | 2801 | 95 | } | 2802 | 195 | } | 2803 | | | 2804 | 282 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 282 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 282 | const auto& result = results.back(); | 2811 | | | 2812 | 282 | 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 | 282 | 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 | 282 | if ( options.disableTests == false ) { | 2830 | 282 | tests::test(op, result.second); | 2831 | 282 | } | 2832 | | | 2833 | 282 | postprocess(module, op, result); | 2834 | 282 | } | 2835 | | | 2836 | 245 | if ( options.noCompare == false ) { | 2837 | 87 | compare(operations, results, data, size); | 2838 | 87 | } | 2839 | 245 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 224 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 224 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 224 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.81k | do { | 2725 | 3.81k | auto op = getOp(&parentDs, data, size); | 2726 | 3.81k | auto module = getModule(parentDs); | 2727 | 3.81k | if ( module == nullptr ) { | 2728 | 3.41k | continue; | 2729 | 3.41k | } | 2730 | | | 2731 | 405 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 405 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 13 | break; | 2736 | 13 | } | 2737 | 3.80k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 224 | if ( operations.empty() == true ) { | 2740 | 11 | return; | 2741 | 11 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 213 | #if 1 | 2745 | 213 | { | 2746 | 213 | std::set<uint64_t> moduleIDs; | 2747 | 213 | for (const auto& m : modules ) { | 2748 | 180 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 180 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 180 | moduleIDs.insert(moduleID); | 2756 | 180 | } | 2757 | | | 2758 | 213 | std::set<uint64_t> operationModuleIDs; | 2759 | 232 | for (const auto& op : operations) { | 2760 | 232 | operationModuleIDs.insert(op.first->ID); | 2761 | 232 | } | 2762 | | | 2763 | 213 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 213 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 213 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 213 | for (const auto& id : addModuleIDs) { | 2768 | 61 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 61 | } | 2770 | 213 | } | 2771 | 213 | #endif | 2772 | | | 2773 | 213 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 213 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 506 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 293 | auto& operation = operations[i]; | 2782 | | | 2783 | 293 | auto& module = operation.first; | 2784 | 293 | auto& op = operation.second; | 2785 | | | 2786 | 293 | if ( i > 0 ) { | 2787 | 203 | auto& prevModule = operations[i-1].first; | 2788 | 203 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 203 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 96 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 96 | if ( curModifier.size() == 0 ) { | 2793 | 20.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 19.9k | curModifier.push_back(1); | 2795 | 19.9k | } | 2796 | 57 | } else { | 2797 | 1.56k | for (auto& c : curModifier) { | 2798 | 1.56k | c++; | 2799 | 1.56k | } | 2800 | 57 | } | 2801 | 96 | } | 2802 | 203 | } | 2803 | | | 2804 | 293 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 293 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 293 | const auto& result = results.back(); | 2811 | | | 2812 | 293 | 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 | 293 | 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 | 293 | if ( options.disableTests == false ) { | 2830 | 293 | tests::test(op, result.second); | 2831 | 293 | } | 2832 | | | 2833 | 293 | postprocess(module, op, result); | 2834 | 293 | } | 2835 | | | 2836 | 213 | if ( options.noCompare == false ) { | 2837 | 90 | compare(operations, results, data, size); | 2838 | 90 | } | 2839 | 213 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 278 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 278 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 278 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.85k | do { | 2725 | 4.85k | auto op = getOp(&parentDs, data, size); | 2726 | 4.85k | auto module = getModule(parentDs); | 2727 | 4.85k | if ( module == nullptr ) { | 2728 | 4.46k | continue; | 2729 | 4.46k | } | 2730 | | | 2731 | 382 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 382 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 11 | break; | 2736 | 11 | } | 2737 | 4.84k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 278 | if ( operations.empty() == true ) { | 2740 | 38 | return; | 2741 | 38 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 240 | #if 1 | 2745 | 240 | { | 2746 | 240 | std::set<uint64_t> moduleIDs; | 2747 | 240 | for (const auto& m : modules ) { | 2748 | 154 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 154 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 154 | moduleIDs.insert(moduleID); | 2756 | 154 | } | 2757 | | | 2758 | 240 | std::set<uint64_t> operationModuleIDs; | 2759 | 240 | for (const auto& op : operations) { | 2760 | 218 | operationModuleIDs.insert(op.first->ID); | 2761 | 218 | } | 2762 | | | 2763 | 240 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 240 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 240 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 240 | for (const auto& id : addModuleIDs) { | 2768 | 56 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 56 | } | 2770 | 240 | } | 2771 | 240 | #endif | 2772 | | | 2773 | 240 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 240 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 514 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 274 | auto& operation = operations[i]; | 2782 | | | 2783 | 274 | auto& module = operation.first; | 2784 | 274 | auto& op = operation.second; | 2785 | | | 2786 | 274 | 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 | 106 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 106 | if ( curModifier.size() == 0 ) { | 2793 | 26.1k | for (size_t j = 0; j < 512; j++) { | 2794 | 26.1k | curModifier.push_back(1); | 2795 | 26.1k | } | 2796 | 55 | } else { | 2797 | 638 | for (auto& c : curModifier) { | 2798 | 638 | c++; | 2799 | 638 | } | 2800 | 55 | } | 2801 | 106 | } | 2802 | 197 | } | 2803 | | | 2804 | 274 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 274 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 274 | const auto& result = results.back(); | 2811 | | | 2812 | 274 | 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 | 274 | 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 | 274 | if ( options.disableTests == false ) { | 2830 | 274 | tests::test(op, result.second); | 2831 | 274 | } | 2832 | | | 2833 | 274 | postprocess(module, op, result); | 2834 | 274 | } | 2835 | | | 2836 | 240 | if ( options.noCompare == false ) { | 2837 | 77 | compare(operations, results, data, size); | 2838 | 77 | } | 2839 | 240 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 235 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 235 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 235 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.87k | do { | 2725 | 2.87k | auto op = getOp(&parentDs, data, size); | 2726 | 2.87k | auto module = getModule(parentDs); | 2727 | 2.87k | if ( module == nullptr ) { | 2728 | 2.51k | continue; | 2729 | 2.51k | } | 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 | 14 | break; | 2736 | 14 | } | 2737 | 2.86k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 235 | if ( operations.empty() == true ) { | 2740 | 31 | return; | 2741 | 31 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 204 | #if 1 | 2745 | 204 | { | 2746 | 204 | std::set<uint64_t> moduleIDs; | 2747 | 204 | for (const auto& m : modules ) { | 2748 | 128 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 128 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 128 | moduleIDs.insert(moduleID); | 2756 | 128 | } | 2757 | | | 2758 | 204 | std::set<uint64_t> operationModuleIDs; | 2759 | 204 | for (const auto& op : operations) { | 2760 | 199 | operationModuleIDs.insert(op.first->ID); | 2761 | 199 | } | 2762 | | | 2763 | 204 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 204 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 204 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 204 | for (const auto& id : addModuleIDs) { | 2768 | 41 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 41 | } | 2770 | 204 | } | 2771 | 204 | #endif | 2772 | | | 2773 | 204 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 204 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 444 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 240 | auto& operation = operations[i]; | 2782 | | | 2783 | 240 | auto& module = operation.first; | 2784 | 240 | auto& op = operation.second; | 2785 | | | 2786 | 240 | if ( i > 0 ) { | 2787 | 176 | auto& prevModule = operations[i-1].first; | 2788 | 176 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 176 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 98 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 98 | if ( curModifier.size() == 0 ) { | 2793 | 21.5k | for (size_t j = 0; j < 512; j++) { | 2794 | 21.5k | curModifier.push_back(1); | 2795 | 21.5k | } | 2796 | 56 | } else { | 2797 | 578 | for (auto& c : curModifier) { | 2798 | 578 | c++; | 2799 | 578 | } | 2800 | 56 | } | 2801 | 98 | } | 2802 | 176 | } | 2803 | | | 2804 | 240 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 240 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 240 | const auto& result = results.back(); | 2811 | | | 2812 | 240 | 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 | 240 | 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 | 240 | if ( options.disableTests == false ) { | 2830 | 240 | tests::test(op, result.second); | 2831 | 240 | } | 2832 | | | 2833 | 240 | postprocess(module, op, result); | 2834 | 240 | } | 2835 | | | 2836 | 204 | if ( options.noCompare == false ) { | 2837 | 64 | compare(operations, results, data, size); | 2838 | 64 | } | 2839 | 204 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 208 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 208 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 208 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.08k | do { | 2725 | 3.08k | auto op = getOp(&parentDs, data, size); | 2726 | 3.08k | auto module = getModule(parentDs); | 2727 | 3.08k | if ( module == nullptr ) { | 2728 | 2.75k | continue; | 2729 | 2.75k | } | 2730 | | | 2731 | 331 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 331 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 11 | break; | 2736 | 11 | } | 2737 | 3.07k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 208 | if ( operations.empty() == true ) { | 2740 | 30 | return; | 2741 | 30 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 178 | #if 1 | 2745 | 178 | { | 2746 | 178 | std::set<uint64_t> moduleIDs; | 2747 | 178 | for (const auto& m : modules ) { | 2748 | 132 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 132 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 132 | moduleIDs.insert(moduleID); | 2756 | 132 | } | 2757 | | | 2758 | 178 | std::set<uint64_t> operationModuleIDs; | 2759 | 184 | for (const auto& op : operations) { | 2760 | 184 | operationModuleIDs.insert(op.first->ID); | 2761 | 184 | } | 2762 | | | 2763 | 178 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 178 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 178 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 178 | for (const auto& id : addModuleIDs) { | 2768 | 43 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 43 | } | 2770 | 178 | } | 2771 | 178 | #endif | 2772 | | | 2773 | 178 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 178 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 405 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 227 | auto& operation = operations[i]; | 2782 | | | 2783 | 227 | auto& module = operation.first; | 2784 | 227 | auto& op = operation.second; | 2785 | | | 2786 | 227 | 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 | 83 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 83 | if ( curModifier.size() == 0 ) { | 2793 | 21.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 20.9k | curModifier.push_back(1); | 2795 | 20.9k | } | 2796 | 42 | } else { | 2797 | 1.08k | for (auto& c : curModifier) { | 2798 | 1.08k | c++; | 2799 | 1.08k | } | 2800 | 42 | } | 2801 | 83 | } | 2802 | 161 | } | 2803 | | | 2804 | 227 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 227 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 227 | const auto& result = results.back(); | 2811 | | | 2812 | 227 | 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 | 227 | 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 | 227 | if ( options.disableTests == false ) { | 2830 | 227 | tests::test(op, result.second); | 2831 | 227 | } | 2832 | | | 2833 | 227 | postprocess(module, op, result); | 2834 | 227 | } | 2835 | | | 2836 | 178 | if ( options.noCompare == false ) { | 2837 | 66 | compare(operations, results, data, size); | 2838 | 66 | } | 2839 | 178 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 192 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 192 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 192 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.14k | do { | 2725 | 3.14k | auto op = getOp(&parentDs, data, size); | 2726 | 3.14k | auto module = getModule(parentDs); | 2727 | 3.14k | if ( module == nullptr ) { | 2728 | 2.84k | continue; | 2729 | 2.84k | } | 2730 | | | 2731 | 298 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 298 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 11 | break; | 2736 | 11 | } | 2737 | 3.13k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 192 | if ( operations.empty() == true ) { | 2740 | 23 | return; | 2741 | 23 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 169 | #if 1 | 2745 | 169 | { | 2746 | 169 | std::set<uint64_t> moduleIDs; | 2747 | 169 | for (const auto& m : modules ) { | 2748 | 128 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 128 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 128 | moduleIDs.insert(moduleID); | 2756 | 128 | } | 2757 | | | 2758 | 169 | std::set<uint64_t> operationModuleIDs; | 2759 | 176 | for (const auto& op : operations) { | 2760 | 176 | operationModuleIDs.insert(op.first->ID); | 2761 | 176 | } | 2762 | | | 2763 | 169 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 169 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 169 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 169 | for (const auto& id : addModuleIDs) { | 2768 | 42 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 42 | } | 2770 | 169 | } | 2771 | 169 | #endif | 2772 | | | 2773 | 169 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 169 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 387 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 218 | auto& operation = operations[i]; | 2782 | | | 2783 | 218 | auto& module = operation.first; | 2784 | 218 | auto& op = operation.second; | 2785 | | | 2786 | 218 | if ( i > 0 ) { | 2787 | 154 | auto& prevModule = operations[i-1].first; | 2788 | 154 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 154 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 78 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 78 | if ( curModifier.size() == 0 ) { | 2793 | 19.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 19.4k | curModifier.push_back(1); | 2795 | 19.4k | } | 2796 | 40 | } else { | 2797 | 855 | for (auto& c : curModifier) { | 2798 | 855 | c++; | 2799 | 855 | } | 2800 | 40 | } | 2801 | 78 | } | 2802 | 154 | } | 2803 | | | 2804 | 218 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 218 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 218 | const auto& result = results.back(); | 2811 | | | 2812 | 218 | 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 | 218 | 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 | 218 | if ( options.disableTests == false ) { | 2830 | 218 | tests::test(op, result.second); | 2831 | 218 | } | 2832 | | | 2833 | 218 | postprocess(module, op, result); | 2834 | 218 | } | 2835 | | | 2836 | 169 | if ( options.noCompare == false ) { | 2837 | 64 | compare(operations, results, data, size); | 2838 | 64 | } | 2839 | 169 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 248 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 248 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 248 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.52k | do { | 2725 | 4.52k | auto op = getOp(&parentDs, data, size); | 2726 | 4.52k | auto module = getModule(parentDs); | 2727 | 4.52k | if ( module == nullptr ) { | 2728 | 4.14k | continue; | 2729 | 4.14k | } | 2730 | | | 2731 | 376 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 376 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 12 | break; | 2736 | 12 | } | 2737 | 4.51k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 248 | if ( operations.empty() == true ) { | 2740 | 28 | return; | 2741 | 28 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 220 | #if 1 | 2745 | 220 | { | 2746 | 220 | std::set<uint64_t> moduleIDs; | 2747 | 220 | for (const auto& m : modules ) { | 2748 | 130 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 130 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 130 | moduleIDs.insert(moduleID); | 2756 | 130 | } | 2757 | | | 2758 | 220 | std::set<uint64_t> operationModuleIDs; | 2759 | 220 | for (const auto& op : operations) { | 2760 | 181 | operationModuleIDs.insert(op.first->ID); | 2761 | 181 | } | 2762 | | | 2763 | 220 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 220 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 220 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 220 | for (const auto& id : addModuleIDs) { | 2768 | 42 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 42 | } | 2770 | 220 | } | 2771 | 220 | #endif | 2772 | | | 2773 | 220 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 220 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 443 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 223 | auto& operation = operations[i]; | 2782 | | | 2783 | 223 | auto& module = operation.first; | 2784 | 223 | auto& op = operation.second; | 2785 | | | 2786 | 223 | if ( i > 0 ) { | 2787 | 158 | auto& prevModule = operations[i-1].first; | 2788 | 158 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 158 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 84 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 84 | if ( curModifier.size() == 0 ) { | 2793 | 20.5k | for (size_t j = 0; j < 512; j++) { | 2794 | 20.4k | curModifier.push_back(1); | 2795 | 20.4k | } | 2796 | 44 | } else { | 2797 | 1.40k | for (auto& c : curModifier) { | 2798 | 1.40k | c++; | 2799 | 1.40k | } | 2800 | 44 | } | 2801 | 84 | } | 2802 | 158 | } | 2803 | | | 2804 | 223 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 223 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 223 | const auto& result = results.back(); | 2811 | | | 2812 | 223 | 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 | 223 | 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 | 223 | if ( options.disableTests == false ) { | 2830 | 223 | tests::test(op, result.second); | 2831 | 223 | } | 2832 | | | 2833 | 223 | postprocess(module, op, result); | 2834 | 223 | } | 2835 | | | 2836 | 220 | if ( options.noCompare == false ) { | 2837 | 65 | compare(operations, results, data, size); | 2838 | 65 | } | 2839 | 220 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 287 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 287 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 287 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.15k | do { | 2725 | 4.15k | auto op = getOp(&parentDs, data, size); | 2726 | 4.15k | auto module = getModule(parentDs); | 2727 | 4.15k | if ( module == nullptr ) { | 2728 | 3.71k | continue; | 2729 | 3.71k | } | 2730 | | | 2731 | 442 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 442 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 13 | break; | 2736 | 13 | } | 2737 | 4.14k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 287 | if ( operations.empty() == true ) { | 2740 | 27 | return; | 2741 | 27 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 260 | #if 1 | 2745 | 260 | { | 2746 | 260 | std::set<uint64_t> moduleIDs; | 2747 | 260 | for (const auto& m : modules ) { | 2748 | 204 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 204 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 204 | moduleIDs.insert(moduleID); | 2756 | 204 | } | 2757 | | | 2758 | 260 | std::set<uint64_t> operationModuleIDs; | 2759 | 260 | for (const auto& op : operations) { | 2760 | 252 | operationModuleIDs.insert(op.first->ID); | 2761 | 252 | } | 2762 | | | 2763 | 260 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 260 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 260 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 260 | for (const auto& id : addModuleIDs) { | 2768 | 73 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 73 | } | 2770 | 260 | } | 2771 | 260 | #endif | 2772 | | | 2773 | 260 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 260 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 585 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 325 | auto& operation = operations[i]; | 2782 | | | 2783 | 325 | auto& module = operation.first; | 2784 | 325 | auto& op = operation.second; | 2785 | | | 2786 | 325 | if ( i > 0 ) { | 2787 | 223 | auto& prevModule = operations[i-1].first; | 2788 | 223 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 223 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 105 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 105 | if ( curModifier.size() == 0 ) { | 2793 | 30.7k | for (size_t j = 0; j < 512; j++) { | 2794 | 30.7k | curModifier.push_back(1); | 2795 | 30.7k | } | 2796 | 60 | } else { | 2797 | 1.34k | for (auto& c : curModifier) { | 2798 | 1.34k | c++; | 2799 | 1.34k | } | 2800 | 45 | } | 2801 | 105 | } | 2802 | 223 | } | 2803 | | | 2804 | 325 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 325 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 325 | const auto& result = results.back(); | 2811 | | | 2812 | 325 | 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 | 325 | 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 | 325 | if ( options.disableTests == false ) { | 2830 | 325 | tests::test(op, result.second); | 2831 | 325 | } | 2832 | | | 2833 | 325 | postprocess(module, op, result); | 2834 | 325 | } | 2835 | | | 2836 | 260 | if ( options.noCompare == false ) { | 2837 | 102 | compare(operations, results, data, size); | 2838 | 102 | } | 2839 | 260 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 219 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 219 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 219 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.33k | do { | 2725 | 4.33k | auto op = getOp(&parentDs, data, size); | 2726 | 4.33k | auto module = getModule(parentDs); | 2727 | 4.33k | if ( module == nullptr ) { | 2728 | 4.01k | continue; | 2729 | 4.01k | } | 2730 | | | 2731 | 317 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 317 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 13 | break; | 2736 | 13 | } | 2737 | 4.31k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 219 | if ( operations.empty() == true ) { | 2740 | 23 | return; | 2741 | 23 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 196 | #if 1 | 2745 | 196 | { | 2746 | 196 | std::set<uint64_t> moduleIDs; | 2747 | 196 | for (const auto& m : modules ) { | 2748 | 142 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 142 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 142 | moduleIDs.insert(moduleID); | 2756 | 142 | } | 2757 | | | 2758 | 196 | std::set<uint64_t> operationModuleIDs; | 2759 | 196 | for (const auto& op : operations) { | 2760 | 184 | operationModuleIDs.insert(op.first->ID); | 2761 | 184 | } | 2762 | | | 2763 | 196 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 196 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 196 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 196 | for (const auto& id : addModuleIDs) { | 2768 | 49 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 49 | } | 2770 | 196 | } | 2771 | 196 | #endif | 2772 | | | 2773 | 196 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 196 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 429 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 233 | auto& operation = operations[i]; | 2782 | | | 2783 | 233 | auto& module = operation.first; | 2784 | 233 | auto& op = operation.second; | 2785 | | | 2786 | 233 | if ( i > 0 ) { | 2787 | 162 | auto& prevModule = operations[i-1].first; | 2788 | 162 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 162 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 75 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 75 | if ( curModifier.size() == 0 ) { | 2793 | 17.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 17.4k | curModifier.push_back(1); | 2795 | 17.4k | } | 2796 | 41 | } else { | 2797 | 1.70k | for (auto& c : curModifier) { | 2798 | 1.70k | c++; | 2799 | 1.70k | } | 2800 | 41 | } | 2801 | 75 | } | 2802 | 162 | } | 2803 | | | 2804 | 233 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 233 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 233 | const auto& result = results.back(); | 2811 | | | 2812 | 233 | 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 | 233 | 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 | 233 | if ( options.disableTests == false ) { | 2830 | 233 | tests::test(op, result.second); | 2831 | 233 | } | 2832 | | | 2833 | 233 | postprocess(module, op, result); | 2834 | 233 | } | 2835 | | | 2836 | 196 | if ( options.noCompare == false ) { | 2837 | 71 | compare(operations, results, data, size); | 2838 | 71 | } | 2839 | 196 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 251 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 251 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 251 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.01k | do { | 2725 | 4.01k | auto op = getOp(&parentDs, data, size); | 2726 | 4.01k | auto module = getModule(parentDs); | 2727 | 4.01k | if ( module == nullptr ) { | 2728 | 3.61k | continue; | 2729 | 3.61k | } | 2730 | | | 2731 | 406 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 406 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 15 | break; | 2736 | 15 | } | 2737 | 4.00k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 251 | if ( operations.empty() == true ) { | 2740 | 11 | return; | 2741 | 11 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 240 | #if 1 | 2745 | 240 | { | 2746 | 240 | std::set<uint64_t> moduleIDs; | 2747 | 240 | for (const auto& m : modules ) { | 2748 | 230 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 230 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 230 | moduleIDs.insert(moduleID); | 2756 | 230 | } | 2757 | | | 2758 | 240 | std::set<uint64_t> operationModuleIDs; | 2759 | 248 | for (const auto& op : operations) { | 2760 | 248 | operationModuleIDs.insert(op.first->ID); | 2761 | 248 | } | 2762 | | | 2763 | 240 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 240 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 240 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 240 | for (const auto& id : addModuleIDs) { | 2768 | 92 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 92 | } | 2770 | 240 | } | 2771 | 240 | #endif | 2772 | | | 2773 | 240 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 240 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 580 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 340 | auto& operation = operations[i]; | 2782 | | | 2783 | 340 | auto& module = operation.first; | 2784 | 340 | auto& op = operation.second; | 2785 | | | 2786 | 340 | if ( i > 0 ) { | 2787 | 225 | auto& prevModule = operations[i-1].first; | 2788 | 225 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 225 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 94 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 94 | if ( curModifier.size() == 0 ) { | 2793 | 26.6k | for (size_t j = 0; j < 512; j++) { | 2794 | 26.6k | curModifier.push_back(1); | 2795 | 26.6k | } | 2796 | 52 | } else { | 2797 | 1.64k | for (auto& c : curModifier) { | 2798 | 1.64k | c++; | 2799 | 1.64k | } | 2800 | 42 | } | 2801 | 94 | } | 2802 | 225 | } | 2803 | | | 2804 | 340 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 340 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 340 | const auto& result = results.back(); | 2811 | | | 2812 | 340 | 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 | 340 | 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 | 340 | if ( options.disableTests == false ) { | 2830 | 340 | tests::test(op, result.second); | 2831 | 340 | } | 2832 | | | 2833 | 340 | postprocess(module, op, result); | 2834 | 340 | } | 2835 | | | 2836 | 240 | if ( options.noCompare == false ) { | 2837 | 115 | compare(operations, results, data, size); | 2838 | 115 | } | 2839 | 240 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::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 | 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 | 2.44k | continue; | 2729 | 2.44k | } | 2730 | | | 2731 | 352 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 352 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 14 | break; | 2736 | 14 | } | 2737 | 2.77k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 209 | if ( operations.empty() == true ) { | 2740 | 17 | return; | 2741 | 17 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 192 | #if 1 | 2745 | 192 | { | 2746 | 192 | std::set<uint64_t> moduleIDs; | 2747 | 192 | for (const auto& m : modules ) { | 2748 | 176 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 176 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 176 | moduleIDs.insert(moduleID); | 2756 | 176 | } | 2757 | | | 2758 | 192 | std::set<uint64_t> operationModuleIDs; | 2759 | 221 | for (const auto& op : operations) { | 2760 | 221 | operationModuleIDs.insert(op.first->ID); | 2761 | 221 | } | 2762 | | | 2763 | 192 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 192 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 192 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 192 | for (const auto& id : addModuleIDs) { | 2768 | 66 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 66 | } | 2770 | 192 | } | 2771 | 192 | #endif | 2772 | | | 2773 | 192 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 192 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 479 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 287 | auto& operation = operations[i]; | 2782 | | | 2783 | 287 | auto& module = operation.first; | 2784 | 287 | auto& op = operation.second; | 2785 | | | 2786 | 287 | if ( i > 0 ) { | 2787 | 199 | auto& prevModule = operations[i-1].first; | 2788 | 199 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 199 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 99 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 99 | if ( curModifier.size() == 0 ) { | 2793 | 26.6k | for (size_t j = 0; j < 512; j++) { | 2794 | 26.6k | curModifier.push_back(1); | 2795 | 26.6k | } | 2796 | 52 | } else { | 2797 | 631 | for (auto& c : curModifier) { | 2798 | 631 | c++; | 2799 | 631 | } | 2800 | 47 | } | 2801 | 99 | } | 2802 | 199 | } | 2803 | | | 2804 | 287 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 287 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 287 | const auto& result = results.back(); | 2811 | | | 2812 | 287 | 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 | 287 | 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 | 287 | if ( options.disableTests == false ) { | 2830 | 287 | tests::test(op, result.second); | 2831 | 287 | } | 2832 | | | 2833 | 287 | postprocess(module, op, result); | 2834 | 287 | } | 2835 | | | 2836 | 192 | if ( options.noCompare == false ) { | 2837 | 88 | compare(operations, results, data, size); | 2838 | 88 | } | 2839 | 192 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 320 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 320 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 320 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.77k | do { | 2725 | 4.77k | auto op = getOp(&parentDs, data, size); | 2726 | 4.77k | auto module = getModule(parentDs); | 2727 | 4.77k | if ( module == nullptr ) { | 2728 | 4.19k | continue; | 2729 | 4.19k | } | 2730 | | | 2731 | 584 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 584 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 19 | break; | 2736 | 19 | } | 2737 | 4.75k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 320 | if ( operations.empty() == true ) { | 2740 | 11 | return; | 2741 | 11 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 309 | #if 1 | 2745 | 309 | { | 2746 | 309 | std::set<uint64_t> moduleIDs; | 2747 | 326 | for (const auto& m : modules ) { | 2748 | 326 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 326 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 326 | moduleIDs.insert(moduleID); | 2756 | 326 | } | 2757 | | | 2758 | 309 | std::set<uint64_t> operationModuleIDs; | 2759 | 364 | for (const auto& op : operations) { | 2760 | 364 | operationModuleIDs.insert(op.first->ID); | 2761 | 364 | } | 2762 | | | 2763 | 309 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 309 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 309 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 309 | for (const auto& id : addModuleIDs) { | 2768 | 129 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 129 | } | 2770 | 309 | } | 2771 | 309 | #endif | 2772 | | | 2773 | 309 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 309 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 802 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 493 | auto& operation = operations[i]; | 2782 | | | 2783 | 493 | auto& module = operation.first; | 2784 | 493 | auto& op = operation.second; | 2785 | | | 2786 | 493 | if ( i > 0 ) { | 2787 | 330 | auto& prevModule = operations[i-1].first; | 2788 | 330 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 330 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 151 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 151 | if ( curModifier.size() == 0 ) { | 2793 | 44.6k | for (size_t j = 0; j < 512; j++) { | 2794 | 44.5k | curModifier.push_back(1); | 2795 | 44.5k | } | 2796 | 87 | } else { | 2797 | 2.61k | for (auto& c : curModifier) { | 2798 | 2.61k | c++; | 2799 | 2.61k | } | 2800 | 64 | } | 2801 | 151 | } | 2802 | 330 | } | 2803 | | | 2804 | 493 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 493 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 493 | const auto& result = results.back(); | 2811 | | | 2812 | 493 | if ( result.second != std::nullopt ) { | 2813 | 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 | 493 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 493 | if ( options.disableTests == false ) { | 2830 | 493 | tests::test(op, result.second); | 2831 | 493 | } | 2832 | | | 2833 | 493 | postprocess(module, op, result); | 2834 | 493 | } | 2835 | | | 2836 | 309 | if ( options.noCompare == false ) { | 2837 | 163 | compare(operations, results, data, size); | 2838 | 163 | } | 2839 | 309 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 212 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 212 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 212 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.30k | do { | 2725 | 4.30k | auto op = getOp(&parentDs, data, size); | 2726 | 4.30k | auto module = getModule(parentDs); | 2727 | 4.30k | if ( module == nullptr ) { | 2728 | 3.95k | continue; | 2729 | 3.95k | } | 2730 | | | 2731 | 350 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 350 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 14 | break; | 2736 | 14 | } | 2737 | 4.29k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 212 | if ( operations.empty() == true ) { | 2740 | 15 | return; | 2741 | 15 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 197 | #if 1 | 2745 | 197 | { | 2746 | 197 | std::set<uint64_t> moduleIDs; | 2747 | 226 | for (const auto& m : modules ) { | 2748 | 226 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 226 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 226 | moduleIDs.insert(moduleID); | 2756 | 226 | } | 2757 | | | 2758 | 197 | std::set<uint64_t> operationModuleIDs; | 2759 | 240 | for (const auto& op : operations) { | 2760 | 240 | operationModuleIDs.insert(op.first->ID); | 2761 | 240 | } | 2762 | | | 2763 | 197 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 197 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 197 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 197 | for (const auto& id : addModuleIDs) { | 2768 | 88 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 88 | } | 2770 | 197 | } | 2771 | 197 | #endif | 2772 | | | 2773 | 197 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 197 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 525 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 328 | auto& operation = operations[i]; | 2782 | | | 2783 | 328 | auto& module = operation.first; | 2784 | 328 | auto& op = operation.second; | 2785 | | | 2786 | 328 | if ( i > 0 ) { | 2787 | 215 | auto& prevModule = operations[i-1].first; | 2788 | 215 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 215 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 85 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 85 | 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 | 49 | } else { | 2797 | 1.75k | for (auto& c : curModifier) { | 2798 | 1.75k | c++; | 2799 | 1.75k | } | 2800 | 49 | } | 2801 | 85 | } | 2802 | 215 | } | 2803 | | | 2804 | 328 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 328 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 328 | const auto& result = results.back(); | 2811 | | | 2812 | 328 | 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 | 328 | 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 | 328 | if ( options.disableTests == false ) { | 2830 | 328 | tests::test(op, result.second); | 2831 | 328 | } | 2832 | | | 2833 | 328 | postprocess(module, op, result); | 2834 | 328 | } | 2835 | | | 2836 | 197 | if ( options.noCompare == false ) { | 2837 | 113 | compare(operations, results, data, size); | 2838 | 113 | } | 2839 | 197 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 318 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 318 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 318 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.05k | do { | 2725 | 5.05k | auto op = getOp(&parentDs, data, size); | 2726 | 5.05k | auto module = getModule(parentDs); | 2727 | 5.05k | if ( module == nullptr ) { | 2728 | 4.47k | continue; | 2729 | 4.47k | } | 2730 | | | 2731 | 580 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 580 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 20 | break; | 2736 | 20 | } | 2737 | 5.03k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 318 | if ( operations.empty() == true ) { | 2740 | 12 | return; | 2741 | 12 | } | 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 | 288 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 288 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 288 | moduleIDs.insert(moduleID); | 2756 | 288 | } | 2757 | | | 2758 | 306 | std::set<uint64_t> operationModuleIDs; | 2759 | 330 | for (const auto& op : operations) { | 2760 | 330 | operationModuleIDs.insert(op.first->ID); | 2761 | 330 | } | 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 | 117 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 117 | } | 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 | 753 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 447 | auto& operation = operations[i]; | 2782 | | | 2783 | 447 | auto& module = operation.first; | 2784 | 447 | auto& op = operation.second; | 2785 | | | 2786 | 447 | if ( i > 0 ) { | 2787 | 303 | auto& prevModule = operations[i-1].first; | 2788 | 303 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 303 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 138 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 138 | if ( curModifier.size() == 0 ) { | 2793 | 35.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 35.3k | curModifier.push_back(1); | 2795 | 35.3k | } | 2796 | 69 | } else { | 2797 | 2.45k | for (auto& c : curModifier) { | 2798 | 2.45k | c++; | 2799 | 2.45k | } | 2800 | 69 | } | 2801 | 138 | } | 2802 | 303 | } | 2803 | | | 2804 | 447 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 447 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 447 | const auto& result = results.back(); | 2811 | | | 2812 | 447 | 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 | 447 | 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 | 447 | if ( options.disableTests == false ) { | 2830 | 447 | tests::test(op, result.second); | 2831 | 447 | } | 2832 | | | 2833 | 447 | postprocess(module, op, result); | 2834 | 447 | } | 2835 | | | 2836 | 306 | if ( options.noCompare == false ) { | 2837 | 144 | compare(operations, results, data, size); | 2838 | 144 | } | 2839 | 306 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::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 | 3.39k | do { | 2725 | 3.39k | auto op = getOp(&parentDs, data, size); | 2726 | 3.39k | auto module = getModule(parentDs); | 2727 | 3.39k | if ( module == nullptr ) { | 2728 | 2.97k | continue; | 2729 | 2.97k | } | 2730 | | | 2731 | 420 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 420 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 13 | break; | 2736 | 13 | } | 2737 | 3.38k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 261 | if ( operations.empty() == true ) { | 2740 | 14 | return; | 2741 | 14 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 247 | #if 1 | 2745 | 247 | { | 2746 | 247 | std::set<uint64_t> moduleIDs; | 2747 | 247 | for (const auto& m : modules ) { | 2748 | 208 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 208 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 208 | moduleIDs.insert(moduleID); | 2756 | 208 | } | 2757 | | | 2758 | 247 | std::set<uint64_t> operationModuleIDs; | 2759 | 247 | for (const auto& op : operations) { | 2760 | 242 | operationModuleIDs.insert(op.first->ID); | 2761 | 242 | } | 2762 | | | 2763 | 247 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 247 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 247 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 247 | for (const auto& id : addModuleIDs) { | 2768 | 81 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 81 | } | 2770 | 247 | } | 2771 | 247 | #endif | 2772 | | | 2773 | 247 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 247 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 570 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 323 | auto& operation = operations[i]; | 2782 | | | 2783 | 323 | auto& module = operation.first; | 2784 | 323 | auto& op = operation.second; | 2785 | | | 2786 | 323 | if ( i > 0 ) { | 2787 | 219 | auto& prevModule = operations[i-1].first; | 2788 | 219 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 219 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 103 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 103 | if ( curModifier.size() == 0 ) { | 2793 | 28.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 28.1k | curModifier.push_back(1); | 2795 | 28.1k | } | 2796 | 55 | } else { | 2797 | 2.73k | for (auto& c : curModifier) { | 2798 | 2.73k | c++; | 2799 | 2.73k | } | 2800 | 48 | } | 2801 | 103 | } | 2802 | 219 | } | 2803 | | | 2804 | 323 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 323 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 323 | const auto& result = results.back(); | 2811 | | | 2812 | 323 | 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 | 323 | 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 | 323 | if ( options.disableTests == false ) { | 2830 | 323 | tests::test(op, result.second); | 2831 | 323 | } | 2832 | | | 2833 | 323 | postprocess(module, op, result); | 2834 | 323 | } | 2835 | | | 2836 | 247 | if ( options.noCompare == false ) { | 2837 | 104 | compare(operations, results, data, size); | 2838 | 104 | } | 2839 | 247 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 357 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 357 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 357 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.05k | do { | 2725 | 4.05k | auto op = getOp(&parentDs, data, size); | 2726 | 4.05k | auto module = getModule(parentDs); | 2727 | 4.05k | if ( module == nullptr ) { | 2728 | 3.50k | continue; | 2729 | 3.50k | } | 2730 | | | 2731 | 544 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 544 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 16 | break; | 2736 | 16 | } | 2737 | 4.03k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 357 | if ( operations.empty() == true ) { | 2740 | 17 | return; | 2741 | 17 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 340 | #if 1 | 2745 | 340 | { | 2746 | 340 | std::set<uint64_t> moduleIDs; | 2747 | 340 | for (const auto& m : modules ) { | 2748 | 212 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 212 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 212 | moduleIDs.insert(moduleID); | 2756 | 212 | } | 2757 | | | 2758 | 340 | std::set<uint64_t> operationModuleIDs; | 2759 | 340 | for (const auto& op : operations) { | 2760 | 268 | operationModuleIDs.insert(op.first->ID); | 2761 | 268 | } | 2762 | | | 2763 | 340 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 340 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 340 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 340 | for (const auto& id : addModuleIDs) { | 2768 | 78 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 78 | } | 2770 | 340 | } | 2771 | 340 | #endif | 2772 | | | 2773 | 340 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 340 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 686 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 346 | auto& operation = operations[i]; | 2782 | | | 2783 | 346 | auto& module = operation.first; | 2784 | 346 | auto& op = operation.second; | 2785 | | | 2786 | 346 | if ( i > 0 ) { | 2787 | 240 | auto& prevModule = operations[i-1].first; | 2788 | 240 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 240 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 119 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 119 | if ( curModifier.size() == 0 ) { | 2793 | 33.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 33.2k | curModifier.push_back(1); | 2795 | 33.2k | } | 2796 | 65 | } else { | 2797 | 31.9k | for (auto& c : curModifier) { | 2798 | 31.9k | c++; | 2799 | 31.9k | } | 2800 | 54 | } | 2801 | 119 | } | 2802 | 240 | } | 2803 | | | 2804 | 346 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 346 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 346 | const auto& result = results.back(); | 2811 | | | 2812 | 346 | 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 | 346 | 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 | 346 | if ( options.disableTests == false ) { | 2830 | 346 | tests::test(op, result.second); | 2831 | 346 | } | 2832 | | | 2833 | 346 | postprocess(module, op, result); | 2834 | 346 | } | 2835 | | | 2836 | 340 | if ( options.noCompare == false ) { | 2837 | 106 | compare(operations, results, data, size); | 2838 | 106 | } | 2839 | 340 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 201 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 201 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 201 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 2.09k | do { | 2725 | 2.09k | auto op = getOp(&parentDs, data, size); | 2726 | 2.09k | auto module = getModule(parentDs); | 2727 | 2.09k | if ( module == nullptr ) { | 2728 | 1.80k | continue; | 2729 | 1.80k | } | 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 | 13 | break; | 2736 | 13 | } | 2737 | 2.08k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 201 | if ( operations.empty() == true ) { | 2740 | 15 | return; | 2741 | 15 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 186 | #if 1 | 2745 | 186 | { | 2746 | 186 | std::set<uint64_t> moduleIDs; | 2747 | 186 | for (const auto& m : modules ) { | 2748 | 116 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 116 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 116 | moduleIDs.insert(moduleID); | 2756 | 116 | } | 2757 | | | 2758 | 186 | std::set<uint64_t> operationModuleIDs; | 2759 | 186 | for (const auto& op : operations) { | 2760 | 186 | operationModuleIDs.insert(op.first->ID); | 2761 | 186 | } | 2762 | | | 2763 | 186 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 186 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 186 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 186 | for (const auto& id : addModuleIDs) { | 2768 | 37 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 37 | } | 2770 | 186 | } | 2771 | 186 | #endif | 2772 | | | 2773 | 186 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 186 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 409 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 223 | auto& operation = operations[i]; | 2782 | | | 2783 | 223 | auto& module = operation.first; | 2784 | 223 | auto& op = operation.second; | 2785 | | | 2786 | 223 | if ( i > 0 ) { | 2787 | 165 | auto& prevModule = operations[i-1].first; | 2788 | 165 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 165 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 93 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 93 | if ( curModifier.size() == 0 ) { | 2793 | 23.0k | for (size_t j = 0; j < 512; j++) { | 2794 | 23.0k | curModifier.push_back(1); | 2795 | 23.0k | } | 2796 | 48 | } else { | 2797 | 722 | for (auto& c : curModifier) { | 2798 | 722 | c++; | 2799 | 722 | } | 2800 | 48 | } | 2801 | 93 | } | 2802 | 165 | } | 2803 | | | 2804 | 223 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 223 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 223 | const auto& result = results.back(); | 2811 | | | 2812 | 223 | 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 | 223 | 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 | 223 | if ( options.disableTests == false ) { | 2830 | 223 | tests::test(op, result.second); | 2831 | 223 | } | 2832 | | | 2833 | 223 | postprocess(module, op, result); | 2834 | 223 | } | 2835 | | | 2836 | 186 | if ( options.noCompare == false ) { | 2837 | 58 | compare(operations, results, data, size); | 2838 | 58 | } | 2839 | 186 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 239 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 239 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 239 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 4.80k | do { | 2725 | 4.80k | auto op = getOp(&parentDs, data, size); | 2726 | 4.80k | auto module = getModule(parentDs); | 2727 | 4.80k | if ( module == nullptr ) { | 2728 | 4.36k | continue; | 2729 | 4.36k | } | 2730 | | | 2731 | 435 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 435 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 18 | break; | 2736 | 18 | } | 2737 | 4.78k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 239 | if ( operations.empty() == true ) { | 2740 | 16 | return; | 2741 | 16 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 223 | #if 1 | 2745 | 223 | { | 2746 | 223 | std::set<uint64_t> moduleIDs; | 2747 | 223 | for (const auto& m : modules ) { | 2748 | 166 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 166 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 166 | moduleIDs.insert(moduleID); | 2756 | 166 | } | 2757 | | | 2758 | 223 | std::set<uint64_t> operationModuleIDs; | 2759 | 246 | for (const auto& op : operations) { | 2760 | 246 | operationModuleIDs.insert(op.first->ID); | 2761 | 246 | } | 2762 | | | 2763 | 223 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 223 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 223 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 223 | for (const auto& id : addModuleIDs) { | 2768 | 56 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 56 | } | 2770 | 223 | } | 2771 | 223 | #endif | 2772 | | | 2773 | 223 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 223 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 525 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 302 | auto& operation = operations[i]; | 2782 | | | 2783 | 302 | auto& module = operation.first; | 2784 | 302 | auto& op = operation.second; | 2785 | | | 2786 | 302 | if ( i > 0 ) { | 2787 | 219 | auto& prevModule = operations[i-1].first; | 2788 | 219 | auto& prevOp = operations[i].second; | 2789 | | | 2790 | 219 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 123 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 123 | if ( curModifier.size() == 0 ) { | 2793 | 35.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 35.3k | curModifier.push_back(1); | 2795 | 35.3k | } | 2796 | 69 | } else { | 2797 | 1.31k | for (auto& c : curModifier) { | 2798 | 1.31k | c++; | 2799 | 1.31k | } | 2800 | 54 | } | 2801 | 123 | } | 2802 | 219 | } | 2803 | | | 2804 | 302 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 302 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 302 | const auto& result = results.back(); | 2811 | | | 2812 | 302 | 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 | 302 | 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 | 302 | if ( options.disableTests == false ) { | 2830 | 302 | tests::test(op, result.second); | 2831 | 302 | } | 2832 | | | 2833 | 302 | postprocess(module, op, result); | 2834 | 302 | } | 2835 | | | 2836 | 223 | if ( options.noCompare == false ) { | 2837 | 83 | compare(operations, results, data, size); | 2838 | 83 | } | 2839 | 223 | } |
|
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 */ |