/src/cryptofuzz-sp-math-all-8bit/executor.cpp
Line | Count | Source |
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 | 156k | #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 | 1.00k | 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 | 1.00k | (void)module; |
53 | 1.00k | (void)op; |
54 | | |
55 | 1.00k | if ( result.second != std::nullopt ) { |
56 | 744 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
57 | 744 | } |
58 | 1.00k | } |
59 | | |
60 | 1.00k | template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const { |
61 | 1.00k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
62 | | |
63 | 1.00k | return module->OpDigest(op); |
64 | 1.00k | } |
65 | | |
66 | | /* Specialization for operation::HMAC */ |
67 | 826 | 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 | 826 | (void)module; |
69 | 826 | (void)op; |
70 | | |
71 | 826 | if ( result.second != std::nullopt ) { |
72 | 412 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
73 | 412 | } |
74 | 826 | } |
75 | | |
76 | 826 | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const { |
77 | 826 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
78 | | |
79 | 826 | return module->OpHMAC(op); |
80 | 826 | } |
81 | | |
82 | | /* Specialization for operation::UMAC */ |
83 | 147 | 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 | 147 | (void)module; |
85 | 147 | (void)op; |
86 | | |
87 | 147 | if ( result.second != std::nullopt ) { |
88 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
89 | 0 | } |
90 | 147 | } |
91 | | |
92 | 147 | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const { |
93 | 147 | return module->OpUMAC(op); |
94 | 147 | } |
95 | | |
96 | | /* Specialization for operation::CMAC */ |
97 | 1.06k | 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 | 1.06k | (void)module; |
99 | 1.06k | (void)op; |
100 | | |
101 | 1.06k | if ( result.second != std::nullopt ) { |
102 | 259 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
103 | 259 | } |
104 | 1.06k | } |
105 | | |
106 | 1.06k | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const { |
107 | 1.06k | RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get()); |
108 | | |
109 | 1.06k | return module->OpCMAC(op); |
110 | 1.06k | } |
111 | | |
112 | | /* Specialization for operation::SymmetricEncrypt */ |
113 | 3.82k | 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 | 3.82k | if ( options.noDecrypt == true ) { |
115 | 0 | return; |
116 | 0 | } |
117 | | |
118 | 3.82k | if ( result.second != std::nullopt ) { |
119 | 1.67k | fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize()); |
120 | 1.67k | if ( result.second->tag != std::nullopt ) { |
121 | 256 | fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize()); |
122 | 256 | } |
123 | 1.67k | } |
124 | | |
125 | 3.82k | if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) { |
126 | 1.64k | using fuzzing::datasource::ID; |
127 | | |
128 | 1.64k | bool tryDecrypt = true; |
129 | | |
130 | 1.64k | if ( module->ID == CF_MODULE("OpenSSL") ) { |
131 | 0 | switch ( op.cipher.cipherType.Get() ) { |
132 | 0 | case ID("Cryptofuzz/Cipher/AES_128_OCB"): |
133 | 0 | case ID("Cryptofuzz/Cipher/AES_256_OCB"): |
134 | 0 | tryDecrypt = false; |
135 | 0 | break; |
136 | 0 | case ID("Cryptofuzz/Cipher/AES_128_GCM"): |
137 | 0 | case ID("Cryptofuzz/Cipher/AES_192_GCM"): |
138 | 0 | case ID("Cryptofuzz/Cipher/AES_256_GCM"): |
139 | 0 | case ID("Cryptofuzz/Cipher/AES_128_CCM"): |
140 | 0 | case ID("Cryptofuzz/Cipher/AES_192_CCM"): |
141 | 0 | case ID("Cryptofuzz/Cipher/AES_256_CCM"): |
142 | 0 | case ID("Cryptofuzz/Cipher/ARIA_128_CCM"): |
143 | 0 | case ID("Cryptofuzz/Cipher/ARIA_192_CCM"): |
144 | 0 | case ID("Cryptofuzz/Cipher/ARIA_256_CCM"): |
145 | 0 | case ID("Cryptofuzz/Cipher/ARIA_128_GCM"): |
146 | 0 | case ID("Cryptofuzz/Cipher/ARIA_192_GCM"): |
147 | 0 | case ID("Cryptofuzz/Cipher/ARIA_256_GCM"): |
148 | 0 | if ( op.tagSize == std::nullopt ) { |
149 | | /* OpenSSL fails to decrypt its own CCM and GCM ciphertexts if |
150 | | * a tag is not included |
151 | | */ |
152 | 0 | tryDecrypt = false; |
153 | 0 | } |
154 | 0 | break; |
155 | 0 | } |
156 | 0 | } |
157 | | |
158 | 1.64k | if ( tryDecrypt == true ) { |
159 | | /* Try to decrypt the encrypted data */ |
160 | | |
161 | | /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */ |
162 | 1.64k | auto opDecrypt = operation::SymmetricDecrypt( |
163 | | /* The SymmetricEncrypt instance */ |
164 | 1.64k | op, |
165 | | |
166 | | /* The ciphertext generated by OpSymmetricEncrypt */ |
167 | 1.64k | *(result.second), |
168 | | |
169 | | /* The size of the output buffer that OpSymmetricDecrypt() must use. */ |
170 | 1.64k | op.cleartext.GetSize() + 32, |
171 | | |
172 | 1.64k | op.aad, |
173 | | |
174 | | /* Empty modifier */ |
175 | 1.64k | {}); |
176 | | |
177 | 1.64k | const auto cleartext = module->OpSymmetricDecrypt(opDecrypt); |
178 | | |
179 | 1.64k | if ( cleartext == std::nullopt ) { |
180 | | /* Decryption failed, OpSymmetricDecrypt() returned std::nullopt */ |
181 | 0 | printf("Cannot decrypt ciphertext\n\n"); |
182 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); |
183 | 0 | printf("Ciphertext: %s\n", util::HexDump(result.second->ciphertext.Get()).c_str()); |
184 | 0 | printf("Tag: %s\n", result.second->tag ? util::HexDump(result.second->tag->Get()).c_str() : "nullopt"); |
185 | 0 | abort( |
186 | 0 | {module->name}, |
187 | 0 | op.Name(), |
188 | 0 | op.GetAlgorithmString(), |
189 | 0 | "cannot decrypt ciphertext" |
190 | 0 | ); |
191 | 1.64k | } else if ( cleartext->Get() != op.cleartext.Get() ) { |
192 | | /* Decryption ostensibly succeeded, but the cleartext returned by OpSymmetricDecrypt() |
193 | | * does not match to original cleartext */ |
194 | |
|
195 | 0 | printf("Cannot decrypt ciphertext (but decryption ostensibly succeeded)\n\n"); |
196 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); |
197 | 0 | printf("Ciphertext: %s\n", util::HexDump(result.second->ciphertext.Get()).c_str()); |
198 | 0 | printf("Tag: %s\n", result.second->tag ? util::HexDump(result.second->tag->Get()).c_str() : "nullopt"); |
199 | 0 | printf("Purported cleartext: %s\n", util::HexDump(cleartext->Get()).c_str()); |
200 | 0 | abort( |
201 | 0 | {module->name}, |
202 | 0 | op.Name(), |
203 | 0 | op.GetAlgorithmString(), |
204 | 0 | "cannot decrypt ciphertext" |
205 | 0 | ); |
206 | 0 | } |
207 | 1.64k | } |
208 | 1.64k | } |
209 | 3.82k | } |
210 | | |
211 | 3.82k | template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const { |
212 | 3.82k | RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get()); |
213 | | |
214 | 3.82k | return module->OpSymmetricEncrypt(op); |
215 | 3.82k | } |
216 | | |
217 | | /* Specialization for operation::SymmetricDecrypt */ |
218 | 1.60k | template<> void ExecutorBase<component::MAC, operation::SymmetricDecrypt>::postprocess(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op, const ExecutorBase<component::MAC, operation::SymmetricDecrypt>::ResultPair& result) const { |
219 | 1.60k | (void)module; |
220 | 1.60k | (void)op; |
221 | | |
222 | 1.60k | if ( result.second != std::nullopt ) { |
223 | 222 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
224 | 222 | } |
225 | 1.60k | } |
226 | | |
227 | 1.60k | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const { |
228 | 1.60k | RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get()); |
229 | | |
230 | 1.60k | return module->OpSymmetricDecrypt(op); |
231 | 1.60k | } |
232 | | |
233 | | /* Specialization for operation::KDF_SCRYPT */ |
234 | 172 | 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 | 172 | (void)module; |
236 | 172 | (void)op; |
237 | | |
238 | 172 | if ( result.second != std::nullopt ) { |
239 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
240 | 0 | } |
241 | 172 | } |
242 | | |
243 | 172 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const { |
244 | 172 | return module->OpKDF_SCRYPT(op); |
245 | 172 | } |
246 | | |
247 | | /* Specialization for operation::KDF_HKDF */ |
248 | 870 | 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 | 870 | (void)module; |
250 | 870 | (void)op; |
251 | | |
252 | 870 | if ( result.second != std::nullopt ) { |
253 | 382 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
254 | 382 | } |
255 | 870 | } |
256 | | |
257 | 870 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const { |
258 | 870 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
259 | | |
260 | 870 | return module->OpKDF_HKDF(op); |
261 | 870 | } |
262 | | |
263 | | /* Specialization for operation::KDF_PBKDF */ |
264 | 178 | 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 | 178 | (void)module; |
266 | 178 | (void)op; |
267 | | |
268 | 178 | if ( result.second != std::nullopt ) { |
269 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
270 | 0 | } |
271 | 178 | } |
272 | | |
273 | 178 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const { |
274 | 178 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
275 | | |
276 | 178 | return module->OpKDF_PBKDF(op); |
277 | 178 | } |
278 | | |
279 | | /* Specialization for operation::KDF_PBKDF1 */ |
280 | 183 | 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 | 183 | (void)module; |
282 | 183 | (void)op; |
283 | | |
284 | 183 | if ( result.second != std::nullopt ) { |
285 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
286 | 0 | } |
287 | 183 | } |
288 | | |
289 | 183 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const { |
290 | 183 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
291 | | |
292 | 183 | return module->OpKDF_PBKDF1(op); |
293 | 183 | } |
294 | | |
295 | | /* Specialization for operation::KDF_PBKDF2 */ |
296 | 597 | 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 | 597 | (void)module; |
298 | 597 | (void)op; |
299 | | |
300 | 597 | if ( result.second != std::nullopt ) { |
301 | 411 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
302 | 411 | } |
303 | 597 | } |
304 | | |
305 | 597 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const { |
306 | 597 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
307 | | |
308 | 597 | return module->OpKDF_PBKDF2(op); |
309 | 597 | } |
310 | | |
311 | | /* Specialization for operation::KDF_ARGON2 */ |
312 | 22 | 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 | 22 | (void)module; |
314 | 22 | (void)op; |
315 | | |
316 | 22 | if ( result.second != std::nullopt ) { |
317 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
318 | 0 | } |
319 | 22 | } |
320 | | |
321 | 22 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const { |
322 | 22 | return module->OpKDF_ARGON2(op); |
323 | 22 | } |
324 | | |
325 | | /* Specialization for operation::KDF_SSH */ |
326 | 200 | 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 | 200 | (void)module; |
328 | 200 | (void)op; |
329 | | |
330 | 200 | if ( result.second != std::nullopt ) { |
331 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
332 | 0 | } |
333 | 200 | } |
334 | | |
335 | 200 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const { |
336 | 200 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
337 | | |
338 | 200 | return module->OpKDF_SSH(op); |
339 | 200 | } |
340 | | |
341 | | /* Specialization for operation::KDF_TLS1_PRF */ |
342 | 205 | 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 | 205 | (void)module; |
344 | 205 | (void)op; |
345 | | |
346 | 205 | if ( result.second != std::nullopt ) { |
347 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
348 | 0 | } |
349 | 205 | } |
350 | | |
351 | 205 | 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 | 205 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
353 | | |
354 | 205 | return module->OpKDF_TLS1_PRF(op); |
355 | 205 | } |
356 | | |
357 | | /* Specialization for operation::KDF_X963 */ |
358 | 157 | 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 | 157 | (void)module; |
360 | 157 | (void)op; |
361 | | |
362 | 157 | if ( result.second != std::nullopt ) { |
363 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
364 | 0 | } |
365 | 157 | } |
366 | | |
367 | 157 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const { |
368 | 157 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
369 | | |
370 | 157 | return module->OpKDF_X963(op); |
371 | 157 | } |
372 | | |
373 | | /* Specialization for operation::KDF_BCRYPT */ |
374 | 17 | 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 | 17 | (void)module; |
376 | 17 | (void)op; |
377 | | |
378 | 17 | if ( result.second != std::nullopt ) { |
379 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
380 | 0 | } |
381 | 17 | } |
382 | | |
383 | 17 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const { |
384 | 17 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
385 | | |
386 | 17 | return module->OpKDF_BCRYPT(op); |
387 | 17 | } |
388 | | |
389 | | /* Specialization for operation::KDF_SP_800_108 */ |
390 | 198 | 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 | 198 | (void)module; |
392 | 198 | (void)op; |
393 | | |
394 | 198 | if ( result.second != std::nullopt ) { |
395 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
396 | 0 | } |
397 | 198 | } |
398 | | |
399 | 198 | 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 | 198 | if ( op.mech.mode == true ) { |
401 | 125 | RETURN_IF_DISABLED(options.digests, op.mech.type.Get()); |
402 | 125 | } |
403 | | |
404 | 198 | return module->OpKDF_SP_800_108(op); |
405 | 198 | } |
406 | | |
407 | | /* Specialization for operation::KDF_SRTP */ |
408 | 195 | 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 | 195 | (void)module; |
410 | 195 | (void)op; |
411 | 195 | (void)result; |
412 | 195 | } |
413 | | |
414 | 195 | template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const { |
415 | 195 | return module->OpKDF_SRTP(op); |
416 | 195 | } |
417 | | |
418 | | /* Specialization for operation::KDF_SRTCP */ |
419 | 161 | 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 | 161 | (void)module; |
421 | 161 | (void)op; |
422 | 161 | (void)result; |
423 | 161 | } |
424 | | |
425 | 161 | template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const { |
426 | 161 | return module->OpKDF_SRTCP(op); |
427 | 161 | } |
428 | | |
429 | | /* Specialization for operation::ECC_PrivateToPublic */ |
430 | 9.15k | 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 | 9.15k | (void)module; |
432 | | |
433 | 9.15k | if ( result.second != std::nullopt ) { |
434 | 4.01k | const auto curveID = op.curveType.Get(); |
435 | 4.01k | const auto privkey = op.priv.ToTrimmedString(); |
436 | 4.01k | const auto pub_x = result.second->first.ToTrimmedString(); |
437 | 4.01k | const auto pub_y = result.second->second.ToTrimmedString(); |
438 | | |
439 | 4.01k | Pool_CurvePrivkey.Set({ curveID, privkey }); |
440 | 4.01k | Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y }); |
441 | 4.01k | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
442 | | |
443 | 4.01k | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
444 | 4.01k | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
445 | 4.01k | } |
446 | 9.15k | } |
447 | | |
448 | 9.15k | 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 | 9.15k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
450 | | |
451 | 9.15k | const size_t size = op.priv.ToTrimmedString().size(); |
452 | | |
453 | 9.15k | if ( size == 0 || size > 4096 ) { |
454 | 104 | return std::nullopt; |
455 | 104 | } |
456 | | |
457 | 9.04k | return module->OpECC_PrivateToPublic(op); |
458 | 9.15k | } |
459 | | |
460 | | /* Specialization for operation::ECC_ValidatePubkey */ |
461 | 5.80k | 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 | 5.80k | (void)module; |
463 | 5.80k | (void)op; |
464 | 5.80k | (void)result; |
465 | 5.80k | } |
466 | | |
467 | 5.80k | template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const { |
468 | 5.80k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
469 | | |
470 | 5.80k | return module->OpECC_ValidatePubkey(op); |
471 | 5.80k | } |
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 | 3.04k | 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 | 3.04k | (void)operations; |
479 | 3.04k | (void)results; |
480 | 3.04k | (void)data; |
481 | 3.04k | (void)size; |
482 | 3.04k | } |
483 | | |
484 | 8.95k | 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 | 8.95k | (void)module; |
486 | | |
487 | 8.95k | if ( result.second != std::nullopt ) { |
488 | 2.43k | const auto curveID = op.curveType.Get(); |
489 | 2.43k | const auto privkey = result.second->priv.ToTrimmedString(); |
490 | 2.43k | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
491 | 2.43k | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
492 | | |
493 | 2.43k | Pool_CurvePrivkey.Set({ curveID, privkey }); |
494 | 2.43k | Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y }); |
495 | 2.43k | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
496 | | |
497 | 2.43k | { |
498 | 2.43k | auto opValidate = operation::ECC_ValidatePubkey( |
499 | 2.43k | op.curveType, |
500 | 2.43k | result.second->pub, |
501 | 2.43k | op.modifier); |
502 | | |
503 | 2.43k | const auto validateResult = module->OpECC_ValidatePubkey(opValidate); |
504 | 2.43k | CF_ASSERT( |
505 | 2.43k | validateResult == std::nullopt || |
506 | 2.43k | *validateResult == true, |
507 | 2.43k | "Cannot validate generated public key"); |
508 | 2.43k | } |
509 | 2.43k | } |
510 | 8.95k | } |
511 | | |
512 | 8.95k | 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 | 8.95k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
514 | | |
515 | 8.95k | return module->OpECC_GenerateKeyPair(op); |
516 | 8.95k | } |
517 | | |
518 | | /* Specialization for operation::ECCSI_Sign */ |
519 | 945 | 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 | 945 | (void)module; |
521 | | |
522 | 945 | 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 | 945 | } |
565 | | |
566 | 945 | 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 | 945 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
568 | 945 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
569 | | |
570 | 665 | const size_t size = op.priv.ToTrimmedString().size(); |
571 | | |
572 | 665 | if ( size == 0 || size > 4096 ) { |
573 | 3 | return std::nullopt; |
574 | 3 | } |
575 | | |
576 | 662 | return module->OpECCSI_Sign(op); |
577 | 665 | } |
578 | | |
579 | | /* Specialization for operation::ECDSA_Sign */ |
580 | 11.0k | 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 | 11.0k | (void)module; |
582 | | |
583 | 11.0k | if ( result.second != std::nullopt ) { |
584 | 6.83k | const auto curveID = op.curveType.Get(); |
585 | 6.83k | const auto cleartext = op.cleartext.ToHex(); |
586 | 6.83k | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
587 | 6.83k | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
588 | 6.83k | const auto sig_r = result.second->signature.first.ToTrimmedString(); |
589 | 6.83k | const auto sig_s = result.second->signature.second.ToTrimmedString(); |
590 | | |
591 | 6.83k | Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s}); |
592 | 6.83k | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
593 | 6.83k | Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s }); |
594 | | |
595 | 6.83k | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
596 | 6.83k | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
597 | 6.83k | if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); } |
598 | 6.83k | if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); } |
599 | | |
600 | 6.83k | { |
601 | 6.83k | auto opVerify = operation::ECDSA_Verify( |
602 | 6.83k | op, |
603 | 6.83k | *(result.second), |
604 | 6.83k | op.modifier); |
605 | | |
606 | 6.83k | const auto verifyResult = module->OpECDSA_Verify(opVerify); |
607 | 6.83k | CF_ASSERT( |
608 | 6.83k | verifyResult == std::nullopt || |
609 | 6.83k | *verifyResult == true, |
610 | 6.83k | "Cannot verify generated signature"); |
611 | 6.83k | } |
612 | 6.83k | } |
613 | 11.0k | } |
614 | | |
615 | 11.0k | 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 | 11.0k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
617 | 11.0k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
618 | | |
619 | 10.7k | const size_t size = op.priv.ToTrimmedString().size(); |
620 | | |
621 | 10.7k | if ( size == 0 || size > 4096 ) { |
622 | 3 | return std::nullopt; |
623 | 3 | } |
624 | | |
625 | 10.7k | return module->OpECDSA_Sign(op); |
626 | 10.7k | } |
627 | | |
628 | | /* Specialization for operation::ECGDSA_Sign */ |
629 | 56 | 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 | 56 | (void)module; |
631 | | |
632 | 56 | if ( result.second != std::nullopt ) { |
633 | 0 | const auto curveID = op.curveType.Get(); |
634 | 0 | const auto cleartext = op.cleartext.ToHex(); |
635 | 0 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
636 | 0 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
637 | 0 | const auto sig_r = result.second->signature.first.ToTrimmedString(); |
638 | 0 | const auto sig_s = result.second->signature.second.ToTrimmedString(); |
639 | |
|
640 | 0 | Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s}); |
641 | 0 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
642 | 0 | Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s }); |
643 | |
|
644 | 0 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
645 | 0 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
646 | 0 | if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); } |
647 | 0 | if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); } |
648 | 0 | } |
649 | 56 | } |
650 | | |
651 | 56 | 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 | 56 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
653 | 56 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
654 | | |
655 | 56 | const size_t size = op.priv.ToTrimmedString().size(); |
656 | | |
657 | 56 | if ( size == 0 || size > 4096 ) { |
658 | 0 | return std::nullopt; |
659 | 0 | } |
660 | | |
661 | 56 | return module->OpECGDSA_Sign(op); |
662 | 56 | } |
663 | | |
664 | | /* Specialization for operation::ECRDSA_Sign */ |
665 | 60 | 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 | 60 | (void)module; |
667 | | |
668 | 60 | 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 | 60 | } |
686 | | |
687 | 60 | 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 | 60 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
689 | 60 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
690 | | |
691 | 60 | const size_t size = op.priv.ToTrimmedString().size(); |
692 | | |
693 | 60 | if ( size == 0 || size > 4096 ) { |
694 | 0 | return std::nullopt; |
695 | 0 | } |
696 | | |
697 | 60 | return module->OpECRDSA_Sign(op); |
698 | 60 | } |
699 | | |
700 | | /* Specialization for operation::Schnorr_Sign */ |
701 | 56 | 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 | 56 | (void)module; |
703 | | |
704 | 56 | 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 | 56 | } |
722 | | |
723 | 56 | 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 | 56 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
725 | 56 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
726 | | |
727 | 56 | const size_t size = op.priv.ToTrimmedString().size(); |
728 | | |
729 | 56 | if ( size == 0 || size > 4096 ) { |
730 | 0 | return std::nullopt; |
731 | 0 | } |
732 | | |
733 | 56 | return module->OpSchnorr_Sign(op); |
734 | 56 | } |
735 | | |
736 | | /* Specialization for operation::ECCSI_Verify */ |
737 | 521 | 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 | 521 | (void)module; |
739 | 521 | (void)op; |
740 | 521 | (void)result; |
741 | 521 | } |
742 | | |
743 | 521 | template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const { |
744 | 521 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
745 | 521 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
746 | | |
747 | 207 | return module->OpECCSI_Verify(op); |
748 | 521 | } |
749 | | |
750 | | /* Specialization for operation::ECDSA_Verify */ |
751 | 6.72k | 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 | 6.72k | (void)module; |
753 | 6.72k | (void)op; |
754 | 6.72k | (void)result; |
755 | 6.72k | } |
756 | | |
757 | 6.72k | template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const { |
758 | 6.72k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
759 | 6.72k | 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 | 6.36k | return module->OpECDSA_Verify(op); |
772 | 6.72k | } |
773 | | |
774 | | /* Specialization for operation::ECGDSA_Verify */ |
775 | 50 | 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 | 50 | (void)module; |
777 | 50 | (void)op; |
778 | 50 | (void)result; |
779 | 50 | } |
780 | | |
781 | 50 | template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const { |
782 | 50 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
783 | 50 | 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 | 50 | return module->OpECGDSA_Verify(op); |
796 | 50 | } |
797 | | |
798 | | /* Specialization for operation::ECRDSA_Verify */ |
799 | 53 | 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 | 53 | (void)module; |
801 | 53 | (void)op; |
802 | 53 | (void)result; |
803 | 53 | } |
804 | | |
805 | 53 | template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const { |
806 | 53 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
807 | 53 | 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 | 53 | return module->OpECRDSA_Verify(op); |
820 | 53 | } |
821 | | |
822 | | /* Specialization for operation::Schnorr_Verify */ |
823 | 44 | 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 | 44 | (void)module; |
825 | 44 | (void)op; |
826 | 44 | (void)result; |
827 | 44 | } |
828 | | |
829 | 44 | template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const { |
830 | 44 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
831 | 44 | 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 | 44 | return module->OpSchnorr_Verify(op); |
844 | 44 | } |
845 | | |
846 | 48 | 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 | 48 | (void)module; |
848 | 48 | (void)op; |
849 | 48 | (void)result; |
850 | 48 | } |
851 | | |
852 | 48 | 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 | 48 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
854 | 48 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
855 | | |
856 | 48 | return module->OpECDSA_Recover(op); |
857 | 48 | } |
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 | 93 | 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 | 93 | (void)module; |
869 | 93 | (void)op; |
870 | 93 | (void)result; |
871 | 93 | } |
872 | | |
873 | 93 | template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const { |
874 | 93 | const std::vector<size_t> sizes = { |
875 | 93 | op.parameters.p.ToTrimmedString().size(), |
876 | 93 | op.parameters.q.ToTrimmedString().size(), |
877 | 93 | op.parameters.g.ToTrimmedString().size(), |
878 | 93 | op.pub.ToTrimmedString().size(), |
879 | 93 | op.signature.first.ToTrimmedString().size(), |
880 | 93 | op.signature.second.ToTrimmedString().size(), |
881 | 93 | }; |
882 | | |
883 | 548 | for (const auto& size : sizes) { |
884 | 548 | if ( size == 0 || size > 4096 ) { |
885 | 4 | return std::nullopt; |
886 | 4 | } |
887 | 548 | } |
888 | | |
889 | 89 | return module->OpDSA_Verify(op); |
890 | 93 | } |
891 | | |
892 | | /* Specialization for operation::DSA_Sign */ |
893 | | /* Do not compare DSA_Sign results, because the result can be produced indeterministically */ |
894 | | template <> |
895 | 35 | 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 | 35 | (void)operations; |
897 | 35 | (void)results; |
898 | 35 | (void)data; |
899 | 35 | (void)size; |
900 | 35 | } |
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 | 84 | 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 | 84 | (void)module; |
910 | 84 | (void)op; |
911 | 84 | 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 | 84 | } |
934 | | |
935 | 84 | 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 | 84 | const std::vector<size_t> sizes = { |
937 | 84 | op.parameters.p.ToTrimmedString().size(), |
938 | 84 | op.parameters.q.ToTrimmedString().size(), |
939 | 84 | op.parameters.g.ToTrimmedString().size(), |
940 | 84 | op.priv.ToTrimmedString().size(), |
941 | 84 | }; |
942 | | |
943 | 330 | for (const auto& size : sizes) { |
944 | 330 | if ( size == 0 || size > 4096 ) { |
945 | 8 | return std::nullopt; |
946 | 8 | } |
947 | 330 | } |
948 | | |
949 | 76 | return module->OpDSA_Sign(op); |
950 | 84 | } |
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 | 52 | 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 | 52 | (void)result; |
963 | 52 | (void)module; |
964 | 52 | (void)op; |
965 | 52 | if ( result.second != std::nullopt ) { |
966 | | //Pool_DSA_PubPriv.Set({pub, priv}); |
967 | 0 | } |
968 | 52 | } |
969 | | |
970 | 52 | template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const { |
971 | 52 | return module->OpDSA_PrivateToPublic(op); |
972 | 52 | } |
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 | 44 | 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 | 44 | (void)operations; |
980 | 44 | (void)results; |
981 | 44 | (void)data; |
982 | 44 | (void)size; |
983 | 44 | } |
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 | 100 | 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 | 100 | (void)result; |
994 | 100 | (void)module; |
995 | 100 | (void)op; |
996 | 100 | 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 | 100 | } |
1003 | | |
1004 | 100 | 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 | 100 | const std::vector<size_t> sizes = { |
1006 | 100 | op.p.ToTrimmedString().size(), |
1007 | 100 | op.q.ToTrimmedString().size(), |
1008 | 100 | op.g.ToTrimmedString().size(), |
1009 | 100 | }; |
1010 | | |
1011 | 293 | for (const auto& size : sizes) { |
1012 | 293 | if ( size == 0 || size > 4096 ) { |
1013 | 7 | return std::nullopt; |
1014 | 7 | } |
1015 | 293 | } |
1016 | | |
1017 | 93 | return module->OpDSA_GenerateKeyPair(op); |
1018 | 100 | } |
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 | 20 | 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 | 20 | (void)operations; |
1026 | 20 | (void)results; |
1027 | 20 | (void)data; |
1028 | 20 | (void)size; |
1029 | 20 | } |
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 | 53 | 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 | 53 | (void)result; |
1040 | 53 | (void)module; |
1041 | 53 | (void)op; |
1042 | 53 | 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 | 53 | } |
1054 | | |
1055 | 53 | 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 | 53 | return module->OpDSA_GenerateParameters(op); |
1057 | 53 | } |
1058 | | |
1059 | | /* Specialization for operation::ECDH_Derive */ |
1060 | 1.33k | 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 | 1.33k | (void)module; |
1062 | 1.33k | (void)op; |
1063 | 1.33k | (void)result; |
1064 | 1.33k | } |
1065 | | |
1066 | 1.33k | template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const { |
1067 | 1.33k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1068 | | |
1069 | 1.33k | return module->OpECDH_Derive(op); |
1070 | 1.33k | } |
1071 | | |
1072 | | /* Specialization for operation::ECIES_Encrypt */ |
1073 | | template <> |
1074 | 710 | 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 | 710 | (void)operations; |
1076 | 710 | (void)results; |
1077 | 710 | (void)data; |
1078 | 710 | (void)size; |
1079 | 710 | } |
1080 | 1.45k | 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 | 1.45k | (void)module; |
1082 | 1.45k | (void)op; |
1083 | 1.45k | (void)result; |
1084 | 1.45k | } |
1085 | | |
1086 | 1.45k | template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const { |
1087 | 1.45k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1088 | | |
1089 | 1.45k | return module->OpECIES_Encrypt(op); |
1090 | 1.45k | } |
1091 | | |
1092 | | /* Specialization for operation::ECIES_Decrypt */ |
1093 | 1.51k | template<> void ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::postprocess(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op, const ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::ResultPair& result) const { |
1094 | 1.51k | (void)module; |
1095 | 1.51k | (void)op; |
1096 | 1.51k | (void)result; |
1097 | 1.51k | } |
1098 | | |
1099 | 1.51k | template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const { |
1100 | 1.51k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1101 | | |
1102 | 1.51k | return module->OpECIES_Decrypt(op); |
1103 | 1.51k | } |
1104 | | |
1105 | | /* Specialization for operation::ECC_Point_Add */ |
1106 | 4.52k | 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 | 4.52k | (void)module; |
1108 | | |
1109 | 4.52k | if ( result.second != std::nullopt ) { |
1110 | 254 | const auto curveID = op.curveType.Get(); |
1111 | 254 | const auto x = result.second->first.ToTrimmedString(); |
1112 | 254 | const auto y = result.second->second.ToTrimmedString(); |
1113 | | |
1114 | 254 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1115 | | |
1116 | 254 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1117 | 254 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1118 | 254 | } |
1119 | 4.52k | } |
1120 | | |
1121 | 4.52k | 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 | 4.52k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1123 | | |
1124 | 4.52k | return module->OpECC_Point_Add(op); |
1125 | 4.52k | } |
1126 | | |
1127 | | /* Specialization for operation::ECC_Point_Sub */ |
1128 | 53 | 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 | 53 | (void)module; |
1130 | | |
1131 | 53 | if ( result.second != std::nullopt ) { |
1132 | 0 | const auto curveID = op.curveType.Get(); |
1133 | 0 | const auto x = result.second->first.ToTrimmedString(); |
1134 | 0 | const auto y = result.second->second.ToTrimmedString(); |
1135 | |
|
1136 | 0 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1137 | |
|
1138 | 0 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1139 | 0 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1140 | 0 | } |
1141 | 53 | } |
1142 | | |
1143 | 53 | 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 | 53 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1145 | | |
1146 | 53 | return module->OpECC_Point_Sub(op); |
1147 | 53 | } |
1148 | | |
1149 | | /* Specialization for operation::ECC_Point_Mul */ |
1150 | 4.59k | 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 | 4.59k | (void)module; |
1152 | | |
1153 | 4.59k | if ( result.second != std::nullopt ) { |
1154 | 362 | const auto curveID = op.curveType.Get(); |
1155 | 362 | const auto x = result.second->first.ToTrimmedString(); |
1156 | 362 | const auto y = result.second->second.ToTrimmedString(); |
1157 | | |
1158 | 362 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1159 | | |
1160 | 362 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1161 | 362 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1162 | 362 | } |
1163 | 4.59k | } |
1164 | | |
1165 | 4.59k | 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 | 4.59k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1167 | | |
1168 | 4.59k | return module->OpECC_Point_Mul(op); |
1169 | 4.59k | } |
1170 | | |
1171 | | /* Specialization for operation::ECC_Point_Neg */ |
1172 | 268 | 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 | 268 | (void)module; |
1174 | | |
1175 | 268 | if ( result.second != std::nullopt ) { |
1176 | 47 | const auto curveID = op.curveType.Get(); |
1177 | 47 | const auto x = result.second->first.ToTrimmedString(); |
1178 | 47 | const auto y = result.second->second.ToTrimmedString(); |
1179 | | |
1180 | 47 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1181 | | |
1182 | 47 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1183 | 47 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1184 | 47 | } |
1185 | 268 | } |
1186 | | |
1187 | 268 | 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 | 268 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1189 | | |
1190 | 268 | return module->OpECC_Point_Neg(op); |
1191 | 268 | } |
1192 | | |
1193 | | /* Specialization for operation::ECC_Point_Dbl */ |
1194 | 7.08k | 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 | 7.08k | (void)module; |
1196 | | |
1197 | 7.08k | if ( result.second != std::nullopt ) { |
1198 | 131 | const auto curveID = op.curveType.Get(); |
1199 | 131 | const auto x = result.second->first.ToTrimmedString(); |
1200 | 131 | const auto y = result.second->second.ToTrimmedString(); |
1201 | | |
1202 | 131 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
1203 | | |
1204 | 131 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
1205 | 131 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
1206 | 131 | } |
1207 | 7.08k | } |
1208 | | |
1209 | 7.08k | 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 | 7.08k | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1211 | | |
1212 | 7.08k | return module->OpECC_Point_Dbl(op); |
1213 | 7.08k | } |
1214 | | |
1215 | | /* Specialization for operation::ECC_Point_Cmp */ |
1216 | 110 | 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 | 110 | (void)module; |
1218 | 110 | (void)result; |
1219 | 110 | (void)op; |
1220 | 110 | } |
1221 | | |
1222 | 110 | template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const { |
1223 | 110 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1224 | | |
1225 | 110 | return module->OpECC_Point_Cmp(op); |
1226 | 110 | } |
1227 | | |
1228 | | /* Specialization for operation::DH_Derive */ |
1229 | 2.61k | 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 | 2.61k | (void)module; |
1231 | 2.61k | (void)op; |
1232 | 2.61k | (void)result; |
1233 | 2.61k | } |
1234 | | |
1235 | 2.61k | template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const { |
1236 | 2.61k | if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1237 | 2.54k | if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1238 | 2.51k | if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1239 | 2.44k | if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1240 | | |
1241 | 2.37k | return module->OpDH_Derive(op); |
1242 | 2.44k | } |
1243 | | |
1244 | | /* Specialization for operation::DH_GenerateKeyPair */ |
1245 | 4.44k | 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 | 4.44k | (void)result; |
1247 | 4.44k | (void)op; |
1248 | 4.44k | (void)module; |
1249 | | |
1250 | 4.44k | if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) { |
1251 | 543 | const auto priv = result.second->first.ToTrimmedString(); |
1252 | 543 | const auto pub = result.second->second.ToTrimmedString(); |
1253 | | |
1254 | 543 | Pool_DH_PrivateKey.Set(priv); |
1255 | 543 | Pool_DH_PublicKey.Set(pub); |
1256 | 543 | } |
1257 | 4.44k | } |
1258 | | |
1259 | 4.44k | 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 | 4.44k | if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1261 | 4.40k | if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1262 | | |
1263 | 4.34k | return module->OpDH_GenerateKeyPair(op); |
1264 | 4.40k | } |
1265 | | |
1266 | | /* Specialization for operation::BignumCalc */ |
1267 | 59.5k | 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 | 59.5k | (void)module; |
1269 | 59.5k | (void)op; |
1270 | | |
1271 | 59.5k | if ( result.second != std::nullopt ) { |
1272 | 21.9k | const auto bignum = result.second->ToTrimmedString(); |
1273 | | |
1274 | 21.9k | if ( bignum.size() <= config::kMaxBignumSize ) { |
1275 | 21.9k | Pool_Bignum.Set(bignum); |
1276 | 21.9k | if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) { |
1277 | 749 | Pool_Bignum_Primes.Set(bignum); |
1278 | 749 | } |
1279 | 21.9k | } |
1280 | 21.9k | if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) { |
1281 | 1.55k | if ( bignum == "1" ) { |
1282 | 629 | Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString()); |
1283 | 629 | } |
1284 | 1.55k | } |
1285 | 21.9k | } |
1286 | 59.5k | } |
1287 | | |
1288 | 59.5k | std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const { |
1289 | 59.5k | RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get()); |
1290 | | |
1291 | | /* Prevent timeouts */ |
1292 | 59.5k | if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1293 | 59.5k | if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1294 | 59.5k | if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1295 | 59.4k | if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1296 | | |
1297 | 59.4k | if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) { |
1298 | 85 | return std::nullopt; |
1299 | 85 | } |
1300 | | |
1301 | 59.3k | switch ( op.calcOp.Get() ) { |
1302 | 615 | case CF_CALCOP("SetBit(A,B)"): |
1303 | | /* Don't allow setting very high bit positions (risk of memory exhaustion) */ |
1304 | 615 | if ( op.bn1.GetSize() > 4 ) { |
1305 | 75 | return std::nullopt; |
1306 | 75 | } |
1307 | 540 | break; |
1308 | 540 | case CF_CALCOP("Exp(A,B)"): |
1309 | 236 | if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) { |
1310 | 169 | return std::nullopt; |
1311 | 169 | } |
1312 | 67 | break; |
1313 | 177 | case CF_CALCOP("ModLShift(A,B,C)"): |
1314 | 177 | if ( op.bn1.GetSize() > 4 ) { |
1315 | 102 | return std::nullopt; |
1316 | 102 | } |
1317 | 75 | break; |
1318 | 407 | case CF_CALCOP("Exp2(A)"): |
1319 | 407 | if ( op.bn0.GetSize() > 4 ) { |
1320 | 99 | return std::nullopt; |
1321 | 99 | } |
1322 | 308 | break; |
1323 | 59.3k | } |
1324 | | |
1325 | 58.9k | return module->OpBignumCalc(op); |
1326 | 59.3k | } |
1327 | | |
1328 | | /* Specialization for operation::BignumCalc_Fp2 */ |
1329 | 123 | 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 | 123 | (void)module; |
1331 | 123 | (void)op; |
1332 | | |
1333 | 123 | 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 | 123 | } |
1345 | | |
1346 | 123 | std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const { |
1347 | 123 | RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get()); |
1348 | | |
1349 | | /* Prevent timeouts */ |
1350 | 123 | if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1351 | 122 | if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1352 | 115 | if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1353 | 105 | if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1354 | 94 | if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1355 | 84 | if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1356 | 74 | if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1357 | 70 | if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1358 | | |
1359 | 59 | if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) { |
1360 | 0 | return std::nullopt; |
1361 | 0 | } |
1362 | | |
1363 | 59 | return module->OpBignumCalc_Fp2(op); |
1364 | 59 | } |
1365 | | |
1366 | | /* Specialization for operation::BignumCalc_Fp12 */ |
1367 | 678 | 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 | 678 | (void)module; |
1369 | 678 | (void)op; |
1370 | | |
1371 | 678 | 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 | 678 | } |
1400 | | |
1401 | 678 | std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const { |
1402 | 678 | RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get()); |
1403 | | |
1404 | | /* Prevent timeouts */ |
1405 | 678 | if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1406 | 667 | if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1407 | 658 | if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1408 | 651 | if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1409 | 641 | if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1410 | 631 | if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1411 | 620 | if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1412 | 610 | if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1413 | 600 | if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1414 | 592 | if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1415 | 582 | if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1416 | 572 | if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1417 | | |
1418 | 561 | if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1419 | 551 | if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1420 | 541 | if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1421 | 531 | if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1422 | 522 | if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1423 | 511 | if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1424 | 501 | if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1425 | 491 | if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1426 | 481 | if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1427 | 473 | if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1428 | 463 | if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1429 | 453 | if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1430 | | |
1431 | 444 | if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1432 | 434 | if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1433 | 424 | if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1434 | 417 | if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1435 | 407 | if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1436 | 397 | if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1437 | 387 | if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1438 | 376 | if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1439 | 366 | if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1440 | 356 | if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1441 | 343 | if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1442 | 333 | if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1443 | | |
1444 | 323 | if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1445 | 313 | if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1446 | 303 | if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1447 | 293 | if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1448 | 283 | if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1449 | 273 | if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1450 | 262 | if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1451 | 251 | if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1452 | 241 | if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1453 | 234 | if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1454 | 224 | if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1455 | 214 | if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1456 | | |
1457 | 204 | if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) { |
1458 | 0 | return std::nullopt; |
1459 | 0 | } |
1460 | | |
1461 | 204 | return module->OpBignumCalc_Fp12(op); |
1462 | 204 | } |
1463 | | |
1464 | | /* Specialization for operation::BLS_PrivateToPublic */ |
1465 | 55 | 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 | 55 | (void)module; |
1467 | | |
1468 | 55 | 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 | 55 | } |
1479 | | |
1480 | 55 | 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 | 55 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1482 | | |
1483 | 55 | const size_t size = op.priv.ToTrimmedString().size(); |
1484 | | |
1485 | 55 | if ( size == 0 || size > 4096 ) { |
1486 | 0 | return std::nullopt; |
1487 | 0 | } |
1488 | | |
1489 | 55 | return module->OpBLS_PrivateToPublic(op); |
1490 | 55 | } |
1491 | | |
1492 | | /* Specialization for operation::BLS_PrivateToPublic_G2 */ |
1493 | 70 | 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 | 70 | (void)module; |
1495 | 70 | 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 | 70 | } |
1510 | | |
1511 | 70 | 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 | 70 | const size_t size = op.priv.ToTrimmedString().size(); |
1513 | | |
1514 | 70 | if ( size == 0 || size > 4096 ) { |
1515 | 1 | return std::nullopt; |
1516 | 1 | } |
1517 | | |
1518 | 69 | return module->OpBLS_PrivateToPublic_G2(op); |
1519 | 70 | } |
1520 | | |
1521 | | /* Specialization for operation::BLS_Sign */ |
1522 | 57 | 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 | 57 | (void)module; |
1524 | | |
1525 | 57 | 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 | 57 | } |
1553 | | |
1554 | 57 | 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 | 57 | const size_t size = op.priv.ToTrimmedString().size(); |
1556 | | |
1557 | 57 | if ( size == 0 || size > 4096 ) { |
1558 | 1 | return std::nullopt; |
1559 | 1 | } |
1560 | | |
1561 | 56 | return module->OpBLS_Sign(op); |
1562 | 57 | } |
1563 | | |
1564 | | /* Specialization for operation::BLS_Verify */ |
1565 | 39 | 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 | 39 | (void)module; |
1567 | 39 | (void)op; |
1568 | 39 | (void)result; |
1569 | 39 | } |
1570 | | |
1571 | 39 | 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 | 39 | return module->OpBLS_Verify(op); |
1588 | 39 | } |
1589 | | |
1590 | | /* Specialization for operation::BLS_BatchSign */ |
1591 | 71 | 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 | 71 | (void)module; |
1593 | 71 | (void)op; |
1594 | | |
1595 | 71 | 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 | 71 | } |
1624 | | |
1625 | 71 | 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 | 71 | return module->OpBLS_BatchSign(op); |
1627 | 71 | } |
1628 | | |
1629 | | /* Specialization for operation::BLS_BatchVerify */ |
1630 | 55 | 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 | 55 | (void)module; |
1632 | 55 | (void)op; |
1633 | 55 | (void)result; |
1634 | 55 | } |
1635 | | |
1636 | 55 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const { |
1637 | 55 | return module->OpBLS_BatchVerify(op); |
1638 | 55 | } |
1639 | | |
1640 | | /* Specialization for operation::BLS_Aggregate_G1 */ |
1641 | 55 | 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 | 55 | (void)module; |
1643 | 55 | (void)op; |
1644 | 55 | (void)result; |
1645 | 55 | } |
1646 | | |
1647 | 55 | 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 | 55 | return module->OpBLS_Aggregate_G1(op); |
1649 | 55 | } |
1650 | | |
1651 | | /* Specialization for operation::BLS_Aggregate_G2 */ |
1652 | 58 | 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 | 58 | (void)module; |
1654 | 58 | (void)op; |
1655 | 58 | (void)result; |
1656 | 58 | } |
1657 | | |
1658 | 58 | 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 | 58 | return module->OpBLS_Aggregate_G2(op); |
1660 | 58 | } |
1661 | | |
1662 | | /* Specialization for operation::BLS_Pairing */ |
1663 | 52 | 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 | 52 | (void)module; |
1665 | 52 | (void)op; |
1666 | | |
1667 | 52 | 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 | 52 | } |
1684 | | |
1685 | 52 | template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const { |
1686 | 52 | return module->OpBLS_Pairing(op); |
1687 | 52 | } |
1688 | | |
1689 | | /* Specialization for operation::BLS_MillerLoop */ |
1690 | 42 | 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 | 42 | (void)module; |
1692 | 42 | (void)op; |
1693 | | |
1694 | 42 | 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 | 42 | } |
1711 | | |
1712 | 42 | template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const { |
1713 | 42 | return module->OpBLS_MillerLoop(op); |
1714 | 42 | } |
1715 | | |
1716 | | /* Specialization for operation::BLS_FinalExp */ |
1717 | 54 | 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 | 54 | (void)module; |
1719 | 54 | (void)op; |
1720 | | |
1721 | 54 | 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 | 54 | } |
1738 | | |
1739 | 54 | template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const { |
1740 | 54 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1741 | 54 | return module->OpBLS_FinalExp(op); |
1742 | 54 | } |
1743 | | |
1744 | | /* Specialization for operation::BLS_HashToG1 */ |
1745 | 55 | 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 | 55 | (void)module; |
1747 | | |
1748 | 55 | 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 | 55 | } |
1759 | | |
1760 | 55 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const { |
1761 | 55 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1762 | 55 | return module->OpBLS_HashToG1(op); |
1763 | 55 | } |
1764 | | |
1765 | | /* Specialization for operation::BLS_MapToG1 */ |
1766 | 52 | 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 | 52 | (void)module; |
1768 | | |
1769 | 52 | 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 | 52 | } |
1780 | | |
1781 | 52 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const { |
1782 | 52 | return module->OpBLS_MapToG1(op); |
1783 | 52 | } |
1784 | | |
1785 | | /* Specialization for operation::BLS_MapToG2 */ |
1786 | 49 | 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 | 49 | (void)module; |
1788 | | |
1789 | 49 | 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 | 49 | } |
1804 | | |
1805 | 49 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const { |
1806 | 49 | return module->OpBLS_MapToG2(op); |
1807 | 49 | } |
1808 | | |
1809 | | /* Specialization for operation::BLS_IsG1OnCurve */ |
1810 | 87 | 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 | 87 | (void)module; |
1812 | 87 | (void)op; |
1813 | 87 | (void)result; |
1814 | 87 | } |
1815 | | |
1816 | 87 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const { |
1817 | 87 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1818 | 87 | if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1819 | 79 | if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1820 | | |
1821 | 79 | return module->OpBLS_IsG1OnCurve(op); |
1822 | 79 | } |
1823 | | |
1824 | | /* Specialization for operation::BLS_IsG2OnCurve */ |
1825 | 87 | 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 | 87 | (void)module; |
1827 | 87 | (void)op; |
1828 | 87 | (void)result; |
1829 | 87 | } |
1830 | | |
1831 | 87 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const { |
1832 | 87 | if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1833 | 77 | if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1834 | 67 | if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1835 | 56 | if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1836 | | |
1837 | 53 | return module->OpBLS_IsG2OnCurve(op); |
1838 | 56 | } |
1839 | | |
1840 | | /* Specialization for operation::BLS_GenerateKeyPair */ |
1841 | 52 | 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 | 52 | (void)module; |
1843 | | |
1844 | 52 | 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 | 52 | } |
1857 | | |
1858 | 52 | 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 | 52 | return module->OpBLS_GenerateKeyPair(op); |
1860 | 52 | } |
1861 | | |
1862 | | /* Specialization for operation::BLS_Decompress_G1 */ |
1863 | 50 | 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 | 50 | (void)module; |
1865 | | |
1866 | 50 | 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 | 50 | } |
1877 | | |
1878 | 50 | 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 | 50 | return module->OpBLS_Decompress_G1(op); |
1880 | 50 | } |
1881 | | |
1882 | | /* Specialization for operation::BLS_Compress_G1 */ |
1883 | 53 | 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 | 53 | (void)module; |
1885 | 53 | (void)op; |
1886 | | |
1887 | 53 | 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 | 53 | } |
1893 | | |
1894 | 53 | 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 | 53 | return module->OpBLS_Compress_G1(op); |
1896 | 53 | } |
1897 | | |
1898 | | /* Specialization for operation::BLS_Decompress_G2 */ |
1899 | 52 | 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 | 52 | (void)module; |
1901 | | |
1902 | 52 | 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 | 52 | } |
1917 | | |
1918 | 52 | 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 | 52 | return module->OpBLS_Decompress_G2(op); |
1920 | 52 | } |
1921 | | |
1922 | | /* Specialization for operation::BLS_Compress_G2 */ |
1923 | 54 | 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 | 54 | (void)module; |
1925 | | |
1926 | 54 | 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 | 54 | } |
1937 | | |
1938 | 54 | 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 | 54 | return module->OpBLS_Compress_G2(op); |
1940 | 54 | } |
1941 | | |
1942 | | /* Specialization for operation::BLS_G1_Add */ |
1943 | 137 | 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 | 137 | (void)module; |
1945 | | |
1946 | 137 | 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 | 137 | } |
1957 | | |
1958 | 137 | 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 | 137 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1960 | 137 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1961 | 126 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1962 | 118 | if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1963 | 108 | if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1964 | | |
1965 | 98 | return module->OpBLS_G1_Add(op); |
1966 | 108 | } |
1967 | | |
1968 | | /* Specialization for operation::BLS_G1_Mul */ |
1969 | 90 | 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 | 90 | (void)module; |
1971 | | |
1972 | 90 | 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 | 90 | } |
1983 | | |
1984 | 90 | 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 | 90 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
1986 | 90 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1987 | 90 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1988 | 80 | if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1989 | | |
1990 | 74 | return module->OpBLS_G1_Mul(op); |
1991 | 80 | } |
1992 | | |
1993 | | /* Specialization for operation::BLS_G1_IsEq */ |
1994 | 117 | 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 | 117 | (void)module; |
1996 | 117 | (void)op; |
1997 | 117 | (void)result; |
1998 | 117 | } |
1999 | | |
2000 | 117 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const { |
2001 | 117 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2002 | 117 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2003 | 107 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2004 | 97 | if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2005 | 86 | if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2006 | | |
2007 | 76 | return module->OpBLS_G1_IsEq(op); |
2008 | 86 | } |
2009 | | |
2010 | | /* Specialization for operation::BLS_G1_Neg */ |
2011 | 85 | 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 | 85 | (void)module; |
2013 | | |
2014 | 85 | 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 | 85 | } |
2025 | | |
2026 | 85 | 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 | 85 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2028 | 85 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2029 | 78 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2030 | | |
2031 | 77 | return module->OpBLS_G1_Neg(op); |
2032 | 78 | } |
2033 | | |
2034 | | /* Specialization for operation::BLS_G2_Add */ |
2035 | 173 | 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 | 173 | (void)module; |
2037 | | |
2038 | 173 | 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 | 173 | } |
2053 | | |
2054 | 173 | 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 | 173 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2056 | 173 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2057 | 162 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2058 | 151 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2059 | 141 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2060 | 133 | if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2061 | 130 | if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2062 | 119 | if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2063 | 109 | if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2064 | | |
2065 | 99 | return module->OpBLS_G2_Add(op); |
2066 | 109 | } |
2067 | | |
2068 | | /* Specialization for operation::BLS_G2_Mul */ |
2069 | 101 | 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 | 101 | (void)module; |
2071 | | |
2072 | 101 | 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 | 101 | } |
2087 | | |
2088 | 101 | 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 | 101 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2090 | 101 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2091 | 98 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2092 | 88 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2093 | 85 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2094 | 79 | if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2095 | | |
2096 | 73 | return module->OpBLS_G2_Mul(op); |
2097 | 79 | } |
2098 | | |
2099 | | /* Specialization for operation::BLS_G2_IsEq */ |
2100 | 192 | 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 | 192 | (void)module; |
2102 | 192 | (void)op; |
2103 | 192 | (void)result; |
2104 | 192 | } |
2105 | | |
2106 | 192 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const { |
2107 | 192 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2108 | 192 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2109 | 189 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2110 | 178 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2111 | 168 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2112 | 158 | if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2113 | 147 | if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2114 | 140 | if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2115 | 124 | if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2116 | | |
2117 | 109 | return module->OpBLS_G2_IsEq(op); |
2118 | 124 | } |
2119 | | |
2120 | | /* Specialization for operation::BLS_G2_Neg */ |
2121 | 122 | 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 | 122 | (void)module; |
2123 | | |
2124 | 122 | 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 | 122 | } |
2139 | | |
2140 | 122 | 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 | 122 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2142 | 122 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2143 | 116 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2144 | 108 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2145 | 107 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2146 | | |
2147 | 97 | return module->OpBLS_G2_Neg(op); |
2148 | 107 | } |
2149 | | |
2150 | | /* Specialization for operation::BLS_G1_MultiExp */ |
2151 | 135 | 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 | 135 | (void)module; |
2153 | | |
2154 | 135 | 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 | 135 | } |
2165 | | |
2166 | 135 | 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 | 135 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2168 | | |
2169 | 2.04k | for (const auto& point_scalar : op.points_scalars.points_scalars) { |
2170 | 2.04k | if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2171 | 2.03k | if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2172 | 2.03k | if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
2173 | 2.03k | } |
2174 | | |
2175 | 122 | return module->OpBLS_G1_MultiExp(op); |
2176 | 135 | } |
2177 | | |
2178 | | /* Specialization for operation::Misc */ |
2179 | 45 | template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const { |
2180 | 45 | (void)module; |
2181 | 45 | (void)op; |
2182 | 45 | (void)result; |
2183 | 45 | } |
2184 | | |
2185 | 45 | template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const { |
2186 | 45 | return module->OpMisc(op); |
2187 | 45 | } |
2188 | | |
2189 | | /* Specialization for operation::BLS_HashToG2 */ |
2190 | 59 | 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 | 59 | (void)module; |
2192 | | |
2193 | 59 | 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 | 59 | } |
2208 | | |
2209 | 59 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const { |
2210 | 59 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
2211 | 59 | return module->OpBLS_HashToG2(op); |
2212 | 59 | } |
2213 | | |
2214 | | ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2215 | 161 | ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options) |
2216 | 161 | { } |
2217 | 154 | void ExecutorBignumCalc::SetModulo(const std::string& modulo) { |
2218 | 154 | this->modulo = component::Bignum(modulo); |
2219 | 154 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2223 | 7 | CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513")); |
2224 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2228 | 7 | CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787")); |
2229 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2233 | 7 | CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041")); |
2234 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2238 | 7 | CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177")); |
2239 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2243 | 7 | CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617")); |
2244 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2248 | 7 | CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583")); |
2249 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2253 | 7 | CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337")); |
2254 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2258 | 7 | CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097")); |
2259 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2263 | 7 | CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949")); |
2264 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2268 | 7 | CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601")); |
2269 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2273 | 7 | CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001")); |
2274 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2278 | 7 | CF_NORET(SetModulo("18446744069414584321")); |
2279 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2283 | 7 | CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137")); |
2284 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2288 | 7 | CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081")); |
2289 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2293 | 7 | CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081")); |
2294 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2298 | 7 | CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040")); |
2299 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2303 | 7 | CF_NORET(SetModulo("18446744073709551616")); |
2304 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2308 | 7 | CF_NORET(SetModulo("340282366920938463463374607431768211456")); |
2309 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2313 | 7 | CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936")); |
2314 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2318 | 7 | CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096")); |
2319 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2323 | 7 | CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337")); |
2324 | 7 | } |
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 | 7 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
2328 | 7 | CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663")); |
2329 | 7 | } |
2330 | | |
2331 | | ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
2332 | 7 | ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options) |
2333 | 7 | { } |
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 | 7 | ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options) |
2340 | 7 | { } |
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 | 749 | operationID(operationID), |
2348 | 749 | modules(modules), |
2349 | 749 | options(options) |
2350 | 749 | { |
2351 | 749 | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 161 | operationID(operationID), | 2348 | 161 | modules(modules), | 2349 | 161 | options(options) | 2350 | 161 | { | 2351 | 161 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 2347 | 7 | operationID(operationID), | 2348 | 7 | modules(modules), | 2349 | 7 | options(options) | 2350 | 7 | { | 2351 | 7 | } |
|
2352 | | |
2353 | | /* Specialization for operation::SR25519_Verify */ |
2354 | 60 | 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 | 60 | (void)module; |
2356 | 60 | (void)op; |
2357 | 60 | (void)result; |
2358 | 60 | } |
2359 | | |
2360 | 60 | template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const { |
2361 | 60 | return module->OpSR25519_Verify(op); |
2362 | 60 | } |
2363 | | |
2364 | | template <class ResultType, class OperationType> |
2365 | 749 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { |
2366 | 749 | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase() Line | Count | Source | 2365 | 161 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 161 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase() Line | Count | Source | 2365 | 7 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 2366 | 7 | } |
|
2367 | | |
2368 | | /* Filter away the values in the set that are std::nullopt */ |
2369 | | template <class ResultType, class OperationType> |
2370 | 22.5k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { |
2371 | 22.5k | ResultSet ret; |
2372 | | |
2373 | 66.8k | for (const auto& result : results) { |
2374 | 66.8k | if ( result.second == std::nullopt ) { |
2375 | 42.4k | continue; |
2376 | 42.4k | } |
2377 | | |
2378 | 24.3k | ret.push_back(result); |
2379 | 24.3k | } |
2380 | | |
2381 | 22.5k | return ret; |
2382 | 22.5k | } 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 | 154 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 154 | ResultSet ret; | 2372 | | | 2373 | 831 | for (const auto& result : results) { | 2374 | 831 | if ( result.second == std::nullopt ) { | 2375 | 209 | continue; | 2376 | 209 | } | 2377 | | | 2378 | 622 | ret.push_back(result); | 2379 | 622 | } | 2380 | | | 2381 | 154 | return ret; | 2382 | 154 | } |
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 | 139 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 139 | ResultSet ret; | 2372 | | | 2373 | 759 | for (const auto& result : results) { | 2374 | 759 | if ( result.second == std::nullopt ) { | 2375 | 394 | continue; | 2376 | 394 | } | 2377 | | | 2378 | 365 | ret.push_back(result); | 2379 | 365 | } | 2380 | | | 2381 | 139 | return ret; | 2382 | 139 | } |
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 | 25 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 25 | ResultSet ret; | 2372 | | | 2373 | 146 | for (const auto& result : results) { | 2374 | 146 | if ( result.second == std::nullopt ) { | 2375 | 146 | continue; | 2376 | 146 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 25 | return ret; | 2382 | 25 | } |
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 | 177 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 177 | ResultSet ret; | 2372 | | | 2373 | 819 | for (const auto& result : results) { | 2374 | 819 | if ( result.second == std::nullopt ) { | 2375 | 579 | continue; | 2376 | 579 | } | 2377 | | | 2378 | 240 | ret.push_back(result); | 2379 | 240 | } | 2380 | | | 2381 | 177 | return ret; | 2382 | 177 | } |
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 | 625 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 625 | ResultSet ret; | 2372 | | | 2373 | 3.01k | for (const auto& result : results) { | 2374 | 3.01k | if ( result.second == std::nullopt ) { | 2375 | 1.50k | continue; | 2376 | 1.50k | } | 2377 | | | 2378 | 1.50k | ret.push_back(result); | 2379 | 1.50k | } | 2380 | | | 2381 | 625 | return ret; | 2382 | 625 | } |
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 | 285 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 285 | ResultSet ret; | 2372 | | | 2373 | 1.24k | for (const auto& result : results) { | 2374 | 1.24k | if ( result.second == std::nullopt ) { | 2375 | 1.05k | continue; | 2376 | 1.05k | } | 2377 | | | 2378 | 188 | ret.push_back(result); | 2379 | 188 | } | 2380 | | | 2381 | 285 | return ret; | 2382 | 285 | } |
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 | 26 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 26 | ResultSet ret; | 2372 | | | 2373 | 171 | for (const auto& result : results) { | 2374 | 171 | if ( result.second == std::nullopt ) { | 2375 | 171 | continue; | 2376 | 171 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 26 | return ret; | 2382 | 26 | } |
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 | 112 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 112 | ResultSet ret; | 2372 | | | 2373 | 654 | for (const auto& result : results) { | 2374 | 654 | if ( result.second == std::nullopt ) { | 2375 | 456 | continue; | 2376 | 456 | } | 2377 | | | 2378 | 198 | ret.push_back(result); | 2379 | 198 | } | 2380 | | | 2381 | 112 | return ret; | 2382 | 112 | } |
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 | 30 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 30 | ResultSet ret; | 2372 | | | 2373 | 204 | for (const auto& result : results) { | 2374 | 204 | if ( result.second == std::nullopt ) { | 2375 | 204 | continue; | 2376 | 204 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 30 | return ret; | 2382 | 30 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 26 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 26 | ResultSet ret; | 2372 | | | 2373 | 177 | for (const auto& result : results) { | 2374 | 177 | if ( result.second == std::nullopt ) { | 2375 | 177 | continue; | 2376 | 177 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 26 | return ret; | 2382 | 26 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 27 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 27 | ResultSet ret; | 2372 | | | 2373 | 182 | for (const auto& result : results) { | 2374 | 182 | if ( result.second == std::nullopt ) { | 2375 | 182 | continue; | 2376 | 182 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 27 | return ret; | 2382 | 27 | } |
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 | 83 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 83 | ResultSet ret; | 2372 | | | 2373 | 502 | for (const auto& result : results) { | 2374 | 502 | if ( result.second == std::nullopt ) { | 2375 | 183 | continue; | 2376 | 183 | } | 2377 | | | 2378 | 319 | ret.push_back(result); | 2379 | 319 | } | 2380 | | | 2381 | 83 | return ret; | 2382 | 83 | } |
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 | 10 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 10 | ResultSet ret; | 2372 | | | 2373 | 21 | for (const auto& result : results) { | 2374 | 21 | if ( result.second == std::nullopt ) { | 2375 | 21 | continue; | 2376 | 21 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 10 | return ret; | 2382 | 10 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 29 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 29 | ResultSet ret; | 2372 | | | 2373 | 199 | for (const auto& result : results) { | 2374 | 199 | if ( result.second == std::nullopt ) { | 2375 | 199 | continue; | 2376 | 199 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 29 | return ret; | 2382 | 29 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const Line | Count | Source | 2370 | 26 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 26 | ResultSet ret; | 2372 | | | 2373 | 156 | for (const auto& result : results) { | 2374 | 156 | if ( result.second == std::nullopt ) { | 2375 | 156 | continue; | 2376 | 156 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 26 | return ret; | 2382 | 26 | } |
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 | 8 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 8 | ResultSet ret; | 2372 | | | 2373 | 16 | for (const auto& result : results) { | 2374 | 16 | if ( result.second == std::nullopt ) { | 2375 | 16 | continue; | 2376 | 16 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 8 | return ret; | 2382 | 8 | } |
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 | 31 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 31 | ResultSet ret; | 2372 | | | 2373 | 196 | for (const auto& result : results) { | 2374 | 196 | if ( result.second == std::nullopt ) { | 2375 | 196 | continue; | 2376 | 196 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 31 | return ret; | 2382 | 31 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&) const Line | Count | Source | 2370 | 28 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 28 | ResultSet ret; | 2372 | | | 2373 | 194 | for (const auto& result : results) { | 2374 | 194 | if ( result.second == std::nullopt ) { | 2375 | 194 | continue; | 2376 | 194 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 28 | return ret; | 2382 | 28 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&) const Line | Count | Source | 2370 | 26 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 26 | ResultSet ret; | 2372 | | | 2373 | 160 | for (const auto& result : results) { | 2374 | 160 | if ( result.second == std::nullopt ) { | 2375 | 160 | continue; | 2376 | 160 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 26 | return ret; | 2382 | 26 | } |
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 | 1.46k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 1.46k | ResultSet ret; | 2372 | | | 2373 | 3.97k | for (const auto& result : results) { | 2374 | 3.97k | if ( result.second == std::nullopt ) { | 2375 | 2.34k | continue; | 2376 | 2.34k | } | 2377 | | | 2378 | 1.62k | ret.push_back(result); | 2379 | 1.62k | } | 2380 | | | 2381 | 1.46k | return ret; | 2382 | 1.46k | } |
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 | 1.05k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 1.05k | ResultSet ret; | 2372 | | | 2373 | 2.69k | for (const auto& result : results) { | 2374 | 2.69k | if ( result.second == std::nullopt ) { | 2375 | 2.03k | continue; | 2376 | 2.03k | } | 2377 | | | 2378 | 658 | ret.push_back(result); | 2379 | 658 | } | 2380 | | | 2381 | 1.05k | return ret; | 2382 | 1.05k | } |
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 | 302 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 302 | ResultSet ret; | 2372 | | | 2373 | 862 | for (const auto& result : results) { | 2374 | 862 | if ( result.second == std::nullopt ) { | 2375 | 862 | continue; | 2376 | 862 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 302 | return ret; | 2382 | 302 | } |
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 | 2.75k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 2.75k | ResultSet ret; | 2372 | | | 2373 | 7.98k | for (const auto& result : results) { | 2374 | 7.98k | if ( result.second == std::nullopt ) { | 2375 | 2.98k | continue; | 2376 | 2.98k | } | 2377 | | | 2378 | 5.00k | ret.push_back(result); | 2379 | 5.00k | } | 2380 | | | 2381 | 2.75k | return ret; | 2382 | 2.75k | } |
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 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 19 | ResultSet ret; | 2372 | | | 2373 | 54 | for (const auto& result : results) { | 2374 | 54 | if ( result.second == std::nullopt ) { | 2375 | 54 | continue; | 2376 | 54 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 19 | return ret; | 2382 | 19 | } |
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 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 19 | ResultSet ret; | 2372 | | | 2373 | 58 | for (const auto& result : results) { | 2374 | 58 | if ( result.second == std::nullopt ) { | 2375 | 58 | continue; | 2376 | 58 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 19 | return ret; | 2382 | 19 | } |
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 | 20 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 20 | ResultSet ret; | 2372 | | | 2373 | 54 | for (const auto& result : results) { | 2374 | 54 | if ( result.second == std::nullopt ) { | 2375 | 54 | continue; | 2376 | 54 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 20 | return ret; | 2382 | 20 | } |
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 | 161 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 161 | ResultSet ret; | 2372 | | | 2373 | 502 | for (const auto& result : results) { | 2374 | 502 | if ( result.second == std::nullopt ) { | 2375 | 502 | continue; | 2376 | 502 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 161 | return ret; | 2382 | 161 | } |
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 | 1.80k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 1.80k | ResultSet ret; | 2372 | | | 2373 | 5.08k | for (const auto& result : results) { | 2374 | 5.08k | if ( result.second == std::nullopt ) { | 2375 | 2.55k | continue; | 2376 | 2.55k | } | 2377 | | | 2378 | 2.53k | ret.push_back(result); | 2379 | 2.53k | } | 2380 | | | 2381 | 1.80k | return ret; | 2382 | 1.80k | } |
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 | 17 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 17 | ResultSet ret; | 2372 | | | 2373 | 49 | for (const auto& result : results) { | 2374 | 49 | if ( result.second == std::nullopt ) { | 2375 | 49 | continue; | 2376 | 49 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 17 | return ret; | 2382 | 17 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::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 | 18 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 18 | ResultSet ret; | 2372 | | | 2373 | 52 | for (const auto& result : results) { | 2374 | 52 | if ( result.second == std::nullopt ) { | 2375 | 52 | continue; | 2376 | 52 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 18 | return ret; | 2382 | 18 | } |
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 | 16 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 16 | ResultSet ret; | 2372 | | | 2373 | 43 | for (const auto& result : results) { | 2374 | 43 | if ( result.second == std::nullopt ) { | 2375 | 43 | continue; | 2376 | 43 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 16 | return ret; | 2382 | 16 | } |
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 | 17 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 17 | ResultSet ret; | 2372 | | | 2373 | 47 | for (const auto& result : results) { | 2374 | 47 | if ( result.second == std::nullopt ) { | 2375 | 47 | continue; | 2376 | 47 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 17 | return ret; | 2382 | 17 | } |
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 | 28 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 28 | ResultSet ret; | 2372 | | | 2373 | 83 | for (const auto& result : results) { | 2374 | 83 | if ( result.second == std::nullopt ) { | 2375 | 83 | continue; | 2376 | 83 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 28 | return ret; | 2382 | 28 | } |
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 | 17 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 17 | ResultSet ret; | 2372 | | | 2373 | 51 | for (const auto& result : results) { | 2374 | 51 | if ( result.second == std::nullopt ) { | 2375 | 51 | continue; | 2376 | 51 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 17 | return ret; | 2382 | 17 | } |
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 | 387 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 387 | ResultSet ret; | 2372 | | | 2373 | 1.12k | for (const auto& result : results) { | 2374 | 1.12k | if ( result.second == std::nullopt ) { | 2375 | 944 | continue; | 2376 | 944 | } | 2377 | | | 2378 | 177 | ret.push_back(result); | 2379 | 177 | } | 2380 | | | 2381 | 387 | return ret; | 2382 | 387 | } |
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 | 426 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 426 | ResultSet ret; | 2372 | | | 2373 | 1.19k | for (const auto& result : results) { | 2374 | 1.19k | if ( result.second == std::nullopt ) { | 2375 | 1.18k | continue; | 2376 | 1.18k | } | 2377 | | | 2378 | 14 | ret.push_back(result); | 2379 | 14 | } | 2380 | | | 2381 | 426 | return ret; | 2382 | 426 | } |
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 | 1.11k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 1.11k | ResultSet ret; | 2372 | | | 2373 | 2.92k | for (const auto& result : results) { | 2374 | 2.92k | if ( result.second == std::nullopt ) { | 2375 | 2.71k | continue; | 2376 | 2.71k | } | 2377 | | | 2378 | 213 | ret.push_back(result); | 2379 | 213 | } | 2380 | | | 2381 | 1.11k | return ret; | 2382 | 1.11k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 19 | ResultSet ret; | 2372 | | | 2373 | 52 | for (const auto& result : results) { | 2374 | 52 | if ( result.second == std::nullopt ) { | 2375 | 52 | continue; | 2376 | 52 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 19 | return ret; | 2382 | 19 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 834 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 834 | ResultSet ret; | 2372 | | | 2373 | 2.22k | for (const auto& result : results) { | 2374 | 2.22k | if ( result.second == std::nullopt ) { | 2375 | 1.94k | continue; | 2376 | 1.94k | } | 2377 | | | 2378 | 278 | ret.push_back(result); | 2379 | 278 | } | 2380 | | | 2381 | 834 | return ret; | 2382 | 834 | } |
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 | 68 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 68 | ResultSet ret; | 2372 | | | 2373 | 200 | for (const auto& result : results) { | 2374 | 200 | if ( result.second == std::nullopt ) { | 2375 | 161 | continue; | 2376 | 161 | } | 2377 | | | 2378 | 39 | ret.push_back(result); | 2379 | 39 | } | 2380 | | | 2381 | 68 | return ret; | 2382 | 68 | } |
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 | 1.13k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 1.13k | ResultSet ret; | 2372 | | | 2373 | 2.84k | for (const auto& result : results) { | 2374 | 2.84k | if ( result.second == std::nullopt ) { | 2375 | 2.74k | continue; | 2376 | 2.74k | } | 2377 | | | 2378 | 103 | ret.push_back(result); | 2379 | 103 | } | 2380 | | | 2381 | 1.13k | return ret; | 2382 | 1.13k | } |
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 | 35 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 35 | ResultSet ret; | 2372 | | | 2373 | 98 | for (const auto& result : results) { | 2374 | 98 | if ( result.second == std::nullopt ) { | 2375 | 57 | continue; | 2376 | 57 | } | 2377 | | | 2378 | 41 | ret.push_back(result); | 2379 | 41 | } | 2380 | | | 2381 | 35 | return ret; | 2382 | 35 | } |
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 | 751 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 751 | ResultSet ret; | 2372 | | | 2373 | 2.09k | for (const auto& result : results) { | 2374 | 2.09k | if ( result.second == std::nullopt ) { | 2375 | 1.80k | continue; | 2376 | 1.80k | } | 2377 | | | 2378 | 296 | ret.push_back(result); | 2379 | 296 | } | 2380 | | | 2381 | 751 | return ret; | 2382 | 751 | } |
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 | 7.12k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 7.12k | ResultSet ret; | 2372 | | | 2373 | 19.9k | for (const auto& result : results) { | 2374 | 19.9k | if ( result.second == std::nullopt ) { | 2375 | 9.99k | continue; | 2376 | 9.99k | } | 2377 | | | 2378 | 9.94k | ret.push_back(result); | 2379 | 9.94k | } | 2380 | | | 2381 | 7.12k | return ret; | 2382 | 7.12k | } |
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 | 39 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 39 | ResultSet ret; | 2372 | | | 2373 | 109 | for (const auto& result : results) { | 2374 | 109 | if ( result.second == std::nullopt ) { | 2375 | 109 | continue; | 2376 | 109 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 39 | return ret; | 2382 | 39 | } |
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 | 198 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 198 | ResultSet ret; | 2372 | | | 2373 | 568 | for (const auto& result : results) { | 2374 | 568 | if ( result.second == std::nullopt ) { | 2375 | 568 | continue; | 2376 | 568 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 198 | return ret; | 2382 | 198 | } |
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 | 20 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 20 | ResultSet ret; | 2372 | | | 2373 | 52 | for (const auto& result : results) { | 2374 | 52 | if ( result.second == std::nullopt ) { | 2375 | 52 | continue; | 2376 | 52 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 20 | return ret; | 2382 | 20 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const Line | Count | Source | 2370 | 23 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 23 | ResultSet ret; | 2372 | | | 2373 | 59 | for (const auto& result : results) { | 2374 | 59 | if ( result.second == std::nullopt ) { | 2375 | 59 | continue; | 2376 | 59 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 23 | return ret; | 2382 | 23 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> > > > const&) const Line | Count | Source | 2370 | 20 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 20 | ResultSet ret; | 2372 | | | 2373 | 54 | for (const auto& result : results) { | 2374 | 54 | if ( result.second == std::nullopt ) { | 2375 | 54 | continue; | 2376 | 54 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 20 | return ret; | 2382 | 20 | } |
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 | 13 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 13 | ResultSet ret; | 2372 | | | 2373 | 38 | for (const auto& result : results) { | 2374 | 38 | if ( result.second == std::nullopt ) { | 2375 | 38 | continue; | 2376 | 38 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 13 | return ret; | 2382 | 13 | } |
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 | 25 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 25 | ResultSet ret; | 2372 | | | 2373 | 68 | for (const auto& result : results) { | 2374 | 68 | if ( result.second == std::nullopt ) { | 2375 | 68 | continue; | 2376 | 68 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 25 | return ret; | 2382 | 25 | } |
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 | 16 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 16 | ResultSet ret; | 2372 | | | 2373 | 53 | for (const auto& result : results) { | 2374 | 53 | if ( result.second == std::nullopt ) { | 2375 | 53 | continue; | 2376 | 53 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 16 | return ret; | 2382 | 16 | } |
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 | 15 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 15 | ResultSet ret; | 2372 | | | 2373 | 54 | for (const auto& result : results) { | 2374 | 54 | if ( result.second == std::nullopt ) { | 2375 | 54 | continue; | 2376 | 54 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 15 | return ret; | 2382 | 15 | } |
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 | 16 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 16 | ResultSet ret; | 2372 | | | 2373 | 57 | for (const auto& result : results) { | 2374 | 57 | if ( result.second == std::nullopt ) { | 2375 | 57 | continue; | 2376 | 57 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 16 | return ret; | 2382 | 16 | } |
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 | 17 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 17 | ResultSet ret; | 2372 | | | 2373 | 51 | for (const auto& result : results) { | 2374 | 51 | if ( result.second == std::nullopt ) { | 2375 | 51 | continue; | 2376 | 51 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 17 | return ret; | 2382 | 17 | } |
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 | 15 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 15 | ResultSet ret; | 2372 | | | 2373 | 41 | for (const auto& result : results) { | 2374 | 41 | if ( result.second == std::nullopt ) { | 2375 | 41 | continue; | 2376 | 41 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 15 | return ret; | 2382 | 15 | } |
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 | 18 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 18 | ResultSet ret; | 2372 | | | 2373 | 53 | for (const auto& result : results) { | 2374 | 53 | if ( result.second == std::nullopt ) { | 2375 | 53 | continue; | 2376 | 53 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 18 | return ret; | 2382 | 18 | } |
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 | 18 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 18 | ResultSet ret; | 2372 | | | 2373 | 54 | for (const auto& result : results) { | 2374 | 54 | if ( result.second == std::nullopt ) { | 2375 | 54 | continue; | 2376 | 54 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 18 | return ret; | 2382 | 18 | } |
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 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 19 | ResultSet ret; | 2372 | | | 2373 | 58 | for (const auto& result : results) { | 2374 | 58 | if ( result.second == std::nullopt ) { | 2375 | 58 | continue; | 2376 | 58 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 19 | return ret; | 2382 | 19 | } |
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 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 19 | ResultSet ret; | 2372 | | | 2373 | 51 | for (const auto& result : results) { | 2374 | 51 | if ( result.second == std::nullopt ) { | 2375 | 51 | continue; | 2376 | 51 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 19 | return ret; | 2382 | 19 | } |
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 | 16 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 16 | ResultSet ret; | 2372 | | | 2373 | 48 | for (const auto& result : results) { | 2374 | 48 | if ( result.second == std::nullopt ) { | 2375 | 48 | continue; | 2376 | 48 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 16 | return ret; | 2382 | 16 | } |
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 | 27 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 27 | ResultSet ret; | 2372 | | | 2373 | 75 | for (const auto& result : results) { | 2374 | 75 | if ( result.second == std::nullopt ) { | 2375 | 75 | continue; | 2376 | 75 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 27 | return ret; | 2382 | 27 | } |
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 | 28 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 28 | ResultSet ret; | 2372 | | | 2373 | 82 | for (const auto& result : results) { | 2374 | 82 | if ( result.second == std::nullopt ) { | 2375 | 82 | continue; | 2376 | 82 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 28 | return ret; | 2382 | 28 | } |
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 | 18 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 18 | ResultSet ret; | 2372 | | | 2373 | 51 | for (const auto& result : results) { | 2374 | 51 | if ( result.second == std::nullopt ) { | 2375 | 51 | continue; | 2376 | 51 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 18 | return ret; | 2382 | 18 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 17 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 17 | ResultSet ret; | 2372 | | | 2373 | 49 | for (const auto& result : results) { | 2374 | 49 | if ( result.second == std::nullopt ) { | 2375 | 49 | continue; | 2376 | 49 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 17 | return ret; | 2382 | 17 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const Line | Count | Source | 2370 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 19 | ResultSet ret; | 2372 | | | 2373 | 52 | for (const auto& result : results) { | 2374 | 52 | if ( result.second == std::nullopt ) { | 2375 | 52 | continue; | 2376 | 52 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 19 | return ret; | 2382 | 19 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const Line | Count | Source | 2370 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 19 | ResultSet ret; | 2372 | | | 2373 | 51 | for (const auto& result : results) { | 2374 | 51 | if ( result.second == std::nullopt ) { | 2375 | 51 | continue; | 2376 | 51 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 19 | return ret; | 2382 | 19 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const Line | Count | Source | 2370 | 18 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 18 | ResultSet ret; | 2372 | | | 2373 | 53 | for (const auto& result : results) { | 2374 | 53 | if ( result.second == std::nullopt ) { | 2375 | 53 | continue; | 2376 | 53 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 18 | return ret; | 2382 | 18 | } |
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 | 40 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 40 | ResultSet ret; | 2372 | | | 2373 | 107 | for (const auto& result : results) { | 2374 | 107 | if ( result.second == std::nullopt ) { | 2375 | 107 | continue; | 2376 | 107 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 40 | return ret; | 2382 | 40 | } |
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 | 28 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 28 | ResultSet ret; | 2372 | | | 2373 | 78 | for (const auto& result : results) { | 2374 | 78 | if ( result.second == std::nullopt ) { | 2375 | 78 | continue; | 2376 | 78 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 28 | return ret; | 2382 | 28 | } |
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 | 31 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 31 | ResultSet ret; | 2372 | | | 2373 | 87 | for (const auto& result : results) { | 2374 | 87 | if ( result.second == std::nullopt ) { | 2375 | 87 | continue; | 2376 | 87 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 31 | return ret; | 2382 | 31 | } |
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 | 27 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 27 | ResultSet ret; | 2372 | | | 2373 | 70 | for (const auto& result : results) { | 2374 | 70 | if ( result.second == std::nullopt ) { | 2375 | 70 | continue; | 2376 | 70 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 27 | return ret; | 2382 | 27 | } |
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 | 56 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 56 | ResultSet ret; | 2372 | | | 2373 | 148 | for (const auto& result : results) { | 2374 | 148 | if ( result.second == std::nullopt ) { | 2375 | 148 | continue; | 2376 | 148 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 56 | return ret; | 2382 | 56 | } |
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 | 31 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 31 | ResultSet ret; | 2372 | | | 2373 | 81 | for (const auto& result : results) { | 2374 | 81 | if ( result.second == std::nullopt ) { | 2375 | 81 | continue; | 2376 | 81 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 31 | return ret; | 2382 | 31 | } |
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 | 54 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 54 | ResultSet ret; | 2372 | | | 2373 | 148 | for (const auto& result : results) { | 2374 | 148 | if ( result.second == std::nullopt ) { | 2375 | 148 | continue; | 2376 | 148 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 54 | return ret; | 2382 | 54 | } |
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 | 37 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 37 | ResultSet ret; | 2372 | | | 2373 | 95 | for (const auto& result : results) { | 2374 | 95 | if ( result.second == std::nullopt ) { | 2375 | 95 | continue; | 2376 | 95 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 37 | return ret; | 2382 | 37 | } |
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 | 42 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 42 | ResultSet ret; | 2372 | | | 2373 | 118 | for (const auto& result : results) { | 2374 | 118 | if ( result.second == std::nullopt ) { | 2375 | 118 | continue; | 2376 | 118 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 42 | return ret; | 2382 | 42 | } |
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 | 14 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 14 | ResultSet ret; | 2372 | | | 2373 | 44 | for (const auto& result : results) { | 2374 | 44 | if ( result.second == std::nullopt ) { | 2375 | 44 | continue; | 2376 | 44 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 14 | return ret; | 2382 | 14 | } |
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 | 21 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 2371 | 21 | ResultSet ret; | 2372 | | | 2373 | 56 | for (const auto& result : results) { | 2374 | 56 | if ( result.second == std::nullopt ) { | 2375 | 56 | continue; | 2376 | 56 | } | 2377 | | | 2378 | 0 | ret.push_back(result); | 2379 | 0 | } | 2380 | | | 2381 | 21 | return ret; | 2382 | 21 | } |
|
2383 | | |
2384 | | /* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */ |
2385 | | template <> |
2386 | 6.29k | 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 | 6.29k | (void)operations; |
2388 | 6.29k | (void)results; |
2389 | 6.29k | (void)data; |
2390 | 6.29k | (void)size; |
2391 | 6.29k | } |
2392 | | |
2393 | | template <class ResultType, class OperationType> |
2394 | 2.19k | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { |
2395 | 2.19k | (void)operation; |
2396 | | |
2397 | 2.19k | return false; |
2398 | 2.19k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const Line | Count | Source | 2394 | 121 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 121 | (void)operation; | 2396 | | | 2397 | 121 | return false; | 2398 | 121 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const Line | Count | Source | 2394 | 42 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 42 | (void)operation; | 2396 | | | 2397 | 42 | return false; | 2398 | 42 | } |
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 | 54 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 54 | (void)operation; | 2396 | | | 2397 | 54 | return false; | 2398 | 54 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::dontCompare(cryptofuzz::operation::KDF_SSH const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::dontCompare(cryptofuzz::operation::KDF_X963 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::dontCompare(cryptofuzz::operation::KDF_BCRYPT const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::dontCompare(cryptofuzz::operation::KDF_SRTP const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::dontCompare(cryptofuzz::operation::KDF_SRTCP const&) const cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::dontCompare(cryptofuzz::operation::ECC_PrivateToPublic const&) const Line | Count | Source | 2394 | 575 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 575 | (void)operation; | 2396 | | | 2397 | 575 | return false; | 2398 | 575 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const Line | Count | Source | 2394 | 220 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 220 | (void)operation; | 2396 | | | 2397 | 220 | return false; | 2398 | 220 | } |
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 | 825 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 825 | (void)operation; | 2396 | | | 2397 | 825 | return false; | 2398 | 825 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::dontCompare(cryptofuzz::operation::ECRDSA_Verify const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::dontCompare(cryptofuzz::operation::Schnorr_Verify const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::dontCompare(cryptofuzz::operation::ECDSA_Recover const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::dontCompare(cryptofuzz::operation::DSA_Sign const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::dontCompare(cryptofuzz::operation::DSA_GenerateParameters const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::dontCompare(cryptofuzz::operation::DSA_PrivateToPublic const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DSA_GenerateKeyPair const&) const cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::dontCompare(cryptofuzz::operation::ECDH_Derive const&) const Line | Count | Source | 2394 | 55 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 55 | (void)operation; | 2396 | | | 2397 | 55 | return false; | 2398 | 55 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::dontCompare(cryptofuzz::operation::ECIES_Encrypt const&) const cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::dontCompare(cryptofuzz::operation::ECIES_Decrypt const&) const Line | Count | Source | 2394 | 3 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 3 | (void)operation; | 2396 | | | 2397 | 3 | return false; | 2398 | 3 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::dontCompare(cryptofuzz::operation::ECC_Point_Add const&) const Line | Count | Source | 2394 | 64 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 64 | (void)operation; | 2396 | | | 2397 | 64 | return false; | 2398 | 64 | } |
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::dontCompare(cryptofuzz::operation::ECC_Point_Sub const&) const cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const Line | Count | Source | 2394 | 86 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 86 | (void)operation; | 2396 | | | 2397 | 86 | return false; | 2398 | 86 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const Line | Count | Source | 2394 | 12 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 12 | (void)operation; | 2396 | | | 2397 | 12 | return false; | 2398 | 12 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const Line | Count | Source | 2394 | 31 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 31 | (void)operation; | 2396 | | | 2397 | 31 | return false; | 2398 | 31 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const Line | Count | Source | 2394 | 12 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 12 | (void)operation; | 2396 | | | 2397 | 12 | return false; | 2398 | 12 | } |
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 | 91 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 2395 | 91 | (void)operation; | 2396 | | | 2397 | 91 | return false; | 2398 | 91 | } |
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 | 3.37k | bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const { |
2402 | 3.37k | if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; } |
2403 | 3.35k | if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; } |
2404 | 3.35k | if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; } |
2405 | 3.22k | if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; } |
2406 | | |
2407 | 3.22k | return false; |
2408 | 3.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 | 1.64k | bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const { |
2418 | 1.64k | if ( |
2419 | 1.64k | operation.curveType.Get() != CF_ECC_CURVE("ed25519") && |
2420 | 1.26k | operation.curveType.Get() != CF_ECC_CURVE("ed448") ) { |
2421 | 796 | if ( operation.UseRandomNonce() ) { |
2422 | | /* Don't compare ECDSA signatures comptued from a randomly generated nonce */ |
2423 | 577 | return true; |
2424 | 577 | } |
2425 | 796 | } |
2426 | | |
2427 | 1.07k | return false; |
2428 | 1.64k | } |
2429 | | |
2430 | | template <> |
2431 | 0 | bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const { |
2432 | 0 | if ( |
2433 | 0 | operation.curveType.Get() != CF_ECC_CURVE("ed25519") && |
2434 | 0 | operation.curveType.Get() != CF_ECC_CURVE("ed448") ) { |
2435 | 0 | if ( operation.UseRandomNonce() ) { |
2436 | | /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */ |
2437 | 0 | return true; |
2438 | 0 | } |
2439 | 0 | } |
2440 | | |
2441 | 0 | return false; |
2442 | 0 | } |
2443 | | |
2444 | | template <> |
2445 | 0 | bool ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::dontCompare(const operation::ECRDSA_Sign& operation) const { |
2446 | 0 | if ( |
2447 | 0 | operation.curveType.Get() != CF_ECC_CURVE("ed25519") && |
2448 | 0 | operation.curveType.Get() != CF_ECC_CURVE("ed448") ) { |
2449 | 0 | if ( operation.UseRandomNonce() ) { |
2450 | | /* Don't compare ECRDSA signatures comptued from a randomly generated nonce */ |
2451 | 0 | return true; |
2452 | 0 | } |
2453 | 0 | } |
2454 | | |
2455 | 0 | return false; |
2456 | 0 | } |
2457 | | |
2458 | | /* OpenSSL DES_EDE3_WRAP randomizes the IV, result is different each time */ |
2459 | | template <> |
2460 | 256 | bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const { |
2461 | 256 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; } |
2462 | | |
2463 | 256 | return false; |
2464 | 256 | } |
2465 | | |
2466 | | template <> |
2467 | 35 | bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const { |
2468 | 35 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true; |
2469 | | |
2470 | 35 | return false; |
2471 | 35 | } |
2472 | | |
2473 | | template <> |
2474 | 41 | bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const { |
2475 | 41 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true; |
2476 | | |
2477 | 41 | return false; |
2478 | 41 | } |
2479 | | |
2480 | | template <> |
2481 | 72 | bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const { |
2482 | 72 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true; |
2483 | | |
2484 | 71 | return false; |
2485 | 72 | } |
2486 | | |
2487 | | template <class ResultType, class OperationType> |
2488 | 86.9k | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { |
2489 | 86.9k | if ( results.size() < 2 ) { |
2490 | | /* Nothing to compare. Don't even bother filtering. */ |
2491 | 64.4k | return; |
2492 | 64.4k | } |
2493 | | |
2494 | 22.5k | const auto filtered = filter(results); |
2495 | | |
2496 | 22.5k | if ( filtered.size() < 2 ) { |
2497 | | /* Nothing to compare */ |
2498 | 14.8k | return; |
2499 | 14.8k | } |
2500 | | |
2501 | 7.62k | if ( dontCompare(operations[0].second) == true ) { |
2502 | 734 | return; |
2503 | 734 | } |
2504 | | |
2505 | 21.0k | for (size_t i = 1; i < filtered.size(); i++) { |
2506 | 14.2k | const std::optional<ResultType>& prev = filtered[i-1].second; |
2507 | 14.2k | const std::optional<ResultType>& cur = filtered[i].second; |
2508 | | |
2509 | 14.2k | const bool equal = *prev == *cur; |
2510 | | |
2511 | 14.2k | if ( !equal ) { |
2512 | | /* Reconstruct operation */ |
2513 | 0 | const auto op = getOp(nullptr, data, size); |
2514 | |
|
2515 | 0 | printf("Difference detected\n\n"); |
2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); |
2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); |
2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); |
2519 | |
|
2520 | 0 | abort( |
2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, |
2522 | 0 | op.Name(), |
2523 | 0 | op.GetAlgorithmString(), |
2524 | 0 | "difference" |
2525 | 0 | ); |
2526 | 0 | } |
2527 | 14.2k | } |
2528 | 6.88k | } 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 | 327 | 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 | 327 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 173 | return; | 2492 | 173 | } | 2493 | | | 2494 | 154 | const auto filtered = filter(results); | 2495 | | | 2496 | 154 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 33 | return; | 2499 | 33 | } | 2500 | | | 2501 | 121 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 622 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 501 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 501 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 501 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 501 | 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 | 501 | } | 2528 | 121 | } |
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 | 206 | 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 | 206 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 67 | return; | 2492 | 67 | } | 2493 | | | 2494 | 139 | const auto filtered = filter(results); | 2495 | | | 2496 | 139 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 67 | return; | 2499 | 67 | } | 2500 | | | 2501 | 72 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 1 | return; | 2503 | 1 | } | 2504 | | | 2505 | 360 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 289 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 289 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 289 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 289 | 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 | 289 | } | 2528 | 71 | } |
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 | 26 | 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 | 26 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 25 | const auto filtered = filter(results); | 2495 | | | 2496 | 25 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 25 | return; | 2499 | 25 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::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 | 427 | 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 | 427 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 250 | return; | 2492 | 250 | } | 2493 | | | 2494 | 177 | const auto filtered = filter(results); | 2495 | | | 2496 | 177 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 136 | return; | 2499 | 136 | } | 2500 | | | 2501 | 41 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 240 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 199 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 199 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 199 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 199 | 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 | 199 | } | 2528 | 41 | } |
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 | 1.44k | 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.44k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 816 | return; | 2492 | 816 | } | 2493 | | | 2494 | 625 | const auto filtered = filter(results); | 2495 | | | 2496 | 625 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 369 | return; | 2499 | 369 | } | 2500 | | | 2501 | 256 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 1.50k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 1.25k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 1.25k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 1.25k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 1.25k | 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.25k | } | 2528 | 256 | } |
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 | 646 | 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 | 646 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 361 | return; | 2492 | 361 | } | 2493 | | | 2494 | 285 | const auto filtered = filter(results); | 2495 | | | 2496 | 285 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 250 | return; | 2499 | 250 | } | 2500 | | | 2501 | 35 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 188 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 153 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 153 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 153 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 153 | 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 | 153 | } | 2528 | 35 | } |
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 | 27 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 27 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 26 | const auto filtered = filter(results); | 2495 | | | 2496 | 26 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 26 | return; | 2499 | 26 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_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 | 328 | 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 | 328 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 216 | return; | 2492 | 216 | } | 2493 | | | 2494 | 112 | const auto filtered = filter(results); | 2495 | | | 2496 | 112 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 70 | return; | 2499 | 70 | } | 2500 | | | 2501 | 42 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 198 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 156 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 156 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 156 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 156 | 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 | 156 | } | 2528 | 42 | } |
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 | 31 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 31 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 30 | const auto filtered = filter(results); | 2495 | | | 2496 | 30 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 30 | return; | 2499 | 30 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 27 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 27 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 26 | const auto filtered = filter(results); | 2495 | | | 2496 | 26 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 26 | return; | 2499 | 26 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 28 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 28 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 27 | const auto filtered = filter(results); | 2495 | | | 2496 | 27 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 27 | return; | 2499 | 27 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_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 | 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 | 95 | return; | 2492 | 95 | } | 2493 | | | 2494 | 83 | const auto filtered = filter(results); | 2495 | | | 2496 | 83 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 29 | return; | 2499 | 29 | } | 2500 | | | 2501 | 54 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 319 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 265 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 265 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 265 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 265 | 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 | 265 | } | 2528 | 54 | } |
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 | 11 | 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 | 11 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 10 | const auto filtered = filter(results); | 2495 | | | 2496 | 10 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 10 | return; | 2499 | 10 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SSH>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SSH> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 30 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 30 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 29 | const auto filtered = filter(results); | 2495 | | | 2496 | 29 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 29 | return; | 2499 | 29 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_X963>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_X963> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 27 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 27 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 26 | const auto filtered = filter(results); | 2495 | | | 2496 | 26 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 26 | return; | 2499 | 26 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_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 | 9 | 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 | 9 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 8 | const auto filtered = filter(results); | 2495 | | | 2496 | 8 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 8 | return; | 2499 | 8 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 33 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 33 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 2 | return; | 2492 | 2 | } | 2493 | | | 2494 | 31 | const auto filtered = filter(results); | 2495 | | | 2496 | 31 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 31 | return; | 2499 | 31 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTP>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTP> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 29 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 29 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 28 | const auto filtered = filter(results); | 2495 | | | 2496 | 28 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 28 | return; | 2499 | 28 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTCP>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTCP> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 27 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 27 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 26 | const auto filtered = filter(results); | 2495 | | | 2496 | 26 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 26 | return; | 2499 | 26 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::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 | 6.64k | 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.64k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 5.17k | return; | 2492 | 5.17k | } | 2493 | | | 2494 | 1.46k | const auto filtered = filter(results); | 2495 | | | 2496 | 1.46k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 891 | return; | 2499 | 891 | } | 2500 | | | 2501 | 575 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 1.53k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 955 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 955 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 955 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 955 | 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 | 955 | } | 2528 | 575 | } |
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 | 4.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 | 4.15k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 3.10k | return; | 2492 | 3.10k | } | 2493 | | | 2494 | 1.05k | const auto filtered = filter(results); | 2495 | | | 2496 | 1.05k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 831 | return; | 2499 | 831 | } | 2500 | | | 2501 | 220 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 586 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 366 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 366 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 366 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 366 | 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 | 366 | } | 2528 | 220 | } |
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 | 385 | 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 | 385 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 83 | return; | 2492 | 83 | } | 2493 | | | 2494 | 302 | const auto filtered = filter(results); | 2495 | | | 2496 | 302 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 302 | return; | 2499 | 302 | } | 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 | 5.81k | 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 | 5.81k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 3.05k | return; | 2492 | 3.05k | } | 2493 | | | 2494 | 2.75k | const auto filtered = filter(results); | 2495 | | | 2496 | 2.75k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 1.10k | return; | 2499 | 1.10k | } | 2500 | | | 2501 | 1.64k | if ( dontCompare(operations[0].second) == true ) { | 2502 | 577 | return; | 2503 | 577 | } | 2504 | | | 2505 | 3.13k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 2.06k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 2.06k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 2.06k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 2.06k | 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.06k | } | 2528 | 1.07k | } |
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 | 21 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 21 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 2 | return; | 2492 | 2 | } | 2493 | | | 2494 | 19 | const auto filtered = filter(results); | 2495 | | | 2496 | 19 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 19 | return; | 2499 | 19 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::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 | 21 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 21 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 2 | return; | 2492 | 2 | } | 2493 | | | 2494 | 19 | const auto filtered = filter(results); | 2495 | | | 2496 | 19 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 19 | return; | 2499 | 19 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::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 | 22 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 22 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 2 | return; | 2492 | 2 | } | 2493 | | | 2494 | 20 | const auto filtered = filter(results); | 2495 | | | 2496 | 20 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 20 | return; | 2499 | 20 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<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 | 180 | 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 | 180 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 19 | return; | 2492 | 19 | } | 2493 | | | 2494 | 161 | const auto filtered = filter(results); | 2495 | | | 2496 | 161 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 161 | return; | 2499 | 161 | } | 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 | 3.44k | 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.44k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1.64k | return; | 2492 | 1.64k | } | 2493 | | | 2494 | 1.80k | const auto filtered = filter(results); | 2495 | | | 2496 | 1.80k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 977 | return; | 2499 | 977 | } | 2500 | | | 2501 | 825 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 2.35k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 1.52k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 1.52k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 1.52k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 1.52k | 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.52k | } | 2528 | 825 | } |
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 | 18 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 18 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 17 | const auto filtered = filter(results); | 2495 | | | 2496 | 17 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 17 | return; | 2499 | 17 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::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 | 19 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 19 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 18 | const auto filtered = filter(results); | 2495 | | | 2496 | 18 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 18 | return; | 2499 | 18 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::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 | 17 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 17 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 16 | const auto filtered = filter(results); | 2495 | | | 2496 | 16 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 16 | return; | 2499 | 16 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::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 | 18 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 18 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 17 | const auto filtered = filter(results); | 2495 | | | 2496 | 17 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 17 | return; | 2499 | 17 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::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 | 38 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 38 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 10 | return; | 2492 | 10 | } | 2493 | | | 2494 | 28 | const auto filtered = filter(results); | 2495 | | | 2496 | 28 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 28 | return; | 2499 | 28 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::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 | 18 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 18 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 17 | const auto filtered = filter(results); | 2495 | | | 2496 | 17 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 17 | return; | 2499 | 17 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::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 | 596 | 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 | 596 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 209 | return; | 2492 | 209 | } | 2493 | | | 2494 | 387 | const auto filtered = filter(results); | 2495 | | | 2496 | 387 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 332 | return; | 2499 | 332 | } | 2500 | | | 2501 | 55 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 157 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 102 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 102 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 102 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 102 | 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 | 102 | } | 2528 | 55 | } |
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 | 746 | 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 | 746 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 320 | return; | 2492 | 320 | } | 2493 | | | 2494 | 426 | const auto filtered = filter(results); | 2495 | | | 2496 | 426 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 423 | return; | 2499 | 423 | } | 2500 | | | 2501 | 3 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 7 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 4 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 4 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 4 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 4 | 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 | 4 | } | 2528 | 3 | } |
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 | 2.71k | 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.71k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1.60k | return; | 2492 | 1.60k | } | 2493 | | | 2494 | 1.11k | const auto filtered = filter(results); | 2495 | | | 2496 | 1.11k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 1.04k | return; | 2499 | 1.04k | } | 2500 | | | 2501 | 64 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 203 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 139 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 139 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 139 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 139 | 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 | 139 | } | 2528 | 64 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 20 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 20 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 19 | const auto filtered = filter(results); | 2495 | | | 2496 | 19 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 19 | return; | 2499 | 19 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Mul>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Mul> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 3.20k | 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.20k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 2.37k | return; | 2492 | 2.37k | } | 2493 | | | 2494 | 834 | const auto filtered = filter(results); | 2495 | | | 2496 | 834 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 748 | return; | 2499 | 748 | } | 2500 | | | 2501 | 86 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 269 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 183 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 183 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 183 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 183 | 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 | 183 | } | 2528 | 86 | } |
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 | 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 | 68 | return; | 2492 | 68 | } | 2493 | | | 2494 | 68 | const auto filtered = filter(results); | 2495 | | | 2496 | 68 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 56 | return; | 2499 | 56 | } | 2500 | | | 2501 | 12 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 39 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 27 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 27 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 27 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 27 | 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 | 27 | } | 2528 | 12 | } |
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 | 5.37k | 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 | 5.37k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 4.24k | return; | 2492 | 4.24k | } | 2493 | | | 2494 | 1.13k | const auto filtered = filter(results); | 2495 | | | 2496 | 1.13k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 1.10k | return; | 2499 | 1.10k | } | 2500 | | | 2501 | 31 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 88 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 57 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 57 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 57 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 57 | 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 | 57 | } | 2528 | 31 | } |
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 | 47 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 47 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 12 | return; | 2492 | 12 | } | 2493 | | | 2494 | 35 | const auto filtered = filter(results); | 2495 | | | 2496 | 35 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 23 | return; | 2499 | 23 | } | 2500 | | | 2501 | 12 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 41 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 29 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 29 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 29 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 29 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 29 | } | 2528 | 12 | } |
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 | 1.26k | 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.26k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 512 | return; | 2492 | 512 | } | 2493 | | | 2494 | 751 | const auto filtered = filter(results); | 2495 | | | 2496 | 751 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 660 | return; | 2499 | 660 | } | 2500 | | | 2501 | 91 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 278 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 187 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 187 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 187 | const bool equal = *prev == *cur; | 2510 | | | 2511 | 187 | 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 | 187 | } | 2528 | 91 | } |
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 | 46.7k | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 46.7k | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 39.6k | return; | 2492 | 39.6k | } | 2493 | | | 2494 | 7.12k | const auto filtered = filter(results); | 2495 | | | 2496 | 7.12k | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 3.74k | return; | 2499 | 3.74k | } | 2500 | | | 2501 | 3.37k | if ( dontCompare(operations[0].second) == true ) { | 2502 | 156 | return; | 2503 | 156 | } | 2504 | | | 2505 | 8.96k | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 5.74k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 5.74k | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | | | 2509 | 5.74k | const bool equal = *prev == *cur; | 2510 | | | 2511 | 5.74k | 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 | 5.74k | } | 2528 | 3.22k | } |
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 | 53 | 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 | 53 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 14 | return; | 2492 | 14 | } | 2493 | | | 2494 | 39 | const auto filtered = filter(results); | 2495 | | | 2496 | 39 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 39 | return; | 2499 | 39 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::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 | 308 | 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 | 308 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 110 | return; | 2492 | 110 | } | 2493 | | | 2494 | 198 | const auto filtered = filter(results); | 2495 | | | 2496 | 198 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 198 | return; | 2499 | 198 | } | 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 | 23 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 23 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 3 | return; | 2492 | 3 | } | 2493 | | | 2494 | 20 | const auto filtered = filter(results); | 2495 | | | 2496 | 20 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 20 | return; | 2499 | 20 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
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 | 34 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 34 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 11 | return; | 2492 | 11 | } | 2493 | | | 2494 | 23 | const auto filtered = filter(results); | 2495 | | | 2496 | 23 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 23 | return; | 2499 | 23 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 23 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 23 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 3 | return; | 2492 | 3 | } | 2493 | | | 2494 | 20 | const auto filtered = filter(results); | 2495 | | | 2496 | 20 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 20 | return; | 2499 | 20 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
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 | 14 | 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 | 14 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 13 | const auto filtered = filter(results); | 2495 | | | 2496 | 13 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 13 | return; | 2499 | 13 | } | 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 | 28 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 28 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 3 | return; | 2492 | 3 | } | 2493 | | | 2494 | 25 | const auto filtered = filter(results); | 2495 | | | 2496 | 25 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 25 | return; | 2499 | 25 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<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 | 18 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 18 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 2 | return; | 2492 | 2 | } | 2493 | | | 2494 | 16 | const auto filtered = filter(results); | 2495 | | | 2496 | 16 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 16 | return; | 2499 | 16 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_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 | 16 | 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 | 16 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 15 | const auto filtered = filter(results); | 2495 | | | 2496 | 15 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 15 | return; | 2499 | 15 | } | 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 | 17 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 17 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 16 | const auto filtered = filter(results); | 2495 | | | 2496 | 16 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 16 | return; | 2499 | 16 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::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 | 18 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 18 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 17 | const auto filtered = filter(results); | 2495 | | | 2496 | 17 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 17 | return; | 2499 | 17 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::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 | 16 | 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 | 16 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 15 | const auto filtered = filter(results); | 2495 | | | 2496 | 15 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 15 | return; | 2499 | 15 | } | 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 | 19 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 19 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 18 | const auto filtered = filter(results); | 2495 | | | 2496 | 18 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 18 | return; | 2499 | 18 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<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 | 19 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 19 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 18 | const auto filtered = filter(results); | 2495 | | | 2496 | 18 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 18 | return; | 2499 | 18 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<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 | 20 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 20 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 19 | const auto filtered = filter(results); | 2495 | | | 2496 | 19 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 19 | return; | 2499 | 19 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_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 | 20 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 20 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 19 | const auto filtered = filter(results); | 2495 | | | 2496 | 19 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 19 | return; | 2499 | 19 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_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 | 17 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 17 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 16 | const auto filtered = filter(results); | 2495 | | | 2496 | 16 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 16 | return; | 2499 | 16 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::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 | 39 | 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 | 39 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 12 | return; | 2492 | 12 | } | 2493 | | | 2494 | 27 | const auto filtered = filter(results); | 2495 | | | 2496 | 27 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 27 | return; | 2499 | 27 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_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 | 33 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 33 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 5 | return; | 2492 | 5 | } | 2493 | | | 2494 | 28 | const auto filtered = filter(results); | 2495 | | | 2496 | 28 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 28 | return; | 2499 | 28 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<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 | 19 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 19 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 18 | const auto filtered = filter(results); | 2495 | | | 2496 | 18 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 18 | return; | 2499 | 18 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 18 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 18 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 17 | const auto filtered = filter(results); | 2495 | | | 2496 | 17 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 17 | return; | 2499 | 17 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 20 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 20 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 19 | const auto filtered = filter(results); | 2495 | | | 2496 | 19 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 19 | return; | 2499 | 19 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 20 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 20 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 19 | const auto filtered = filter(results); | 2495 | | | 2496 | 19 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 19 | return; | 2499 | 19 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 19 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 19 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 18 | const auto filtered = filter(results); | 2495 | | | 2496 | 18 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 18 | return; | 2499 | 18 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<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 | 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 | 30 | return; | 2492 | 30 | } | 2493 | | | 2494 | 40 | const auto filtered = filter(results); | 2495 | | | 2496 | 40 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 40 | return; | 2499 | 40 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_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 | 40 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 40 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 12 | return; | 2492 | 12 | } | 2493 | | | 2494 | 28 | const auto filtered = filter(results); | 2495 | | | 2496 | 28 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 28 | return; | 2499 | 28 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_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 | 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 | 30 | return; | 2492 | 30 | } | 2493 | | | 2494 | 31 | const auto filtered = filter(results); | 2495 | | | 2496 | 31 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 31 | return; | 2499 | 31 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::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 | 42 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 42 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 15 | return; | 2492 | 15 | } | 2493 | | | 2494 | 27 | const auto filtered = filter(results); | 2495 | | | 2496 | 27 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 27 | return; | 2499 | 27 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2488 | 81 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 81 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 25 | return; | 2492 | 25 | } | 2493 | | | 2494 | 56 | const auto filtered = filter(results); | 2495 | | | 2496 | 56 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 56 | return; | 2499 | 56 | } | 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 | 51 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 51 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 20 | return; | 2492 | 20 | } | 2493 | | | 2494 | 31 | const auto filtered = filter(results); | 2495 | | | 2496 | 31 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 31 | return; | 2499 | 31 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<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 | 98 | 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 | 98 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 44 | return; | 2492 | 44 | } | 2493 | | | 2494 | 54 | const auto filtered = filter(results); | 2495 | | | 2496 | 54 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 54 | return; | 2499 | 54 | } | 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 | 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 | 27 | return; | 2492 | 27 | } | 2493 | | | 2494 | 37 | const auto filtered = filter(results); | 2495 | | | 2496 | 37 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 37 | return; | 2499 | 37 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::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 | 59 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2489 | 59 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 17 | return; | 2492 | 17 | } | 2493 | | | 2494 | 42 | const auto filtered = filter(results); | 2495 | | | 2496 | 42 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 42 | return; | 2499 | 42 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::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 | 15 | 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 | 15 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 1 | return; | 2492 | 1 | } | 2493 | | | 2494 | 14 | const auto filtered = filter(results); | 2495 | | | 2496 | 14 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 14 | return; | 2499 | 14 | } | 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 | 25 | 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 | 25 | if ( results.size() < 2 ) { | 2490 | | /* Nothing to compare. Don't even bother filtering. */ | 2491 | 4 | return; | 2492 | 4 | } | 2493 | | | 2494 | 21 | const auto filtered = filter(results); | 2495 | | | 2496 | 21 | if ( filtered.size() < 2 ) { | 2497 | | /* Nothing to compare */ | 2498 | 21 | return; | 2499 | 21 | } | 2500 | | | 2501 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2502 | 0 | return; | 2503 | 0 | } | 2504 | | | 2505 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2506 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2507 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2508 | |
| 2509 | 0 | const bool equal = *prev == *cur; | 2510 | |
| 2511 | 0 | if ( !equal ) { | 2512 | | /* Reconstruct operation */ | 2513 | 0 | const auto op = getOp(nullptr, data, size); | 2514 | |
| 2515 | 0 | printf("Difference detected\n\n"); | 2516 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2517 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2518 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2519 | |
| 2520 | 0 | abort( | 2521 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2522 | 0 | op.Name(), | 2523 | 0 | op.GetAlgorithmString(), | 2524 | 0 | "difference" | 2525 | 0 | ); | 2526 | 0 | } | 2527 | 0 | } | 2528 | 0 | } |
|
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 | 154k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { |
2550 | 154k | (void)parentDs; |
2551 | 154k | return op; |
2552 | 154k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const Line | Count | Source | 2549 | 1.19k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.19k | (void)parentDs; | 2551 | 1.19k | return op; | 2552 | 1.19k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const Line | Count | Source | 2549 | 949 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 949 | (void)parentDs; | 2551 | 949 | return op; | 2552 | 949 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const Line | Count | Source | 2549 | 247 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 247 | (void)parentDs; | 2551 | 247 | return op; | 2552 | 247 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const Line | Count | Source | 2549 | 1.15k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.15k | (void)parentDs; | 2551 | 1.15k | return op; | 2552 | 1.15k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const Line | Count | Source | 2549 | 3.97k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 3.97k | (void)parentDs; | 2551 | 3.97k | return op; | 2552 | 3.97k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const Line | Count | Source | 2549 | 1.75k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.75k | (void)parentDs; | 2551 | 1.75k | return op; | 2552 | 1.75k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const Line | Count | Source | 2549 | 275 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 275 | (void)parentDs; | 2551 | 275 | return op; | 2552 | 275 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const Line | Count | Source | 2549 | 971 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 971 | (void)parentDs; | 2551 | 971 | return op; | 2552 | 971 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const Line | Count | Source | 2549 | 309 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 309 | (void)parentDs; | 2551 | 309 | return op; | 2552 | 309 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const Line | Count | Source | 2549 | 296 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 296 | (void)parentDs; | 2551 | 296 | return op; | 2552 | 296 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const Line | Count | Source | 2549 | 333 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 333 | (void)parentDs; | 2551 | 333 | return op; | 2552 | 333 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const Line | Count | Source | 2549 | 790 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 790 | (void)parentDs; | 2551 | 790 | return op; | 2552 | 790 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const Line | Count | Source | 2549 | 31 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 31 | (void)parentDs; | 2551 | 31 | return op; | 2552 | 31 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const Line | Count | Source | 2549 | 327 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 327 | (void)parentDs; | 2551 | 327 | return op; | 2552 | 327 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const Line | Count | Source | 2549 | 305 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 305 | (void)parentDs; | 2551 | 305 | return op; | 2552 | 305 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const Line | Count | Source | 2549 | 22 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 22 | (void)parentDs; | 2551 | 22 | return op; | 2552 | 22 | } |
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 | 335 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 335 | (void)parentDs; | 2551 | 335 | return op; | 2552 | 335 | } |
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 | 351 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 351 | (void)parentDs; | 2551 | 351 | return op; | 2552 | 351 | } |
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 | 265 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 265 | (void)parentDs; | 2551 | 265 | return op; | 2552 | 265 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const Line | Count | Source | 2549 | 9.41k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 9.41k | (void)parentDs; | 2551 | 9.41k | return op; | 2552 | 9.41k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const Line | Count | Source | 2549 | 6.17k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 6.17k | (void)parentDs; | 2551 | 6.17k | return op; | 2552 | 6.17k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const Line | Count | Source | 2549 | 9.24k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 9.24k | (void)parentDs; | 2551 | 9.24k | return op; | 2552 | 9.24k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const Line | Count | Source | 2549 | 1.15k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.15k | (void)parentDs; | 2551 | 1.15k | return op; | 2552 | 1.15k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const Line | Count | Source | 2549 | 11.2k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 11.2k | (void)parentDs; | 2551 | 11.2k | return op; | 2552 | 11.2k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const Line | Count | Source | 2549 | 84 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 84 | (void)parentDs; | 2551 | 84 | return op; | 2552 | 84 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const Line | Count | Source | 2549 | 86 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 86 | (void)parentDs; | 2551 | 86 | return op; | 2552 | 86 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const Line | Count | Source | 2549 | 77 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 77 | (void)parentDs; | 2551 | 77 | return op; | 2552 | 77 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const Line | Count | Source | 2549 | 719 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 719 | (void)parentDs; | 2551 | 719 | return op; | 2552 | 719 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const Line | Count | Source | 2549 | 6.98k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 6.98k | (void)parentDs; | 2551 | 6.98k | return op; | 2552 | 6.98k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const Line | Count | Source | 2549 | 69 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 69 | (void)parentDs; | 2551 | 69 | return op; | 2552 | 69 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const Line | Count | Source | 2549 | 71 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 71 | (void)parentDs; | 2551 | 71 | return op; | 2552 | 71 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const Line | Count | Source | 2549 | 68 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 68 | (void)parentDs; | 2551 | 68 | return op; | 2552 | 68 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const Line | Count | Source | 2549 | 71 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 71 | (void)parentDs; | 2551 | 71 | return op; | 2552 | 71 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const Line | Count | Source | 2549 | 120 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 120 | (void)parentDs; | 2551 | 120 | return op; | 2552 | 120 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const Line | Count | Source | 2549 | 107 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 107 | (void)parentDs; | 2551 | 107 | return op; | 2552 | 107 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const Line | Count | Source | 2549 | 89 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 89 | (void)parentDs; | 2551 | 89 | return op; | 2552 | 89 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const Line | Count | Source | 2549 | 85 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 85 | (void)parentDs; | 2551 | 85 | return op; | 2552 | 85 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const Line | Count | Source | 2549 | 131 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 131 | (void)parentDs; | 2551 | 131 | return op; | 2552 | 131 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const Line | Count | Source | 2549 | 1.54k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.54k | (void)parentDs; | 2551 | 1.54k | return op; | 2552 | 1.54k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const Line | Count | Source | 2549 | 1.76k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.76k | (void)parentDs; | 2551 | 1.76k | return op; | 2552 | 1.76k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const Line | Count | Source | 2549 | 1.85k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 1.85k | (void)parentDs; | 2551 | 1.85k | return op; | 2552 | 1.85k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const Line | Count | Source | 2549 | 4.85k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.85k | (void)parentDs; | 2551 | 4.85k | return op; | 2552 | 4.85k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const Line | Count | Source | 2549 | 87 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 87 | (void)parentDs; | 2551 | 87 | return op; | 2552 | 87 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const Line | Count | Source | 2549 | 4.83k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 4.83k | (void)parentDs; | 2551 | 4.83k | return op; | 2552 | 4.83k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const Line | Count | Source | 2549 | 295 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 295 | (void)parentDs; | 2551 | 295 | return op; | 2552 | 295 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const Line | Count | Source | 2549 | 7.39k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 7.39k | (void)parentDs; | 2551 | 7.39k | return op; | 2552 | 7.39k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const Line | Count | Source | 2549 | 147 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 147 | (void)parentDs; | 2551 | 147 | return op; | 2552 | 147 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_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::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const Line | Count | Source | 2549 | 2.90k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 2.90k | (void)parentDs; | 2551 | 2.90k | return op; | 2552 | 2.90k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const Line | Count | Source | 2549 | 59.7k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 59.7k | (void)parentDs; | 2551 | 59.7k | return op; | 2552 | 59.7k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const Line | Count | Source | 2549 | 150 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 150 | (void)parentDs; | 2551 | 150 | return op; | 2552 | 150 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const Line | Count | Source | 2549 | 707 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 707 | (void)parentDs; | 2551 | 707 | return op; | 2552 | 707 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const Line | Count | Source | 2549 | 85 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 85 | (void)parentDs; | 2551 | 85 | return op; | 2552 | 85 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const Line | Count | Source | 2549 | 97 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 97 | (void)parentDs; | 2551 | 97 | return op; | 2552 | 97 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const Line | Count | Source | 2549 | 81 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 81 | (void)parentDs; | 2551 | 81 | return op; | 2552 | 81 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const Line | Count | Source | 2549 | 55 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 55 | (void)parentDs; | 2551 | 55 | return op; | 2552 | 55 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const Line | Count | Source | 2549 | 173 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 173 | (void)parentDs; | 2551 | 173 | return op; | 2552 | 173 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const Line | Count | Source | 2549 | 128 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 128 | (void)parentDs; | 2551 | 128 | return op; | 2552 | 128 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const Line | Count | Source | 2549 | 124 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 124 | (void)parentDs; | 2551 | 124 | return op; | 2552 | 124 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const Line | Count | Source | 2549 | 133 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 133 | (void)parentDs; | 2551 | 133 | return op; | 2552 | 133 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const Line | Count | Source | 2549 | 82 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 82 | (void)parentDs; | 2551 | 82 | return op; | 2552 | 82 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const Line | Count | Source | 2549 | 73 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 73 | (void)parentDs; | 2551 | 73 | return op; | 2552 | 73 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const Line | Count | Source | 2549 | 91 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 91 | (void)parentDs; | 2551 | 91 | return op; | 2552 | 91 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const Line | Count | Source | 2549 | 85 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 85 | (void)parentDs; | 2551 | 85 | return op; | 2552 | 85 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const Line | Count | Source | 2549 | 89 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 89 | (void)parentDs; | 2551 | 89 | return op; | 2552 | 89 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const Line | Count | Source | 2549 | 78 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 78 | (void)parentDs; | 2551 | 78 | return op; | 2552 | 78 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const Line | Count | Source | 2549 | 77 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 77 | (void)parentDs; | 2551 | 77 | return op; | 2552 | 77 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const Line | Count | Source | 2549 | 120 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 120 | (void)parentDs; | 2551 | 120 | return op; | 2552 | 120 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const Line | Count | Source | 2549 | 114 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 114 | (void)parentDs; | 2551 | 114 | return op; | 2552 | 114 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const Line | Count | Source | 2549 | 76 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 76 | (void)parentDs; | 2551 | 76 | return op; | 2552 | 76 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const Line | Count | Source | 2549 | 76 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 76 | (void)parentDs; | 2551 | 76 | return op; | 2552 | 76 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const Line | Count | Source | 2549 | 83 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 83 | (void)parentDs; | 2551 | 83 | return op; | 2552 | 83 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const Line | Count | Source | 2549 | 91 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 91 | (void)parentDs; | 2551 | 91 | return op; | 2552 | 91 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const Line | Count | Source | 2549 | 84 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 84 | (void)parentDs; | 2551 | 84 | return op; | 2552 | 84 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const Line | Count | Source | 2549 | 167 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 167 | (void)parentDs; | 2551 | 167 | return op; | 2552 | 167 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const Line | Count | Source | 2549 | 109 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 109 | (void)parentDs; | 2551 | 109 | return op; | 2552 | 109 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const Line | Count | Source | 2549 | 145 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 145 | (void)parentDs; | 2551 | 145 | return op; | 2552 | 145 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const Line | Count | Source | 2549 | 121 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 121 | (void)parentDs; | 2551 | 121 | return op; | 2552 | 121 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const Line | Count | Source | 2549 | 205 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 205 | (void)parentDs; | 2551 | 205 | return op; | 2552 | 205 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const Line | Count | Source | 2549 | 129 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 129 | (void)parentDs; | 2551 | 129 | return op; | 2552 | 129 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const Line | Count | Source | 2549 | 232 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 232 | (void)parentDs; | 2551 | 232 | return op; | 2552 | 232 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const Line | Count | Source | 2549 | 155 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 155 | (void)parentDs; | 2551 | 155 | return op; | 2552 | 155 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const Line | Count | Source | 2549 | 215 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 215 | (void)parentDs; | 2551 | 215 | return op; | 2552 | 215 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const Line | Count | Source | 2549 | 75 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 75 | (void)parentDs; | 2551 | 75 | return op; | 2552 | 75 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const Line | Count | Source | 2549 | 132 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2550 | 132 | (void)parentDs; | 2551 | 132 | return op; | 2552 | 132 | } |
|
2553 | | |
2554 | 13 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2555 | 13 | (void)parentDs; |
2556 | 13 | op.modulo = modulo; |
2557 | 13 | return op; |
2558 | 13 | } |
2559 | | |
2560 | 19 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2561 | 19 | (void)parentDs; |
2562 | 19 | op.modulo = modulo; |
2563 | 19 | return op; |
2564 | 19 | } |
2565 | | |
2566 | 12 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2567 | 12 | (void)parentDs; |
2568 | 12 | op.modulo = modulo; |
2569 | 12 | return op; |
2570 | 12 | } |
2571 | | |
2572 | 11 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2573 | 11 | (void)parentDs; |
2574 | 11 | op.modulo = modulo; |
2575 | 11 | return op; |
2576 | 11 | } |
2577 | | |
2578 | 15 | operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2579 | 15 | (void)parentDs; |
2580 | 15 | op.modulo = modulo; |
2581 | 15 | return op; |
2582 | 15 | } |
2583 | | |
2584 | 12 | operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2585 | 12 | (void)parentDs; |
2586 | 12 | op.modulo = modulo; |
2587 | 12 | return op; |
2588 | 12 | } |
2589 | | |
2590 | 10 | operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2591 | 10 | (void)parentDs; |
2592 | 10 | op.modulo = modulo; |
2593 | 10 | return op; |
2594 | 10 | } |
2595 | | |
2596 | 11 | operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2597 | 11 | (void)parentDs; |
2598 | 11 | op.modulo = modulo; |
2599 | 11 | return op; |
2600 | 11 | } |
2601 | | |
2602 | 13 | operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2603 | 13 | (void)parentDs; |
2604 | 13 | op.modulo = modulo; |
2605 | 13 | return op; |
2606 | 13 | } |
2607 | | |
2608 | 13 | operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2609 | 13 | (void)parentDs; |
2610 | 13 | op.modulo = modulo; |
2611 | 13 | return op; |
2612 | 13 | } |
2613 | | |
2614 | 20 | operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2615 | 20 | (void)parentDs; |
2616 | 20 | op.modulo = modulo; |
2617 | 20 | return op; |
2618 | 20 | } |
2619 | | |
2620 | 16 | operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2621 | 16 | (void)parentDs; |
2622 | 16 | op.modulo = modulo; |
2623 | 16 | return op; |
2624 | 16 | } |
2625 | | |
2626 | 13 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2627 | 13 | (void)parentDs; |
2628 | 13 | op.modulo = modulo; |
2629 | 13 | return op; |
2630 | 13 | } |
2631 | | |
2632 | 13 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2633 | 13 | (void)parentDs; |
2634 | 13 | op.modulo = modulo; |
2635 | 13 | return op; |
2636 | 13 | } |
2637 | | |
2638 | 19 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2639 | 19 | (void)parentDs; |
2640 | 19 | op.modulo = modulo; |
2641 | 19 | return op; |
2642 | 19 | } |
2643 | | |
2644 | 10 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2645 | 10 | (void)parentDs; |
2646 | 10 | op.modulo = modulo; |
2647 | 10 | return op; |
2648 | 10 | } |
2649 | | |
2650 | 13 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2651 | 13 | (void)parentDs; |
2652 | 13 | op.modulo = modulo; |
2653 | 13 | return op; |
2654 | 13 | } |
2655 | | |
2656 | 14 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2657 | 14 | (void)parentDs; |
2658 | 14 | op.modulo = modulo; |
2659 | 14 | return op; |
2660 | 14 | } |
2661 | | |
2662 | 12 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2663 | 12 | (void)parentDs; |
2664 | 12 | op.modulo = modulo; |
2665 | 12 | return op; |
2666 | 12 | } |
2667 | | |
2668 | 10 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2669 | 10 | (void)parentDs; |
2670 | 10 | op.modulo = modulo; |
2671 | 10 | return op; |
2672 | 10 | } |
2673 | | |
2674 | 18 | operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2675 | 18 | (void)parentDs; |
2676 | 18 | op.modulo = modulo; |
2677 | 18 | return op; |
2678 | 18 | } |
2679 | | |
2680 | 15 | operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2681 | 15 | (void)parentDs; |
2682 | 15 | op.modulo = modulo; |
2683 | 15 | return op; |
2684 | 15 | } |
2685 | | |
2686 | | template <class ResultType, class OperationType> |
2687 | 157k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { |
2688 | 157k | Datasource ds(data, size); |
2689 | 157k | if ( parentDs != nullptr ) { |
2690 | 157k | auto modifier = parentDs->GetData(0); |
2691 | 157k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); |
2692 | 157k | } else { |
2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); |
2694 | 0 | } |
2695 | 157k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.20k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.20k | Datasource ds(data, size); | 2689 | 1.20k | if ( parentDs != nullptr ) { | 2690 | 1.20k | auto modifier = parentDs->GetData(0); | 2691 | 1.20k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.20k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.20k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 959 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 959 | Datasource ds(data, size); | 2689 | 959 | if ( parentDs != nullptr ) { | 2690 | 959 | auto modifier = parentDs->GetData(0); | 2691 | 959 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 959 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 959 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 257 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 257 | Datasource ds(data, size); | 2689 | 257 | if ( parentDs != nullptr ) { | 2690 | 257 | auto modifier = parentDs->GetData(0); | 2691 | 257 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 257 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 257 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.16k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.16k | Datasource ds(data, size); | 2689 | 1.16k | if ( parentDs != nullptr ) { | 2690 | 1.16k | auto modifier = parentDs->GetData(0); | 2691 | 1.16k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.16k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.16k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.98k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.98k | Datasource ds(data, size); | 2689 | 3.98k | if ( parentDs != nullptr ) { | 2690 | 3.98k | auto modifier = parentDs->GetData(0); | 2691 | 3.98k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.98k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.98k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.76k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.76k | Datasource ds(data, size); | 2689 | 1.76k | if ( parentDs != nullptr ) { | 2690 | 1.76k | auto modifier = parentDs->GetData(0); | 2691 | 1.76k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.76k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.76k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 288 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 288 | Datasource ds(data, size); | 2689 | 288 | if ( parentDs != nullptr ) { | 2690 | 288 | auto modifier = parentDs->GetData(0); | 2691 | 288 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 288 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 288 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 983 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 983 | Datasource ds(data, size); | 2689 | 983 | if ( parentDs != nullptr ) { | 2690 | 983 | auto modifier = parentDs->GetData(0); | 2691 | 983 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 983 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 983 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 318 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 318 | Datasource ds(data, size); | 2689 | 318 | if ( parentDs != nullptr ) { | 2690 | 318 | auto modifier = parentDs->GetData(0); | 2691 | 318 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 318 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 318 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 306 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 306 | Datasource ds(data, size); | 2689 | 306 | if ( parentDs != nullptr ) { | 2690 | 306 | auto modifier = parentDs->GetData(0); | 2691 | 306 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 306 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 306 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 346 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 346 | Datasource ds(data, size); | 2689 | 346 | if ( parentDs != nullptr ) { | 2690 | 346 | auto modifier = parentDs->GetData(0); | 2691 | 346 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 346 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 346 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 802 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 802 | Datasource ds(data, size); | 2689 | 802 | if ( parentDs != nullptr ) { | 2690 | 802 | auto modifier = parentDs->GetData(0); | 2691 | 802 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 802 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 802 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 36 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 36 | Datasource ds(data, size); | 2689 | 36 | if ( parentDs != nullptr ) { | 2690 | 36 | auto modifier = parentDs->GetData(0); | 2691 | 36 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 36 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 36 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 338 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 338 | Datasource ds(data, size); | 2689 | 338 | if ( parentDs != nullptr ) { | 2690 | 338 | auto modifier = parentDs->GetData(0); | 2691 | 338 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 338 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 338 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 316 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 316 | Datasource ds(data, size); | 2689 | 316 | if ( parentDs != nullptr ) { | 2690 | 316 | auto modifier = parentDs->GetData(0); | 2691 | 316 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 316 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 316 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 27 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 27 | Datasource ds(data, size); | 2689 | 27 | if ( parentDs != nullptr ) { | 2690 | 27 | auto modifier = parentDs->GetData(0); | 2691 | 27 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 27 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 27 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 344 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 344 | Datasource ds(data, size); | 2689 | 344 | if ( parentDs != nullptr ) { | 2690 | 344 | auto modifier = parentDs->GetData(0); | 2691 | 344 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 344 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 344 | } |
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 | 362 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 362 | Datasource ds(data, size); | 2689 | 362 | if ( parentDs != nullptr ) { | 2690 | 362 | auto modifier = parentDs->GetData(0); | 2691 | 362 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 362 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 362 | } |
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 | 278 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 278 | Datasource ds(data, size); | 2689 | 278 | if ( parentDs != nullptr ) { | 2690 | 278 | auto modifier = parentDs->GetData(0); | 2691 | 278 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 278 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 278 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 9.50k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 9.50k | Datasource ds(data, size); | 2689 | 9.50k | if ( parentDs != nullptr ) { | 2690 | 9.50k | auto modifier = parentDs->GetData(0); | 2691 | 9.50k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 9.50k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 9.50k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 6.24k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 6.24k | Datasource ds(data, size); | 2689 | 6.24k | if ( parentDs != nullptr ) { | 2690 | 6.24k | auto modifier = parentDs->GetData(0); | 2691 | 6.24k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 6.24k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 6.24k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 9.30k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 9.30k | Datasource ds(data, size); | 2689 | 9.30k | if ( parentDs != nullptr ) { | 2690 | 9.30k | auto modifier = parentDs->GetData(0); | 2691 | 9.30k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 9.30k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 9.30k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.22k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.22k | Datasource ds(data, size); | 2689 | 1.22k | if ( parentDs != nullptr ) { | 2690 | 1.22k | auto modifier = parentDs->GetData(0); | 2691 | 1.22k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.22k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.22k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 11.3k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 11.3k | Datasource ds(data, size); | 2689 | 11.3k | if ( parentDs != nullptr ) { | 2690 | 11.3k | auto modifier = parentDs->GetData(0); | 2691 | 11.3k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 11.3k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 11.3k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 93 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 93 | Datasource ds(data, size); | 2689 | 93 | if ( parentDs != nullptr ) { | 2690 | 93 | auto modifier = parentDs->GetData(0); | 2691 | 93 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 93 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 93 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 95 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 95 | Datasource ds(data, size); | 2689 | 95 | if ( parentDs != nullptr ) { | 2690 | 95 | auto modifier = parentDs->GetData(0); | 2691 | 95 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 95 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 95 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 83 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 83 | Datasource ds(data, size); | 2689 | 83 | if ( parentDs != nullptr ) { | 2690 | 83 | auto modifier = parentDs->GetData(0); | 2691 | 83 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 83 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 83 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 794 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 794 | Datasource ds(data, size); | 2689 | 794 | if ( parentDs != nullptr ) { | 2690 | 794 | auto modifier = parentDs->GetData(0); | 2691 | 794 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 794 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 794 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 7.06k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 7.06k | Datasource ds(data, size); | 2689 | 7.06k | if ( parentDs != nullptr ) { | 2690 | 7.06k | auto modifier = parentDs->GetData(0); | 2691 | 7.06k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 7.06k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 7.06k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 73 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 73 | Datasource ds(data, size); | 2689 | 73 | if ( parentDs != nullptr ) { | 2690 | 73 | auto modifier = parentDs->GetData(0); | 2691 | 73 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 73 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 73 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 75 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 75 | Datasource ds(data, size); | 2689 | 75 | if ( parentDs != nullptr ) { | 2690 | 75 | auto modifier = parentDs->GetData(0); | 2691 | 75 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 75 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 75 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 76 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 76 | Datasource ds(data, size); | 2689 | 76 | if ( parentDs != nullptr ) { | 2690 | 76 | auto modifier = parentDs->GetData(0); | 2691 | 76 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 76 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 76 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 76 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 76 | Datasource ds(data, size); | 2689 | 76 | if ( parentDs != nullptr ) { | 2690 | 76 | auto modifier = parentDs->GetData(0); | 2691 | 76 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 76 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 76 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 131 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 131 | Datasource ds(data, size); | 2689 | 131 | if ( parentDs != nullptr ) { | 2690 | 131 | auto modifier = parentDs->GetData(0); | 2691 | 131 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 131 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 131 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 115 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 115 | Datasource ds(data, size); | 2689 | 115 | if ( parentDs != nullptr ) { | 2690 | 115 | auto modifier = parentDs->GetData(0); | 2691 | 115 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 115 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 115 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 94 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 94 | Datasource ds(data, size); | 2689 | 94 | if ( parentDs != nullptr ) { | 2690 | 94 | auto modifier = parentDs->GetData(0); | 2691 | 94 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 94 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 94 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 103 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 103 | Datasource ds(data, size); | 2689 | 103 | if ( parentDs != nullptr ) { | 2690 | 103 | auto modifier = parentDs->GetData(0); | 2691 | 103 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 103 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 103 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 140 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 140 | Datasource ds(data, size); | 2689 | 140 | if ( parentDs != nullptr ) { | 2690 | 140 | auto modifier = parentDs->GetData(0); | 2691 | 140 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 140 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 140 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.60k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.60k | Datasource ds(data, size); | 2689 | 1.60k | if ( parentDs != nullptr ) { | 2690 | 1.60k | auto modifier = parentDs->GetData(0); | 2691 | 1.60k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.60k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.60k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.84k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.84k | Datasource ds(data, size); | 2689 | 1.84k | if ( parentDs != nullptr ) { | 2690 | 1.84k | auto modifier = parentDs->GetData(0); | 2691 | 1.84k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.84k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.84k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 1.93k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 1.93k | Datasource ds(data, size); | 2689 | 1.93k | if ( parentDs != nullptr ) { | 2690 | 1.93k | auto modifier = parentDs->GetData(0); | 2691 | 1.93k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 1.93k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 1.93k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 5.00k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 5.00k | Datasource ds(data, size); | 2689 | 5.00k | if ( parentDs != nullptr ) { | 2690 | 5.00k | auto modifier = parentDs->GetData(0); | 2691 | 5.00k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 5.00k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 5.00k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 95 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 95 | Datasource ds(data, size); | 2689 | 95 | if ( parentDs != nullptr ) { | 2690 | 95 | auto modifier = parentDs->GetData(0); | 2691 | 95 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 95 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 95 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::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::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 300 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 300 | Datasource ds(data, size); | 2689 | 300 | if ( parentDs != nullptr ) { | 2690 | 300 | auto modifier = parentDs->GetData(0); | 2691 | 300 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 300 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 300 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 7.54k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 7.54k | Datasource ds(data, size); | 2689 | 7.54k | if ( parentDs != nullptr ) { | 2690 | 7.54k | auto modifier = parentDs->GetData(0); | 2691 | 7.54k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 7.54k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 7.54k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 153 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 153 | Datasource ds(data, size); | 2689 | 153 | if ( parentDs != nullptr ) { | 2690 | 153 | auto modifier = parentDs->GetData(0); | 2691 | 153 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 153 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 153 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::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::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 3.02k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 3.02k | Datasource ds(data, size); | 2689 | 3.02k | if ( parentDs != nullptr ) { | 2690 | 3.02k | auto modifier = parentDs->GetData(0); | 2691 | 3.02k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 3.02k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 3.02k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 60.1k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 60.1k | Datasource ds(data, size); | 2689 | 60.1k | if ( parentDs != nullptr ) { | 2690 | 60.1k | auto modifier = parentDs->GetData(0); | 2691 | 60.1k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 60.1k | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 60.1k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 160 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 160 | Datasource ds(data, size); | 2689 | 160 | if ( parentDs != nullptr ) { | 2690 | 160 | auto modifier = parentDs->GetData(0); | 2691 | 160 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 160 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 160 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 721 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 721 | Datasource ds(data, size); | 2689 | 721 | if ( parentDs != nullptr ) { | 2690 | 721 | auto modifier = parentDs->GetData(0); | 2691 | 721 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 721 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 721 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 92 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 92 | Datasource ds(data, size); | 2689 | 92 | if ( parentDs != nullptr ) { | 2690 | 92 | auto modifier = parentDs->GetData(0); | 2691 | 92 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 92 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 92 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 103 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 103 | Datasource ds(data, size); | 2689 | 103 | if ( parentDs != nullptr ) { | 2690 | 103 | auto modifier = parentDs->GetData(0); | 2691 | 103 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 103 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 103 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 91 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 91 | Datasource ds(data, size); | 2689 | 91 | if ( parentDs != nullptr ) { | 2690 | 91 | auto modifier = parentDs->GetData(0); | 2691 | 91 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 91 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 91 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 65 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 65 | Datasource ds(data, size); | 2689 | 65 | if ( parentDs != nullptr ) { | 2690 | 65 | auto modifier = parentDs->GetData(0); | 2691 | 65 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 65 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 65 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 234 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 234 | Datasource ds(data, size); | 2689 | 234 | if ( parentDs != nullptr ) { | 2690 | 234 | auto modifier = parentDs->GetData(0); | 2691 | 234 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 234 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 234 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 156 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 156 | Datasource ds(data, size); | 2689 | 156 | if ( parentDs != nullptr ) { | 2690 | 156 | auto modifier = parentDs->GetData(0); | 2691 | 156 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 156 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 156 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 171 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 171 | Datasource ds(data, size); | 2689 | 171 | if ( parentDs != nullptr ) { | 2690 | 171 | auto modifier = parentDs->GetData(0); | 2691 | 171 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 171 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 171 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 182 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 182 | Datasource ds(data, size); | 2689 | 182 | if ( parentDs != nullptr ) { | 2690 | 182 | auto modifier = parentDs->GetData(0); | 2691 | 182 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 182 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 182 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 91 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 91 | Datasource ds(data, size); | 2689 | 91 | if ( parentDs != nullptr ) { | 2690 | 91 | auto modifier = parentDs->GetData(0); | 2691 | 91 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 91 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 91 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 83 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 83 | Datasource ds(data, size); | 2689 | 83 | if ( parentDs != nullptr ) { | 2690 | 83 | auto modifier = parentDs->GetData(0); | 2691 | 83 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 83 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 83 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 103 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 103 | Datasource ds(data, size); | 2689 | 103 | if ( parentDs != nullptr ) { | 2690 | 103 | auto modifier = parentDs->GetData(0); | 2691 | 103 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 103 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 103 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 93 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 93 | Datasource ds(data, size); | 2689 | 93 | if ( parentDs != nullptr ) { | 2690 | 93 | auto modifier = parentDs->GetData(0); | 2691 | 93 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 93 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 93 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 97 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 97 | Datasource ds(data, size); | 2689 | 97 | if ( parentDs != nullptr ) { | 2690 | 97 | auto modifier = parentDs->GetData(0); | 2691 | 97 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 97 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 97 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 83 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 83 | Datasource ds(data, size); | 2689 | 83 | if ( parentDs != nullptr ) { | 2690 | 83 | auto modifier = parentDs->GetData(0); | 2691 | 83 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 83 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 83 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 83 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 83 | Datasource ds(data, size); | 2689 | 83 | if ( parentDs != nullptr ) { | 2690 | 83 | auto modifier = parentDs->GetData(0); | 2691 | 83 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 83 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 83 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 127 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 127 | Datasource ds(data, size); | 2689 | 127 | if ( parentDs != nullptr ) { | 2690 | 127 | auto modifier = parentDs->GetData(0); | 2691 | 127 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 127 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 127 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 121 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 121 | Datasource ds(data, size); | 2689 | 121 | if ( parentDs != nullptr ) { | 2690 | 121 | auto modifier = parentDs->GetData(0); | 2691 | 121 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 121 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 121 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 82 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 82 | Datasource ds(data, size); | 2689 | 82 | if ( parentDs != nullptr ) { | 2690 | 82 | auto modifier = parentDs->GetData(0); | 2691 | 82 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 82 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 82 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 80 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 80 | Datasource ds(data, size); | 2689 | 80 | if ( parentDs != nullptr ) { | 2690 | 80 | auto modifier = parentDs->GetData(0); | 2691 | 80 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 80 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 80 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 89 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 89 | Datasource ds(data, size); | 2689 | 89 | if ( parentDs != nullptr ) { | 2690 | 89 | auto modifier = parentDs->GetData(0); | 2691 | 89 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 89 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 89 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 97 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 97 | Datasource ds(data, size); | 2689 | 97 | if ( parentDs != nullptr ) { | 2690 | 97 | auto modifier = parentDs->GetData(0); | 2691 | 97 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 97 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 97 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 91 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 91 | Datasource ds(data, size); | 2689 | 91 | if ( parentDs != nullptr ) { | 2690 | 91 | auto modifier = parentDs->GetData(0); | 2691 | 91 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 91 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 91 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 174 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 174 | Datasource ds(data, size); | 2689 | 174 | if ( parentDs != nullptr ) { | 2690 | 174 | auto modifier = parentDs->GetData(0); | 2691 | 174 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 174 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 174 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 115 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 115 | Datasource ds(data, size); | 2689 | 115 | if ( parentDs != nullptr ) { | 2690 | 115 | auto modifier = parentDs->GetData(0); | 2691 | 115 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 115 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 115 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 151 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 151 | Datasource ds(data, size); | 2689 | 151 | if ( parentDs != nullptr ) { | 2690 | 151 | auto modifier = parentDs->GetData(0); | 2691 | 151 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 151 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 151 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 127 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 127 | Datasource ds(data, size); | 2689 | 127 | if ( parentDs != nullptr ) { | 2690 | 127 | auto modifier = parentDs->GetData(0); | 2691 | 127 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 127 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 127 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 215 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 215 | Datasource ds(data, size); | 2689 | 215 | if ( parentDs != nullptr ) { | 2690 | 215 | auto modifier = parentDs->GetData(0); | 2691 | 215 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 215 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 215 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 137 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 137 | Datasource ds(data, size); | 2689 | 137 | if ( parentDs != nullptr ) { | 2690 | 137 | auto modifier = parentDs->GetData(0); | 2691 | 137 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 137 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 137 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 243 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 243 | Datasource ds(data, size); | 2689 | 243 | if ( parentDs != nullptr ) { | 2690 | 243 | auto modifier = parentDs->GetData(0); | 2691 | 243 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 243 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 243 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 162 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 162 | Datasource ds(data, size); | 2689 | 162 | if ( parentDs != nullptr ) { | 2690 | 162 | auto modifier = parentDs->GetData(0); | 2691 | 162 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 162 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 162 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 252 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 252 | Datasource ds(data, size); | 2689 | 252 | if ( parentDs != nullptr ) { | 2690 | 252 | auto modifier = parentDs->GetData(0); | 2691 | 252 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 252 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 252 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 81 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 81 | Datasource ds(data, size); | 2689 | 81 | if ( parentDs != nullptr ) { | 2690 | 81 | auto modifier = parentDs->GetData(0); | 2691 | 81 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 81 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 81 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2687 | 149 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2688 | 149 | Datasource ds(data, size); | 2689 | 149 | if ( parentDs != nullptr ) { | 2690 | 149 | auto modifier = parentDs->GetData(0); | 2691 | 149 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2692 | 149 | } else { | 2693 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2694 | 0 | } | 2695 | 149 | } |
|
2696 | | |
2697 | | template <class ResultType, class OperationType> |
2698 | 155k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { |
2699 | 155k | auto moduleID = ds.Get<uint64_t>(); |
2700 | | |
2701 | | /* Override the extracted module ID with the preferred one, if specified */ |
2702 | 155k | if ( options.forceModule != std::nullopt ) { |
2703 | 153k | moduleID = *options.forceModule; |
2704 | 153k | } |
2705 | | |
2706 | | /* Skip if this is a disabled module */ |
2707 | 155k | if ( options.disableModules.HaveExplicit(moduleID) ) { |
2708 | 0 | return nullptr; |
2709 | 0 | } |
2710 | | |
2711 | 155k | if ( modules.find(moduleID) == modules.end() ) { |
2712 | 0 | return nullptr; |
2713 | 0 | } |
2714 | | |
2715 | 155k | return modules.at(moduleID); |
2716 | 155k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.19k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.19k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.19k | if ( options.forceModule != std::nullopt ) { | 2703 | 1.18k | moduleID = *options.forceModule; | 2704 | 1.18k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.19k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.19k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 1.19k | return modules.at(moduleID); | 2716 | 1.19k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 949 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 949 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 949 | if ( options.forceModule != std::nullopt ) { | 2703 | 943 | moduleID = *options.forceModule; | 2704 | 943 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 949 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 949 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 949 | return modules.at(moduleID); | 2716 | 949 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 247 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 247 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 247 | if ( options.forceModule != std::nullopt ) { | 2703 | 240 | moduleID = *options.forceModule; | 2704 | 240 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 247 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 247 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 247 | return modules.at(moduleID); | 2716 | 247 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.15k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.15k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.15k | if ( options.forceModule != std::nullopt ) { | 2703 | 1.14k | moduleID = *options.forceModule; | 2704 | 1.14k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.15k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.15k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 1.15k | return modules.at(moduleID); | 2716 | 1.15k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 3.97k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 3.97k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 3.97k | if ( options.forceModule != std::nullopt ) { | 2703 | 3.96k | moduleID = *options.forceModule; | 2704 | 3.96k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 3.97k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 3.97k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 3.97k | return modules.at(moduleID); | 2716 | 3.97k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.75k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.75k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.75k | if ( options.forceModule != std::nullopt ) { | 2703 | 1.74k | moduleID = *options.forceModule; | 2704 | 1.74k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.75k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.75k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 1.75k | return modules.at(moduleID); | 2716 | 1.75k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 275 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 275 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 275 | if ( options.forceModule != std::nullopt ) { | 2703 | 270 | moduleID = *options.forceModule; | 2704 | 270 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 275 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 275 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 275 | return modules.at(moduleID); | 2716 | 275 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 971 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 971 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 971 | if ( options.forceModule != std::nullopt ) { | 2703 | 965 | moduleID = *options.forceModule; | 2704 | 965 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 971 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 971 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 971 | return modules.at(moduleID); | 2716 | 971 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 309 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 309 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 309 | if ( options.forceModule != std::nullopt ) { | 2703 | 303 | moduleID = *options.forceModule; | 2704 | 303 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 309 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 309 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 309 | return modules.at(moduleID); | 2716 | 309 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 296 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 296 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 296 | if ( options.forceModule != std::nullopt ) { | 2703 | 291 | moduleID = *options.forceModule; | 2704 | 291 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 296 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 296 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 296 | return modules.at(moduleID); | 2716 | 296 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 333 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 333 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 333 | if ( options.forceModule != std::nullopt ) { | 2703 | 327 | moduleID = *options.forceModule; | 2704 | 327 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 333 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 333 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 333 | return modules.at(moduleID); | 2716 | 333 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 790 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 790 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 790 | if ( options.forceModule != std::nullopt ) { | 2703 | 784 | moduleID = *options.forceModule; | 2704 | 784 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 790 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 790 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 790 | return modules.at(moduleID); | 2716 | 790 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 31 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 31 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 31 | if ( options.forceModule != std::nullopt ) { | 2703 | 28 | moduleID = *options.forceModule; | 2704 | 28 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 31 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 31 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 31 | return modules.at(moduleID); | 2716 | 31 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 327 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 327 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 327 | if ( options.forceModule != std::nullopt ) { | 2703 | 318 | moduleID = *options.forceModule; | 2704 | 318 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 327 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 327 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 327 | return modules.at(moduleID); | 2716 | 327 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 305 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 305 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 305 | if ( options.forceModule != std::nullopt ) { | 2703 | 299 | moduleID = *options.forceModule; | 2704 | 299 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 305 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 305 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 305 | return modules.at(moduleID); | 2716 | 305 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 22 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 22 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 22 | if ( options.forceModule != std::nullopt ) { | 2703 | 20 | moduleID = *options.forceModule; | 2704 | 20 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 22 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 22 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 22 | return modules.at(moduleID); | 2716 | 22 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 335 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 335 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 335 | if ( options.forceModule != std::nullopt ) { | 2703 | 327 | moduleID = *options.forceModule; | 2704 | 327 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 335 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 335 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 335 | return modules.at(moduleID); | 2716 | 335 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 351 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 351 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 351 | if ( options.forceModule != std::nullopt ) { | 2703 | 343 | moduleID = *options.forceModule; | 2704 | 343 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 351 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 351 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 351 | return modules.at(moduleID); | 2716 | 351 | } |
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 265 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 265 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 265 | if ( options.forceModule != std::nullopt ) { | 2703 | 261 | moduleID = *options.forceModule; | 2704 | 261 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 265 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 265 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 265 | return modules.at(moduleID); | 2716 | 265 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 9.41k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 9.41k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 9.41k | if ( options.forceModule != std::nullopt ) { | 2703 | 9.34k | moduleID = *options.forceModule; | 2704 | 9.34k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 9.41k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 9.41k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 9.41k | return modules.at(moduleID); | 2716 | 9.41k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 6.17k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 6.17k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 6.17k | if ( options.forceModule != std::nullopt ) { | 2703 | 6.02k | moduleID = *options.forceModule; | 2704 | 6.02k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 6.17k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 6.17k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 6.17k | return modules.at(moduleID); | 2716 | 6.17k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 9.24k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 9.24k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 9.24k | if ( options.forceModule != std::nullopt ) { | 2703 | 9.16k | moduleID = *options.forceModule; | 2704 | 9.16k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 9.24k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 9.24k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 9.24k | return modules.at(moduleID); | 2716 | 9.24k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.15k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.15k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.15k | if ( options.forceModule != std::nullopt ) { | 2703 | 1.12k | moduleID = *options.forceModule; | 2704 | 1.12k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.15k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.15k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 1.15k | return modules.at(moduleID); | 2716 | 1.15k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 11.2k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 11.2k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 11.2k | if ( options.forceModule != std::nullopt ) { | 2703 | 11.2k | moduleID = *options.forceModule; | 2704 | 11.2k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 11.2k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 11.2k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 11.2k | return modules.at(moduleID); | 2716 | 11.2k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 84 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 84 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 84 | if ( options.forceModule != std::nullopt ) { | 2703 | 80 | moduleID = *options.forceModule; | 2704 | 80 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 84 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 84 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 84 | return modules.at(moduleID); | 2716 | 84 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 86 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 86 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 86 | if ( options.forceModule != std::nullopt ) { | 2703 | 82 | moduleID = *options.forceModule; | 2704 | 82 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 86 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 86 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 86 | return modules.at(moduleID); | 2716 | 86 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 77 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 77 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 77 | if ( options.forceModule != std::nullopt ) { | 2703 | 72 | moduleID = *options.forceModule; | 2704 | 72 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 77 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 77 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 77 | return modules.at(moduleID); | 2716 | 77 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 719 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 719 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 719 | if ( options.forceModule != std::nullopt ) { | 2703 | 687 | moduleID = *options.forceModule; | 2704 | 687 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 719 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 719 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 719 | return modules.at(moduleID); | 2716 | 719 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 6.98k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 6.98k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 6.98k | if ( options.forceModule != std::nullopt ) { | 2703 | 6.94k | moduleID = *options.forceModule; | 2704 | 6.94k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 6.98k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 6.98k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 6.98k | return modules.at(moduleID); | 2716 | 6.98k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 69 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 69 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 69 | if ( options.forceModule != std::nullopt ) { | 2703 | 64 | moduleID = *options.forceModule; | 2704 | 64 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 69 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 69 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 69 | return modules.at(moduleID); | 2716 | 69 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 71 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 71 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 71 | if ( options.forceModule != std::nullopt ) { | 2703 | 66 | moduleID = *options.forceModule; | 2704 | 66 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 71 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 71 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 71 | return modules.at(moduleID); | 2716 | 71 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 68 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 68 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 68 | if ( options.forceModule != std::nullopt ) { | 2703 | 64 | moduleID = *options.forceModule; | 2704 | 64 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 68 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 68 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 68 | return modules.at(moduleID); | 2716 | 68 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 71 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 71 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 71 | if ( options.forceModule != std::nullopt ) { | 2703 | 65 | moduleID = *options.forceModule; | 2704 | 65 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 71 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 71 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 71 | return modules.at(moduleID); | 2716 | 71 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 120 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 120 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 120 | if ( options.forceModule != std::nullopt ) { | 2703 | 117 | moduleID = *options.forceModule; | 2704 | 117 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 120 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 120 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 120 | return modules.at(moduleID); | 2716 | 120 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 107 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 107 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 107 | if ( options.forceModule != std::nullopt ) { | 2703 | 101 | moduleID = *options.forceModule; | 2704 | 101 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 107 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 107 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 107 | return modules.at(moduleID); | 2716 | 107 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 89 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 89 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 89 | if ( options.forceModule != std::nullopt ) { | 2703 | 81 | moduleID = *options.forceModule; | 2704 | 81 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 89 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 89 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 89 | return modules.at(moduleID); | 2716 | 89 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 85 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 85 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 85 | if ( options.forceModule != std::nullopt ) { | 2703 | 79 | moduleID = *options.forceModule; | 2704 | 79 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 85 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 85 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 85 | return modules.at(moduleID); | 2716 | 85 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 131 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 131 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 131 | if ( options.forceModule != std::nullopt ) { | 2703 | 126 | moduleID = *options.forceModule; | 2704 | 126 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 131 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 131 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 131 | return modules.at(moduleID); | 2716 | 131 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.54k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.54k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.54k | if ( options.forceModule != std::nullopt ) { | 2703 | 1.51k | moduleID = *options.forceModule; | 2704 | 1.51k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.54k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.54k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 1.54k | return modules.at(moduleID); | 2716 | 1.54k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.76k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.76k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.76k | if ( options.forceModule != std::nullopt ) { | 2703 | 1.71k | moduleID = *options.forceModule; | 2704 | 1.71k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.76k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.76k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 1.76k | return modules.at(moduleID); | 2716 | 1.76k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 1.85k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 1.85k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 1.85k | if ( options.forceModule != std::nullopt ) { | 2703 | 1.79k | moduleID = *options.forceModule; | 2704 | 1.79k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 1.85k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 1.85k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 1.85k | return modules.at(moduleID); | 2716 | 1.85k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.85k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.85k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.85k | if ( options.forceModule != std::nullopt ) { | 2703 | 4.77k | moduleID = *options.forceModule; | 2704 | 4.77k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.85k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.85k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 4.85k | return modules.at(moduleID); | 2716 | 4.85k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 87 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 87 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 87 | if ( options.forceModule != std::nullopt ) { | 2703 | 81 | moduleID = *options.forceModule; | 2704 | 81 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 87 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 87 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 87 | return modules.at(moduleID); | 2716 | 87 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 4.83k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 4.83k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 4.83k | if ( options.forceModule != std::nullopt ) { | 2703 | 4.79k | moduleID = *options.forceModule; | 2704 | 4.79k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 4.83k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 4.83k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 4.83k | return modules.at(moduleID); | 2716 | 4.83k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 295 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 295 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 295 | if ( options.forceModule != std::nullopt ) { | 2703 | 291 | moduleID = *options.forceModule; | 2704 | 291 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 295 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 295 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 295 | return modules.at(moduleID); | 2716 | 295 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 7.39k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 7.39k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 7.39k | if ( options.forceModule != std::nullopt ) { | 2703 | 7.30k | moduleID = *options.forceModule; | 2704 | 7.30k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 7.39k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 7.39k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 7.39k | return modules.at(moduleID); | 2716 | 7.39k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 147 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 147 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 147 | if ( options.forceModule != std::nullopt ) { | 2703 | 140 | moduleID = *options.forceModule; | 2704 | 140 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 147 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 147 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 147 | return modules.at(moduleID); | 2716 | 147 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_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 | 4.68k | moduleID = *options.forceModule; | 2704 | 4.68k | } | 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 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 4.78k | return modules.at(moduleID); | 2716 | 4.78k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 2.90k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 2.90k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 2.90k | if ( options.forceModule != std::nullopt ) { | 2703 | 2.82k | moduleID = *options.forceModule; | 2704 | 2.82k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 2.90k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 2.90k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 2.90k | return modules.at(moduleID); | 2716 | 2.90k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 60.0k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 60.0k | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 60.0k | if ( options.forceModule != std::nullopt ) { | 2703 | 59.9k | moduleID = *options.forceModule; | 2704 | 59.9k | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 60.0k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 60.0k | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 60.0k | return modules.at(moduleID); | 2716 | 60.0k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 150 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 150 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 150 | if ( options.forceModule != std::nullopt ) { | 2703 | 146 | moduleID = *options.forceModule; | 2704 | 146 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 150 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 150 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 150 | return modules.at(moduleID); | 2716 | 150 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 707 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 707 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 707 | if ( options.forceModule != std::nullopt ) { | 2703 | 702 | moduleID = *options.forceModule; | 2704 | 702 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 707 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 707 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 707 | return modules.at(moduleID); | 2716 | 707 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 85 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 85 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 85 | if ( options.forceModule != std::nullopt ) { | 2703 | 81 | moduleID = *options.forceModule; | 2704 | 81 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 85 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 85 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 85 | return modules.at(moduleID); | 2716 | 85 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 97 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 97 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 97 | if ( options.forceModule != std::nullopt ) { | 2703 | 93 | moduleID = *options.forceModule; | 2704 | 93 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 97 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 97 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 97 | return modules.at(moduleID); | 2716 | 97 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 81 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 81 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 81 | if ( options.forceModule != std::nullopt ) { | 2703 | 77 | moduleID = *options.forceModule; | 2704 | 77 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 81 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 81 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 81 | return modules.at(moduleID); | 2716 | 81 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 55 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 55 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 55 | if ( options.forceModule != std::nullopt ) { | 2703 | 52 | moduleID = *options.forceModule; | 2704 | 52 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 55 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 55 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 55 | return modules.at(moduleID); | 2716 | 55 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 173 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 173 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 173 | if ( options.forceModule != std::nullopt ) { | 2703 | 146 | moduleID = *options.forceModule; | 2704 | 146 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 173 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 173 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 173 | return modules.at(moduleID); | 2716 | 173 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 128 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 128 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 128 | if ( options.forceModule != std::nullopt ) { | 2703 | 114 | moduleID = *options.forceModule; | 2704 | 114 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 128 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 128 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 128 | return modules.at(moduleID); | 2716 | 128 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 124 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 124 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 124 | if ( options.forceModule != std::nullopt ) { | 2703 | 110 | moduleID = *options.forceModule; | 2704 | 110 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 124 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 124 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 124 | return modules.at(moduleID); | 2716 | 124 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 133 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 133 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 133 | if ( options.forceModule != std::nullopt ) { | 2703 | 119 | moduleID = *options.forceModule; | 2704 | 119 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 133 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 133 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 133 | return modules.at(moduleID); | 2716 | 133 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 82 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 82 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 82 | if ( options.forceModule != std::nullopt ) { | 2703 | 78 | moduleID = *options.forceModule; | 2704 | 78 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 82 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 82 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 82 | return modules.at(moduleID); | 2716 | 82 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 73 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 73 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 73 | if ( options.forceModule != std::nullopt ) { | 2703 | 68 | moduleID = *options.forceModule; | 2704 | 68 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 73 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 73 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 73 | return modules.at(moduleID); | 2716 | 73 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 91 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 91 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 91 | if ( options.forceModule != std::nullopt ) { | 2703 | 87 | moduleID = *options.forceModule; | 2704 | 87 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 91 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 91 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 91 | return modules.at(moduleID); | 2716 | 91 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 85 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 85 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 85 | if ( options.forceModule != std::nullopt ) { | 2703 | 81 | moduleID = *options.forceModule; | 2704 | 81 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 85 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 85 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 85 | return modules.at(moduleID); | 2716 | 85 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 89 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 89 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 89 | if ( options.forceModule != std::nullopt ) { | 2703 | 85 | moduleID = *options.forceModule; | 2704 | 85 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 89 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 89 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 89 | return modules.at(moduleID); | 2716 | 89 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 78 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 78 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 78 | if ( options.forceModule != std::nullopt ) { | 2703 | 73 | moduleID = *options.forceModule; | 2704 | 73 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 78 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 78 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 78 | return modules.at(moduleID); | 2716 | 78 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 77 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 77 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 77 | if ( options.forceModule != std::nullopt ) { | 2703 | 73 | moduleID = *options.forceModule; | 2704 | 73 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 77 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 77 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 77 | return modules.at(moduleID); | 2716 | 77 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 120 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 120 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 120 | if ( options.forceModule != std::nullopt ) { | 2703 | 113 | moduleID = *options.forceModule; | 2704 | 113 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 120 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 120 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 120 | return modules.at(moduleID); | 2716 | 120 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 114 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 114 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 114 | if ( options.forceModule != std::nullopt ) { | 2703 | 109 | moduleID = *options.forceModule; | 2704 | 109 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 114 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 114 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 114 | return modules.at(moduleID); | 2716 | 114 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 76 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 76 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 76 | if ( options.forceModule != std::nullopt ) { | 2703 | 72 | moduleID = *options.forceModule; | 2704 | 72 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 76 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 76 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 76 | return modules.at(moduleID); | 2716 | 76 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 76 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 76 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 76 | if ( options.forceModule != std::nullopt ) { | 2703 | 72 | moduleID = *options.forceModule; | 2704 | 72 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 76 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 76 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 76 | return modules.at(moduleID); | 2716 | 76 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 83 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 83 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 83 | if ( options.forceModule != std::nullopt ) { | 2703 | 79 | moduleID = *options.forceModule; | 2704 | 79 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 83 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 83 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 83 | return modules.at(moduleID); | 2716 | 83 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 91 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 91 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 91 | if ( options.forceModule != std::nullopt ) { | 2703 | 83 | moduleID = *options.forceModule; | 2704 | 83 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 91 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 91 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 91 | return modules.at(moduleID); | 2716 | 91 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 84 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 84 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 84 | if ( options.forceModule != std::nullopt ) { | 2703 | 80 | moduleID = *options.forceModule; | 2704 | 80 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 84 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 84 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 84 | return modules.at(moduleID); | 2716 | 84 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 167 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 167 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 167 | if ( options.forceModule != std::nullopt ) { | 2703 | 163 | moduleID = *options.forceModule; | 2704 | 163 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 167 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 167 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 167 | return modules.at(moduleID); | 2716 | 167 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 109 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 109 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 109 | if ( options.forceModule != std::nullopt ) { | 2703 | 106 | moduleID = *options.forceModule; | 2704 | 106 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 109 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 109 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 109 | return modules.at(moduleID); | 2716 | 109 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 145 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 145 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 145 | if ( options.forceModule != std::nullopt ) { | 2703 | 141 | moduleID = *options.forceModule; | 2704 | 141 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 145 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 145 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 145 | return modules.at(moduleID); | 2716 | 145 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 121 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 121 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 121 | if ( options.forceModule != std::nullopt ) { | 2703 | 113 | moduleID = *options.forceModule; | 2704 | 113 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 121 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 121 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 121 | return modules.at(moduleID); | 2716 | 121 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 205 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 205 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 205 | if ( options.forceModule != std::nullopt ) { | 2703 | 202 | moduleID = *options.forceModule; | 2704 | 202 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 205 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 205 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 205 | return modules.at(moduleID); | 2716 | 205 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 129 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 129 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 129 | if ( options.forceModule != std::nullopt ) { | 2703 | 124 | moduleID = *options.forceModule; | 2704 | 124 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 129 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 129 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 129 | return modules.at(moduleID); | 2716 | 129 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 232 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 232 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 232 | if ( options.forceModule != std::nullopt ) { | 2703 | 227 | moduleID = *options.forceModule; | 2704 | 227 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 232 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 232 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 232 | return modules.at(moduleID); | 2716 | 232 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 155 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 155 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 155 | if ( options.forceModule != std::nullopt ) { | 2703 | 149 | moduleID = *options.forceModule; | 2704 | 149 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 155 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 155 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 155 | return modules.at(moduleID); | 2716 | 155 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 215 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 215 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 215 | if ( options.forceModule != std::nullopt ) { | 2703 | 194 | moduleID = *options.forceModule; | 2704 | 194 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 215 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 215 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 215 | return modules.at(moduleID); | 2716 | 215 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 75 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 75 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 75 | if ( options.forceModule != std::nullopt ) { | 2703 | 71 | moduleID = *options.forceModule; | 2704 | 71 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 75 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 75 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 75 | return modules.at(moduleID); | 2716 | 75 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2698 | 132 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2699 | 132 | auto moduleID = ds.Get<uint64_t>(); | 2700 | | | 2701 | | /* Override the extracted module ID with the preferred one, if specified */ | 2702 | 132 | if ( options.forceModule != std::nullopt ) { | 2703 | 106 | moduleID = *options.forceModule; | 2704 | 106 | } | 2705 | | | 2706 | | /* Skip if this is a disabled module */ | 2707 | 132 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2708 | 0 | return nullptr; | 2709 | 0 | } | 2710 | | | 2711 | 132 | if ( modules.find(moduleID) == modules.end() ) { | 2712 | 0 | return nullptr; | 2713 | 0 | } | 2714 | | | 2715 | 132 | return modules.at(moduleID); | 2716 | 132 | } |
|
2717 | | |
2718 | | template <class ResultType, class OperationType> |
2719 | 101k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { |
2720 | 101k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; |
2721 | | |
2722 | 101k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; |
2723 | | |
2724 | 157k | do { |
2725 | 157k | auto op = getOp(&parentDs, data, size); |
2726 | 157k | auto module = getModule(parentDs); |
2727 | 157k | if ( module == nullptr ) { |
2728 | 0 | continue; |
2729 | 0 | } |
2730 | | |
2731 | 157k | operations.push_back( {module, op} ); |
2732 | | |
2733 | | /* Limit number of operations per run to prevent time-outs */ |
2734 | 157k | if ( operations.size() == OperationType::MaxOperations() ) { |
2735 | 1.98k | break; |
2736 | 1.98k | } |
2737 | 157k | } while ( parentDs.Get<bool>() == true ); |
2738 | | |
2739 | 101k | if ( operations.empty() == true ) { |
2740 | 0 | return; |
2741 | 0 | } |
2742 | | |
2743 | | /* Enable this to run every operation on every loaded module */ |
2744 | 101k | #if 1 |
2745 | 101k | { |
2746 | 101k | std::set<uint64_t> moduleIDs; |
2747 | 101k | for (const auto& m : modules ) { |
2748 | 97.1k | const auto moduleID = m.first; |
2749 | | |
2750 | | /* Skip if this is a disabled module */ |
2751 | 97.1k | if ( options.disableModules.HaveExplicit(moduleID) ) { |
2752 | 0 | continue; |
2753 | 0 | } |
2754 | | |
2755 | 97.1k | moduleIDs.insert(moduleID); |
2756 | 97.1k | } |
2757 | | |
2758 | 101k | std::set<uint64_t> operationModuleIDs; |
2759 | 146k | for (const auto& op : operations) { |
2760 | 146k | operationModuleIDs.insert(op.first->ID); |
2761 | 146k | } |
2762 | | |
2763 | 101k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); |
2764 | 101k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); |
2765 | 101k | addModuleIDs.resize(it - addModuleIDs.begin()); |
2766 | | |
2767 | 101k | for (const auto& id : addModuleIDs) { |
2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); |
2769 | 0 | } |
2770 | 101k | } |
2771 | 101k | #endif |
2772 | | |
2773 | 101k | if ( operations.size() < options.minModules ) { |
2774 | 0 | return; |
2775 | 0 | } |
2776 | | |
2777 | 101k | if ( options.debug == true && !operations.empty() ) { |
2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); |
2779 | 0 | } |
2780 | 248k | for (size_t i = 0; i < operations.size(); i++) { |
2781 | 146k | auto& operation = operations[i]; |
2782 | | |
2783 | 146k | auto& module = operation.first; |
2784 | 146k | auto& op = operation.second; |
2785 | | |
2786 | 146k | if ( i > 0 ) { |
2787 | 49.3k | auto& prevModule = operations[i-1].first; |
2788 | 49.3k | auto& prevOp = operations[i-1].second; |
2789 | | |
2790 | 49.3k | if ( prevModule == module && prevOp.modifier == op.modifier ) { |
2791 | 16.8k | auto& curModifier = op.modifier.GetVectorPtr(); |
2792 | 16.8k | if ( curModifier.size() == 0 ) { |
2793 | 4.40M | for (size_t j = 0; j < 512; j++) { |
2794 | 4.39M | curModifier.push_back(1); |
2795 | 4.39M | } |
2796 | 8.58k | } else { |
2797 | 1.20M | for (auto& c : curModifier) { |
2798 | 1.20M | c++; |
2799 | 1.20M | } |
2800 | 8.25k | } |
2801 | 16.8k | } |
2802 | 49.3k | } |
2803 | | |
2804 | 146k | if ( options.debug == true ) { |
2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); |
2806 | 0 | } |
2807 | | |
2808 | 146k | results.push_back( {module, std::move(callModule(module, op))} ); |
2809 | | |
2810 | 146k | const auto& result = results.back(); |
2811 | | |
2812 | 146k | if ( result.second != std::nullopt ) { |
2813 | 48.5k | if ( options.jsonDumpFP != std::nullopt ) { |
2814 | 0 | nlohmann::json j; |
2815 | 0 | j["operation"] = op.ToJSON(); |
2816 | 0 | j["result"] = util::ToJSON(*result.second); |
2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); |
2818 | 0 | } |
2819 | 48.5k | } |
2820 | | |
2821 | 146k | if ( options.debug == true ) { |
2822 | 0 | printf("Module %s result:\n\n%s\n\n", |
2823 | 0 | result.first->name.c_str(), |
2824 | 0 | result.second == std::nullopt ? |
2825 | 0 | "(empty)" : |
2826 | 0 | util::ToString(*result.second).c_str()); |
2827 | 0 | } |
2828 | | |
2829 | 146k | if ( options.disableTests == false ) { |
2830 | 146k | tests::test(op, result.second); |
2831 | 146k | } |
2832 | | |
2833 | 146k | postprocess(module, op, result); |
2834 | 146k | } |
2835 | | |
2836 | 101k | if ( options.noCompare == false ) { |
2837 | 97.0k | compare(operations, results, data, size); |
2838 | 97.0k | } |
2839 | 101k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::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 | 1.20k | do { | 2725 | 1.20k | auto op = getOp(&parentDs, data, size); | 2726 | 1.20k | auto module = getModule(parentDs); | 2727 | 1.20k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 1.20k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.20k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 1.20k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 357 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 357 | #if 1 | 2745 | 357 | { | 2746 | 357 | std::set<uint64_t> moduleIDs; | 2747 | 357 | for (const auto& m : modules ) { | 2748 | 327 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 327 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 327 | moduleIDs.insert(moduleID); | 2756 | 327 | } | 2757 | | | 2758 | 357 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.00k | for (const auto& op : operations) { | 2760 | 1.00k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.00k | } | 2762 | | | 2763 | 357 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 357 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 357 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 357 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 357 | } | 2771 | 357 | #endif | 2772 | | | 2773 | 357 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 357 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.36k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.00k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.00k | auto& module = operation.first; | 2784 | 1.00k | auto& op = operation.second; | 2785 | | | 2786 | 1.00k | if ( i > 0 ) { | 2787 | 677 | auto& prevModule = operations[i-1].first; | 2788 | 677 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 677 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 306 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 306 | if ( curModifier.size() == 0 ) { | 2793 | 120k | for (size_t j = 0; j < 512; j++) { | 2794 | 120k | curModifier.push_back(1); | 2795 | 120k | } | 2796 | 235 | } else { | 2797 | 145k | for (auto& c : curModifier) { | 2798 | 145k | c++; | 2799 | 145k | } | 2800 | 71 | } | 2801 | 306 | } | 2802 | 677 | } | 2803 | | | 2804 | 1.00k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.00k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.00k | const auto& result = results.back(); | 2811 | | | 2812 | 1.00k | if ( result.second != std::nullopt ) { | 2813 | 744 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 744 | } | 2820 | | | 2821 | 1.00k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->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.00k | if ( options.disableTests == false ) { | 2830 | 1.00k | tests::test(op, result.second); | 2831 | 1.00k | } | 2832 | | | 2833 | 1.00k | postprocess(module, op, result); | 2834 | 1.00k | } | 2835 | | | 2836 | 357 | if ( options.noCompare == false ) { | 2837 | 327 | compare(operations, results, data, size); | 2838 | 327 | } | 2839 | 357 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 229 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 229 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 229 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 959 | do { | 2725 | 959 | auto op = getOp(&parentDs, data, size); | 2726 | 959 | auto module = getModule(parentDs); | 2727 | 959 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 959 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 959 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 959 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 229 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 229 | #if 1 | 2745 | 229 | { | 2746 | 229 | std::set<uint64_t> moduleIDs; | 2747 | 229 | 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 | 229 | std::set<uint64_t> operationModuleIDs; | 2759 | 826 | for (const auto& op : operations) { | 2760 | 826 | operationModuleIDs.insert(op.first->ID); | 2761 | 826 | } | 2762 | | | 2763 | 229 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 229 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 229 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 229 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 229 | } | 2771 | 229 | #endif | 2772 | | | 2773 | 229 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 229 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.05k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 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 | 620 | auto& prevModule = operations[i-1].first; | 2788 | 620 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 620 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 255 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 255 | if ( curModifier.size() == 0 ) { | 2793 | 101k | for (size_t j = 0; j < 512; j++) { | 2794 | 101k | curModifier.push_back(1); | 2795 | 101k | } | 2796 | 198 | } else { | 2797 | 6.08k | for (auto& c : curModifier) { | 2798 | 6.08k | c++; | 2799 | 6.08k | } | 2800 | 57 | } | 2801 | 255 | } | 2802 | 620 | } | 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 | 412 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 412 | } | 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 | 229 | if ( options.noCompare == false ) { | 2837 | 206 | compare(operations, results, data, size); | 2838 | 206 | } | 2839 | 229 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 52 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 52 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 52 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 257 | do { | 2725 | 257 | auto op = getOp(&parentDs, data, size); | 2726 | 257 | auto module = getModule(parentDs); | 2727 | 257 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 257 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 257 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 257 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 52 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 52 | #if 1 | 2745 | 52 | { | 2746 | 52 | std::set<uint64_t> moduleIDs; | 2747 | 52 | for (const auto& m : modules ) { | 2748 | 26 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 26 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 26 | moduleIDs.insert(moduleID); | 2756 | 26 | } | 2757 | | | 2758 | 52 | std::set<uint64_t> operationModuleIDs; | 2759 | 147 | for (const auto& op : operations) { | 2760 | 147 | operationModuleIDs.insert(op.first->ID); | 2761 | 147 | } | 2762 | | | 2763 | 52 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 52 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 52 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 52 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 52 | } | 2771 | 52 | #endif | 2772 | | | 2773 | 52 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 52 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 199 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 147 | auto& operation = operations[i]; | 2782 | | | 2783 | 147 | auto& module = operation.first; | 2784 | 147 | auto& op = operation.second; | 2785 | | | 2786 | 147 | if ( i > 0 ) { | 2787 | 121 | auto& prevModule = operations[i-1].first; | 2788 | 121 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 121 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 63 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 63 | if ( curModifier.size() == 0 ) { | 2793 | 23.5k | for (size_t j = 0; j < 512; j++) { | 2794 | 23.5k | curModifier.push_back(1); | 2795 | 23.5k | } | 2796 | 46 | } else { | 2797 | 1.03k | for (auto& c : curModifier) { | 2798 | 1.03k | c++; | 2799 | 1.03k | } | 2800 | 17 | } | 2801 | 63 | } | 2802 | 121 | } | 2803 | | | 2804 | 147 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 147 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 147 | const auto& result = results.back(); | 2811 | | | 2812 | 147 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 147 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 147 | if ( options.disableTests == false ) { | 2830 | 147 | tests::test(op, result.second); | 2831 | 147 | } | 2832 | | | 2833 | 147 | postprocess(module, op, result); | 2834 | 147 | } | 2835 | | | 2836 | 52 | if ( options.noCompare == false ) { | 2837 | 26 | compare(operations, results, data, size); | 2838 | 26 | } | 2839 | 52 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 448 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 448 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 448 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.16k | do { | 2725 | 1.16k | auto op = getOp(&parentDs, data, size); | 2726 | 1.16k | auto module = getModule(parentDs); | 2727 | 1.16k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 1.16k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.16k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 1.16k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 448 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 448 | #if 1 | 2745 | 448 | { | 2746 | 448 | std::set<uint64_t> moduleIDs; | 2747 | 448 | for (const auto& m : modules ) { | 2748 | 427 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 427 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 427 | moduleIDs.insert(moduleID); | 2756 | 427 | } | 2757 | | | 2758 | 448 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.06k | for (const auto& op : operations) { | 2760 | 1.06k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.06k | } | 2762 | | | 2763 | 448 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 448 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 448 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 448 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 448 | } | 2771 | 448 | #endif | 2772 | | | 2773 | 448 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 448 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.51k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.06k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.06k | auto& module = operation.first; | 2784 | 1.06k | auto& op = operation.second; | 2785 | | | 2786 | 1.06k | if ( i > 0 ) { | 2787 | 642 | auto& prevModule = operations[i-1].first; | 2788 | 642 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 642 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 307 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 307 | if ( curModifier.size() == 0 ) { | 2793 | 128k | for (size_t j = 0; j < 512; j++) { | 2794 | 128k | curModifier.push_back(1); | 2795 | 128k | } | 2796 | 251 | } else { | 2797 | 1.96k | for (auto& c : curModifier) { | 2798 | 1.96k | c++; | 2799 | 1.96k | } | 2800 | 56 | } | 2801 | 307 | } | 2802 | 642 | } | 2803 | | | 2804 | 1.06k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.06k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.06k | const auto& result = results.back(); | 2811 | | | 2812 | 1.06k | if ( result.second != std::nullopt ) { | 2813 | 259 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 259 | } | 2820 | | | 2821 | 1.06k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->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.06k | if ( options.disableTests == false ) { | 2830 | 1.06k | tests::test(op, result.second); | 2831 | 1.06k | } | 2832 | | | 2833 | 1.06k | postprocess(module, op, result); | 2834 | 1.06k | } | 2835 | | | 2836 | 448 | if ( options.noCompare == false ) { | 2837 | 427 | compare(operations, results, data, size); | 2838 | 427 | } | 2839 | 448 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.48k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.48k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.48k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.98k | do { | 2725 | 3.98k | auto op = getOp(&parentDs, data, size); | 2726 | 3.98k | auto module = getModule(parentDs); | 2727 | 3.98k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 3.98k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 3.98k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 3.98k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.48k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 1.48k | #if 1 | 2745 | 1.48k | { | 2746 | 1.48k | std::set<uint64_t> moduleIDs; | 2747 | 1.48k | for (const auto& m : modules ) { | 2748 | 1.44k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.44k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.44k | moduleIDs.insert(moduleID); | 2756 | 1.44k | } | 2757 | | | 2758 | 1.48k | std::set<uint64_t> operationModuleIDs; | 2759 | 3.82k | for (const auto& op : operations) { | 2760 | 3.82k | operationModuleIDs.insert(op.first->ID); | 2761 | 3.82k | } | 2762 | | | 2763 | 1.48k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 1.48k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 1.48k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 1.48k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 1.48k | } | 2771 | 1.48k | #endif | 2772 | | | 2773 | 1.48k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 1.48k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 5.30k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 3.82k | auto& operation = operations[i]; | 2782 | | | 2783 | 3.82k | auto& module = operation.first; | 2784 | 3.82k | auto& op = operation.second; | 2785 | | | 2786 | 3.82k | if ( i > 0 ) { | 2787 | 2.38k | auto& prevModule = operations[i-1].first; | 2788 | 2.38k | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 2.38k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 944 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 944 | if ( curModifier.size() == 0 ) { | 2793 | 376k | for (size_t j = 0; j < 512; j++) { | 2794 | 375k | curModifier.push_back(1); | 2795 | 375k | } | 2796 | 733 | } else { | 2797 | 3.39k | for (auto& c : curModifier) { | 2798 | 3.39k | c++; | 2799 | 3.39k | } | 2800 | 211 | } | 2801 | 944 | } | 2802 | 2.38k | } | 2803 | | | 2804 | 3.82k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 3.82k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 3.82k | const auto& result = results.back(); | 2811 | | | 2812 | 3.82k | if ( result.second != std::nullopt ) { | 2813 | 1.67k | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = 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.67k | } | 2820 | | | 2821 | 3.82k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->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.82k | if ( options.disableTests == false ) { | 2830 | 3.82k | tests::test(op, result.second); | 2831 | 3.82k | } | 2832 | | | 2833 | 3.82k | postprocess(module, op, result); | 2834 | 3.82k | } | 2835 | | | 2836 | 1.48k | if ( options.noCompare == false ) { | 2837 | 1.44k | compare(operations, results, data, size); | 2838 | 1.44k | } | 2839 | 1.48k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 688 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 688 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 688 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.76k | do { | 2725 | 1.76k | auto op = getOp(&parentDs, data, size); | 2726 | 1.76k | auto module = getModule(parentDs); | 2727 | 1.76k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 1.76k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.76k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 1.76k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 688 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 688 | #if 1 | 2745 | 688 | { | 2746 | 688 | std::set<uint64_t> moduleIDs; | 2747 | 688 | for (const auto& m : modules ) { | 2748 | 646 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 646 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 646 | moduleIDs.insert(moduleID); | 2756 | 646 | } | 2757 | | | 2758 | 688 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.60k | for (const auto& op : operations) { | 2760 | 1.60k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.60k | } | 2762 | | | 2763 | 688 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 688 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 688 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 688 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 688 | } | 2771 | 688 | #endif | 2772 | | | 2773 | 688 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 688 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 2.29k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.60k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.60k | auto& module = operation.first; | 2784 | 1.60k | auto& op = operation.second; | 2785 | | | 2786 | 1.60k | if ( i > 0 ) { | 2787 | 962 | auto& prevModule = operations[i-1].first; | 2788 | 962 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 962 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 446 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 446 | if ( curModifier.size() == 0 ) { | 2793 | 188k | for (size_t j = 0; j < 512; j++) { | 2794 | 187k | curModifier.push_back(1); | 2795 | 187k | } | 2796 | 367 | } else { | 2797 | 3.68k | for (auto& c : curModifier) { | 2798 | 3.68k | c++; | 2799 | 3.68k | } | 2800 | 79 | } | 2801 | 446 | } | 2802 | 962 | } | 2803 | | | 2804 | 1.60k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.60k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.60k | const auto& result = results.back(); | 2811 | | | 2812 | 1.60k | if ( result.second != std::nullopt ) { | 2813 | 222 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 222 | } | 2820 | | | 2821 | 1.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 | 1.60k | if ( options.disableTests == false ) { | 2830 | 1.60k | tests::test(op, result.second); | 2831 | 1.60k | } | 2832 | | | 2833 | 1.60k | postprocess(module, op, result); | 2834 | 1.60k | } | 2835 | | | 2836 | 688 | if ( options.noCompare == false ) { | 2837 | 646 | compare(operations, results, data, size); | 2838 | 646 | } | 2839 | 688 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 54 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 54 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 54 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 288 | do { | 2725 | 288 | auto op = getOp(&parentDs, data, size); | 2726 | 288 | auto module = getModule(parentDs); | 2727 | 288 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 288 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 288 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 288 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 54 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 54 | #if 1 | 2745 | 54 | { | 2746 | 54 | std::set<uint64_t> moduleIDs; | 2747 | 54 | for (const auto& m : modules ) { | 2748 | 27 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 27 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 27 | moduleIDs.insert(moduleID); | 2756 | 27 | } | 2757 | | | 2758 | 54 | std::set<uint64_t> operationModuleIDs; | 2759 | 172 | for (const auto& op : operations) { | 2760 | 172 | operationModuleIDs.insert(op.first->ID); | 2761 | 172 | } | 2762 | | | 2763 | 54 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 54 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 54 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 54 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 54 | } | 2771 | 54 | #endif | 2772 | | | 2773 | 54 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 54 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 226 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 172 | auto& operation = operations[i]; | 2782 | | | 2783 | 172 | auto& module = operation.first; | 2784 | 172 | auto& op = operation.second; | 2785 | | | 2786 | 172 | if ( i > 0 ) { | 2787 | 145 | auto& prevModule = operations[i-1].first; | 2788 | 145 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 145 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 75 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 75 | 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 | 262 | for (auto& c : curModifier) { | 2798 | 262 | c++; | 2799 | 262 | } | 2800 | 26 | } | 2801 | 75 | } | 2802 | 145 | } | 2803 | | | 2804 | 172 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 172 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 172 | const auto& result = results.back(); | 2811 | | | 2812 | 172 | 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 | 172 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 172 | if ( options.disableTests == false ) { | 2830 | 172 | tests::test(op, result.second); | 2831 | 172 | } | 2832 | | | 2833 | 172 | postprocess(module, op, result); | 2834 | 172 | } | 2835 | | | 2836 | 54 | if ( options.noCompare == false ) { | 2837 | 27 | compare(operations, results, data, size); | 2838 | 27 | } | 2839 | 54 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 353 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 353 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 353 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 983 | do { | 2725 | 983 | auto op = getOp(&parentDs, data, size); | 2726 | 983 | auto module = getModule(parentDs); | 2727 | 983 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 983 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 983 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 983 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 353 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 353 | #if 1 | 2745 | 353 | { | 2746 | 353 | std::set<uint64_t> moduleIDs; | 2747 | 353 | for (const auto& m : modules ) { | 2748 | 328 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 328 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 328 | moduleIDs.insert(moduleID); | 2756 | 328 | } | 2757 | | | 2758 | 353 | std::set<uint64_t> operationModuleIDs; | 2759 | 870 | for (const auto& op : operations) { | 2760 | 870 | operationModuleIDs.insert(op.first->ID); | 2761 | 870 | } | 2762 | | | 2763 | 353 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 353 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 353 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 353 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 353 | } | 2771 | 353 | #endif | 2772 | | | 2773 | 353 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 353 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.22k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 870 | auto& operation = operations[i]; | 2782 | | | 2783 | 870 | auto& module = operation.first; | 2784 | 870 | auto& op = operation.second; | 2785 | | | 2786 | 870 | if ( i > 0 ) { | 2787 | 542 | auto& prevModule = operations[i-1].first; | 2788 | 542 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 542 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 274 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 274 | if ( curModifier.size() == 0 ) { | 2793 | 124k | for (size_t j = 0; j < 512; j++) { | 2794 | 124k | curModifier.push_back(1); | 2795 | 124k | } | 2796 | 243 | } else { | 2797 | 1.97k | for (auto& c : curModifier) { | 2798 | 1.97k | c++; | 2799 | 1.97k | } | 2800 | 31 | } | 2801 | 274 | } | 2802 | 542 | } | 2803 | | | 2804 | 870 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 870 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 870 | const auto& result = results.back(); | 2811 | | | 2812 | 870 | if ( result.second != std::nullopt ) { | 2813 | 382 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 382 | } | 2820 | | | 2821 | 870 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 870 | if ( options.disableTests == false ) { | 2830 | 870 | tests::test(op, result.second); | 2831 | 870 | } | 2832 | | | 2833 | 870 | postprocess(module, op, result); | 2834 | 870 | } | 2835 | | | 2836 | 353 | if ( options.noCompare == false ) { | 2837 | 328 | compare(operations, results, data, size); | 2838 | 328 | } | 2839 | 353 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 55 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 55 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 55 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 318 | do { | 2725 | 318 | auto op = getOp(&parentDs, data, size); | 2726 | 318 | auto module = getModule(parentDs); | 2727 | 318 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 318 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 318 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 318 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 55 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 55 | #if 1 | 2745 | 55 | { | 2746 | 55 | std::set<uint64_t> moduleIDs; | 2747 | 55 | for (const auto& m : modules ) { | 2748 | 31 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 31 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 31 | moduleIDs.insert(moduleID); | 2756 | 31 | } | 2757 | | | 2758 | 55 | std::set<uint64_t> operationModuleIDs; | 2759 | 205 | for (const auto& op : operations) { | 2760 | 205 | operationModuleIDs.insert(op.first->ID); | 2761 | 205 | } | 2762 | | | 2763 | 55 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 55 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 55 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 55 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 55 | } | 2771 | 55 | #endif | 2772 | | | 2773 | 55 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 55 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 260 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 205 | auto& operation = operations[i]; | 2782 | | | 2783 | 205 | auto& module = operation.first; | 2784 | 205 | auto& op = operation.second; | 2785 | | | 2786 | 205 | if ( i > 0 ) { | 2787 | 174 | auto& prevModule = operations[i-1].first; | 2788 | 174 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 174 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 84 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 84 | if ( curModifier.size() == 0 ) { | 2793 | 32.8k | for (size_t j = 0; j < 512; j++) { | 2794 | 32.7k | curModifier.push_back(1); | 2795 | 32.7k | } | 2796 | 64 | } else { | 2797 | 245 | for (auto& c : curModifier) { | 2798 | 245 | c++; | 2799 | 245 | } | 2800 | 20 | } | 2801 | 84 | } | 2802 | 174 | } | 2803 | | | 2804 | 205 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 205 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 205 | const auto& result = results.back(); | 2811 | | | 2812 | 205 | 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 | 205 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 205 | if ( options.disableTests == false ) { | 2830 | 205 | tests::test(op, result.second); | 2831 | 205 | } | 2832 | | | 2833 | 205 | postprocess(module, op, result); | 2834 | 205 | } | 2835 | | | 2836 | 55 | if ( options.noCompare == false ) { | 2837 | 31 | compare(operations, results, data, size); | 2838 | 31 | } | 2839 | 55 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 49 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 49 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 49 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 306 | do { | 2725 | 306 | auto op = getOp(&parentDs, data, size); | 2726 | 306 | auto module = getModule(parentDs); | 2727 | 306 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 306 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 306 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 306 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 49 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 49 | #if 1 | 2745 | 49 | { | 2746 | 49 | std::set<uint64_t> moduleIDs; | 2747 | 49 | for (const auto& m : modules ) { | 2748 | 27 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 27 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 27 | moduleIDs.insert(moduleID); | 2756 | 27 | } | 2757 | | | 2758 | 49 | std::set<uint64_t> operationModuleIDs; | 2759 | 178 | for (const auto& op : operations) { | 2760 | 178 | operationModuleIDs.insert(op.first->ID); | 2761 | 178 | } | 2762 | | | 2763 | 49 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 49 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 49 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 49 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 49 | } | 2771 | 49 | #endif | 2772 | | | 2773 | 49 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 49 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 227 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 178 | auto& operation = operations[i]; | 2782 | | | 2783 | 178 | auto& module = operation.first; | 2784 | 178 | auto& op = operation.second; | 2785 | | | 2786 | 178 | if ( i > 0 ) { | 2787 | 151 | auto& prevModule = operations[i-1].first; | 2788 | 151 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 151 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 63 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 63 | if ( curModifier.size() == 0 ) { | 2793 | 22.5k | for (size_t j = 0; j < 512; j++) { | 2794 | 22.5k | curModifier.push_back(1); | 2795 | 22.5k | } | 2796 | 44 | } else { | 2797 | 260 | for (auto& c : curModifier) { | 2798 | 260 | c++; | 2799 | 260 | } | 2800 | 19 | } | 2801 | 63 | } | 2802 | 151 | } | 2803 | | | 2804 | 178 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 178 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 178 | const auto& result = results.back(); | 2811 | | | 2812 | 178 | 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 | 178 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 178 | if ( options.disableTests == false ) { | 2830 | 178 | tests::test(op, result.second); | 2831 | 178 | } | 2832 | | | 2833 | 178 | postprocess(module, op, result); | 2834 | 178 | } | 2835 | | | 2836 | 49 | if ( options.noCompare == false ) { | 2837 | 27 | compare(operations, results, data, size); | 2838 | 27 | } | 2839 | 49 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 58 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 58 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 58 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 346 | do { | 2725 | 346 | auto op = getOp(&parentDs, data, size); | 2726 | 346 | auto module = getModule(parentDs); | 2727 | 346 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 346 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 346 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 346 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 58 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 58 | #if 1 | 2745 | 58 | { | 2746 | 58 | std::set<uint64_t> moduleIDs; | 2747 | 58 | for (const auto& m : modules ) { | 2748 | 28 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 28 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 28 | moduleIDs.insert(moduleID); | 2756 | 28 | } | 2757 | | | 2758 | 58 | std::set<uint64_t> operationModuleIDs; | 2759 | 183 | for (const auto& op : operations) { | 2760 | 183 | operationModuleIDs.insert(op.first->ID); | 2761 | 183 | } | 2762 | | | 2763 | 58 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 58 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 58 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 58 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 58 | } | 2771 | 58 | #endif | 2772 | | | 2773 | 58 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 58 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 241 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 183 | auto& operation = operations[i]; | 2782 | | | 2783 | 183 | auto& module = operation.first; | 2784 | 183 | auto& op = operation.second; | 2785 | | | 2786 | 183 | if ( i > 0 ) { | 2787 | 155 | auto& prevModule = operations[i-1].first; | 2788 | 155 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 155 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 71 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 71 | if ( curModifier.size() == 0 ) { | 2793 | 27.1k | for (size_t j = 0; j < 512; j++) { | 2794 | 27.1k | curModifier.push_back(1); | 2795 | 27.1k | } | 2796 | 53 | } else { | 2797 | 246 | for (auto& c : curModifier) { | 2798 | 246 | c++; | 2799 | 246 | } | 2800 | 18 | } | 2801 | 71 | } | 2802 | 155 | } | 2803 | | | 2804 | 183 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 183 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 183 | const auto& result = results.back(); | 2811 | | | 2812 | 183 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 183 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 183 | if ( options.disableTests == false ) { | 2830 | 183 | tests::test(op, result.second); | 2831 | 183 | } | 2832 | | | 2833 | 183 | postprocess(module, op, result); | 2834 | 183 | } | 2835 | | | 2836 | 58 | if ( options.noCompare == false ) { | 2837 | 28 | compare(operations, results, data, size); | 2838 | 28 | } | 2839 | 58 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::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 | 802 | do { | 2725 | 802 | auto op = getOp(&parentDs, data, size); | 2726 | 802 | auto module = getModule(parentDs); | 2727 | 802 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 802 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 802 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 802 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 209 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 209 | #if 1 | 2745 | 209 | { | 2746 | 209 | std::set<uint64_t> moduleIDs; | 2747 | 209 | for (const auto& m : modules ) { | 2748 | 178 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 178 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 178 | moduleIDs.insert(moduleID); | 2756 | 178 | } | 2757 | | | 2758 | 209 | std::set<uint64_t> operationModuleIDs; | 2759 | 597 | for (const auto& op : operations) { | 2760 | 597 | operationModuleIDs.insert(op.first->ID); | 2761 | 597 | } | 2762 | | | 2763 | 209 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 209 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 209 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 209 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 209 | } | 2771 | 209 | #endif | 2772 | | | 2773 | 209 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 209 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 806 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 597 | auto& operation = operations[i]; | 2782 | | | 2783 | 597 | auto& module = operation.first; | 2784 | 597 | auto& op = operation.second; | 2785 | | | 2786 | 597 | if ( i > 0 ) { | 2787 | 419 | auto& prevModule = operations[i-1].first; | 2788 | 419 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 419 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 205 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 205 | if ( curModifier.size() == 0 ) { | 2793 | 87.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 87.0k | curModifier.push_back(1); | 2795 | 87.0k | } | 2796 | 170 | } else { | 2797 | 973 | for (auto& c : curModifier) { | 2798 | 973 | c++; | 2799 | 973 | } | 2800 | 35 | } | 2801 | 205 | } | 2802 | 419 | } | 2803 | | | 2804 | 597 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 597 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 597 | const auto& result = results.back(); | 2811 | | | 2812 | 597 | if ( result.second != std::nullopt ) { | 2813 | 411 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 411 | } | 2820 | | | 2821 | 597 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 597 | if ( options.disableTests == false ) { | 2830 | 597 | tests::test(op, result.second); | 2831 | 597 | } | 2832 | | | 2833 | 597 | postprocess(module, op, result); | 2834 | 597 | } | 2835 | | | 2836 | 209 | if ( options.noCompare == false ) { | 2837 | 178 | compare(operations, results, data, size); | 2838 | 178 | } | 2839 | 209 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 21 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 21 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 21 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 36 | do { | 2725 | 36 | auto op = getOp(&parentDs, data, size); | 2726 | 36 | auto module = getModule(parentDs); | 2727 | 36 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 36 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 36 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 36 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 21 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 21 | #if 1 | 2745 | 21 | { | 2746 | 21 | std::set<uint64_t> moduleIDs; | 2747 | 21 | for (const auto& m : modules ) { | 2748 | 11 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 11 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 11 | moduleIDs.insert(moduleID); | 2756 | 11 | } | 2757 | | | 2758 | 21 | std::set<uint64_t> operationModuleIDs; | 2759 | 22 | for (const auto& op : operations) { | 2760 | 22 | operationModuleIDs.insert(op.first->ID); | 2761 | 22 | } | 2762 | | | 2763 | 21 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 21 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 21 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 21 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 21 | } | 2771 | 21 | #endif | 2772 | | | 2773 | 21 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 21 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 43 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 22 | auto& operation = operations[i]; | 2782 | | | 2783 | 22 | auto& module = operation.first; | 2784 | 22 | auto& op = operation.second; | 2785 | | | 2786 | 22 | if ( i > 0 ) { | 2787 | 11 | auto& prevModule = operations[i-1].first; | 2788 | 11 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 11 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 8 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 8 | if ( curModifier.size() == 0 ) { | 2793 | 513 | for (size_t j = 0; j < 512; j++) { | 2794 | 512 | curModifier.push_back(1); | 2795 | 512 | } | 2796 | 7 | } else { | 2797 | 126 | for (auto& c : curModifier) { | 2798 | 126 | c++; | 2799 | 126 | } | 2800 | 7 | } | 2801 | 8 | } | 2802 | 11 | } | 2803 | | | 2804 | 22 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 22 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 22 | const auto& result = results.back(); | 2811 | | | 2812 | 22 | 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 | 22 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 22 | if ( options.disableTests == false ) { | 2830 | 22 | tests::test(op, result.second); | 2831 | 22 | } | 2832 | | | 2833 | 22 | postprocess(module, op, result); | 2834 | 22 | } | 2835 | | | 2836 | 21 | if ( options.noCompare == false ) { | 2837 | 11 | compare(operations, results, data, size); | 2838 | 11 | } | 2839 | 21 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 58 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 58 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 58 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 338 | do { | 2725 | 338 | auto op = getOp(&parentDs, data, size); | 2726 | 338 | auto module = getModule(parentDs); | 2727 | 338 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 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 | 1 | break; | 2736 | 1 | } | 2737 | 338 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 58 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 58 | #if 1 | 2745 | 58 | { | 2746 | 58 | std::set<uint64_t> moduleIDs; | 2747 | 58 | for (const auto& m : modules ) { | 2748 | 30 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 30 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 30 | moduleIDs.insert(moduleID); | 2756 | 30 | } | 2757 | | | 2758 | 58 | std::set<uint64_t> operationModuleIDs; | 2759 | 200 | for (const auto& op : operations) { | 2760 | 200 | operationModuleIDs.insert(op.first->ID); | 2761 | 200 | } | 2762 | | | 2763 | 58 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 58 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 58 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 58 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 58 | } | 2771 | 58 | #endif | 2772 | | | 2773 | 58 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 58 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 258 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 200 | auto& operation = operations[i]; | 2782 | | | 2783 | 200 | auto& module = operation.first; | 2784 | 200 | auto& op = operation.second; | 2785 | | | 2786 | 200 | if ( i > 0 ) { | 2787 | 170 | auto& prevModule = operations[i-1].first; | 2788 | 170 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 170 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 82 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 82 | 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 | 227 | for (auto& c : curModifier) { | 2798 | 227 | c++; | 2799 | 227 | } | 2800 | 30 | } | 2801 | 82 | } | 2802 | 170 | } | 2803 | | | 2804 | 200 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 200 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 200 | const auto& result = results.back(); | 2811 | | | 2812 | 200 | 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 | 200 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 200 | if ( options.disableTests == false ) { | 2830 | 200 | tests::test(op, result.second); | 2831 | 200 | } | 2832 | | | 2833 | 200 | postprocess(module, op, result); | 2834 | 200 | } | 2835 | | | 2836 | 58 | if ( options.noCompare == false ) { | 2837 | 30 | compare(operations, results, data, size); | 2838 | 30 | } | 2839 | 58 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 54 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 54 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 54 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 316 | do { | 2725 | 316 | auto op = getOp(&parentDs, data, size); | 2726 | 316 | auto module = getModule(parentDs); | 2727 | 316 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 316 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 316 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 316 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 54 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 54 | #if 1 | 2745 | 54 | { | 2746 | 54 | std::set<uint64_t> moduleIDs; | 2747 | 54 | for (const auto& m : modules ) { | 2748 | 27 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 27 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 27 | moduleIDs.insert(moduleID); | 2756 | 27 | } | 2757 | | | 2758 | 54 | std::set<uint64_t> operationModuleIDs; | 2759 | 157 | for (const auto& op : operations) { | 2760 | 157 | operationModuleIDs.insert(op.first->ID); | 2761 | 157 | } | 2762 | | | 2763 | 54 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 54 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 54 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 54 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 54 | } | 2771 | 54 | #endif | 2772 | | | 2773 | 54 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 54 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 211 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 157 | auto& operation = operations[i]; | 2782 | | | 2783 | 157 | auto& module = operation.first; | 2784 | 157 | auto& op = operation.second; | 2785 | | | 2786 | 157 | if ( i > 0 ) { | 2787 | 130 | auto& prevModule = operations[i-1].first; | 2788 | 130 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 130 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 70 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 70 | if ( curModifier.size() == 0 ) { | 2793 | 26.1k | for (size_t j = 0; j < 512; j++) { | 2794 | 26.1k | curModifier.push_back(1); | 2795 | 26.1k | } | 2796 | 51 | } else { | 2797 | 256 | for (auto& c : curModifier) { | 2798 | 256 | c++; | 2799 | 256 | } | 2800 | 19 | } | 2801 | 70 | } | 2802 | 130 | } | 2803 | | | 2804 | 157 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 157 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 157 | const auto& result = results.back(); | 2811 | | | 2812 | 157 | 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 | 157 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 157 | if ( options.disableTests == false ) { | 2830 | 157 | tests::test(op, result.second); | 2831 | 157 | } | 2832 | | | 2833 | 157 | postprocess(module, op, result); | 2834 | 157 | } | 2835 | | | 2836 | 54 | if ( options.noCompare == false ) { | 2837 | 27 | compare(operations, results, data, size); | 2838 | 27 | } | 2839 | 54 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 17 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 17 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 17 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 27 | do { | 2725 | 27 | auto op = getOp(&parentDs, data, size); | 2726 | 27 | auto module = getModule(parentDs); | 2727 | 27 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 27 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 27 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 8 | break; | 2736 | 8 | } | 2737 | 27 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 17 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 17 | #if 1 | 2745 | 17 | { | 2746 | 17 | std::set<uint64_t> moduleIDs; | 2747 | 17 | for (const auto& m : modules ) { | 2748 | 9 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 9 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 9 | moduleIDs.insert(moduleID); | 2756 | 9 | } | 2757 | | | 2758 | 17 | std::set<uint64_t> operationModuleIDs; | 2759 | 17 | for (const auto& op : operations) { | 2760 | 17 | operationModuleIDs.insert(op.first->ID); | 2761 | 17 | } | 2762 | | | 2763 | 17 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 17 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 17 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 17 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 17 | } | 2771 | 17 | #endif | 2772 | | | 2773 | 17 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 17 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 34 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 17 | auto& operation = operations[i]; | 2782 | | | 2783 | 17 | auto& module = operation.first; | 2784 | 17 | auto& op = operation.second; | 2785 | | | 2786 | 17 | if ( i > 0 ) { | 2787 | 8 | auto& prevModule = operations[i-1].first; | 2788 | 8 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 8 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 7 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 7 | if ( curModifier.size() == 0 ) { | 2793 | 513 | for (size_t j = 0; j < 512; j++) { | 2794 | 512 | curModifier.push_back(1); | 2795 | 512 | } | 2796 | 6 | } else { | 2797 | 2.37k | for (auto& c : curModifier) { | 2798 | 2.37k | c++; | 2799 | 2.37k | } | 2800 | 6 | } | 2801 | 7 | } | 2802 | 8 | } | 2803 | | | 2804 | 17 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 17 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 17 | const auto& result = results.back(); | 2811 | | | 2812 | 17 | 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 | 17 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 17 | if ( options.disableTests == false ) { | 2830 | 17 | tests::test(op, result.second); | 2831 | 17 | } | 2832 | | | 2833 | 17 | postprocess(module, op, result); | 2834 | 17 | } | 2835 | | | 2836 | 17 | if ( options.noCompare == false ) { | 2837 | 9 | compare(operations, results, data, size); | 2838 | 9 | } | 2839 | 17 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 61 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 61 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 61 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 344 | do { | 2725 | 344 | auto op = getOp(&parentDs, data, size); | 2726 | 344 | auto module = getModule(parentDs); | 2727 | 344 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 344 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 344 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 344 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 61 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 61 | #if 1 | 2745 | 61 | { | 2746 | 61 | std::set<uint64_t> moduleIDs; | 2747 | 61 | for (const auto& m : modules ) { | 2748 | 33 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 33 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 33 | moduleIDs.insert(moduleID); | 2756 | 33 | } | 2757 | | | 2758 | 61 | std::set<uint64_t> operationModuleIDs; | 2759 | 198 | for (const auto& op : operations) { | 2760 | 198 | operationModuleIDs.insert(op.first->ID); | 2761 | 198 | } | 2762 | | | 2763 | 61 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 61 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 61 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 61 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 61 | } | 2771 | 61 | #endif | 2772 | | | 2773 | 61 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 61 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 259 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 198 | auto& operation = operations[i]; | 2782 | | | 2783 | 198 | auto& module = operation.first; | 2784 | 198 | auto& op = operation.second; | 2785 | | | 2786 | 198 | if ( i > 0 ) { | 2787 | 165 | auto& prevModule = operations[i-1].first; | 2788 | 165 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 165 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 83 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 83 | 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 | 260 | for (auto& c : curModifier) { | 2798 | 260 | c++; | 2799 | 260 | } | 2800 | 14 | } | 2801 | 83 | } | 2802 | 165 | } | 2803 | | | 2804 | 198 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 198 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 198 | const auto& result = results.back(); | 2811 | | | 2812 | 198 | 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 | 198 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 198 | if ( options.disableTests == false ) { | 2830 | 198 | tests::test(op, result.second); | 2831 | 198 | } | 2832 | | | 2833 | 198 | postprocess(module, op, result); | 2834 | 198 | } | 2835 | | | 2836 | 61 | if ( options.noCompare == false ) { | 2837 | 33 | compare(operations, results, data, size); | 2838 | 33 | } | 2839 | 61 | } |
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 | 57 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 57 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 57 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 362 | do { | 2725 | 362 | auto op = getOp(&parentDs, data, size); | 2726 | 362 | auto module = getModule(parentDs); | 2727 | 362 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 362 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 362 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 362 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 57 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 57 | #if 1 | 2745 | 57 | { | 2746 | 57 | std::set<uint64_t> moduleIDs; | 2747 | 57 | for (const auto& m : modules ) { | 2748 | 29 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 29 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 29 | moduleIDs.insert(moduleID); | 2756 | 29 | } | 2757 | | | 2758 | 57 | std::set<uint64_t> operationModuleIDs; | 2759 | 195 | for (const auto& op : operations) { | 2760 | 195 | operationModuleIDs.insert(op.first->ID); | 2761 | 195 | } | 2762 | | | 2763 | 57 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 57 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 57 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 57 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 57 | } | 2771 | 57 | #endif | 2772 | | | 2773 | 57 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 57 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 252 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 195 | auto& operation = operations[i]; | 2782 | | | 2783 | 195 | auto& module = operation.first; | 2784 | 195 | auto& op = operation.second; | 2785 | | | 2786 | 195 | if ( i > 0 ) { | 2787 | 166 | auto& prevModule = operations[i-1].first; | 2788 | 166 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 166 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 70 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 70 | if ( curModifier.size() == 0 ) { | 2793 | 14.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 14.3k | curModifier.push_back(1); | 2795 | 14.3k | } | 2796 | 42 | } else { | 2797 | 290 | for (auto& c : curModifier) { | 2798 | 290 | c++; | 2799 | 290 | } | 2800 | 42 | } | 2801 | 70 | } | 2802 | 166 | } | 2803 | | | 2804 | 195 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 195 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 195 | const auto& result = results.back(); | 2811 | | | 2812 | 195 | if ( result.second != std::nullopt ) { | 2813 | 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 | 195 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 195 | if ( options.disableTests == false ) { | 2830 | 195 | tests::test(op, result.second); | 2831 | 195 | } | 2832 | | | 2833 | 195 | postprocess(module, op, result); | 2834 | 195 | } | 2835 | | | 2836 | 57 | if ( options.noCompare == false ) { | 2837 | 29 | compare(operations, results, data, size); | 2838 | 29 | } | 2839 | 57 | } |
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 | 53 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 53 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 53 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 278 | do { | 2725 | 278 | auto op = getOp(&parentDs, data, size); | 2726 | 278 | auto module = getModule(parentDs); | 2727 | 278 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 278 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 278 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 278 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 53 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 53 | #if 1 | 2745 | 53 | { | 2746 | 53 | std::set<uint64_t> moduleIDs; | 2747 | 53 | for (const auto& m : modules ) { | 2748 | 27 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 27 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 27 | moduleIDs.insert(moduleID); | 2756 | 27 | } | 2757 | | | 2758 | 53 | std::set<uint64_t> operationModuleIDs; | 2759 | 161 | for (const auto& op : operations) { | 2760 | 161 | operationModuleIDs.insert(op.first->ID); | 2761 | 161 | } | 2762 | | | 2763 | 53 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 53 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 53 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 53 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 53 | } | 2771 | 53 | #endif | 2772 | | | 2773 | 53 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 53 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 214 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 161 | auto& operation = operations[i]; | 2782 | | | 2783 | 161 | auto& module = operation.first; | 2784 | 161 | auto& op = operation.second; | 2785 | | | 2786 | 161 | if ( i > 0 ) { | 2787 | 134 | auto& prevModule = operations[i-1].first; | 2788 | 134 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 134 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 63 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 63 | if ( curModifier.size() == 0 ) { | 2793 | 19.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 19.4k | curModifier.push_back(1); | 2795 | 19.4k | } | 2796 | 38 | } else { | 2797 | 511 | for (auto& c : curModifier) { | 2798 | 511 | c++; | 2799 | 511 | } | 2800 | 25 | } | 2801 | 63 | } | 2802 | 134 | } | 2803 | | | 2804 | 161 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 161 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 161 | const auto& result = results.back(); | 2811 | | | 2812 | 161 | 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 | 161 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 161 | if ( options.disableTests == false ) { | 2830 | 161 | tests::test(op, result.second); | 2831 | 161 | } | 2832 | | | 2833 | 161 | postprocess(module, op, result); | 2834 | 161 | } | 2835 | | | 2836 | 53 | if ( options.noCompare == false ) { | 2837 | 27 | compare(operations, results, data, size); | 2838 | 27 | } | 2839 | 53 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 6.83k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 6.83k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 6.83k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 9.50k | do { | 2725 | 9.50k | auto op = getOp(&parentDs, data, size); | 2726 | 9.50k | auto module = getModule(parentDs); | 2727 | 9.50k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 9.50k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 9.50k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 87 | break; | 2736 | 87 | } | 2737 | 9.50k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 6.83k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 6.83k | #if 1 | 2745 | 6.83k | { | 2746 | 6.83k | std::set<uint64_t> moduleIDs; | 2747 | 6.83k | for (const auto& m : modules ) { | 2748 | 6.64k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 6.64k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 6.64k | moduleIDs.insert(moduleID); | 2756 | 6.64k | } | 2757 | | | 2758 | 6.83k | std::set<uint64_t> operationModuleIDs; | 2759 | 9.15k | for (const auto& op : operations) { | 2760 | 9.15k | operationModuleIDs.insert(op.first->ID); | 2761 | 9.15k | } | 2762 | | | 2763 | 6.83k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 6.83k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 6.83k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 6.83k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 6.83k | } | 2771 | 6.83k | #endif | 2772 | | | 2773 | 6.83k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 6.83k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 15.9k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 9.15k | auto& operation = operations[i]; | 2782 | | | 2783 | 9.15k | auto& module = operation.first; | 2784 | 9.15k | auto& op = operation.second; | 2785 | | | 2786 | 9.15k | if ( i > 0 ) { | 2787 | 2.50k | auto& prevModule = operations[i-1].first; | 2788 | 2.50k | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 2.50k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 896 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 896 | if ( curModifier.size() == 0 ) { | 2793 | 230k | for (size_t j = 0; j < 512; j++) { | 2794 | 229k | curModifier.push_back(1); | 2795 | 229k | } | 2796 | 449 | } else { | 2797 | 14.2k | for (auto& c : curModifier) { | 2798 | 14.2k | c++; | 2799 | 14.2k | } | 2800 | 447 | } | 2801 | 896 | } | 2802 | 2.50k | } | 2803 | | | 2804 | 9.15k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 9.15k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 9.15k | const auto& result = results.back(); | 2811 | | | 2812 | 9.15k | if ( result.second != std::nullopt ) { | 2813 | 4.01k | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 4.01k | } | 2820 | | | 2821 | 9.15k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->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.15k | if ( options.disableTests == false ) { | 2830 | 9.15k | tests::test(op, result.second); | 2831 | 9.15k | } | 2832 | | | 2833 | 9.15k | postprocess(module, op, result); | 2834 | 9.15k | } | 2835 | | | 2836 | 6.83k | if ( options.noCompare == false ) { | 2837 | 6.64k | compare(operations, results, data, size); | 2838 | 6.64k | } | 2839 | 6.83k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 4.40k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 4.40k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 4.40k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 6.24k | do { | 2725 | 6.24k | auto op = getOp(&parentDs, data, size); | 2726 | 6.24k | auto module = getModule(parentDs); | 2727 | 6.24k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 6.24k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 6.24k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 54 | break; | 2736 | 54 | } | 2737 | 6.24k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 4.40k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 4.40k | #if 1 | 2745 | 4.40k | { | 2746 | 4.40k | std::set<uint64_t> moduleIDs; | 2747 | 4.40k | for (const auto& m : modules ) { | 2748 | 4.15k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 4.15k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 4.15k | moduleIDs.insert(moduleID); | 2756 | 4.15k | } | 2757 | | | 2758 | 4.40k | std::set<uint64_t> operationModuleIDs; | 2759 | 5.80k | for (const auto& op : operations) { | 2760 | 5.80k | operationModuleIDs.insert(op.first->ID); | 2761 | 5.80k | } | 2762 | | | 2763 | 4.40k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 4.40k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 4.40k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 4.40k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 4.40k | } | 2771 | 4.40k | #endif | 2772 | | | 2773 | 4.40k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 4.40k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 10.2k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 5.80k | auto& operation = operations[i]; | 2782 | | | 2783 | 5.80k | auto& module = operation.first; | 2784 | 5.80k | auto& op = operation.second; | 2785 | | | 2786 | 5.80k | if ( i > 0 ) { | 2787 | 1.64k | auto& prevModule = operations[i-1].first; | 2788 | 1.64k | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 1.64k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 557 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 557 | 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 | 417 | } else { | 2797 | 41.3k | for (auto& c : curModifier) { | 2798 | 41.3k | c++; | 2799 | 41.3k | } | 2800 | 417 | } | 2801 | 557 | } | 2802 | 1.64k | } | 2803 | | | 2804 | 5.80k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 5.80k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 5.80k | const auto& result = results.back(); | 2811 | | | 2812 | 5.80k | if ( result.second != std::nullopt ) { | 2813 | 1.97k | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = 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.97k | } | 2820 | | | 2821 | 5.80k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->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.80k | if ( options.disableTests == false ) { | 2830 | 5.80k | tests::test(op, result.second); | 2831 | 5.80k | } | 2832 | | | 2833 | 5.80k | postprocess(module, op, result); | 2834 | 5.80k | } | 2835 | | | 2836 | 4.40k | if ( options.noCompare == false ) { | 2837 | 4.15k | compare(operations, results, data, size); | 2838 | 4.15k | } | 2839 | 4.40k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 6.49k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 6.49k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 6.49k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 9.30k | do { | 2725 | 9.30k | auto op = getOp(&parentDs, data, size); | 2726 | 9.30k | auto module = getModule(parentDs); | 2727 | 9.30k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 9.30k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 9.30k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 106 | break; | 2736 | 106 | } | 2737 | 9.30k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 6.49k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 6.49k | #if 1 | 2745 | 6.49k | { | 2746 | 6.49k | std::set<uint64_t> moduleIDs; | 2747 | 6.49k | for (const auto& m : modules ) { | 2748 | 6.29k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 6.29k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 6.29k | moduleIDs.insert(moduleID); | 2756 | 6.29k | } | 2757 | | | 2758 | 6.49k | std::set<uint64_t> operationModuleIDs; | 2759 | 8.95k | for (const auto& op : operations) { | 2760 | 8.95k | operationModuleIDs.insert(op.first->ID); | 2761 | 8.95k | } | 2762 | | | 2763 | 6.49k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 6.49k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 6.49k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 6.49k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 6.49k | } | 2771 | 6.49k | #endif | 2772 | | | 2773 | 6.49k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 6.49k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 15.4k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 8.95k | auto& operation = operations[i]; | 2782 | | | 2783 | 8.95k | auto& module = operation.first; | 2784 | 8.95k | auto& op = operation.second; | 2785 | | | 2786 | 8.95k | if ( i > 0 ) { | 2787 | 2.65k | auto& prevModule = operations[i-1].first; | 2788 | 2.65k | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 2.65k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 416 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 416 | if ( curModifier.size() == 0 ) { | 2793 | 114k | for (size_t j = 0; j < 512; j++) { | 2794 | 114k | curModifier.push_back(1); | 2795 | 114k | } | 2796 | 224 | } else { | 2797 | 8.62k | for (auto& c : curModifier) { | 2798 | 8.62k | c++; | 2799 | 8.62k | } | 2800 | 192 | } | 2801 | 416 | } | 2802 | 2.65k | } | 2803 | | | 2804 | 8.95k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 8.95k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 8.95k | const auto& result = results.back(); | 2811 | | | 2812 | 8.95k | if ( result.second != std::nullopt ) { | 2813 | 2.43k | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = 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.43k | } | 2820 | | | 2821 | 8.95k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 8.95k | if ( options.disableTests == false ) { | 2830 | 8.95k | tests::test(op, result.second); | 2831 | 8.95k | } | 2832 | | | 2833 | 8.95k | postprocess(module, op, result); | 2834 | 8.95k | } | 2835 | | | 2836 | 6.49k | if ( options.noCompare == false ) { | 2837 | 6.29k | compare(operations, results, data, size); | 2838 | 6.29k | } | 2839 | 6.49k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 510 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 510 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 510 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.22k | do { | 2725 | 1.22k | auto op = getOp(&parentDs, data, size); | 2726 | 1.22k | auto module = getModule(parentDs); | 2727 | 1.22k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 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 | 36 | break; | 2736 | 36 | } | 2737 | 1.22k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 510 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 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 | 510 | for (const auto& m : modules ) { | 2748 | 385 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 385 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 385 | moduleIDs.insert(moduleID); | 2756 | 385 | } | 2757 | | | 2758 | 510 | std::set<uint64_t> operationModuleIDs; | 2759 | 945 | for (const auto& op : operations) { | 2760 | 945 | operationModuleIDs.insert(op.first->ID); | 2761 | 945 | } | 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 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 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.45k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 945 | auto& operation = operations[i]; | 2782 | | | 2783 | 945 | auto& module = operation.first; | 2784 | 945 | auto& op = operation.second; | 2785 | | | 2786 | 945 | if ( i > 0 ) { | 2787 | 560 | auto& prevModule = operations[i-1].first; | 2788 | 560 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 560 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 199 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 199 | if ( curModifier.size() == 0 ) { | 2793 | 30.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 30.2k | curModifier.push_back(1); | 2795 | 30.2k | } | 2796 | 140 | } else { | 2797 | 2.82k | for (auto& c : curModifier) { | 2798 | 2.82k | c++; | 2799 | 2.82k | } | 2800 | 140 | } | 2801 | 199 | } | 2802 | 560 | } | 2803 | | | 2804 | 945 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 945 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 945 | const auto& result = results.back(); | 2811 | | | 2812 | 945 | 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 | 945 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 945 | if ( options.disableTests == false ) { | 2830 | 945 | tests::test(op, result.second); | 2831 | 945 | } | 2832 | | | 2833 | 945 | postprocess(module, op, result); | 2834 | 945 | } | 2835 | | | 2836 | 510 | if ( options.noCompare == false ) { | 2837 | 385 | compare(operations, results, data, size); | 2838 | 385 | } | 2839 | 510 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 5.95k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 5.95k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 5.95k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 11.3k | do { | 2725 | 11.3k | auto op = getOp(&parentDs, data, size); | 2726 | 11.3k | auto module = getModule(parentDs); | 2727 | 11.3k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 11.3k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 11.3k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 360 | break; | 2736 | 360 | } | 2737 | 11.3k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 5.95k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 5.95k | #if 1 | 2745 | 5.95k | { | 2746 | 5.95k | std::set<uint64_t> moduleIDs; | 2747 | 5.95k | for (const auto& m : modules ) { | 2748 | 5.81k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 5.81k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 5.81k | moduleIDs.insert(moduleID); | 2756 | 5.81k | } | 2757 | | | 2758 | 5.95k | std::set<uint64_t> operationModuleIDs; | 2759 | 11.0k | for (const auto& op : operations) { | 2760 | 11.0k | operationModuleIDs.insert(op.first->ID); | 2761 | 11.0k | } | 2762 | | | 2763 | 5.95k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 5.95k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 5.95k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 5.95k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 5.95k | } | 2771 | 5.95k | #endif | 2772 | | | 2773 | 5.95k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 5.95k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 16.9k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 11.0k | auto& operation = operations[i]; | 2782 | | | 2783 | 11.0k | auto& module = operation.first; | 2784 | 11.0k | auto& op = operation.second; | 2785 | | | 2786 | 11.0k | if ( i > 0 ) { | 2787 | 5.23k | auto& prevModule = operations[i-1].first; | 2788 | 5.23k | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 5.23k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 1.31k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 1.31k | if ( curModifier.size() == 0 ) { | 2793 | 193k | for (size_t j = 0; j < 512; j++) { | 2794 | 193k | curModifier.push_back(1); | 2795 | 193k | } | 2796 | 936 | } else { | 2797 | 10.7k | for (auto& c : curModifier) { | 2798 | 10.7k | c++; | 2799 | 10.7k | } | 2800 | 936 | } | 2801 | 1.31k | } | 2802 | 5.23k | } | 2803 | | | 2804 | 11.0k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 11.0k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 11.0k | const auto& result = results.back(); | 2811 | | | 2812 | 11.0k | if ( result.second != std::nullopt ) { | 2813 | 6.83k | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = 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.83k | } | 2820 | | | 2821 | 11.0k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 11.0k | if ( options.disableTests == false ) { | 2830 | 11.0k | tests::test(op, result.second); | 2831 | 11.0k | } | 2832 | | | 2833 | 11.0k | postprocess(module, op, result); | 2834 | 11.0k | } | 2835 | | | 2836 | 5.95k | if ( options.noCompare == false ) { | 2837 | 5.81k | compare(operations, results, data, size); | 2838 | 5.81k | } | 2839 | 5.95k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 37 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 37 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 37 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 93 | do { | 2725 | 93 | auto op = getOp(&parentDs, data, size); | 2726 | 93 | auto module = getModule(parentDs); | 2727 | 93 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 93 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 93 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 93 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 37 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 37 | #if 1 | 2745 | 37 | { | 2746 | 37 | std::set<uint64_t> moduleIDs; | 2747 | 37 | for (const auto& m : modules ) { | 2748 | 21 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 21 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 21 | moduleIDs.insert(moduleID); | 2756 | 21 | } | 2757 | | | 2758 | 37 | std::set<uint64_t> operationModuleIDs; | 2759 | 56 | for (const auto& op : operations) { | 2760 | 56 | operationModuleIDs.insert(op.first->ID); | 2761 | 56 | } | 2762 | | | 2763 | 37 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 37 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 37 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 37 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 37 | } | 2771 | 37 | #endif | 2772 | | | 2773 | 37 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 37 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 93 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 56 | auto& operation = operations[i]; | 2782 | | | 2783 | 56 | auto& module = operation.first; | 2784 | 56 | auto& op = operation.second; | 2785 | | | 2786 | 56 | if ( i > 0 ) { | 2787 | 35 | auto& prevModule = operations[i-1].first; | 2788 | 35 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 35 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 19 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 19 | if ( curModifier.size() == 0 ) { | 2793 | 3.59k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.58k | curModifier.push_back(1); | 2795 | 3.58k | } | 2796 | 12 | } else { | 2797 | 261 | for (auto& c : curModifier) { | 2798 | 261 | c++; | 2799 | 261 | } | 2800 | 12 | } | 2801 | 19 | } | 2802 | 35 | } | 2803 | | | 2804 | 56 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 56 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 56 | const auto& result = results.back(); | 2811 | | | 2812 | 56 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 56 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 56 | if ( options.disableTests == false ) { | 2830 | 56 | tests::test(op, result.second); | 2831 | 56 | } | 2832 | | | 2833 | 56 | postprocess(module, op, result); | 2834 | 56 | } | 2835 | | | 2836 | 37 | if ( options.noCompare == false ) { | 2837 | 21 | compare(operations, results, data, size); | 2838 | 21 | } | 2839 | 37 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 37 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 37 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 37 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 95 | do { | 2725 | 95 | auto op = getOp(&parentDs, data, size); | 2726 | 95 | auto module = getModule(parentDs); | 2727 | 95 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 95 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 95 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 95 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 37 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 37 | #if 1 | 2745 | 37 | { | 2746 | 37 | std::set<uint64_t> moduleIDs; | 2747 | 37 | for (const auto& m : modules ) { | 2748 | 21 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 21 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 21 | moduleIDs.insert(moduleID); | 2756 | 21 | } | 2757 | | | 2758 | 37 | std::set<uint64_t> operationModuleIDs; | 2759 | 60 | for (const auto& op : operations) { | 2760 | 60 | operationModuleIDs.insert(op.first->ID); | 2761 | 60 | } | 2762 | | | 2763 | 37 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 37 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 37 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 37 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 37 | } | 2771 | 37 | #endif | 2772 | | | 2773 | 37 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 37 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 97 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 60 | auto& operation = operations[i]; | 2782 | | | 2783 | 60 | auto& module = operation.first; | 2784 | 60 | auto& op = operation.second; | 2785 | | | 2786 | 60 | if ( i > 0 ) { | 2787 | 39 | auto& prevModule = operations[i-1].first; | 2788 | 39 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 39 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 21 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 21 | if ( curModifier.size() == 0 ) { | 2793 | 4.10k | for (size_t j = 0; j < 512; j++) { | 2794 | 4.09k | curModifier.push_back(1); | 2795 | 4.09k | } | 2796 | 13 | } else { | 2797 | 107 | for (auto& c : curModifier) { | 2798 | 107 | c++; | 2799 | 107 | } | 2800 | 13 | } | 2801 | 21 | } | 2802 | 39 | } | 2803 | | | 2804 | 60 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 60 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 60 | const auto& result = results.back(); | 2811 | | | 2812 | 60 | 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 | 60 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 60 | if ( options.disableTests == false ) { | 2830 | 60 | tests::test(op, result.second); | 2831 | 60 | } | 2832 | | | 2833 | 60 | postprocess(module, op, result); | 2834 | 60 | } | 2835 | | | 2836 | 37 | if ( options.noCompare == false ) { | 2837 | 21 | compare(operations, results, data, size); | 2838 | 21 | } | 2839 | 37 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 35 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 35 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 35 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 83 | do { | 2725 | 83 | auto op = getOp(&parentDs, data, size); | 2726 | 83 | auto module = getModule(parentDs); | 2727 | 83 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 83 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 83 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 83 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 35 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 35 | #if 1 | 2745 | 35 | { | 2746 | 35 | std::set<uint64_t> moduleIDs; | 2747 | 35 | for (const auto& m : modules ) { | 2748 | 22 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 22 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 22 | moduleIDs.insert(moduleID); | 2756 | 22 | } | 2757 | | | 2758 | 35 | std::set<uint64_t> operationModuleIDs; | 2759 | 56 | for (const auto& op : operations) { | 2760 | 56 | operationModuleIDs.insert(op.first->ID); | 2761 | 56 | } | 2762 | | | 2763 | 35 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 35 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 35 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 35 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 35 | } | 2771 | 35 | #endif | 2772 | | | 2773 | 35 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 35 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 91 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 56 | auto& operation = operations[i]; | 2782 | | | 2783 | 56 | auto& module = operation.first; | 2784 | 56 | auto& op = operation.second; | 2785 | | | 2786 | 56 | if ( i > 0 ) { | 2787 | 34 | auto& prevModule = operations[i-1].first; | 2788 | 34 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 34 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 18 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 18 | if ( curModifier.size() == 0 ) { | 2793 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.07k | curModifier.push_back(1); | 2795 | 3.07k | } | 2796 | 12 | } else { | 2797 | 240 | for (auto& c : curModifier) { | 2798 | 240 | c++; | 2799 | 240 | } | 2800 | 12 | } | 2801 | 18 | } | 2802 | 34 | } | 2803 | | | 2804 | 56 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 56 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 56 | const auto& result = results.back(); | 2811 | | | 2812 | 56 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 56 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 56 | if ( options.disableTests == false ) { | 2830 | 56 | tests::test(op, result.second); | 2831 | 56 | } | 2832 | | | 2833 | 56 | postprocess(module, op, result); | 2834 | 56 | } | 2835 | | | 2836 | 35 | if ( options.noCompare == false ) { | 2837 | 22 | compare(operations, results, data, size); | 2838 | 22 | } | 2839 | 35 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 313 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 313 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 313 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 794 | do { | 2725 | 794 | auto op = getOp(&parentDs, data, size); | 2726 | 794 | auto module = getModule(parentDs); | 2727 | 794 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 794 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 794 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 26 | break; | 2736 | 26 | } | 2737 | 794 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 313 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 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 | 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 | 313 | std::set<uint64_t> operationModuleIDs; | 2759 | 521 | for (const auto& op : operations) { | 2760 | 521 | operationModuleIDs.insert(op.first->ID); | 2761 | 521 | } | 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 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 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 | 834 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 521 | auto& operation = operations[i]; | 2782 | | | 2783 | 521 | auto& module = operation.first; | 2784 | 521 | auto& op = operation.second; | 2785 | | | 2786 | 521 | if ( i > 0 ) { | 2787 | 341 | auto& prevModule = operations[i-1].first; | 2788 | 341 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 341 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 158 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 158 | if ( curModifier.size() == 0 ) { | 2793 | 38.4k | for (size_t j = 0; j < 512; j++) { | 2794 | 38.4k | curModifier.push_back(1); | 2795 | 38.4k | } | 2796 | 83 | } else { | 2797 | 2.12k | for (auto& c : curModifier) { | 2798 | 2.12k | c++; | 2799 | 2.12k | } | 2800 | 83 | } | 2801 | 158 | } | 2802 | 341 | } | 2803 | | | 2804 | 521 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 521 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 521 | const auto& result = results.back(); | 2811 | | | 2812 | 521 | 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 | 521 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 521 | if ( options.disableTests == false ) { | 2830 | 521 | tests::test(op, result.second); | 2831 | 521 | } | 2832 | | | 2833 | 521 | postprocess(module, op, result); | 2834 | 521 | } | 2835 | | | 2836 | 313 | if ( options.noCompare == false ) { | 2837 | 180 | compare(operations, results, data, size); | 2838 | 180 | } | 2839 | 313 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 3.59k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 3.59k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 3.59k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 7.06k | do { | 2725 | 7.06k | auto op = getOp(&parentDs, data, size); | 2726 | 7.06k | auto module = getModule(parentDs); | 2727 | 7.06k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 7.06k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 7.06k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 178 | break; | 2736 | 178 | } | 2737 | 7.06k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 3.59k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 3.59k | #if 1 | 2745 | 3.59k | { | 2746 | 3.59k | std::set<uint64_t> moduleIDs; | 2747 | 3.59k | for (const auto& m : modules ) { | 2748 | 3.44k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 3.44k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 3.44k | moduleIDs.insert(moduleID); | 2756 | 3.44k | } | 2757 | | | 2758 | 3.59k | std::set<uint64_t> operationModuleIDs; | 2759 | 6.72k | for (const auto& op : operations) { | 2760 | 6.72k | operationModuleIDs.insert(op.first->ID); | 2761 | 6.72k | } | 2762 | | | 2763 | 3.59k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 3.59k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 3.59k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 3.59k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 3.59k | } | 2771 | 3.59k | #endif | 2772 | | | 2773 | 3.59k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 3.59k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 10.3k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 6.72k | auto& operation = operations[i]; | 2782 | | | 2783 | 6.72k | auto& module = operation.first; | 2784 | 6.72k | auto& op = operation.second; | 2785 | | | 2786 | 6.72k | if ( i > 0 ) { | 2787 | 3.28k | auto& prevModule = operations[i-1].first; | 2788 | 3.28k | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 3.28k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 972 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 972 | if ( curModifier.size() == 0 ) { | 2793 | 176k | for (size_t j = 0; j < 512; j++) { | 2794 | 176k | curModifier.push_back(1); | 2795 | 176k | } | 2796 | 627 | } else { | 2797 | 56.3k | for (auto& c : curModifier) { | 2798 | 56.3k | c++; | 2799 | 56.3k | } | 2800 | 627 | } | 2801 | 972 | } | 2802 | 3.28k | } | 2803 | | | 2804 | 6.72k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 6.72k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 6.72k | const auto& result = results.back(); | 2811 | | | 2812 | 6.72k | if ( result.second != std::nullopt ) { | 2813 | 3.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 | 3.28k | } | 2820 | | | 2821 | 6.72k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 6.72k | if ( options.disableTests == false ) { | 2830 | 6.72k | tests::test(op, result.second); | 2831 | 6.72k | } | 2832 | | | 2833 | 6.72k | postprocess(module, op, result); | 2834 | 6.72k | } | 2835 | | | 2836 | 3.59k | if ( options.noCompare == false ) { | 2837 | 3.44k | compare(operations, results, data, size); | 2838 | 3.44k | } | 2839 | 3.59k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 29 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 29 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 29 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 73 | do { | 2725 | 73 | auto op = getOp(&parentDs, data, size); | 2726 | 73 | auto module = getModule(parentDs); | 2727 | 73 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 73 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 73 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 73 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 29 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 29 | #if 1 | 2745 | 29 | { | 2746 | 29 | std::set<uint64_t> moduleIDs; | 2747 | 29 | for (const auto& m : modules ) { | 2748 | 18 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 18 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 18 | moduleIDs.insert(moduleID); | 2756 | 18 | } | 2757 | | | 2758 | 29 | std::set<uint64_t> operationModuleIDs; | 2759 | 50 | for (const auto& op : operations) { | 2760 | 50 | operationModuleIDs.insert(op.first->ID); | 2761 | 50 | } | 2762 | | | 2763 | 29 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 29 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 29 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 29 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 29 | } | 2771 | 29 | #endif | 2772 | | | 2773 | 29 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 29 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 79 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 50 | auto& operation = operations[i]; | 2782 | | | 2783 | 50 | auto& module = operation.first; | 2784 | 50 | auto& op = operation.second; | 2785 | | | 2786 | 50 | if ( i > 0 ) { | 2787 | 32 | auto& prevModule = operations[i-1].first; | 2788 | 32 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 32 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 17 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 17 | if ( curModifier.size() == 0 ) { | 2793 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.07k | curModifier.push_back(1); | 2795 | 3.07k | } | 2796 | 11 | } else { | 2797 | 247 | for (auto& c : curModifier) { | 2798 | 247 | c++; | 2799 | 247 | } | 2800 | 11 | } | 2801 | 17 | } | 2802 | 32 | } | 2803 | | | 2804 | 50 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 50 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 50 | const auto& result = results.back(); | 2811 | | | 2812 | 50 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 50 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 50 | if ( options.disableTests == false ) { | 2830 | 50 | tests::test(op, result.second); | 2831 | 50 | } | 2832 | | | 2833 | 50 | postprocess(module, op, result); | 2834 | 50 | } | 2835 | | | 2836 | 29 | if ( options.noCompare == false ) { | 2837 | 18 | compare(operations, results, data, size); | 2838 | 18 | } | 2839 | 29 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 30 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 30 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 30 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 75 | do { | 2725 | 75 | auto op = getOp(&parentDs, data, size); | 2726 | 75 | auto module = getModule(parentDs); | 2727 | 75 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 75 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 75 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 75 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 30 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 30 | #if 1 | 2745 | 30 | { | 2746 | 30 | std::set<uint64_t> moduleIDs; | 2747 | 30 | for (const auto& m : modules ) { | 2748 | 19 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 19 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 19 | moduleIDs.insert(moduleID); | 2756 | 19 | } | 2757 | | | 2758 | 30 | std::set<uint64_t> operationModuleIDs; | 2759 | 53 | for (const auto& op : operations) { | 2760 | 53 | operationModuleIDs.insert(op.first->ID); | 2761 | 53 | } | 2762 | | | 2763 | 30 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 30 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 30 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 30 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 30 | } | 2771 | 30 | #endif | 2772 | | | 2773 | 30 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 30 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 83 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 53 | auto& operation = operations[i]; | 2782 | | | 2783 | 53 | auto& module = operation.first; | 2784 | 53 | auto& op = operation.second; | 2785 | | | 2786 | 53 | if ( i > 0 ) { | 2787 | 34 | auto& prevModule = operations[i-1].first; | 2788 | 34 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 34 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 18 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 18 | if ( curModifier.size() == 0 ) { | 2793 | 3.59k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.58k | curModifier.push_back(1); | 2795 | 3.58k | } | 2796 | 11 | } else { | 2797 | 259 | for (auto& c : curModifier) { | 2798 | 259 | c++; | 2799 | 259 | } | 2800 | 11 | } | 2801 | 18 | } | 2802 | 34 | } | 2803 | | | 2804 | 53 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 53 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 53 | const auto& result = results.back(); | 2811 | | | 2812 | 53 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 53 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 53 | if ( options.disableTests == false ) { | 2830 | 53 | tests::test(op, result.second); | 2831 | 53 | } | 2832 | | | 2833 | 53 | postprocess(module, op, result); | 2834 | 53 | } | 2835 | | | 2836 | 30 | if ( options.noCompare == false ) { | 2837 | 19 | compare(operations, results, data, size); | 2838 | 19 | } | 2839 | 30 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 32 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 32 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 32 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 76 | do { | 2725 | 76 | auto op = getOp(&parentDs, data, size); | 2726 | 76 | auto module = getModule(parentDs); | 2727 | 76 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 76 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 76 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 76 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 32 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 32 | #if 1 | 2745 | 32 | { | 2746 | 32 | std::set<uint64_t> moduleIDs; | 2747 | 32 | for (const auto& m : modules ) { | 2748 | 17 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 17 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 17 | moduleIDs.insert(moduleID); | 2756 | 17 | } | 2757 | | | 2758 | 32 | std::set<uint64_t> operationModuleIDs; | 2759 | 44 | for (const auto& op : operations) { | 2760 | 44 | operationModuleIDs.insert(op.first->ID); | 2761 | 44 | } | 2762 | | | 2763 | 32 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 32 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 32 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 32 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 32 | } | 2771 | 32 | #endif | 2772 | | | 2773 | 32 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 32 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 76 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 44 | auto& operation = operations[i]; | 2782 | | | 2783 | 44 | auto& module = operation.first; | 2784 | 44 | auto& op = operation.second; | 2785 | | | 2786 | 44 | if ( i > 0 ) { | 2787 | 27 | auto& prevModule = operations[i-1].first; | 2788 | 27 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 27 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 15 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 15 | if ( curModifier.size() == 0 ) { | 2793 | 3.59k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.58k | curModifier.push_back(1); | 2795 | 3.58k | } | 2796 | 8 | } else { | 2797 | 255 | for (auto& c : curModifier) { | 2798 | 255 | c++; | 2799 | 255 | } | 2800 | 8 | } | 2801 | 15 | } | 2802 | 27 | } | 2803 | | | 2804 | 44 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 44 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 44 | const auto& result = results.back(); | 2811 | | | 2812 | 44 | 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 | 44 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 44 | if ( options.disableTests == false ) { | 2830 | 44 | tests::test(op, result.second); | 2831 | 44 | } | 2832 | | | 2833 | 44 | postprocess(module, op, result); | 2834 | 44 | } | 2835 | | | 2836 | 32 | if ( options.noCompare == false ) { | 2837 | 17 | compare(operations, results, data, size); | 2838 | 17 | } | 2839 | 32 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 32 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 32 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 32 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 76 | do { | 2725 | 76 | auto op = getOp(&parentDs, data, size); | 2726 | 76 | auto module = getModule(parentDs); | 2727 | 76 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 76 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 76 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 76 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 32 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 32 | #if 1 | 2745 | 32 | { | 2746 | 32 | std::set<uint64_t> moduleIDs; | 2747 | 32 | for (const auto& m : modules ) { | 2748 | 18 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 18 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 18 | moduleIDs.insert(moduleID); | 2756 | 18 | } | 2757 | | | 2758 | 32 | std::set<uint64_t> operationModuleIDs; | 2759 | 48 | for (const auto& op : operations) { | 2760 | 48 | operationModuleIDs.insert(op.first->ID); | 2761 | 48 | } | 2762 | | | 2763 | 32 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 32 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 32 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 32 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 32 | } | 2771 | 32 | #endif | 2772 | | | 2773 | 32 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 32 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 80 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 48 | auto& operation = operations[i]; | 2782 | | | 2783 | 48 | auto& module = operation.first; | 2784 | 48 | auto& op = operation.second; | 2785 | | | 2786 | 48 | if ( i > 0 ) { | 2787 | 30 | auto& prevModule = operations[i-1].first; | 2788 | 30 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 30 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 18 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 18 | if ( curModifier.size() == 0 ) { | 2793 | 2.05k | for (size_t j = 0; j < 512; j++) { | 2794 | 2.04k | curModifier.push_back(1); | 2795 | 2.04k | } | 2796 | 14 | } else { | 2797 | 244 | for (auto& c : curModifier) { | 2798 | 244 | c++; | 2799 | 244 | } | 2800 | 14 | } | 2801 | 18 | } | 2802 | 30 | } | 2803 | | | 2804 | 48 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 48 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 48 | const auto& result = results.back(); | 2811 | | | 2812 | 48 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 48 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 48 | if ( options.disableTests == false ) { | 2830 | 48 | tests::test(op, result.second); | 2831 | 48 | } | 2832 | | | 2833 | 48 | postprocess(module, op, result); | 2834 | 48 | } | 2835 | | | 2836 | 32 | if ( options.noCompare == false ) { | 2837 | 18 | compare(operations, results, data, size); | 2838 | 18 | } | 2839 | 32 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 56 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 56 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 56 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 131 | do { | 2725 | 131 | auto op = getOp(&parentDs, data, size); | 2726 | 131 | auto module = getModule(parentDs); | 2727 | 131 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 131 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 131 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 131 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 56 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 56 | #if 1 | 2745 | 56 | { | 2746 | 56 | std::set<uint64_t> moduleIDs; | 2747 | 56 | for (const auto& m : modules ) { | 2748 | 38 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 38 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 38 | moduleIDs.insert(moduleID); | 2756 | 38 | } | 2757 | | | 2758 | 56 | std::set<uint64_t> operationModuleIDs; | 2759 | 93 | for (const auto& op : operations) { | 2760 | 93 | operationModuleIDs.insert(op.first->ID); | 2761 | 93 | } | 2762 | | | 2763 | 56 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 56 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 56 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 56 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 56 | } | 2771 | 56 | #endif | 2772 | | | 2773 | 56 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 56 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 149 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 93 | auto& operation = operations[i]; | 2782 | | | 2783 | 93 | auto& module = operation.first; | 2784 | 93 | auto& op = operation.second; | 2785 | | | 2786 | 93 | if ( i > 0 ) { | 2787 | 55 | auto& prevModule = operations[i-1].first; | 2788 | 55 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 55 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 29 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 29 | if ( curModifier.size() == 0 ) { | 2793 | 9.23k | for (size_t j = 0; j < 512; j++) { | 2794 | 9.21k | curModifier.push_back(1); | 2795 | 9.21k | } | 2796 | 18 | } else { | 2797 | 282 | for (auto& c : curModifier) { | 2798 | 282 | c++; | 2799 | 282 | } | 2800 | 11 | } | 2801 | 29 | } | 2802 | 55 | } | 2803 | | | 2804 | 93 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 93 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 93 | const auto& result = results.back(); | 2811 | | | 2812 | 93 | 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 | 93 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 93 | if ( options.disableTests == false ) { | 2830 | 93 | tests::test(op, result.second); | 2831 | 93 | } | 2832 | | | 2833 | 93 | postprocess(module, op, result); | 2834 | 93 | } | 2835 | | | 2836 | 56 | if ( options.noCompare == false ) { | 2837 | 38 | compare(operations, results, data, size); | 2838 | 38 | } | 2839 | 56 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 51 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 51 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 51 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 115 | do { | 2725 | 115 | auto op = getOp(&parentDs, data, size); | 2726 | 115 | auto module = getModule(parentDs); | 2727 | 115 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 115 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 115 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 115 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 51 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 51 | #if 1 | 2745 | 51 | { | 2746 | 51 | std::set<uint64_t> moduleIDs; | 2747 | 51 | for (const auto& m : modules ) { | 2748 | 35 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 35 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 35 | moduleIDs.insert(moduleID); | 2756 | 35 | } | 2757 | | | 2758 | 51 | std::set<uint64_t> operationModuleIDs; | 2759 | 84 | for (const auto& op : operations) { | 2760 | 84 | operationModuleIDs.insert(op.first->ID); | 2761 | 84 | } | 2762 | | | 2763 | 51 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 51 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 51 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 51 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 51 | } | 2771 | 51 | #endif | 2772 | | | 2773 | 51 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 51 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 135 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 84 | auto& operation = operations[i]; | 2782 | | | 2783 | 84 | auto& module = operation.first; | 2784 | 84 | auto& op = operation.second; | 2785 | | | 2786 | 84 | if ( i > 0 ) { | 2787 | 49 | auto& prevModule = operations[i-1].first; | 2788 | 49 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 49 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 23 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 23 | 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 | 12 | } else { | 2797 | 218 | for (auto& c : curModifier) { | 2798 | 218 | c++; | 2799 | 218 | } | 2800 | 12 | } | 2801 | 23 | } | 2802 | 49 | } | 2803 | | | 2804 | 84 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 84 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 84 | const auto& result = results.back(); | 2811 | | | 2812 | 84 | 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 | 84 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 84 | if ( options.disableTests == false ) { | 2830 | 84 | tests::test(op, result.second); | 2831 | 84 | } | 2832 | | | 2833 | 84 | postprocess(module, op, result); | 2834 | 84 | } | 2835 | | | 2836 | 51 | if ( options.noCompare == false ) { | 2837 | 35 | compare(operations, results, data, size); | 2838 | 35 | } | 2839 | 51 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 40 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 40 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 40 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 94 | do { | 2725 | 94 | auto op = getOp(&parentDs, data, size); | 2726 | 94 | auto module = getModule(parentDs); | 2727 | 94 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 94 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 94 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 94 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 40 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 40 | #if 1 | 2745 | 40 | { | 2746 | 40 | std::set<uint64_t> moduleIDs; | 2747 | 40 | for (const auto& m : modules ) { | 2748 | 20 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 20 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 20 | moduleIDs.insert(moduleID); | 2756 | 20 | } | 2757 | | | 2758 | 40 | std::set<uint64_t> operationModuleIDs; | 2759 | 53 | for (const auto& op : operations) { | 2760 | 53 | operationModuleIDs.insert(op.first->ID); | 2761 | 53 | } | 2762 | | | 2763 | 40 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 40 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 40 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 40 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 40 | } | 2771 | 40 | #endif | 2772 | | | 2773 | 40 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 40 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 93 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 53 | auto& operation = operations[i]; | 2782 | | | 2783 | 53 | auto& module = operation.first; | 2784 | 53 | auto& op = operation.second; | 2785 | | | 2786 | 53 | if ( i > 0 ) { | 2787 | 33 | auto& prevModule = operations[i-1].first; | 2788 | 33 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 33 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 17 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 17 | if ( curModifier.size() == 0 ) { | 2793 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.07k | curModifier.push_back(1); | 2795 | 3.07k | } | 2796 | 11 | } else { | 2797 | 245 | for (auto& c : curModifier) { | 2798 | 245 | c++; | 2799 | 245 | } | 2800 | 11 | } | 2801 | 17 | } | 2802 | 33 | } | 2803 | | | 2804 | 53 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 53 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 53 | const auto& result = results.back(); | 2811 | | | 2812 | 53 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 53 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 53 | if ( options.disableTests == false ) { | 2830 | 53 | tests::test(op, result.second); | 2831 | 53 | } | 2832 | | | 2833 | 53 | postprocess(module, op, result); | 2834 | 53 | } | 2835 | | | 2836 | 40 | if ( options.noCompare == false ) { | 2837 | 20 | compare(operations, results, data, size); | 2838 | 20 | } | 2839 | 40 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 46 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 46 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 46 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 103 | do { | 2725 | 103 | auto op = getOp(&parentDs, data, size); | 2726 | 103 | auto module = getModule(parentDs); | 2727 | 103 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 103 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 103 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 103 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 46 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 46 | #if 1 | 2745 | 46 | { | 2746 | 46 | std::set<uint64_t> moduleIDs; | 2747 | 46 | for (const auto& m : modules ) { | 2748 | 18 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 18 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 18 | moduleIDs.insert(moduleID); | 2756 | 18 | } | 2757 | | | 2758 | 46 | std::set<uint64_t> operationModuleIDs; | 2759 | 52 | for (const auto& op : operations) { | 2760 | 52 | operationModuleIDs.insert(op.first->ID); | 2761 | 52 | } | 2762 | | | 2763 | 46 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 46 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 46 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 46 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 46 | } | 2771 | 46 | #endif | 2772 | | | 2773 | 46 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 46 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 98 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 52 | auto& operation = operations[i]; | 2782 | | | 2783 | 52 | auto& module = operation.first; | 2784 | 52 | auto& op = operation.second; | 2785 | | | 2786 | 52 | if ( i > 0 ) { | 2787 | 34 | auto& prevModule = operations[i-1].first; | 2788 | 34 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 34 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 16 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 16 | if ( curModifier.size() == 0 ) { | 2793 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.07k | curModifier.push_back(1); | 2795 | 3.07k | } | 2796 | 10 | } else { | 2797 | 1.05k | for (auto& c : curModifier) { | 2798 | 1.05k | c++; | 2799 | 1.05k | } | 2800 | 10 | } | 2801 | 16 | } | 2802 | 34 | } | 2803 | | | 2804 | 52 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 52 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 52 | const auto& result = results.back(); | 2811 | | | 2812 | 52 | 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 | 52 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 52 | if ( options.disableTests == false ) { | 2830 | 52 | tests::test(op, result.second); | 2831 | 52 | } | 2832 | | | 2833 | 52 | postprocess(module, op, result); | 2834 | 52 | } | 2835 | | | 2836 | 46 | if ( options.noCompare == false ) { | 2837 | 18 | compare(operations, results, data, size); | 2838 | 18 | } | 2839 | 46 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 62 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 62 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 62 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 140 | do { | 2725 | 140 | auto op = getOp(&parentDs, data, size); | 2726 | 140 | auto module = getModule(parentDs); | 2727 | 140 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 140 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 140 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 140 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 62 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 62 | #if 1 | 2745 | 62 | { | 2746 | 62 | std::set<uint64_t> moduleIDs; | 2747 | 62 | for (const auto& m : modules ) { | 2748 | 44 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 44 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 44 | moduleIDs.insert(moduleID); | 2756 | 44 | } | 2757 | | | 2758 | 62 | std::set<uint64_t> operationModuleIDs; | 2759 | 100 | for (const auto& op : operations) { | 2760 | 100 | operationModuleIDs.insert(op.first->ID); | 2761 | 100 | } | 2762 | | | 2763 | 62 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 62 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 62 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 62 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 62 | } | 2771 | 62 | #endif | 2772 | | | 2773 | 62 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 62 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 162 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 100 | auto& operation = operations[i]; | 2782 | | | 2783 | 100 | auto& module = operation.first; | 2784 | 100 | auto& op = operation.second; | 2785 | | | 2786 | 100 | if ( i > 0 ) { | 2787 | 56 | auto& prevModule = operations[i-1].first; | 2788 | 56 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 56 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 22 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 22 | if ( curModifier.size() == 0 ) { | 2793 | 3.59k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.58k | curModifier.push_back(1); | 2795 | 3.58k | } | 2796 | 15 | } else { | 2797 | 361 | for (auto& c : curModifier) { | 2798 | 361 | c++; | 2799 | 361 | } | 2800 | 15 | } | 2801 | 22 | } | 2802 | 56 | } | 2803 | | | 2804 | 100 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 100 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 100 | const auto& result = results.back(); | 2811 | | | 2812 | 100 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 100 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 100 | if ( options.disableTests == false ) { | 2830 | 100 | tests::test(op, result.second); | 2831 | 100 | } | 2832 | | | 2833 | 100 | postprocess(module, op, result); | 2834 | 100 | } | 2835 | | | 2836 | 62 | if ( options.noCompare == false ) { | 2837 | 44 | compare(operations, results, data, size); | 2838 | 44 | } | 2839 | 62 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 717 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 717 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 717 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.60k | do { | 2725 | 1.60k | auto op = getOp(&parentDs, data, size); | 2726 | 1.60k | auto module = getModule(parentDs); | 2727 | 1.60k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 1.60k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.60k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 43 | break; | 2736 | 43 | } | 2737 | 1.60k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 717 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 717 | #if 1 | 2745 | 717 | { | 2746 | 717 | std::set<uint64_t> moduleIDs; | 2747 | 717 | for (const auto& m : modules ) { | 2748 | 596 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 596 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 596 | moduleIDs.insert(moduleID); | 2756 | 596 | } | 2757 | | | 2758 | 717 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.33k | for (const auto& op : operations) { | 2760 | 1.33k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.33k | } | 2762 | | | 2763 | 717 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 717 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 717 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 717 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 717 | } | 2771 | 717 | #endif | 2772 | | | 2773 | 717 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 717 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 2.04k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.33k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.33k | auto& module = operation.first; | 2784 | 1.33k | auto& op = operation.second; | 2785 | | | 2786 | 1.33k | if ( i > 0 ) { | 2787 | 734 | auto& prevModule = operations[i-1].first; | 2788 | 734 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 734 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 280 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 280 | if ( curModifier.size() == 0 ) { | 2793 | 27.7k | for (size_t j = 0; j < 512; j++) { | 2794 | 27.6k | curModifier.push_back(1); | 2795 | 27.6k | } | 2796 | 226 | } else { | 2797 | 2.61k | for (auto& c : curModifier) { | 2798 | 2.61k | c++; | 2799 | 2.61k | } | 2800 | 226 | } | 2801 | 280 | } | 2802 | 734 | } | 2803 | | | 2804 | 1.33k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.33k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.33k | const auto& result = results.back(); | 2811 | | | 2812 | 1.33k | if ( result.second != std::nullopt ) { | 2813 | 234 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 234 | } | 2820 | | | 2821 | 1.33k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->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.33k | if ( options.disableTests == false ) { | 2830 | 1.33k | tests::test(op, result.second); | 2831 | 1.33k | } | 2832 | | | 2833 | 1.33k | postprocess(module, op, result); | 2834 | 1.33k | } | 2835 | | | 2836 | 717 | if ( options.noCompare == false ) { | 2837 | 596 | compare(operations, results, data, size); | 2838 | 596 | } | 2839 | 717 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 888 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 888 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 888 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.84k | do { | 2725 | 1.84k | auto op = getOp(&parentDs, data, size); | 2726 | 1.84k | auto module = getModule(parentDs); | 2727 | 1.84k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 1.84k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.84k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 58 | break; | 2736 | 58 | } | 2737 | 1.84k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 888 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 888 | #if 1 | 2745 | 888 | { | 2746 | 888 | std::set<uint64_t> moduleIDs; | 2747 | 888 | for (const auto& m : modules ) { | 2748 | 710 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 710 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 710 | moduleIDs.insert(moduleID); | 2756 | 710 | } | 2757 | | | 2758 | 888 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.45k | for (const auto& op : operations) { | 2760 | 1.45k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.45k | } | 2762 | | | 2763 | 888 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 888 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 888 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 888 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 888 | } | 2771 | 888 | #endif | 2772 | | | 2773 | 888 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 888 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 2.34k | 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 | 743 | auto& prevModule = operations[i-1].first; | 2788 | 743 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 743 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 217 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 217 | if ( curModifier.size() == 0 ) { | 2793 | 40.5k | for (size_t j = 0; j < 512; j++) { | 2794 | 40.4k | curModifier.push_back(1); | 2795 | 40.4k | } | 2796 | 138 | } else { | 2797 | 9.81k | for (auto& c : curModifier) { | 2798 | 9.81k | c++; | 2799 | 9.81k | } | 2800 | 138 | } | 2801 | 217 | } | 2802 | 743 | } | 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 | 197 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 197 | } | 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 | 888 | if ( options.noCompare == false ) { | 2837 | 710 | compare(operations, results, data, size); | 2838 | 710 | } | 2839 | 888 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 936 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 936 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 936 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 1.93k | do { | 2725 | 1.93k | auto op = getOp(&parentDs, data, size); | 2726 | 1.93k | auto module = getModule(parentDs); | 2727 | 1.93k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 1.93k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 1.93k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 49 | break; | 2736 | 49 | } | 2737 | 1.93k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 936 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 936 | #if 1 | 2745 | 936 | { | 2746 | 936 | std::set<uint64_t> moduleIDs; | 2747 | 936 | for (const auto& m : modules ) { | 2748 | 746 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 746 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 746 | moduleIDs.insert(moduleID); | 2756 | 746 | } | 2757 | | | 2758 | 936 | std::set<uint64_t> operationModuleIDs; | 2759 | 1.51k | for (const auto& op : operations) { | 2760 | 1.51k | operationModuleIDs.insert(op.first->ID); | 2761 | 1.51k | } | 2762 | | | 2763 | 936 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 936 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 936 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 936 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 936 | } | 2771 | 936 | #endif | 2772 | | | 2773 | 936 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 936 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 2.45k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 1.51k | auto& operation = operations[i]; | 2782 | | | 2783 | 1.51k | auto& module = operation.first; | 2784 | 1.51k | auto& op = operation.second; | 2785 | | | 2786 | 1.51k | if ( i > 0 ) { | 2787 | 768 | auto& prevModule = operations[i-1].first; | 2788 | 768 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 768 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 248 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 248 | if ( curModifier.size() == 0 ) { | 2793 | 46.1k | for (size_t j = 0; j < 512; j++) { | 2794 | 46.0k | curModifier.push_back(1); | 2795 | 46.0k | } | 2796 | 158 | } else { | 2797 | 10.1k | for (auto& c : curModifier) { | 2798 | 10.1k | c++; | 2799 | 10.1k | } | 2800 | 158 | } | 2801 | 248 | } | 2802 | 768 | } | 2803 | | | 2804 | 1.51k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 1.51k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 1.51k | const auto& result = results.back(); | 2811 | | | 2812 | 1.51k | if ( result.second != std::nullopt ) { | 2813 | 21 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 21 | } | 2820 | | | 2821 | 1.51k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->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.51k | if ( options.disableTests == false ) { | 2830 | 1.51k | tests::test(op, result.second); | 2831 | 1.51k | } | 2832 | | | 2833 | 1.51k | postprocess(module, op, result); | 2834 | 1.51k | } | 2835 | | | 2836 | 936 | if ( options.noCompare == false ) { | 2837 | 746 | compare(operations, results, data, size); | 2838 | 746 | } | 2839 | 936 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 2.97k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 2.97k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 2.97k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 5.00k | do { | 2725 | 5.00k | auto op = getOp(&parentDs, data, size); | 2726 | 5.00k | auto module = getModule(parentDs); | 2727 | 5.00k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 5.00k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 5.00k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 93 | break; | 2736 | 93 | } | 2737 | 5.00k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 2.97k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 2.97k | #if 1 | 2745 | 2.97k | { | 2746 | 2.97k | std::set<uint64_t> moduleIDs; | 2747 | 2.97k | for (const auto& m : modules ) { | 2748 | 2.71k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 2.71k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 2.71k | moduleIDs.insert(moduleID); | 2756 | 2.71k | } | 2757 | | | 2758 | 2.97k | std::set<uint64_t> operationModuleIDs; | 2759 | 4.52k | for (const auto& op : operations) { | 2760 | 4.52k | operationModuleIDs.insert(op.first->ID); | 2761 | 4.52k | } | 2762 | | | 2763 | 2.97k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 2.97k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 2.97k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 2.97k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 2.97k | } | 2771 | 2.97k | #endif | 2772 | | | 2773 | 2.97k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 2.97k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 7.49k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 4.52k | auto& operation = operations[i]; | 2782 | | | 2783 | 4.52k | auto& module = operation.first; | 2784 | 4.52k | auto& op = operation.second; | 2785 | | | 2786 | 4.52k | if ( i > 0 ) { | 2787 | 1.81k | auto& prevModule = operations[i-1].first; | 2788 | 1.81k | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 1.81k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 582 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 582 | if ( curModifier.size() == 0 ) { | 2793 | 54.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 54.2k | curModifier.push_back(1); | 2795 | 54.2k | } | 2796 | 476 | } else { | 2797 | 31.6k | for (auto& c : curModifier) { | 2798 | 31.6k | c++; | 2799 | 31.6k | } | 2800 | 476 | } | 2801 | 582 | } | 2802 | 1.81k | } | 2803 | | | 2804 | 4.52k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 4.52k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 4.52k | const auto& result = results.back(); | 2811 | | | 2812 | 4.52k | if ( result.second != std::nullopt ) { | 2813 | 254 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 254 | } | 2820 | | | 2821 | 4.52k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 4.52k | if ( options.disableTests == false ) { | 2830 | 4.52k | tests::test(op, result.second); | 2831 | 4.52k | } | 2832 | | | 2833 | 4.52k | postprocess(module, op, result); | 2834 | 4.52k | } | 2835 | | | 2836 | 2.97k | if ( options.noCompare == false ) { | 2837 | 2.71k | compare(operations, results, data, size); | 2838 | 2.71k | } | 2839 | 2.97k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 39 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 39 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 39 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 95 | do { | 2725 | 95 | auto op = getOp(&parentDs, data, size); | 2726 | 95 | auto module = getModule(parentDs); | 2727 | 95 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 95 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 95 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 95 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 39 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 39 | #if 1 | 2745 | 39 | { | 2746 | 39 | std::set<uint64_t> moduleIDs; | 2747 | 39 | for (const auto& m : modules ) { | 2748 | 20 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 20 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 20 | moduleIDs.insert(moduleID); | 2756 | 20 | } | 2757 | | | 2758 | 39 | std::set<uint64_t> operationModuleIDs; | 2759 | 53 | for (const auto& op : operations) { | 2760 | 53 | operationModuleIDs.insert(op.first->ID); | 2761 | 53 | } | 2762 | | | 2763 | 39 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 39 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 39 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 39 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 39 | } | 2771 | 39 | #endif | 2772 | | | 2773 | 39 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 39 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 92 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 53 | auto& operation = operations[i]; | 2782 | | | 2783 | 53 | auto& module = operation.first; | 2784 | 53 | auto& op = operation.second; | 2785 | | | 2786 | 53 | if ( i > 0 ) { | 2787 | 33 | auto& prevModule = operations[i-1].first; | 2788 | 33 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 33 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 17 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 17 | if ( curModifier.size() == 0 ) { | 2793 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.07k | curModifier.push_back(1); | 2795 | 3.07k | } | 2796 | 11 | } else { | 2797 | 293 | for (auto& c : curModifier) { | 2798 | 293 | c++; | 2799 | 293 | } | 2800 | 11 | } | 2801 | 17 | } | 2802 | 33 | } | 2803 | | | 2804 | 53 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 53 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 53 | const auto& result = results.back(); | 2811 | | | 2812 | 53 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 53 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 53 | if ( options.disableTests == false ) { | 2830 | 53 | tests::test(op, result.second); | 2831 | 53 | } | 2832 | | | 2833 | 53 | postprocess(module, op, result); | 2834 | 53 | } | 2835 | | | 2836 | 39 | if ( options.noCompare == false ) { | 2837 | 20 | compare(operations, results, data, size); | 2838 | 20 | } | 2839 | 39 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 3.40k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 3.40k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 3.40k | 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 | 0 | continue; | 2729 | 0 | } | 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 | 48 | break; | 2736 | 48 | } | 2737 | 4.96k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 3.40k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 3.40k | #if 1 | 2745 | 3.40k | { | 2746 | 3.40k | std::set<uint64_t> moduleIDs; | 2747 | 3.40k | for (const auto& m : modules ) { | 2748 | 3.20k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 3.20k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 3.20k | moduleIDs.insert(moduleID); | 2756 | 3.20k | } | 2757 | | | 2758 | 3.40k | std::set<uint64_t> operationModuleIDs; | 2759 | 4.59k | for (const auto& op : operations) { | 2760 | 4.59k | operationModuleIDs.insert(op.first->ID); | 2761 | 4.59k | } | 2762 | | | 2763 | 3.40k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 3.40k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 3.40k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 3.40k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 3.40k | } | 2771 | 3.40k | #endif | 2772 | | | 2773 | 3.40k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 3.40k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 7.99k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 4.59k | auto& operation = operations[i]; | 2782 | | | 2783 | 4.59k | auto& module = operation.first; | 2784 | 4.59k | auto& op = operation.second; | 2785 | | | 2786 | 4.59k | if ( i > 0 ) { | 2787 | 1.38k | auto& prevModule = operations[i-1].first; | 2788 | 1.38k | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 1.38k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 424 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 424 | if ( curModifier.size() == 0 ) { | 2793 | 61.5k | for (size_t j = 0; j < 512; j++) { | 2794 | 61.4k | curModifier.push_back(1); | 2795 | 61.4k | } | 2796 | 304 | } else { | 2797 | 23.0k | for (auto& c : curModifier) { | 2798 | 23.0k | c++; | 2799 | 23.0k | } | 2800 | 304 | } | 2801 | 424 | } | 2802 | 1.38k | } | 2803 | | | 2804 | 4.59k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 4.59k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 4.59k | const auto& result = results.back(); | 2811 | | | 2812 | 4.59k | if ( result.second != std::nullopt ) { | 2813 | 362 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 362 | } | 2820 | | | 2821 | 4.59k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 4.59k | if ( options.disableTests == false ) { | 2830 | 4.59k | tests::test(op, result.second); | 2831 | 4.59k | } | 2832 | | | 2833 | 4.59k | postprocess(module, op, result); | 2834 | 4.59k | } | 2835 | | | 2836 | 3.40k | if ( options.noCompare == false ) { | 2837 | 3.20k | compare(operations, results, data, size); | 2838 | 3.20k | } | 2839 | 3.40k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 149 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 149 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 149 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 300 | do { | 2725 | 300 | auto op = getOp(&parentDs, data, size); | 2726 | 300 | auto module = getModule(parentDs); | 2727 | 300 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 300 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 300 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 300 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 149 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 149 | #if 1 | 2745 | 149 | { | 2746 | 149 | std::set<uint64_t> moduleIDs; | 2747 | 149 | for (const auto& m : modules ) { | 2748 | 136 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 136 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 136 | moduleIDs.insert(moduleID); | 2756 | 136 | } | 2757 | | | 2758 | 149 | std::set<uint64_t> operationModuleIDs; | 2759 | 268 | for (const auto& op : operations) { | 2760 | 268 | operationModuleIDs.insert(op.first->ID); | 2761 | 268 | } | 2762 | | | 2763 | 149 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 149 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 149 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 149 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 149 | } | 2771 | 149 | #endif | 2772 | | | 2773 | 149 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 149 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 417 | 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 | 132 | auto& prevModule = operations[i-1].first; | 2788 | 132 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 132 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 44 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 44 | if ( curModifier.size() == 0 ) { | 2793 | 15.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 15.3k | curModifier.push_back(1); | 2795 | 15.3k | } | 2796 | 30 | } else { | 2797 | 204 | for (auto& c : curModifier) { | 2798 | 204 | c++; | 2799 | 204 | } | 2800 | 14 | } | 2801 | 44 | } | 2802 | 132 | } | 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 | 47 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 47 | } | 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 | 149 | if ( options.noCompare == false ) { | 2837 | 136 | compare(operations, results, data, size); | 2838 | 136 | } | 2839 | 149 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 5.65k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 5.65k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 5.65k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 7.54k | do { | 2725 | 7.54k | auto op = getOp(&parentDs, data, size); | 2726 | 7.54k | auto module = getModule(parentDs); | 2727 | 7.54k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 7.54k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 7.54k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 67 | break; | 2736 | 67 | } | 2737 | 7.54k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 5.65k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 5.65k | #if 1 | 2745 | 5.65k | { | 2746 | 5.65k | std::set<uint64_t> moduleIDs; | 2747 | 5.65k | for (const auto& m : modules ) { | 2748 | 5.37k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 5.37k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 5.37k | moduleIDs.insert(moduleID); | 2756 | 5.37k | } | 2757 | | | 2758 | 5.65k | std::set<uint64_t> operationModuleIDs; | 2759 | 7.08k | for (const auto& op : operations) { | 2760 | 7.08k | operationModuleIDs.insert(op.first->ID); | 2761 | 7.08k | } | 2762 | | | 2763 | 5.65k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 5.65k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 5.65k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 5.65k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 5.65k | } | 2771 | 5.65k | #endif | 2772 | | | 2773 | 5.65k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 5.65k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 12.7k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 7.08k | auto& operation = operations[i]; | 2782 | | | 2783 | 7.08k | auto& module = operation.first; | 2784 | 7.08k | auto& op = operation.second; | 2785 | | | 2786 | 7.08k | if ( i > 0 ) { | 2787 | 1.70k | auto& prevModule = operations[i-1].first; | 2788 | 1.70k | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 1.70k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 484 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 484 | if ( curModifier.size() == 0 ) { | 2793 | 41.5k | for (size_t j = 0; j < 512; j++) { | 2794 | 41.4k | curModifier.push_back(1); | 2795 | 41.4k | } | 2796 | 403 | } else { | 2797 | 18.4k | for (auto& c : curModifier) { | 2798 | 18.4k | c++; | 2799 | 18.4k | } | 2800 | 403 | } | 2801 | 484 | } | 2802 | 1.70k | } | 2803 | | | 2804 | 7.08k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 7.08k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 7.08k | const auto& result = results.back(); | 2811 | | | 2812 | 7.08k | if ( result.second != std::nullopt ) { | 2813 | 131 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 131 | } | 2820 | | | 2821 | 7.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 | 7.08k | if ( options.disableTests == false ) { | 2830 | 7.08k | tests::test(op, result.second); | 2831 | 7.08k | } | 2832 | | | 2833 | 7.08k | postprocess(module, op, result); | 2834 | 7.08k | } | 2835 | | | 2836 | 5.65k | if ( options.noCompare == false ) { | 2837 | 5.37k | compare(operations, results, data, size); | 2838 | 5.37k | } | 2839 | 5.65k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 65 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 65 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 65 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 153 | do { | 2725 | 153 | auto op = getOp(&parentDs, data, size); | 2726 | 153 | auto module = getModule(parentDs); | 2727 | 153 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 153 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 153 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 153 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 65 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 65 | #if 1 | 2745 | 65 | { | 2746 | 65 | std::set<uint64_t> moduleIDs; | 2747 | 65 | for (const auto& m : modules ) { | 2748 | 47 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 47 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 47 | moduleIDs.insert(moduleID); | 2756 | 47 | } | 2757 | | | 2758 | 65 | std::set<uint64_t> operationModuleIDs; | 2759 | 110 | for (const auto& op : operations) { | 2760 | 110 | operationModuleIDs.insert(op.first->ID); | 2761 | 110 | } | 2762 | | | 2763 | 65 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 65 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 65 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 65 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 65 | } | 2771 | 65 | #endif | 2772 | | | 2773 | 65 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 65 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 175 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 110 | auto& operation = operations[i]; | 2782 | | | 2783 | 110 | auto& module = operation.first; | 2784 | 110 | auto& op = operation.second; | 2785 | | | 2786 | 110 | if ( i > 0 ) { | 2787 | 63 | auto& prevModule = operations[i-1].first; | 2788 | 63 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 63 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 29 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 29 | if ( curModifier.size() == 0 ) { | 2793 | 9.23k | for (size_t j = 0; j < 512; j++) { | 2794 | 9.21k | curModifier.push_back(1); | 2795 | 9.21k | } | 2796 | 18 | } else { | 2797 | 217 | for (auto& c : curModifier) { | 2798 | 217 | c++; | 2799 | 217 | } | 2800 | 11 | } | 2801 | 29 | } | 2802 | 63 | } | 2803 | | | 2804 | 110 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 110 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 110 | const auto& result = results.back(); | 2811 | | | 2812 | 110 | if ( result.second != std::nullopt ) { | 2813 | 44 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 44 | } | 2820 | | | 2821 | 110 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 110 | if ( options.disableTests == false ) { | 2830 | 110 | tests::test(op, result.second); | 2831 | 110 | } | 2832 | | | 2833 | 110 | postprocess(module, op, result); | 2834 | 110 | } | 2835 | | | 2836 | 65 | if ( options.noCompare == false ) { | 2837 | 47 | compare(operations, results, data, size); | 2838 | 47 | } | 2839 | 65 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 3.31k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 3.31k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 3.31k | 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 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 4.90k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 4.90k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 46 | break; | 2736 | 46 | } | 2737 | 4.90k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 3.31k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 3.31k | #if 1 | 2745 | 3.31k | { | 2746 | 3.31k | std::set<uint64_t> moduleIDs; | 2747 | 3.31k | for (const auto& m : modules ) { | 2748 | 3.04k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 3.04k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 3.04k | moduleIDs.insert(moduleID); | 2756 | 3.04k | } | 2757 | | | 2758 | 3.31k | std::set<uint64_t> operationModuleIDs; | 2759 | 4.44k | for (const auto& op : operations) { | 2760 | 4.44k | operationModuleIDs.insert(op.first->ID); | 2761 | 4.44k | } | 2762 | | | 2763 | 3.31k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 3.31k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 3.31k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 3.31k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 3.31k | } | 2771 | 3.31k | #endif | 2772 | | | 2773 | 3.31k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 3.31k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 7.75k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 4.44k | auto& operation = operations[i]; | 2782 | | | 2783 | 4.44k | auto& module = operation.first; | 2784 | 4.44k | auto& op = operation.second; | 2785 | | | 2786 | 4.44k | if ( i > 0 ) { | 2787 | 1.40k | auto& prevModule = operations[i-1].first; | 2788 | 1.40k | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 1.40k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 541 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 541 | 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 | 359 | } else { | 2797 | 35.8k | for (auto& c : curModifier) { | 2798 | 35.8k | c++; | 2799 | 35.8k | } | 2800 | 359 | } | 2801 | 541 | } | 2802 | 1.40k | } | 2803 | | | 2804 | 4.44k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 4.44k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 4.44k | const auto& result = results.back(); | 2811 | | | 2812 | 4.44k | if ( result.second != std::nullopt ) { | 2813 | 2.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 | 2.19k | } | 2820 | | | 2821 | 4.44k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 4.44k | if ( options.disableTests == false ) { | 2830 | 4.44k | tests::test(op, result.second); | 2831 | 4.44k | } | 2832 | | | 2833 | 4.44k | postprocess(module, op, result); | 2834 | 4.44k | } | 2835 | | | 2836 | 3.31k | if ( options.noCompare == false ) { | 2837 | 3.04k | compare(operations, results, data, size); | 2838 | 3.04k | } | 2839 | 3.31k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 1.49k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 1.49k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 1.49k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 3.02k | do { | 2725 | 3.02k | auto op = getOp(&parentDs, data, size); | 2726 | 3.02k | auto module = getModule(parentDs); | 2727 | 3.02k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 3.02k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 3.02k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 63 | break; | 2736 | 63 | } | 2737 | 3.02k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 1.49k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 1.49k | #if 1 | 2745 | 1.49k | { | 2746 | 1.49k | std::set<uint64_t> moduleIDs; | 2747 | 1.49k | for (const auto& m : modules ) { | 2748 | 1.26k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 1.26k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 1.26k | moduleIDs.insert(moduleID); | 2756 | 1.26k | } | 2757 | | | 2758 | 1.49k | 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.49k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 1.49k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 1.49k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 1.49k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 1.49k | } | 2771 | 1.49k | #endif | 2772 | | | 2773 | 1.49k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 1.49k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 4.10k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 2.61k | auto& operation = operations[i]; | 2782 | | | 2783 | 2.61k | auto& module = operation.first; | 2784 | 2.61k | auto& op = operation.second; | 2785 | | | 2786 | 2.61k | if ( i > 0 ) { | 2787 | 1.34k | auto& prevModule = operations[i-1].first; | 2788 | 1.34k | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 1.34k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 507 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 507 | if ( curModifier.size() == 0 ) { | 2793 | 133k | for (size_t j = 0; j < 512; j++) { | 2794 | 133k | curModifier.push_back(1); | 2795 | 133k | } | 2796 | 261 | } else { | 2797 | 16.4k | for (auto& c : curModifier) { | 2798 | 16.4k | c++; | 2799 | 16.4k | } | 2800 | 246 | } | 2801 | 507 | } | 2802 | 1.34k | } | 2803 | | | 2804 | 2.61k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 2.61k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 2.61k | const auto& result = results.back(); | 2811 | | | 2812 | 2.61k | if ( result.second != std::nullopt ) { | 2813 | 403 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 403 | } | 2820 | | | 2821 | 2.61k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->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.61k | if ( options.disableTests == false ) { | 2830 | 2.61k | tests::test(op, result.second); | 2831 | 2.61k | } | 2832 | | | 2833 | 2.61k | postprocess(module, op, result); | 2834 | 2.61k | } | 2835 | | | 2836 | 1.49k | if ( options.noCompare == false ) { | 2837 | 1.26k | compare(operations, results, data, size); | 2838 | 1.26k | } | 2839 | 1.49k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 47.0k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 47.0k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 47.0k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 60.1k | do { | 2725 | 60.1k | auto op = getOp(&parentDs, data, size); | 2726 | 60.1k | auto module = getModule(parentDs); | 2727 | 60.1k | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 60.1k | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 60.1k | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 460 | break; | 2736 | 460 | } | 2737 | 60.1k | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 47.0k | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 47.0k | #if 1 | 2745 | 47.0k | { | 2746 | 47.0k | std::set<uint64_t> moduleIDs; | 2747 | 47.0k | for (const auto& m : modules ) { | 2748 | 46.7k | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 46.7k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 46.7k | moduleIDs.insert(moduleID); | 2756 | 46.7k | } | 2757 | | | 2758 | 47.0k | std::set<uint64_t> operationModuleIDs; | 2759 | 59.5k | for (const auto& op : operations) { | 2760 | 59.5k | operationModuleIDs.insert(op.first->ID); | 2761 | 59.5k | } | 2762 | | | 2763 | 47.0k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 47.0k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 47.0k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 47.0k | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 47.0k | } | 2771 | 47.0k | #endif | 2772 | | | 2773 | 47.0k | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 47.0k | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 106k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 59.5k | auto& operation = operations[i]; | 2782 | | | 2783 | 59.5k | auto& module = operation.first; | 2784 | 59.5k | auto& op = operation.second; | 2785 | | | 2786 | 59.5k | if ( i > 0 ) { | 2787 | 12.8k | auto& prevModule = operations[i-1].first; | 2788 | 12.8k | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 12.8k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 4.36k | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 4.36k | if ( curModifier.size() == 0 ) { | 2793 | 1.34M | for (size_t j = 0; j < 512; j++) { | 2794 | 1.34M | curModifier.push_back(1); | 2795 | 1.34M | } | 2796 | 2.62k | } else { | 2797 | 685k | for (auto& c : curModifier) { | 2798 | 685k | c++; | 2799 | 685k | } | 2800 | 1.73k | } | 2801 | 4.36k | } | 2802 | 12.8k | } | 2803 | | | 2804 | 59.5k | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 59.5k | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 59.5k | const auto& result = results.back(); | 2811 | | | 2812 | 59.5k | if ( result.second != std::nullopt ) { | 2813 | 21.9k | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 21.9k | } | 2820 | | | 2821 | 59.5k | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 59.5k | if ( options.disableTests == false ) { | 2830 | 59.5k | tests::test(op, result.second); | 2831 | 59.5k | } | 2832 | | | 2833 | 59.5k | postprocess(module, op, result); | 2834 | 59.5k | } | 2835 | | | 2836 | 47.0k | if ( options.noCompare == false ) { | 2837 | 46.7k | compare(operations, results, data, size); | 2838 | 46.7k | } | 2839 | 47.0k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 70 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 70 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 70 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 160 | do { | 2725 | 160 | auto op = getOp(&parentDs, data, size); | 2726 | 160 | auto module = getModule(parentDs); | 2727 | 160 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 160 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 160 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 160 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 70 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 70 | #if 1 | 2745 | 70 | { | 2746 | 70 | std::set<uint64_t> moduleIDs; | 2747 | 70 | for (const auto& m : modules ) { | 2748 | 53 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 53 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 53 | moduleIDs.insert(moduleID); | 2756 | 53 | } | 2757 | | | 2758 | 70 | std::set<uint64_t> operationModuleIDs; | 2759 | 123 | for (const auto& op : operations) { | 2760 | 123 | operationModuleIDs.insert(op.first->ID); | 2761 | 123 | } | 2762 | | | 2763 | 70 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 70 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 70 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 70 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 70 | } | 2771 | 70 | #endif | 2772 | | | 2773 | 70 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 70 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 193 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 123 | auto& operation = operations[i]; | 2782 | | | 2783 | 123 | auto& module = operation.first; | 2784 | 123 | auto& op = operation.second; | 2785 | | | 2786 | 123 | if ( i > 0 ) { | 2787 | 70 | auto& prevModule = operations[i-1].first; | 2788 | 70 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 70 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 35 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 35 | if ( curModifier.size() == 0 ) { | 2793 | 9.23k | for (size_t j = 0; j < 512; j++) { | 2794 | 9.21k | curModifier.push_back(1); | 2795 | 9.21k | } | 2796 | 18 | } else { | 2797 | 5.90k | for (auto& c : curModifier) { | 2798 | 5.90k | c++; | 2799 | 5.90k | } | 2800 | 17 | } | 2801 | 35 | } | 2802 | 70 | } | 2803 | | | 2804 | 123 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 123 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 123 | const auto& result = results.back(); | 2811 | | | 2812 | 123 | 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 | 123 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 123 | if ( options.disableTests == false ) { | 2830 | 123 | tests::test(op, result.second); | 2831 | 123 | } | 2832 | | | 2833 | 123 | postprocess(module, op, result); | 2834 | 123 | } | 2835 | | | 2836 | 70 | if ( options.noCompare == false ) { | 2837 | 53 | compare(operations, results, data, size); | 2838 | 53 | } | 2839 | 70 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 331 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 331 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 331 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 721 | do { | 2725 | 721 | auto op = getOp(&parentDs, data, size); | 2726 | 721 | auto module = getModule(parentDs); | 2727 | 721 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 721 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 721 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 16 | break; | 2736 | 16 | } | 2737 | 721 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 331 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 331 | #if 1 | 2745 | 331 | { | 2746 | 331 | std::set<uint64_t> moduleIDs; | 2747 | 331 | for (const auto& m : modules ) { | 2748 | 308 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 308 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 308 | moduleIDs.insert(moduleID); | 2756 | 308 | } | 2757 | | | 2758 | 331 | std::set<uint64_t> operationModuleIDs; | 2759 | 678 | for (const auto& op : operations) { | 2760 | 678 | operationModuleIDs.insert(op.first->ID); | 2761 | 678 | } | 2762 | | | 2763 | 331 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 331 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 331 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 331 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 331 | } | 2771 | 331 | #endif | 2772 | | | 2773 | 331 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 331 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 1.00k | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 678 | auto& operation = operations[i]; | 2782 | | | 2783 | 678 | auto& module = operation.first; | 2784 | 678 | auto& op = operation.second; | 2785 | | | 2786 | 678 | if ( i > 0 ) { | 2787 | 370 | auto& prevModule = operations[i-1].first; | 2788 | 370 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 370 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 167 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 167 | if ( curModifier.size() == 0 ) { | 2793 | 70.2k | for (size_t j = 0; j < 512; j++) { | 2794 | 70.1k | curModifier.push_back(1); | 2795 | 70.1k | } | 2796 | 137 | } else { | 2797 | 8.95k | for (auto& c : curModifier) { | 2798 | 8.95k | c++; | 2799 | 8.95k | } | 2800 | 30 | } | 2801 | 167 | } | 2802 | 370 | } | 2803 | | | 2804 | 678 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 678 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 678 | const auto& result = results.back(); | 2811 | | | 2812 | 678 | 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 | 678 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 678 | if ( options.disableTests == false ) { | 2830 | 678 | tests::test(op, result.second); | 2831 | 678 | } | 2832 | | | 2833 | 678 | postprocess(module, op, result); | 2834 | 678 | } | 2835 | | | 2836 | 331 | if ( options.noCompare == false ) { | 2837 | 308 | compare(operations, results, data, size); | 2838 | 308 | } | 2839 | 331 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 38 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 38 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 38 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 92 | do { | 2725 | 92 | auto op = getOp(&parentDs, data, size); | 2726 | 92 | auto module = getModule(parentDs); | 2727 | 92 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 92 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 92 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 92 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 38 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 38 | #if 1 | 2745 | 38 | { | 2746 | 38 | std::set<uint64_t> moduleIDs; | 2747 | 38 | for (const auto& m : modules ) { | 2748 | 23 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 23 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 23 | moduleIDs.insert(moduleID); | 2756 | 23 | } | 2757 | | | 2758 | 38 | std::set<uint64_t> operationModuleIDs; | 2759 | 55 | for (const auto& op : operations) { | 2760 | 55 | operationModuleIDs.insert(op.first->ID); | 2761 | 55 | } | 2762 | | | 2763 | 38 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 38 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 38 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 38 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 38 | } | 2771 | 38 | #endif | 2772 | | | 2773 | 38 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 38 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 93 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 55 | auto& operation = operations[i]; | 2782 | | | 2783 | 55 | auto& module = operation.first; | 2784 | 55 | auto& op = operation.second; | 2785 | | | 2786 | 55 | if ( i > 0 ) { | 2787 | 32 | auto& prevModule = operations[i-1].first; | 2788 | 32 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 32 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 17 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 17 | if ( curModifier.size() == 0 ) { | 2793 | 2.56k | for (size_t j = 0; j < 512; j++) { | 2794 | 2.56k | curModifier.push_back(1); | 2795 | 2.56k | } | 2796 | 12 | } else { | 2797 | 234 | for (auto& c : curModifier) { | 2798 | 234 | c++; | 2799 | 234 | } | 2800 | 12 | } | 2801 | 17 | } | 2802 | 32 | } | 2803 | | | 2804 | 55 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 55 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 55 | const auto& result = results.back(); | 2811 | | | 2812 | 55 | 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 | 55 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 55 | if ( options.disableTests == false ) { | 2830 | 55 | tests::test(op, result.second); | 2831 | 55 | } | 2832 | | | 2833 | 55 | postprocess(module, op, result); | 2834 | 55 | } | 2835 | | | 2836 | 38 | if ( options.noCompare == false ) { | 2837 | 23 | compare(operations, results, data, size); | 2838 | 23 | } | 2839 | 38 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 48 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 48 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 48 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 103 | do { | 2725 | 103 | auto op = getOp(&parentDs, data, size); | 2726 | 103 | auto module = getModule(parentDs); | 2727 | 103 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 103 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 103 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 103 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 48 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 48 | #if 1 | 2745 | 48 | { | 2746 | 48 | std::set<uint64_t> moduleIDs; | 2747 | 48 | for (const auto& m : modules ) { | 2748 | 34 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 34 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 34 | moduleIDs.insert(moduleID); | 2756 | 34 | } | 2757 | | | 2758 | 48 | std::set<uint64_t> operationModuleIDs; | 2759 | 70 | for (const auto& op : operations) { | 2760 | 70 | operationModuleIDs.insert(op.first->ID); | 2761 | 70 | } | 2762 | | | 2763 | 48 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 48 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 48 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 48 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 48 | } | 2771 | 48 | #endif | 2772 | | | 2773 | 48 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 48 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 118 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 70 | auto& operation = operations[i]; | 2782 | | | 2783 | 70 | auto& module = operation.first; | 2784 | 70 | auto& op = operation.second; | 2785 | | | 2786 | 70 | if ( i > 0 ) { | 2787 | 36 | auto& prevModule = operations[i-1].first; | 2788 | 36 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 36 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 18 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 18 | if ( curModifier.size() == 0 ) { | 2793 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.07k | curModifier.push_back(1); | 2795 | 3.07k | } | 2796 | 12 | } else { | 2797 | 206 | for (auto& c : curModifier) { | 2798 | 206 | c++; | 2799 | 206 | } | 2800 | 12 | } | 2801 | 18 | } | 2802 | 36 | } | 2803 | | | 2804 | 70 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 70 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 70 | const auto& result = results.back(); | 2811 | | | 2812 | 70 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 70 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 70 | if ( options.disableTests == false ) { | 2830 | 70 | tests::test(op, result.second); | 2831 | 70 | } | 2832 | | | 2833 | 70 | postprocess(module, op, result); | 2834 | 70 | } | 2835 | | | 2836 | 48 | if ( options.noCompare == false ) { | 2837 | 34 | compare(operations, results, data, size); | 2838 | 34 | } | 2839 | 48 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 40 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 40 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 40 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 91 | do { | 2725 | 91 | auto op = getOp(&parentDs, data, size); | 2726 | 91 | auto module = getModule(parentDs); | 2727 | 91 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 91 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 91 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 91 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 40 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 40 | #if 1 | 2745 | 40 | { | 2746 | 40 | std::set<uint64_t> moduleIDs; | 2747 | 40 | for (const auto& m : modules ) { | 2748 | 23 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 23 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 23 | moduleIDs.insert(moduleID); | 2756 | 23 | } | 2757 | | | 2758 | 40 | std::set<uint64_t> operationModuleIDs; | 2759 | 57 | for (const auto& op : operations) { | 2760 | 57 | operationModuleIDs.insert(op.first->ID); | 2761 | 57 | } | 2762 | | | 2763 | 40 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 40 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 40 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 40 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 40 | } | 2771 | 40 | #endif | 2772 | | | 2773 | 40 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 40 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 97 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 57 | auto& operation = operations[i]; | 2782 | | | 2783 | 57 | auto& module = operation.first; | 2784 | 57 | auto& op = operation.second; | 2785 | | | 2786 | 57 | if ( i > 0 ) { | 2787 | 34 | auto& prevModule = operations[i-1].first; | 2788 | 34 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 34 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 20 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 20 | if ( curModifier.size() == 0 ) { | 2793 | 2.56k | for (size_t j = 0; j < 512; j++) { | 2794 | 2.56k | curModifier.push_back(1); | 2795 | 2.56k | } | 2796 | 15 | } else { | 2797 | 250 | for (auto& c : curModifier) { | 2798 | 250 | c++; | 2799 | 250 | } | 2800 | 15 | } | 2801 | 20 | } | 2802 | 34 | } | 2803 | | | 2804 | 57 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 57 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 57 | const auto& result = results.back(); | 2811 | | | 2812 | 57 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 57 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 57 | if ( options.disableTests == false ) { | 2830 | 57 | tests::test(op, result.second); | 2831 | 57 | } | 2832 | | | 2833 | 57 | postprocess(module, op, result); | 2834 | 57 | } | 2835 | | | 2836 | 40 | if ( options.noCompare == false ) { | 2837 | 23 | compare(operations, results, data, size); | 2838 | 23 | } | 2839 | 40 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 30 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 30 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 30 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 65 | do { | 2725 | 65 | auto op = getOp(&parentDs, data, size); | 2726 | 65 | auto module = getModule(parentDs); | 2727 | 65 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 65 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 65 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 65 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 30 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 30 | #if 1 | 2745 | 30 | { | 2746 | 30 | std::set<uint64_t> moduleIDs; | 2747 | 30 | for (const auto& m : modules ) { | 2748 | 14 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 14 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 14 | moduleIDs.insert(moduleID); | 2756 | 14 | } | 2757 | | | 2758 | 30 | std::set<uint64_t> operationModuleIDs; | 2759 | 39 | for (const auto& op : operations) { | 2760 | 39 | operationModuleIDs.insert(op.first->ID); | 2761 | 39 | } | 2762 | | | 2763 | 30 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 30 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 30 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 30 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 30 | } | 2771 | 30 | #endif | 2772 | | | 2773 | 30 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 30 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 69 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 39 | auto& operation = operations[i]; | 2782 | | | 2783 | 39 | auto& module = operation.first; | 2784 | 39 | auto& op = operation.second; | 2785 | | | 2786 | 39 | if ( i > 0 ) { | 2787 | 25 | auto& prevModule = operations[i-1].first; | 2788 | 25 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 25 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 11 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 11 | if ( curModifier.size() == 0 ) { | 2793 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.07k | curModifier.push_back(1); | 2795 | 3.07k | } | 2796 | 6 | } else { | 2797 | 389 | for (auto& c : curModifier) { | 2798 | 389 | c++; | 2799 | 389 | } | 2800 | 5 | } | 2801 | 11 | } | 2802 | 25 | } | 2803 | | | 2804 | 39 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 39 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 39 | const auto& result = results.back(); | 2811 | | | 2812 | 39 | 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 | 39 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 39 | if ( options.disableTests == false ) { | 2830 | 39 | tests::test(op, result.second); | 2831 | 39 | } | 2832 | | | 2833 | 39 | postprocess(module, op, result); | 2834 | 39 | } | 2835 | | | 2836 | 30 | if ( options.noCompare == false ) { | 2837 | 14 | compare(operations, results, data, size); | 2838 | 14 | } | 2839 | 30 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 128 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 128 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 128 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 234 | do { | 2725 | 234 | auto op = getOp(&parentDs, data, size); | 2726 | 234 | auto module = getModule(parentDs); | 2727 | 234 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 234 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 234 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 234 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 128 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 128 | #if 1 | 2745 | 128 | { | 2746 | 128 | std::set<uint64_t> moduleIDs; | 2747 | 128 | for (const auto& m : modules ) { | 2748 | 28 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 28 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 28 | moduleIDs.insert(moduleID); | 2756 | 28 | } | 2757 | | | 2758 | 128 | std::set<uint64_t> operationModuleIDs; | 2759 | 128 | for (const auto& op : operations) { | 2760 | 71 | operationModuleIDs.insert(op.first->ID); | 2761 | 71 | } | 2762 | | | 2763 | 128 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 128 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 128 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 128 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 128 | } | 2771 | 128 | #endif | 2772 | | | 2773 | 128 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 128 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 199 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 71 | auto& operation = operations[i]; | 2782 | | | 2783 | 71 | auto& module = operation.first; | 2784 | 71 | auto& op = operation.second; | 2785 | | | 2786 | 71 | if ( i > 0 ) { | 2787 | 43 | auto& prevModule = operations[i-1].first; | 2788 | 43 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 43 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 18 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 18 | if ( curModifier.size() == 0 ) { | 2793 | 4.61k | for (size_t j = 0; j < 512; j++) { | 2794 | 4.60k | curModifier.push_back(1); | 2795 | 4.60k | } | 2796 | 9 | } else { | 2797 | 366 | for (auto& c : curModifier) { | 2798 | 366 | c++; | 2799 | 366 | } | 2800 | 9 | } | 2801 | 18 | } | 2802 | 43 | } | 2803 | | | 2804 | 71 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 71 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 71 | const auto& result = results.back(); | 2811 | | | 2812 | 71 | 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 | 71 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 71 | if ( options.disableTests == false ) { | 2830 | 71 | tests::test(op, result.second); | 2831 | 71 | } | 2832 | | | 2833 | 71 | postprocess(module, op, result); | 2834 | 71 | } | 2835 | | | 2836 | 128 | if ( options.noCompare == false ) { | 2837 | 28 | compare(operations, results, data, size); | 2838 | 28 | } | 2839 | 128 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 72 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 72 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 72 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 156 | do { | 2725 | 156 | auto op = getOp(&parentDs, data, size); | 2726 | 156 | auto module = getModule(parentDs); | 2727 | 156 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 156 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 156 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 156 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 72 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 72 | #if 1 | 2745 | 72 | { | 2746 | 72 | std::set<uint64_t> moduleIDs; | 2747 | 72 | for (const auto& m : modules ) { | 2748 | 18 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 18 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 18 | moduleIDs.insert(moduleID); | 2756 | 18 | } | 2757 | | | 2758 | 72 | std::set<uint64_t> operationModuleIDs; | 2759 | 72 | for (const auto& op : operations) { | 2760 | 55 | operationModuleIDs.insert(op.first->ID); | 2761 | 55 | } | 2762 | | | 2763 | 72 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 72 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 72 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 72 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 72 | } | 2771 | 72 | #endif | 2772 | | | 2773 | 72 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 72 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 127 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 55 | auto& operation = operations[i]; | 2782 | | | 2783 | 55 | auto& module = operation.first; | 2784 | 55 | auto& op = operation.second; | 2785 | | | 2786 | 55 | if ( i > 0 ) { | 2787 | 37 | auto& prevModule = operations[i-1].first; | 2788 | 37 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 37 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 15 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 15 | if ( curModifier.size() == 0 ) { | 2793 | 5.13k | for (size_t j = 0; j < 512; j++) { | 2794 | 5.12k | curModifier.push_back(1); | 2795 | 5.12k | } | 2796 | 10 | } else { | 2797 | 176 | for (auto& c : curModifier) { | 2798 | 176 | c++; | 2799 | 176 | } | 2800 | 5 | } | 2801 | 15 | } | 2802 | 37 | } | 2803 | | | 2804 | 55 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 55 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 55 | const auto& result = results.back(); | 2811 | | | 2812 | 55 | 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 | 55 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 55 | if ( options.disableTests == false ) { | 2830 | 55 | tests::test(op, result.second); | 2831 | 55 | } | 2832 | | | 2833 | 55 | postprocess(module, op, result); | 2834 | 55 | } | 2835 | | | 2836 | 72 | if ( options.noCompare == false ) { | 2837 | 18 | compare(operations, results, data, size); | 2838 | 18 | } | 2839 | 72 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 89 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 89 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 89 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 171 | do { | 2725 | 171 | auto op = getOp(&parentDs, data, size); | 2726 | 171 | auto module = getModule(parentDs); | 2727 | 171 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 171 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 171 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 171 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 89 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 89 | #if 1 | 2745 | 89 | { | 2746 | 89 | std::set<uint64_t> moduleIDs; | 2747 | 89 | for (const auto& m : modules ) { | 2748 | 16 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 16 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 16 | moduleIDs.insert(moduleID); | 2756 | 16 | } | 2757 | | | 2758 | 89 | std::set<uint64_t> operationModuleIDs; | 2759 | 89 | for (const auto& op : operations) { | 2760 | 55 | operationModuleIDs.insert(op.first->ID); | 2761 | 55 | } | 2762 | | | 2763 | 89 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 89 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 89 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 89 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 89 | } | 2771 | 89 | #endif | 2772 | | | 2773 | 89 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 89 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 144 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 55 | auto& operation = operations[i]; | 2782 | | | 2783 | 55 | auto& module = operation.first; | 2784 | 55 | auto& op = operation.second; | 2785 | | | 2786 | 55 | if ( i > 0 ) { | 2787 | 39 | auto& prevModule = operations[i-1].first; | 2788 | 39 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 39 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 17 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 17 | 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 | 11 | } else { | 2797 | 23 | for (auto& c : curModifier) { | 2798 | 23 | c++; | 2799 | 23 | } | 2800 | 6 | } | 2801 | 17 | } | 2802 | 39 | } | 2803 | | | 2804 | 55 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 55 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 55 | const auto& result = results.back(); | 2811 | | | 2812 | 55 | 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 | 55 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 55 | if ( options.disableTests == false ) { | 2830 | 55 | tests::test(op, result.second); | 2831 | 55 | } | 2832 | | | 2833 | 55 | postprocess(module, op, result); | 2834 | 55 | } | 2835 | | | 2836 | 89 | if ( options.noCompare == false ) { | 2837 | 16 | compare(operations, results, data, size); | 2838 | 16 | } | 2839 | 89 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 92 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 92 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 92 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 182 | do { | 2725 | 182 | auto op = getOp(&parentDs, data, size); | 2726 | 182 | auto module = getModule(parentDs); | 2727 | 182 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 182 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 182 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 182 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 92 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 92 | #if 1 | 2745 | 92 | { | 2746 | 92 | std::set<uint64_t> moduleIDs; | 2747 | 92 | for (const auto& m : modules ) { | 2748 | 17 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 17 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 17 | moduleIDs.insert(moduleID); | 2756 | 17 | } | 2757 | | | 2758 | 92 | std::set<uint64_t> operationModuleIDs; | 2759 | 92 | for (const auto& op : operations) { | 2760 | 58 | operationModuleIDs.insert(op.first->ID); | 2761 | 58 | } | 2762 | | | 2763 | 92 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 92 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 92 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 92 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 92 | } | 2771 | 92 | #endif | 2772 | | | 2773 | 92 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 92 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 150 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 58 | auto& operation = operations[i]; | 2782 | | | 2783 | 58 | auto& module = operation.first; | 2784 | 58 | auto& op = operation.second; | 2785 | | | 2786 | 58 | if ( i > 0 ) { | 2787 | 41 | auto& prevModule = operations[i-1].first; | 2788 | 41 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 41 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 18 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 18 | if ( curModifier.size() == 0 ) { | 2793 | 8.20k | for (size_t j = 0; j < 512; j++) { | 2794 | 8.19k | curModifier.push_back(1); | 2795 | 8.19k | } | 2796 | 16 | } else { | 2797 | 3 | for (auto& c : curModifier) { | 2798 | 3 | c++; | 2799 | 3 | } | 2800 | 2 | } | 2801 | 18 | } | 2802 | 41 | } | 2803 | | | 2804 | 58 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 58 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 58 | const auto& result = results.back(); | 2811 | | | 2812 | 58 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 58 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 58 | if ( options.disableTests == false ) { | 2830 | 58 | tests::test(op, result.second); | 2831 | 58 | } | 2832 | | | 2833 | 58 | postprocess(module, op, result); | 2834 | 58 | } | 2835 | | | 2836 | 92 | if ( options.noCompare == false ) { | 2837 | 17 | compare(operations, results, data, size); | 2838 | 17 | } | 2839 | 92 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 35 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 35 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 35 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 91 | do { | 2725 | 91 | auto op = getOp(&parentDs, data, size); | 2726 | 91 | auto module = getModule(parentDs); | 2727 | 91 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 91 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 91 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 91 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 35 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 35 | #if 1 | 2745 | 35 | { | 2746 | 35 | std::set<uint64_t> moduleIDs; | 2747 | 35 | for (const auto& m : modules ) { | 2748 | 18 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 18 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 18 | moduleIDs.insert(moduleID); | 2756 | 18 | } | 2757 | | | 2758 | 35 | std::set<uint64_t> operationModuleIDs; | 2759 | 52 | for (const auto& op : operations) { | 2760 | 52 | operationModuleIDs.insert(op.first->ID); | 2761 | 52 | } | 2762 | | | 2763 | 35 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 35 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 35 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 35 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 35 | } | 2771 | 35 | #endif | 2772 | | | 2773 | 35 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 35 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 87 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 52 | auto& operation = operations[i]; | 2782 | | | 2783 | 52 | auto& module = operation.first; | 2784 | 52 | auto& op = operation.second; | 2785 | | | 2786 | 52 | if ( i > 0 ) { | 2787 | 34 | auto& prevModule = operations[i-1].first; | 2788 | 34 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 34 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 17 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 17 | if ( curModifier.size() == 0 ) { | 2793 | 3.59k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.58k | curModifier.push_back(1); | 2795 | 3.58k | } | 2796 | 10 | } else { | 2797 | 707 | for (auto& c : curModifier) { | 2798 | 707 | c++; | 2799 | 707 | } | 2800 | 10 | } | 2801 | 17 | } | 2802 | 34 | } | 2803 | | | 2804 | 52 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 52 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 52 | const auto& result = results.back(); | 2811 | | | 2812 | 52 | 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 | 52 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 52 | if ( options.disableTests == false ) { | 2830 | 52 | tests::test(op, result.second); | 2831 | 52 | } | 2832 | | | 2833 | 52 | postprocess(module, op, result); | 2834 | 52 | } | 2835 | | | 2836 | 35 | if ( options.noCompare == false ) { | 2837 | 18 | compare(operations, results, data, size); | 2838 | 18 | } | 2839 | 35 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 35 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 35 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 35 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 83 | do { | 2725 | 83 | auto op = getOp(&parentDs, data, size); | 2726 | 83 | auto module = getModule(parentDs); | 2727 | 83 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 83 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 83 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 83 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 35 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 35 | #if 1 | 2745 | 35 | { | 2746 | 35 | std::set<uint64_t> moduleIDs; | 2747 | 35 | for (const auto& m : modules ) { | 2748 | 16 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 16 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 16 | moduleIDs.insert(moduleID); | 2756 | 16 | } | 2757 | | | 2758 | 35 | std::set<uint64_t> operationModuleIDs; | 2759 | 42 | for (const auto& op : operations) { | 2760 | 42 | operationModuleIDs.insert(op.first->ID); | 2761 | 42 | } | 2762 | | | 2763 | 35 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 35 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 35 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 35 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 35 | } | 2771 | 35 | #endif | 2772 | | | 2773 | 35 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 35 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 77 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 42 | auto& operation = operations[i]; | 2782 | | | 2783 | 42 | auto& module = operation.first; | 2784 | 42 | auto& op = operation.second; | 2785 | | | 2786 | 42 | if ( i > 0 ) { | 2787 | 26 | auto& prevModule = operations[i-1].first; | 2788 | 26 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 26 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 13 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 13 | if ( curModifier.size() == 0 ) { | 2793 | 2.05k | for (size_t j = 0; j < 512; j++) { | 2794 | 2.04k | curModifier.push_back(1); | 2795 | 2.04k | } | 2796 | 9 | } else { | 2797 | 249 | for (auto& c : curModifier) { | 2798 | 249 | c++; | 2799 | 249 | } | 2800 | 9 | } | 2801 | 13 | } | 2802 | 26 | } | 2803 | | | 2804 | 42 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 42 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 42 | const auto& result = results.back(); | 2811 | | | 2812 | 42 | 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 | 42 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 42 | if ( options.disableTests == false ) { | 2830 | 42 | tests::test(op, result.second); | 2831 | 42 | } | 2832 | | | 2833 | 42 | postprocess(module, op, result); | 2834 | 42 | } | 2835 | | | 2836 | 35 | if ( options.noCompare == false ) { | 2837 | 16 | compare(operations, results, data, size); | 2838 | 16 | } | 2839 | 35 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 39 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 39 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 39 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 103 | do { | 2725 | 103 | auto op = getOp(&parentDs, data, size); | 2726 | 103 | auto module = getModule(parentDs); | 2727 | 103 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 103 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 103 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 103 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 39 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 39 | #if 1 | 2745 | 39 | { | 2746 | 39 | std::set<uint64_t> moduleIDs; | 2747 | 39 | for (const auto& m : modules ) { | 2748 | 19 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 19 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 19 | moduleIDs.insert(moduleID); | 2756 | 19 | } | 2757 | | | 2758 | 39 | std::set<uint64_t> operationModuleIDs; | 2759 | 54 | for (const auto& op : operations) { | 2760 | 54 | operationModuleIDs.insert(op.first->ID); | 2761 | 54 | } | 2762 | | | 2763 | 39 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 39 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 39 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 39 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 39 | } | 2771 | 39 | #endif | 2772 | | | 2773 | 39 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 39 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 93 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 54 | auto& operation = operations[i]; | 2782 | | | 2783 | 54 | auto& module = operation.first; | 2784 | 54 | auto& op = operation.second; | 2785 | | | 2786 | 54 | if ( i > 0 ) { | 2787 | 35 | auto& prevModule = operations[i-1].first; | 2788 | 35 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 35 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 17 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 17 | if ( curModifier.size() == 0 ) { | 2793 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.07k | curModifier.push_back(1); | 2795 | 3.07k | } | 2796 | 11 | } else { | 2797 | 679 | for (auto& c : curModifier) { | 2798 | 679 | c++; | 2799 | 679 | } | 2800 | 11 | } | 2801 | 17 | } | 2802 | 35 | } | 2803 | | | 2804 | 54 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 54 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 54 | const auto& result = results.back(); | 2811 | | | 2812 | 54 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 54 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 54 | if ( options.disableTests == false ) { | 2830 | 54 | tests::test(op, result.second); | 2831 | 54 | } | 2832 | | | 2833 | 54 | postprocess(module, op, result); | 2834 | 54 | } | 2835 | | | 2836 | 39 | if ( options.noCompare == false ) { | 2837 | 19 | compare(operations, results, data, size); | 2838 | 19 | } | 2839 | 39 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 35 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 35 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 35 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 93 | do { | 2725 | 93 | auto op = getOp(&parentDs, data, size); | 2726 | 93 | auto module = getModule(parentDs); | 2727 | 93 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 93 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 93 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 93 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 35 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 35 | #if 1 | 2745 | 35 | { | 2746 | 35 | std::set<uint64_t> moduleIDs; | 2747 | 35 | for (const auto& m : modules ) { | 2748 | 19 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 19 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 19 | moduleIDs.insert(moduleID); | 2756 | 19 | } | 2757 | | | 2758 | 35 | std::set<uint64_t> operationModuleIDs; | 2759 | 55 | for (const auto& op : operations) { | 2760 | 55 | operationModuleIDs.insert(op.first->ID); | 2761 | 55 | } | 2762 | | | 2763 | 35 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 35 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 35 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 35 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 35 | } | 2771 | 35 | #endif | 2772 | | | 2773 | 35 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 35 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 90 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 55 | auto& operation = operations[i]; | 2782 | | | 2783 | 55 | auto& module = operation.first; | 2784 | 55 | auto& op = operation.second; | 2785 | | | 2786 | 55 | if ( i > 0 ) { | 2787 | 36 | auto& prevModule = operations[i-1].first; | 2788 | 36 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 36 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 19 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 19 | if ( curModifier.size() == 0 ) { | 2793 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.07k | curModifier.push_back(1); | 2795 | 3.07k | } | 2796 | 13 | } else { | 2797 | 253 | for (auto& c : curModifier) { | 2798 | 253 | c++; | 2799 | 253 | } | 2800 | 13 | } | 2801 | 19 | } | 2802 | 36 | } | 2803 | | | 2804 | 55 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 55 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 55 | const auto& result = results.back(); | 2811 | | | 2812 | 55 | 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 | 55 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 55 | if ( options.disableTests == false ) { | 2830 | 55 | tests::test(op, result.second); | 2831 | 55 | } | 2832 | | | 2833 | 55 | postprocess(module, op, result); | 2834 | 55 | } | 2835 | | | 2836 | 35 | if ( options.noCompare == false ) { | 2837 | 19 | compare(operations, results, data, size); | 2838 | 19 | } | 2839 | 35 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 36 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 36 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 36 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 97 | do { | 2725 | 97 | auto op = getOp(&parentDs, data, size); | 2726 | 97 | auto module = getModule(parentDs); | 2727 | 97 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 97 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 97 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 97 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 36 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 36 | #if 1 | 2745 | 36 | { | 2746 | 36 | std::set<uint64_t> moduleIDs; | 2747 | 36 | for (const auto& m : modules ) { | 2748 | 20 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 20 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 20 | moduleIDs.insert(moduleID); | 2756 | 20 | } | 2757 | | | 2758 | 36 | std::set<uint64_t> operationModuleIDs; | 2759 | 59 | for (const auto& op : operations) { | 2760 | 59 | operationModuleIDs.insert(op.first->ID); | 2761 | 59 | } | 2762 | | | 2763 | 36 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 36 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 36 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 36 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 36 | } | 2771 | 36 | #endif | 2772 | | | 2773 | 36 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 36 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 95 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 59 | auto& operation = operations[i]; | 2782 | | | 2783 | 59 | auto& module = operation.first; | 2784 | 59 | auto& op = operation.second; | 2785 | | | 2786 | 59 | if ( i > 0 ) { | 2787 | 39 | auto& prevModule = operations[i-1].first; | 2788 | 39 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 39 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 17 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 17 | if ( curModifier.size() == 0 ) { | 2793 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.07k | curModifier.push_back(1); | 2795 | 3.07k | } | 2796 | 11 | } else { | 2797 | 248 | for (auto& c : curModifier) { | 2798 | 248 | c++; | 2799 | 248 | } | 2800 | 11 | } | 2801 | 17 | } | 2802 | 39 | } | 2803 | | | 2804 | 59 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 59 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 59 | const auto& result = results.back(); | 2811 | | | 2812 | 59 | 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 | 59 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 59 | if ( options.disableTests == false ) { | 2830 | 59 | tests::test(op, result.second); | 2831 | 59 | } | 2832 | | | 2833 | 59 | postprocess(module, op, result); | 2834 | 59 | } | 2835 | | | 2836 | 36 | if ( options.noCompare == false ) { | 2837 | 20 | compare(operations, results, data, size); | 2838 | 20 | } | 2839 | 36 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 33 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 33 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 33 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 83 | do { | 2725 | 83 | auto op = getOp(&parentDs, data, size); | 2726 | 83 | auto module = getModule(parentDs); | 2727 | 83 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 83 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 83 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 83 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 33 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 33 | #if 1 | 2745 | 33 | { | 2746 | 33 | std::set<uint64_t> moduleIDs; | 2747 | 33 | for (const auto& m : modules ) { | 2748 | 20 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 20 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 20 | moduleIDs.insert(moduleID); | 2756 | 20 | } | 2757 | | | 2758 | 33 | std::set<uint64_t> operationModuleIDs; | 2759 | 52 | for (const auto& op : operations) { | 2760 | 52 | operationModuleIDs.insert(op.first->ID); | 2761 | 52 | } | 2762 | | | 2763 | 33 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 33 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 33 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 33 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 33 | } | 2771 | 33 | #endif | 2772 | | | 2773 | 33 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 33 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 85 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 52 | auto& operation = operations[i]; | 2782 | | | 2783 | 52 | auto& module = operation.first; | 2784 | 52 | auto& op = operation.second; | 2785 | | | 2786 | 52 | if ( i > 0 ) { | 2787 | 32 | auto& prevModule = operations[i-1].first; | 2788 | 32 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 32 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 16 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 16 | if ( curModifier.size() == 0 ) { | 2793 | 2.05k | for (size_t j = 0; j < 512; j++) { | 2794 | 2.04k | curModifier.push_back(1); | 2795 | 2.04k | } | 2796 | 12 | } else { | 2797 | 265 | for (auto& c : curModifier) { | 2798 | 265 | c++; | 2799 | 265 | } | 2800 | 12 | } | 2801 | 16 | } | 2802 | 32 | } | 2803 | | | 2804 | 52 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 52 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 52 | const auto& result = results.back(); | 2811 | | | 2812 | 52 | 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 | 52 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 52 | if ( options.disableTests == false ) { | 2830 | 52 | tests::test(op, result.second); | 2831 | 52 | } | 2832 | | | 2833 | 52 | postprocess(module, op, result); | 2834 | 52 | } | 2835 | | | 2836 | 33 | if ( options.noCompare == false ) { | 2837 | 20 | compare(operations, results, data, size); | 2838 | 20 | } | 2839 | 33 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 31 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 31 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 31 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 83 | do { | 2725 | 83 | auto op = getOp(&parentDs, data, size); | 2726 | 83 | auto module = getModule(parentDs); | 2727 | 83 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 83 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 83 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 83 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 31 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 31 | #if 1 | 2745 | 31 | { | 2746 | 31 | std::set<uint64_t> moduleIDs; | 2747 | 31 | for (const auto& m : modules ) { | 2748 | 17 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 17 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 17 | moduleIDs.insert(moduleID); | 2756 | 17 | } | 2757 | | | 2758 | 31 | std::set<uint64_t> operationModuleIDs; | 2759 | 49 | for (const auto& op : operations) { | 2760 | 49 | operationModuleIDs.insert(op.first->ID); | 2761 | 49 | } | 2762 | | | 2763 | 31 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 31 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 31 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 31 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 31 | } | 2771 | 31 | #endif | 2772 | | | 2773 | 31 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 31 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 80 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 49 | auto& operation = operations[i]; | 2782 | | | 2783 | 49 | auto& module = operation.first; | 2784 | 49 | auto& op = operation.second; | 2785 | | | 2786 | 49 | if ( i > 0 ) { | 2787 | 32 | auto& prevModule = operations[i-1].first; | 2788 | 32 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 32 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 15 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 15 | if ( curModifier.size() == 0 ) { | 2793 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.07k | curModifier.push_back(1); | 2795 | 3.07k | } | 2796 | 9 | } else { | 2797 | 185 | for (auto& c : curModifier) { | 2798 | 185 | c++; | 2799 | 185 | } | 2800 | 9 | } | 2801 | 15 | } | 2802 | 32 | } | 2803 | | | 2804 | 49 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 49 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 49 | const auto& result = results.back(); | 2811 | | | 2812 | 49 | 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 | 49 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 49 | if ( options.disableTests == false ) { | 2830 | 49 | tests::test(op, result.second); | 2831 | 49 | } | 2832 | | | 2833 | 49 | postprocess(module, op, result); | 2834 | 49 | } | 2835 | | | 2836 | 31 | if ( options.noCompare == false ) { | 2837 | 17 | compare(operations, results, data, size); | 2838 | 17 | } | 2839 | 31 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 57 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 57 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 57 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 127 | do { | 2725 | 127 | auto op = getOp(&parentDs, data, size); | 2726 | 127 | auto module = getModule(parentDs); | 2727 | 127 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 127 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 127 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 127 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 57 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 57 | #if 1 | 2745 | 57 | { | 2746 | 57 | std::set<uint64_t> moduleIDs; | 2747 | 57 | for (const auto& m : modules ) { | 2748 | 39 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 39 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 39 | moduleIDs.insert(moduleID); | 2756 | 39 | } | 2757 | | | 2758 | 57 | std::set<uint64_t> operationModuleIDs; | 2759 | 87 | for (const auto& op : operations) { | 2760 | 87 | operationModuleIDs.insert(op.first->ID); | 2761 | 87 | } | 2762 | | | 2763 | 57 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 57 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 57 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 57 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 57 | } | 2771 | 57 | #endif | 2772 | | | 2773 | 57 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 57 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 144 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 87 | auto& operation = operations[i]; | 2782 | | | 2783 | 87 | auto& module = operation.first; | 2784 | 87 | auto& op = operation.second; | 2785 | | | 2786 | 87 | if ( i > 0 ) { | 2787 | 48 | auto& prevModule = operations[i-1].first; | 2788 | 48 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 48 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 26 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 26 | if ( curModifier.size() == 0 ) { | 2793 | 5.13k | for (size_t j = 0; j < 512; j++) { | 2794 | 5.12k | curModifier.push_back(1); | 2795 | 5.12k | } | 2796 | 16 | } else { | 2797 | 237 | for (auto& c : curModifier) { | 2798 | 237 | c++; | 2799 | 237 | } | 2800 | 16 | } | 2801 | 26 | } | 2802 | 48 | } | 2803 | | | 2804 | 87 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 87 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 87 | const auto& result = results.back(); | 2811 | | | 2812 | 87 | 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 | 87 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 87 | if ( options.disableTests == false ) { | 2830 | 87 | tests::test(op, result.second); | 2831 | 87 | } | 2832 | | | 2833 | 87 | postprocess(module, op, result); | 2834 | 87 | } | 2835 | | | 2836 | 57 | if ( options.noCompare == false ) { | 2837 | 39 | compare(operations, results, data, size); | 2838 | 39 | } | 2839 | 57 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 48 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 48 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 48 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 121 | do { | 2725 | 121 | auto op = getOp(&parentDs, data, size); | 2726 | 121 | auto module = getModule(parentDs); | 2727 | 121 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 121 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 121 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 5 | break; | 2736 | 5 | } | 2737 | 121 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 48 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 48 | #if 1 | 2745 | 48 | { | 2746 | 48 | std::set<uint64_t> moduleIDs; | 2747 | 48 | for (const auto& m : modules ) { | 2748 | 33 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 33 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 33 | moduleIDs.insert(moduleID); | 2756 | 33 | } | 2757 | | | 2758 | 48 | std::set<uint64_t> operationModuleIDs; | 2759 | 87 | for (const auto& op : operations) { | 2760 | 87 | operationModuleIDs.insert(op.first->ID); | 2761 | 87 | } | 2762 | | | 2763 | 48 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 48 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 48 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 48 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 48 | } | 2771 | 48 | #endif | 2772 | | | 2773 | 48 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 48 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 135 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 87 | auto& operation = operations[i]; | 2782 | | | 2783 | 87 | auto& module = operation.first; | 2784 | 87 | auto& op = operation.second; | 2785 | | | 2786 | 87 | if ( i > 0 ) { | 2787 | 54 | auto& prevModule = operations[i-1].first; | 2788 | 54 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 54 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 30 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 30 | if ( curModifier.size() == 0 ) { | 2793 | 9.74k | for (size_t j = 0; j < 512; j++) { | 2794 | 9.72k | curModifier.push_back(1); | 2795 | 9.72k | } | 2796 | 19 | } else { | 2797 | 2.19k | for (auto& c : curModifier) { | 2798 | 2.19k | c++; | 2799 | 2.19k | } | 2800 | 11 | } | 2801 | 30 | } | 2802 | 54 | } | 2803 | | | 2804 | 87 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 87 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 87 | const auto& result = results.back(); | 2811 | | | 2812 | 87 | 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 | 87 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 87 | if ( options.disableTests == false ) { | 2830 | 87 | tests::test(op, result.second); | 2831 | 87 | } | 2832 | | | 2833 | 87 | postprocess(module, op, result); | 2834 | 87 | } | 2835 | | | 2836 | 48 | if ( options.noCompare == false ) { | 2837 | 33 | compare(operations, results, data, size); | 2838 | 33 | } | 2839 | 48 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 32 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 32 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 32 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 82 | do { | 2725 | 82 | auto op = getOp(&parentDs, data, size); | 2726 | 82 | auto module = getModule(parentDs); | 2727 | 82 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 82 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 82 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 82 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 32 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 32 | #if 1 | 2745 | 32 | { | 2746 | 32 | std::set<uint64_t> moduleIDs; | 2747 | 32 | for (const auto& m : modules ) { | 2748 | 19 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 19 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 19 | moduleIDs.insert(moduleID); | 2756 | 19 | } | 2757 | | | 2758 | 32 | std::set<uint64_t> operationModuleIDs; | 2759 | 52 | for (const auto& op : operations) { | 2760 | 52 | operationModuleIDs.insert(op.first->ID); | 2761 | 52 | } | 2762 | | | 2763 | 32 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 32 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 32 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 32 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 32 | } | 2771 | 32 | #endif | 2772 | | | 2773 | 32 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 32 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 84 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 52 | auto& operation = operations[i]; | 2782 | | | 2783 | 52 | auto& module = operation.first; | 2784 | 52 | auto& op = operation.second; | 2785 | | | 2786 | 52 | if ( i > 0 ) { | 2787 | 33 | auto& prevModule = operations[i-1].first; | 2788 | 33 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 33 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 16 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 16 | if ( curModifier.size() == 0 ) { | 2793 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.07k | curModifier.push_back(1); | 2795 | 3.07k | } | 2796 | 10 | } else { | 2797 | 307 | for (auto& c : curModifier) { | 2798 | 307 | c++; | 2799 | 307 | } | 2800 | 10 | } | 2801 | 16 | } | 2802 | 33 | } | 2803 | | | 2804 | 52 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 52 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 52 | const auto& result = results.back(); | 2811 | | | 2812 | 52 | 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 | 52 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 52 | if ( options.disableTests == false ) { | 2830 | 52 | tests::test(op, result.second); | 2831 | 52 | } | 2832 | | | 2833 | 52 | postprocess(module, op, result); | 2834 | 52 | } | 2835 | | | 2836 | 32 | if ( options.noCompare == false ) { | 2837 | 19 | compare(operations, results, data, size); | 2838 | 19 | } | 2839 | 32 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 30 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 30 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 30 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 80 | do { | 2725 | 80 | auto op = getOp(&parentDs, data, size); | 2726 | 80 | auto module = getModule(parentDs); | 2727 | 80 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 80 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 80 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 80 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 30 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 30 | #if 1 | 2745 | 30 | { | 2746 | 30 | std::set<uint64_t> moduleIDs; | 2747 | 30 | for (const auto& m : modules ) { | 2748 | 18 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 18 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 18 | moduleIDs.insert(moduleID); | 2756 | 18 | } | 2757 | | | 2758 | 30 | std::set<uint64_t> operationModuleIDs; | 2759 | 50 | for (const auto& op : operations) { | 2760 | 50 | operationModuleIDs.insert(op.first->ID); | 2761 | 50 | } | 2762 | | | 2763 | 30 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 30 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 30 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 30 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 30 | } | 2771 | 30 | #endif | 2772 | | | 2773 | 30 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 30 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 80 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 50 | auto& operation = operations[i]; | 2782 | | | 2783 | 50 | auto& module = operation.first; | 2784 | 50 | auto& op = operation.second; | 2785 | | | 2786 | 50 | if ( i > 0 ) { | 2787 | 32 | auto& prevModule = operations[i-1].first; | 2788 | 32 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 32 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 16 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 16 | if ( curModifier.size() == 0 ) { | 2793 | 3.59k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.58k | curModifier.push_back(1); | 2795 | 3.58k | } | 2796 | 9 | } else { | 2797 | 92 | for (auto& c : curModifier) { | 2798 | 92 | c++; | 2799 | 92 | } | 2800 | 9 | } | 2801 | 16 | } | 2802 | 32 | } | 2803 | | | 2804 | 50 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 50 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 50 | const auto& result = results.back(); | 2811 | | | 2812 | 50 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 50 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 50 | if ( options.disableTests == false ) { | 2830 | 50 | tests::test(op, result.second); | 2831 | 50 | } | 2832 | | | 2833 | 50 | postprocess(module, op, result); | 2834 | 50 | } | 2835 | | | 2836 | 30 | if ( options.noCompare == false ) { | 2837 | 18 | compare(operations, results, data, size); | 2838 | 18 | } | 2839 | 30 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 34 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 34 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 34 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 89 | do { | 2725 | 89 | auto op = getOp(&parentDs, data, size); | 2726 | 89 | auto module = getModule(parentDs); | 2727 | 89 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 89 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 89 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 1 | break; | 2736 | 1 | } | 2737 | 89 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 34 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 34 | #if 1 | 2745 | 34 | { | 2746 | 34 | std::set<uint64_t> moduleIDs; | 2747 | 34 | for (const auto& m : modules ) { | 2748 | 20 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 20 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 20 | moduleIDs.insert(moduleID); | 2756 | 20 | } | 2757 | | | 2758 | 34 | std::set<uint64_t> operationModuleIDs; | 2759 | 53 | for (const auto& op : operations) { | 2760 | 53 | operationModuleIDs.insert(op.first->ID); | 2761 | 53 | } | 2762 | | | 2763 | 34 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 34 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 34 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 34 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 34 | } | 2771 | 34 | #endif | 2772 | | | 2773 | 34 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 34 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 87 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 53 | auto& operation = operations[i]; | 2782 | | | 2783 | 53 | auto& module = operation.first; | 2784 | 53 | auto& op = operation.second; | 2785 | | | 2786 | 53 | if ( i > 0 ) { | 2787 | 33 | auto& prevModule = operations[i-1].first; | 2788 | 33 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 33 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 16 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 16 | if ( curModifier.size() == 0 ) { | 2793 | 2.56k | for (size_t j = 0; j < 512; j++) { | 2794 | 2.56k | curModifier.push_back(1); | 2795 | 2.56k | } | 2796 | 11 | } else { | 2797 | 240 | for (auto& c : curModifier) { | 2798 | 240 | c++; | 2799 | 240 | } | 2800 | 11 | } | 2801 | 16 | } | 2802 | 33 | } | 2803 | | | 2804 | 53 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 53 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 53 | const auto& result = results.back(); | 2811 | | | 2812 | 53 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 53 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 53 | if ( options.disableTests == false ) { | 2830 | 53 | tests::test(op, result.second); | 2831 | 53 | } | 2832 | | | 2833 | 53 | postprocess(module, op, result); | 2834 | 53 | } | 2835 | | | 2836 | 34 | if ( options.noCompare == false ) { | 2837 | 20 | compare(operations, results, data, size); | 2838 | 20 | } | 2839 | 34 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 39 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 39 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 39 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 97 | do { | 2725 | 97 | auto op = getOp(&parentDs, data, size); | 2726 | 97 | auto module = getModule(parentDs); | 2727 | 97 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 97 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 97 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 97 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 39 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 39 | #if 1 | 2745 | 39 | { | 2746 | 39 | std::set<uint64_t> moduleIDs; | 2747 | 39 | for (const auto& m : modules ) { | 2748 | 20 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 20 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 20 | moduleIDs.insert(moduleID); | 2756 | 20 | } | 2757 | | | 2758 | 39 | std::set<uint64_t> operationModuleIDs; | 2759 | 52 | for (const auto& op : operations) { | 2760 | 52 | operationModuleIDs.insert(op.first->ID); | 2761 | 52 | } | 2762 | | | 2763 | 39 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 39 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 39 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 39 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 39 | } | 2771 | 39 | #endif | 2772 | | | 2773 | 39 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 39 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 91 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 52 | auto& operation = operations[i]; | 2782 | | | 2783 | 52 | auto& module = operation.first; | 2784 | 52 | auto& op = operation.second; | 2785 | | | 2786 | 52 | if ( i > 0 ) { | 2787 | 32 | auto& prevModule = operations[i-1].first; | 2788 | 32 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 32 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 14 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 14 | if ( curModifier.size() == 0 ) { | 2793 | 1.53k | for (size_t j = 0; j < 512; j++) { | 2794 | 1.53k | curModifier.push_back(1); | 2795 | 1.53k | } | 2796 | 11 | } else { | 2797 | 92 | for (auto& c : curModifier) { | 2798 | 92 | c++; | 2799 | 92 | } | 2800 | 11 | } | 2801 | 14 | } | 2802 | 32 | } | 2803 | | | 2804 | 52 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 52 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 52 | const auto& result = results.back(); | 2811 | | | 2812 | 52 | 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 | 52 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 52 | if ( options.disableTests == false ) { | 2830 | 52 | tests::test(op, result.second); | 2831 | 52 | } | 2832 | | | 2833 | 52 | postprocess(module, op, result); | 2834 | 52 | } | 2835 | | | 2836 | 39 | if ( options.noCompare == false ) { | 2837 | 20 | compare(operations, results, data, size); | 2838 | 20 | } | 2839 | 39 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 34 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 34 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 34 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 91 | do { | 2725 | 91 | auto op = getOp(&parentDs, data, size); | 2726 | 91 | auto module = getModule(parentDs); | 2727 | 91 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 91 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 91 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 91 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 34 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 34 | #if 1 | 2745 | 34 | { | 2746 | 34 | std::set<uint64_t> moduleIDs; | 2747 | 34 | for (const auto& m : modules ) { | 2748 | 19 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 19 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 19 | moduleIDs.insert(moduleID); | 2756 | 19 | } | 2757 | | | 2758 | 34 | std::set<uint64_t> operationModuleIDs; | 2759 | 54 | for (const auto& op : operations) { | 2760 | 54 | operationModuleIDs.insert(op.first->ID); | 2761 | 54 | } | 2762 | | | 2763 | 34 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 34 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 34 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 34 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 34 | } | 2771 | 34 | #endif | 2772 | | | 2773 | 34 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 34 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 88 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 54 | auto& operation = operations[i]; | 2782 | | | 2783 | 54 | auto& module = operation.first; | 2784 | 54 | auto& op = operation.second; | 2785 | | | 2786 | 54 | if ( i > 0 ) { | 2787 | 35 | auto& prevModule = operations[i-1].first; | 2788 | 35 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 35 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 18 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 18 | if ( curModifier.size() == 0 ) { | 2793 | 3.59k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.58k | curModifier.push_back(1); | 2795 | 3.58k | } | 2796 | 11 | } else { | 2797 | 396 | for (auto& c : curModifier) { | 2798 | 396 | c++; | 2799 | 396 | } | 2800 | 11 | } | 2801 | 18 | } | 2802 | 35 | } | 2803 | | | 2804 | 54 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 54 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 54 | const auto& result = results.back(); | 2811 | | | 2812 | 54 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 54 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 54 | if ( options.disableTests == false ) { | 2830 | 54 | tests::test(op, result.second); | 2831 | 54 | } | 2832 | | | 2833 | 54 | postprocess(module, op, result); | 2834 | 54 | } | 2835 | | | 2836 | 34 | if ( options.noCompare == false ) { | 2837 | 19 | compare(operations, results, data, size); | 2838 | 19 | } | 2839 | 34 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 85 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 85 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 85 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 174 | do { | 2725 | 174 | auto op = getOp(&parentDs, data, size); | 2726 | 174 | auto module = getModule(parentDs); | 2727 | 174 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 174 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 174 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 174 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 85 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 85 | #if 1 | 2745 | 85 | { | 2746 | 85 | std::set<uint64_t> moduleIDs; | 2747 | 85 | for (const auto& m : modules ) { | 2748 | 70 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 70 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 70 | moduleIDs.insert(moduleID); | 2756 | 70 | } | 2757 | | | 2758 | 85 | std::set<uint64_t> operationModuleIDs; | 2759 | 137 | for (const auto& op : operations) { | 2760 | 137 | operationModuleIDs.insert(op.first->ID); | 2761 | 137 | } | 2762 | | | 2763 | 85 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 85 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 85 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 85 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 85 | } | 2771 | 85 | #endif | 2772 | | | 2773 | 85 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 85 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 222 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 137 | auto& operation = operations[i]; | 2782 | | | 2783 | 137 | auto& module = operation.first; | 2784 | 137 | auto& op = operation.second; | 2785 | | | 2786 | 137 | if ( i > 0 ) { | 2787 | 67 | auto& prevModule = operations[i-1].first; | 2788 | 67 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 67 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 30 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 30 | if ( curModifier.size() == 0 ) { | 2793 | 7.18k | for (size_t j = 0; j < 512; j++) { | 2794 | 7.16k | curModifier.push_back(1); | 2795 | 7.16k | } | 2796 | 16 | } else { | 2797 | 2.40k | for (auto& c : curModifier) { | 2798 | 2.40k | c++; | 2799 | 2.40k | } | 2800 | 16 | } | 2801 | 30 | } | 2802 | 67 | } | 2803 | | | 2804 | 137 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 137 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 137 | const auto& result = results.back(); | 2811 | | | 2812 | 137 | 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 | 137 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 137 | if ( options.disableTests == false ) { | 2830 | 137 | tests::test(op, result.second); | 2831 | 137 | } | 2832 | | | 2833 | 137 | postprocess(module, op, result); | 2834 | 137 | } | 2835 | | | 2836 | 85 | if ( options.noCompare == false ) { | 2837 | 70 | compare(operations, results, data, size); | 2838 | 70 | } | 2839 | 85 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 52 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 52 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 52 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 115 | do { | 2725 | 115 | auto op = getOp(&parentDs, data, size); | 2726 | 115 | auto module = getModule(parentDs); | 2727 | 115 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 115 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 115 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 115 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 52 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 52 | #if 1 | 2745 | 52 | { | 2746 | 52 | std::set<uint64_t> moduleIDs; | 2747 | 52 | for (const auto& m : modules ) { | 2748 | 40 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 40 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 40 | moduleIDs.insert(moduleID); | 2756 | 40 | } | 2757 | | | 2758 | 52 | std::set<uint64_t> operationModuleIDs; | 2759 | 90 | for (const auto& op : operations) { | 2760 | 90 | operationModuleIDs.insert(op.first->ID); | 2761 | 90 | } | 2762 | | | 2763 | 52 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 52 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 52 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 52 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 52 | } | 2771 | 52 | #endif | 2772 | | | 2773 | 52 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 52 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 142 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 90 | auto& operation = operations[i]; | 2782 | | | 2783 | 90 | auto& module = operation.first; | 2784 | 90 | auto& op = operation.second; | 2785 | | | 2786 | 90 | if ( i > 0 ) { | 2787 | 50 | auto& prevModule = operations[i-1].first; | 2788 | 50 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 50 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 21 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 21 | 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 | 11 | } else { | 2797 | 114 | for (auto& c : curModifier) { | 2798 | 114 | c++; | 2799 | 114 | } | 2800 | 10 | } | 2801 | 21 | } | 2802 | 50 | } | 2803 | | | 2804 | 90 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 90 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 90 | const auto& result = results.back(); | 2811 | | | 2812 | 90 | 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 | 90 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 90 | if ( options.disableTests == false ) { | 2830 | 90 | tests::test(op, result.second); | 2831 | 90 | } | 2832 | | | 2833 | 90 | postprocess(module, op, result); | 2834 | 90 | } | 2835 | | | 2836 | 52 | if ( options.noCompare == false ) { | 2837 | 40 | compare(operations, results, data, size); | 2838 | 40 | } | 2839 | 52 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 75 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 75 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 75 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 151 | do { | 2725 | 151 | auto op = getOp(&parentDs, data, size); | 2726 | 151 | auto module = getModule(parentDs); | 2727 | 151 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 151 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 151 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 151 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 75 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 75 | #if 1 | 2745 | 75 | { | 2746 | 75 | std::set<uint64_t> moduleIDs; | 2747 | 75 | for (const auto& m : modules ) { | 2748 | 61 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 61 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 61 | moduleIDs.insert(moduleID); | 2756 | 61 | } | 2757 | | | 2758 | 75 | std::set<uint64_t> operationModuleIDs; | 2759 | 117 | for (const auto& op : operations) { | 2760 | 117 | operationModuleIDs.insert(op.first->ID); | 2761 | 117 | } | 2762 | | | 2763 | 75 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 75 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 75 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 75 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 75 | } | 2771 | 75 | #endif | 2772 | | | 2773 | 75 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 75 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 192 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 117 | auto& operation = operations[i]; | 2782 | | | 2783 | 117 | auto& module = operation.first; | 2784 | 117 | auto& op = operation.second; | 2785 | | | 2786 | 117 | if ( i > 0 ) { | 2787 | 56 | auto& prevModule = operations[i-1].first; | 2788 | 56 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 56 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 27 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 27 | if ( curModifier.size() == 0 ) { | 2793 | 8.72k | for (size_t j = 0; j < 512; j++) { | 2794 | 8.70k | curModifier.push_back(1); | 2795 | 8.70k | } | 2796 | 17 | } else { | 2797 | 775 | for (auto& c : curModifier) { | 2798 | 775 | c++; | 2799 | 775 | } | 2800 | 10 | } | 2801 | 27 | } | 2802 | 56 | } | 2803 | | | 2804 | 117 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 117 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 117 | const auto& result = results.back(); | 2811 | | | 2812 | 117 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 117 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 117 | if ( options.disableTests == false ) { | 2830 | 117 | tests::test(op, result.second); | 2831 | 117 | } | 2832 | | | 2833 | 117 | postprocess(module, op, result); | 2834 | 117 | } | 2835 | | | 2836 | 75 | if ( options.noCompare == false ) { | 2837 | 61 | compare(operations, results, data, size); | 2838 | 61 | } | 2839 | 75 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 60 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 60 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 60 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 127 | do { | 2725 | 127 | auto op = getOp(&parentDs, data, size); | 2726 | 127 | auto module = getModule(parentDs); | 2727 | 127 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 127 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 127 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 127 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 60 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 60 | #if 1 | 2745 | 60 | { | 2746 | 60 | std::set<uint64_t> moduleIDs; | 2747 | 60 | for (const auto& m : modules ) { | 2748 | 42 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 42 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 42 | moduleIDs.insert(moduleID); | 2756 | 42 | } | 2757 | | | 2758 | 60 | std::set<uint64_t> operationModuleIDs; | 2759 | 85 | for (const auto& op : operations) { | 2760 | 85 | operationModuleIDs.insert(op.first->ID); | 2761 | 85 | } | 2762 | | | 2763 | 60 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 60 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 60 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 60 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 60 | } | 2771 | 60 | #endif | 2772 | | | 2773 | 60 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 60 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 145 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 85 | auto& operation = operations[i]; | 2782 | | | 2783 | 85 | auto& module = operation.first; | 2784 | 85 | auto& op = operation.second; | 2785 | | | 2786 | 85 | if ( i > 0 ) { | 2787 | 43 | auto& prevModule = operations[i-1].first; | 2788 | 43 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 43 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 18 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 18 | if ( curModifier.size() == 0 ) { | 2793 | 2.05k | for (size_t j = 0; j < 512; j++) { | 2794 | 2.04k | curModifier.push_back(1); | 2795 | 2.04k | } | 2796 | 14 | } else { | 2797 | 1.60k | for (auto& c : curModifier) { | 2798 | 1.60k | c++; | 2799 | 1.60k | } | 2800 | 14 | } | 2801 | 18 | } | 2802 | 43 | } | 2803 | | | 2804 | 85 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 85 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 85 | const auto& result = results.back(); | 2811 | | | 2812 | 85 | 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 | 85 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 85 | if ( options.disableTests == false ) { | 2830 | 85 | tests::test(op, result.second); | 2831 | 85 | } | 2832 | | | 2833 | 85 | postprocess(module, op, result); | 2834 | 85 | } | 2835 | | | 2836 | 60 | if ( options.noCompare == false ) { | 2837 | 42 | compare(operations, results, data, size); | 2838 | 42 | } | 2839 | 60 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 98 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 98 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 98 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 215 | do { | 2725 | 215 | auto op = getOp(&parentDs, data, size); | 2726 | 215 | auto module = getModule(parentDs); | 2727 | 215 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 215 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 215 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 215 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 98 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 98 | #if 1 | 2745 | 98 | { | 2746 | 98 | std::set<uint64_t> moduleIDs; | 2747 | 98 | for (const auto& m : modules ) { | 2748 | 81 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 81 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 81 | moduleIDs.insert(moduleID); | 2756 | 81 | } | 2757 | | | 2758 | 98 | std::set<uint64_t> operationModuleIDs; | 2759 | 173 | for (const auto& op : operations) { | 2760 | 173 | operationModuleIDs.insert(op.first->ID); | 2761 | 173 | } | 2762 | | | 2763 | 98 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 98 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 98 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 98 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 98 | } | 2771 | 98 | #endif | 2772 | | | 2773 | 98 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 98 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 271 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 173 | auto& operation = operations[i]; | 2782 | | | 2783 | 173 | auto& module = operation.first; | 2784 | 173 | auto& op = operation.second; | 2785 | | | 2786 | 173 | if ( i > 0 ) { | 2787 | 92 | auto& prevModule = operations[i-1].first; | 2788 | 92 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 92 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 48 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 48 | if ( curModifier.size() == 0 ) { | 2793 | 14.8k | for (size_t j = 0; j < 512; j++) { | 2794 | 14.8k | curModifier.push_back(1); | 2795 | 14.8k | } | 2796 | 29 | } else { | 2797 | 6.02k | for (auto& c : curModifier) { | 2798 | 6.02k | c++; | 2799 | 6.02k | } | 2800 | 19 | } | 2801 | 48 | } | 2802 | 92 | } | 2803 | | | 2804 | 173 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 173 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 173 | const auto& result = results.back(); | 2811 | | | 2812 | 173 | 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 | 173 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 173 | if ( options.disableTests == false ) { | 2830 | 173 | tests::test(op, result.second); | 2831 | 173 | } | 2832 | | | 2833 | 173 | postprocess(module, op, result); | 2834 | 173 | } | 2835 | | | 2836 | 98 | if ( options.noCompare == false ) { | 2837 | 81 | compare(operations, results, data, size); | 2838 | 81 | } | 2839 | 98 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 67 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 67 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 67 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 137 | do { | 2725 | 137 | auto op = getOp(&parentDs, data, size); | 2726 | 137 | auto module = getModule(parentDs); | 2727 | 137 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 137 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 137 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 137 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 67 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 67 | #if 1 | 2745 | 67 | { | 2746 | 67 | std::set<uint64_t> moduleIDs; | 2747 | 67 | for (const auto& m : modules ) { | 2748 | 51 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 51 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 51 | moduleIDs.insert(moduleID); | 2756 | 51 | } | 2757 | | | 2758 | 67 | std::set<uint64_t> operationModuleIDs; | 2759 | 101 | for (const auto& op : operations) { | 2760 | 101 | operationModuleIDs.insert(op.first->ID); | 2761 | 101 | } | 2762 | | | 2763 | 67 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 67 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 67 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 67 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 67 | } | 2771 | 67 | #endif | 2772 | | | 2773 | 67 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 67 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 168 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 101 | auto& operation = operations[i]; | 2782 | | | 2783 | 101 | auto& module = operation.first; | 2784 | 101 | auto& op = operation.second; | 2785 | | | 2786 | 101 | if ( i > 0 ) { | 2787 | 50 | auto& prevModule = operations[i-1].first; | 2788 | 50 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 50 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 23 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 23 | if ( curModifier.size() == 0 ) { | 2793 | 6.15k | for (size_t j = 0; j < 512; j++) { | 2794 | 6.14k | curModifier.push_back(1); | 2795 | 6.14k | } | 2796 | 12 | } else { | 2797 | 3.61k | for (auto& c : curModifier) { | 2798 | 3.61k | c++; | 2799 | 3.61k | } | 2800 | 11 | } | 2801 | 23 | } | 2802 | 50 | } | 2803 | | | 2804 | 101 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 101 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 101 | const auto& result = results.back(); | 2811 | | | 2812 | 101 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 101 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 101 | if ( options.disableTests == false ) { | 2830 | 101 | tests::test(op, result.second); | 2831 | 101 | } | 2832 | | | 2833 | 101 | postprocess(module, op, result); | 2834 | 101 | } | 2835 | | | 2836 | 67 | if ( options.noCompare == false ) { | 2837 | 51 | compare(operations, results, data, size); | 2838 | 51 | } | 2839 | 67 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 120 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 120 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 120 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 243 | do { | 2725 | 243 | auto op = getOp(&parentDs, data, size); | 2726 | 243 | auto module = getModule(parentDs); | 2727 | 243 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 243 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 243 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 6 | break; | 2736 | 6 | } | 2737 | 243 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 120 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 120 | #if 1 | 2745 | 120 | { | 2746 | 120 | std::set<uint64_t> moduleIDs; | 2747 | 120 | for (const auto& m : modules ) { | 2748 | 98 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 98 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 98 | moduleIDs.insert(moduleID); | 2756 | 98 | } | 2757 | | | 2758 | 120 | std::set<uint64_t> operationModuleIDs; | 2759 | 192 | for (const auto& op : operations) { | 2760 | 192 | operationModuleIDs.insert(op.first->ID); | 2761 | 192 | } | 2762 | | | 2763 | 120 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 120 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 120 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 120 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 120 | } | 2771 | 120 | #endif | 2772 | | | 2773 | 120 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 120 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 312 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 192 | auto& operation = operations[i]; | 2782 | | | 2783 | 192 | auto& module = operation.first; | 2784 | 192 | auto& op = operation.second; | 2785 | | | 2786 | 192 | if ( i > 0 ) { | 2787 | 94 | auto& prevModule = operations[i-1].first; | 2788 | 94 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 94 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 42 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 42 | if ( curModifier.size() == 0 ) { | 2793 | 13.3k | for (size_t j = 0; j < 512; j++) { | 2794 | 13.3k | curModifier.push_back(1); | 2795 | 13.3k | } | 2796 | 26 | } else { | 2797 | 17.1k | for (auto& c : curModifier) { | 2798 | 17.1k | c++; | 2799 | 17.1k | } | 2800 | 16 | } | 2801 | 42 | } | 2802 | 94 | } | 2803 | | | 2804 | 192 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 192 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 192 | const auto& result = results.back(); | 2811 | | | 2812 | 192 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 192 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 192 | if ( options.disableTests == false ) { | 2830 | 192 | tests::test(op, result.second); | 2831 | 192 | } | 2832 | | | 2833 | 192 | postprocess(module, op, result); | 2834 | 192 | } | 2835 | | | 2836 | 120 | if ( options.noCompare == false ) { | 2837 | 98 | compare(operations, results, data, size); | 2838 | 98 | } | 2839 | 120 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 81 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 81 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 81 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 162 | do { | 2725 | 162 | auto op = getOp(&parentDs, data, size); | 2726 | 162 | auto module = getModule(parentDs); | 2727 | 162 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 162 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 162 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 162 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 81 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 81 | #if 1 | 2745 | 81 | { | 2746 | 81 | std::set<uint64_t> moduleIDs; | 2747 | 81 | for (const auto& m : modules ) { | 2748 | 64 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 64 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 64 | moduleIDs.insert(moduleID); | 2756 | 64 | } | 2757 | | | 2758 | 81 | std::set<uint64_t> operationModuleIDs; | 2759 | 122 | for (const auto& op : operations) { | 2760 | 122 | operationModuleIDs.insert(op.first->ID); | 2761 | 122 | } | 2762 | | | 2763 | 81 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 81 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 81 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 81 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 81 | } | 2771 | 81 | #endif | 2772 | | | 2773 | 81 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 81 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 203 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 122 | auto& operation = operations[i]; | 2782 | | | 2783 | 122 | auto& module = operation.first; | 2784 | 122 | auto& op = operation.second; | 2785 | | | 2786 | 122 | if ( i > 0 ) { | 2787 | 58 | auto& prevModule = operations[i-1].first; | 2788 | 58 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 58 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 30 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 30 | if ( curModifier.size() == 0 ) { | 2793 | 4.61k | for (size_t j = 0; j < 512; j++) { | 2794 | 4.60k | curModifier.push_back(1); | 2795 | 4.60k | } | 2796 | 21 | } else { | 2797 | 1.64k | for (auto& c : curModifier) { | 2798 | 1.64k | c++; | 2799 | 1.64k | } | 2800 | 21 | } | 2801 | 30 | } | 2802 | 58 | } | 2803 | | | 2804 | 122 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 122 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 122 | const auto& result = results.back(); | 2811 | | | 2812 | 122 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 122 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 122 | if ( options.disableTests == false ) { | 2830 | 122 | tests::test(op, result.second); | 2831 | 122 | } | 2832 | | | 2833 | 122 | postprocess(module, op, result); | 2834 | 122 | } | 2835 | | | 2836 | 81 | if ( options.noCompare == false ) { | 2837 | 64 | compare(operations, results, data, size); | 2838 | 64 | } | 2839 | 81 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 128 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 128 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 128 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 252 | do { | 2725 | 252 | auto op = getOp(&parentDs, data, size); | 2726 | 252 | auto module = getModule(parentDs); | 2727 | 252 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 252 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 252 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 4 | break; | 2736 | 4 | } | 2737 | 252 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 128 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 128 | #if 1 | 2745 | 128 | { | 2746 | 128 | std::set<uint64_t> moduleIDs; | 2747 | 128 | for (const auto& m : modules ) { | 2748 | 59 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 59 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 59 | moduleIDs.insert(moduleID); | 2756 | 59 | } | 2757 | | | 2758 | 128 | std::set<uint64_t> operationModuleIDs; | 2759 | 135 | for (const auto& op : operations) { | 2760 | 135 | operationModuleIDs.insert(op.first->ID); | 2761 | 135 | } | 2762 | | | 2763 | 128 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 128 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 128 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 128 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 128 | } | 2771 | 128 | #endif | 2772 | | | 2773 | 128 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 128 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 263 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 135 | auto& operation = operations[i]; | 2782 | | | 2783 | 135 | auto& module = operation.first; | 2784 | 135 | auto& op = operation.second; | 2785 | | | 2786 | 135 | if ( i > 0 ) { | 2787 | 76 | auto& prevModule = operations[i-1].first; | 2788 | 76 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 76 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 27 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 27 | if ( curModifier.size() == 0 ) { | 2793 | 8.20k | for (size_t j = 0; j < 512; j++) { | 2794 | 8.19k | curModifier.push_back(1); | 2795 | 8.19k | } | 2796 | 16 | } else { | 2797 | 1.70k | for (auto& c : curModifier) { | 2798 | 1.70k | c++; | 2799 | 1.70k | } | 2800 | 11 | } | 2801 | 27 | } | 2802 | 76 | } | 2803 | | | 2804 | 135 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 135 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 135 | const auto& result = results.back(); | 2811 | | | 2812 | 135 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 135 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 135 | if ( options.disableTests == false ) { | 2830 | 135 | tests::test(op, result.second); | 2831 | 135 | } | 2832 | | | 2833 | 135 | postprocess(module, op, result); | 2834 | 135 | } | 2835 | | | 2836 | 128 | if ( options.noCompare == false ) { | 2837 | 59 | compare(operations, results, data, size); | 2838 | 59 | } | 2839 | 128 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 29 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 29 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 29 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 81 | do { | 2725 | 81 | auto op = getOp(&parentDs, data, size); | 2726 | 81 | auto module = getModule(parentDs); | 2727 | 81 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 81 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 81 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 3 | break; | 2736 | 3 | } | 2737 | 81 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 29 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 29 | #if 1 | 2745 | 29 | { | 2746 | 29 | std::set<uint64_t> moduleIDs; | 2747 | 29 | for (const auto& m : modules ) { | 2748 | 15 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 15 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 15 | moduleIDs.insert(moduleID); | 2756 | 15 | } | 2757 | | | 2758 | 29 | std::set<uint64_t> operationModuleIDs; | 2759 | 45 | for (const auto& op : operations) { | 2760 | 45 | operationModuleIDs.insert(op.first->ID); | 2761 | 45 | } | 2762 | | | 2763 | 29 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 29 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 29 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 29 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 29 | } | 2771 | 29 | #endif | 2772 | | | 2773 | 29 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 29 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 74 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 45 | auto& operation = operations[i]; | 2782 | | | 2783 | 45 | auto& module = operation.first; | 2784 | 45 | auto& op = operation.second; | 2785 | | | 2786 | 45 | if ( i > 0 ) { | 2787 | 30 | auto& prevModule = operations[i-1].first; | 2788 | 30 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 30 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 13 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 13 | if ( curModifier.size() == 0 ) { | 2793 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.07k | curModifier.push_back(1); | 2795 | 3.07k | } | 2796 | 7 | } else { | 2797 | 1.58k | for (auto& c : curModifier) { | 2798 | 1.58k | c++; | 2799 | 1.58k | } | 2800 | 7 | } | 2801 | 13 | } | 2802 | 30 | } | 2803 | | | 2804 | 45 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 45 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 45 | const auto& result = results.back(); | 2811 | | | 2812 | 45 | if ( result.second != std::nullopt ) { | 2813 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2814 | 0 | nlohmann::json j; | 2815 | 0 | j["operation"] = op.ToJSON(); | 2816 | 0 | j["result"] = util::ToJSON(*result.second); | 2817 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2818 | 0 | } | 2819 | 0 | } | 2820 | | | 2821 | 45 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 45 | if ( options.disableTests == false ) { | 2830 | 45 | tests::test(op, result.second); | 2831 | 45 | } | 2832 | | | 2833 | 45 | postprocess(module, op, result); | 2834 | 45 | } | 2835 | | | 2836 | 29 | if ( options.noCompare == false ) { | 2837 | 15 | compare(operations, results, data, size); | 2838 | 15 | } | 2839 | 29 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2719 | 75 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2720 | 75 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2721 | | | 2722 | 75 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2723 | | | 2724 | 149 | do { | 2725 | 149 | auto op = getOp(&parentDs, data, size); | 2726 | 149 | auto module = getModule(parentDs); | 2727 | 149 | if ( module == nullptr ) { | 2728 | 0 | continue; | 2729 | 0 | } | 2730 | | | 2731 | 149 | operations.push_back( {module, op} ); | 2732 | | | 2733 | | /* Limit number of operations per run to prevent time-outs */ | 2734 | 149 | if ( operations.size() == OperationType::MaxOperations() ) { | 2735 | 2 | break; | 2736 | 2 | } | 2737 | 149 | } while ( parentDs.Get<bool>() == true ); | 2738 | | | 2739 | 75 | if ( operations.empty() == true ) { | 2740 | 0 | return; | 2741 | 0 | } | 2742 | | | 2743 | | /* Enable this to run every operation on every loaded module */ | 2744 | 75 | #if 1 | 2745 | 75 | { | 2746 | 75 | std::set<uint64_t> moduleIDs; | 2747 | 75 | for (const auto& m : modules ) { | 2748 | 25 | const auto moduleID = m.first; | 2749 | | | 2750 | | /* Skip if this is a disabled module */ | 2751 | 25 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2752 | 0 | continue; | 2753 | 0 | } | 2754 | | | 2755 | 25 | moduleIDs.insert(moduleID); | 2756 | 25 | } | 2757 | | | 2758 | 75 | std::set<uint64_t> operationModuleIDs; | 2759 | 75 | for (const auto& op : operations) { | 2760 | 60 | operationModuleIDs.insert(op.first->ID); | 2761 | 60 | } | 2762 | | | 2763 | 75 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2764 | 75 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2765 | 75 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2766 | | | 2767 | 75 | for (const auto& id : addModuleIDs) { | 2768 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2769 | 0 | } | 2770 | 75 | } | 2771 | 75 | #endif | 2772 | | | 2773 | 75 | if ( operations.size() < options.minModules ) { | 2774 | 0 | return; | 2775 | 0 | } | 2776 | | | 2777 | 75 | if ( options.debug == true && !operations.empty() ) { | 2778 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2779 | 0 | } | 2780 | 135 | for (size_t i = 0; i < operations.size(); i++) { | 2781 | 60 | auto& operation = operations[i]; | 2782 | | | 2783 | 60 | auto& module = operation.first; | 2784 | 60 | auto& op = operation.second; | 2785 | | | 2786 | 60 | if ( i > 0 ) { | 2787 | 35 | auto& prevModule = operations[i-1].first; | 2788 | 35 | auto& prevOp = operations[i-1].second; | 2789 | | | 2790 | 35 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2791 | 18 | auto& curModifier = op.modifier.GetVectorPtr(); | 2792 | 18 | if ( curModifier.size() == 0 ) { | 2793 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2794 | 3.07k | curModifier.push_back(1); | 2795 | 3.07k | } | 2796 | 12 | } else { | 2797 | 245 | for (auto& c : curModifier) { | 2798 | 245 | c++; | 2799 | 245 | } | 2800 | 12 | } | 2801 | 18 | } | 2802 | 35 | } | 2803 | | | 2804 | 60 | if ( options.debug == true ) { | 2805 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2806 | 0 | } | 2807 | | | 2808 | 60 | results.push_back( {module, std::move(callModule(module, op))} ); | 2809 | | | 2810 | 60 | const auto& result = results.back(); | 2811 | | | 2812 | 60 | 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 | 60 | if ( options.debug == true ) { | 2822 | 0 | printf("Module %s result:\n\n%s\n\n", | 2823 | 0 | result.first->name.c_str(), | 2824 | 0 | result.second == std::nullopt ? | 2825 | 0 | "(empty)" : | 2826 | 0 | util::ToString(*result.second).c_str()); | 2827 | 0 | } | 2828 | | | 2829 | 60 | if ( options.disableTests == false ) { | 2830 | 60 | tests::test(op, result.second); | 2831 | 60 | } | 2832 | | | 2833 | 60 | postprocess(module, op, result); | 2834 | 60 | } | 2835 | | | 2836 | 75 | if ( options.noCompare == false ) { | 2837 | 25 | compare(operations, results, data, size); | 2838 | 25 | } | 2839 | 75 | } |
|
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 */ |