/src/cryptofuzz/executor.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | #include "executor.h" |
2 | | #include "tests.h" |
3 | | #include "mutatorpool.h" |
4 | | #include "config.h" |
5 | | #include <cryptofuzz/util.h> |
6 | | #include <fuzzing/memory.hpp> |
7 | | #include <algorithm> |
8 | | #include <set> |
9 | | #include <boost/multiprecision/cpp_int.hpp> |
10 | | |
11 | | uint32_t PRNG(void); |
12 | | |
13 | 18.4k | #define RETURN_IF_DISABLED(option, id) if ( !option.Have(id) ) return std::nullopt; |
14 | | |
15 | | namespace cryptofuzz { |
16 | | |
17 | 0 | static std::string GxCoordMutate(const uint64_t curveID, std::string coord) { |
18 | 0 | if ( (PRNG()%10) != 0 ) { |
19 | 0 | return coord; |
20 | 0 | } |
21 | | |
22 | 0 | if ( curveID == CF_ECC_CURVE("BLS12_381") ) { |
23 | 0 | const static auto prime = boost::multiprecision::cpp_int("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"); |
24 | 0 | return boost::multiprecision::cpp_int(boost::multiprecision::cpp_int(coord) + prime).str(); |
25 | 0 | } else if ( curveID == CF_ECC_CURVE("alt_bn128") ) { |
26 | 0 | const static auto prime = boost::multiprecision::cpp_int("21888242871839275222246405745257275088696311157297823662689037894645226208583"); |
27 | 0 | return boost::multiprecision::cpp_int(boost::multiprecision::cpp_int(coord) + prime).str(); |
28 | 0 | } else { |
29 | 0 | return coord; |
30 | 0 | } |
31 | 0 | } |
32 | 0 | static void G1AddToPool(const uint64_t curveID, const std::string& g1_x, const std::string& g1_y) { |
33 | 0 | Pool_CurveBLSG1.Set({ curveID, GxCoordMutate(curveID, g1_x), GxCoordMutate(curveID, g1_y) }); |
34 | 0 | } |
35 | | |
36 | | static void G2AddToPool(const uint64_t curveID, |
37 | | const std::string& g2_v, |
38 | | const std::string& g2_w, |
39 | | const std::string& g2_x, |
40 | 0 | const std::string& g2_y) { |
41 | |
|
42 | 0 | Pool_CurveBLSG2.Set({ curveID, |
43 | 0 | GxCoordMutate(curveID, g2_v), |
44 | 0 | GxCoordMutate(curveID, g2_w), |
45 | 0 | GxCoordMutate(curveID, g2_x), |
46 | 0 | GxCoordMutate(curveID, g2_y) |
47 | 0 | }); |
48 | 0 | } |
49 | | |
50 | | /* Specialization for operation::Digest */ |
51 | 1.63k | 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.63k | (void)module; |
53 | 1.63k | (void)op; |
54 | | |
55 | 1.63k | if ( result.second != std::nullopt ) { |
56 | 1.47k | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
57 | 1.47k | } |
58 | 1.63k | } |
59 | | |
60 | 1.63k | template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const { |
61 | 1.63k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
62 | | |
63 | 1.63k | return module->OpDigest(op); |
64 | 1.63k | } |
65 | | |
66 | | /* Specialization for operation::HMAC */ |
67 | 1.55k | template<> void ExecutorBase<component::MAC, operation::HMAC>::postprocess(std::shared_ptr<Module> module, operation::HMAC& op, const ExecutorBase<component::MAC, operation::HMAC>::ResultPair& result) const { |
68 | 1.55k | (void)module; |
69 | 1.55k | (void)op; |
70 | | |
71 | 1.55k | if ( result.second != std::nullopt ) { |
72 | 1.29k | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
73 | 1.29k | } |
74 | 1.55k | } |
75 | | |
76 | 1.55k | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const { |
77 | 1.55k | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
78 | | |
79 | 1.55k | return module->OpHMAC(op); |
80 | 1.55k | } |
81 | | |
82 | | /* Specialization for operation::UMAC */ |
83 | 61 | 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 | 61 | (void)module; |
85 | 61 | (void)op; |
86 | | |
87 | 61 | if ( result.second != std::nullopt ) { |
88 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
89 | 0 | } |
90 | 61 | } |
91 | | |
92 | 61 | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const { |
93 | 61 | return module->OpUMAC(op); |
94 | 61 | } |
95 | | |
96 | | /* Specialization for operation::CMAC */ |
97 | 4.10k | 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 | 4.10k | (void)module; |
99 | 4.10k | (void)op; |
100 | | |
101 | 4.10k | if ( result.second != std::nullopt ) { |
102 | 2.17k | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
103 | 2.17k | } |
104 | 4.10k | } |
105 | | |
106 | 4.10k | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const { |
107 | 4.10k | RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get()); |
108 | | |
109 | 4.10k | return module->OpCMAC(op); |
110 | 4.10k | } |
111 | | |
112 | | /* Specialization for operation::SymmetricEncrypt */ |
113 | 2.65k | template<> void ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::postprocess(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op, const ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::ResultPair& result) const { |
114 | 2.65k | if ( options.noDecrypt == true ) { |
115 | 0 | return; |
116 | 0 | } |
117 | | |
118 | 2.65k | if ( result.second != std::nullopt ) { |
119 | 1.12k | fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize()); |
120 | 1.12k | if ( result.second->tag != std::nullopt ) { |
121 | 30 | fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize()); |
122 | 30 | } |
123 | 1.12k | } |
124 | | |
125 | 2.65k | if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) { |
126 | 1.06k | using fuzzing::datasource::ID; |
127 | | |
128 | 1.06k | bool tryDecrypt = true; |
129 | | |
130 | 1.06k | if ( module->ID == CF_MODULE("OpenSSL") ) { |
131 | 1.06k | 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 | 23 | case ID("Cryptofuzz/Cipher/AES_128_GCM"): |
137 | 41 | case ID("Cryptofuzz/Cipher/AES_192_GCM"): |
138 | 45 | case ID("Cryptofuzz/Cipher/AES_256_GCM"): |
139 | 45 | case ID("Cryptofuzz/Cipher/AES_128_CCM"): |
140 | 45 | case ID("Cryptofuzz/Cipher/AES_192_CCM"): |
141 | 77 | case ID("Cryptofuzz/Cipher/AES_256_CCM"): |
142 | 77 | case ID("Cryptofuzz/Cipher/ARIA_128_CCM"): |
143 | 77 | case ID("Cryptofuzz/Cipher/ARIA_192_CCM"): |
144 | 77 | case ID("Cryptofuzz/Cipher/ARIA_256_CCM"): |
145 | 77 | case ID("Cryptofuzz/Cipher/ARIA_128_GCM"): |
146 | 77 | case ID("Cryptofuzz/Cipher/ARIA_192_GCM"): |
147 | 77 | case ID("Cryptofuzz/Cipher/ARIA_256_GCM"): |
148 | 77 | 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 | 71 | tryDecrypt = false; |
153 | 71 | } |
154 | 77 | break; |
155 | 1.06k | } |
156 | 1.06k | } |
157 | | |
158 | 1.06k | if ( tryDecrypt == true ) { |
159 | | /* Try to decrypt the encrypted data */ |
160 | | |
161 | | /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */ |
162 | 997 | auto opDecrypt = operation::SymmetricDecrypt( |
163 | | /* The SymmetricEncrypt instance */ |
164 | 997 | op, |
165 | | |
166 | | /* The ciphertext generated by OpSymmetricEncrypt */ |
167 | 997 | *(result.second), |
168 | | |
169 | | /* The size of the output buffer that OpSymmetricDecrypt() must use. */ |
170 | 997 | op.cleartext.GetSize() + 32, |
171 | | |
172 | 997 | op.aad, |
173 | | |
174 | | /* Empty modifier */ |
175 | 997 | {}); |
176 | | |
177 | 997 | const auto cleartext = module->OpSymmetricDecrypt(opDecrypt); |
178 | | |
179 | 997 | 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 | 997 | } 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 | 997 | } |
208 | 1.06k | } |
209 | 2.65k | } |
210 | | |
211 | 2.65k | template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const { |
212 | 2.65k | RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get()); |
213 | | |
214 | 2.65k | return module->OpSymmetricEncrypt(op); |
215 | 2.65k | } |
216 | | |
217 | | /* Specialization for operation::SymmetricDecrypt */ |
218 | 1.81k | 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.81k | (void)module; |
220 | 1.81k | (void)op; |
221 | | |
222 | 1.81k | if ( result.second != std::nullopt ) { |
223 | 318 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
224 | 318 | } |
225 | 1.81k | } |
226 | | |
227 | 1.81k | template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const { |
228 | 1.81k | RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get()); |
229 | | |
230 | 1.81k | return module->OpSymmetricDecrypt(op); |
231 | 1.81k | } |
232 | | |
233 | | /* Specialization for operation::KDF_SCRYPT */ |
234 | 120 | 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 | 120 | (void)module; |
236 | 120 | (void)op; |
237 | | |
238 | 120 | if ( result.second != std::nullopt ) { |
239 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
240 | 0 | } |
241 | 120 | } |
242 | | |
243 | 120 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const { |
244 | 120 | return module->OpKDF_SCRYPT(op); |
245 | 120 | } |
246 | | |
247 | | /* Specialization for operation::KDF_HKDF */ |
248 | 92 | 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 | 92 | (void)module; |
250 | 92 | (void)op; |
251 | | |
252 | 92 | if ( result.second != std::nullopt ) { |
253 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
254 | 0 | } |
255 | 92 | } |
256 | | |
257 | 92 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const { |
258 | 92 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
259 | | |
260 | 92 | return module->OpKDF_HKDF(op); |
261 | 92 | } |
262 | | |
263 | | /* Specialization for operation::KDF_PBKDF */ |
264 | 100 | 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 | 100 | (void)module; |
266 | 100 | (void)op; |
267 | | |
268 | 100 | if ( result.second != std::nullopt ) { |
269 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
270 | 0 | } |
271 | 100 | } |
272 | | |
273 | 100 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const { |
274 | 100 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
275 | | |
276 | 100 | return module->OpKDF_PBKDF(op); |
277 | 100 | } |
278 | | |
279 | | /* Specialization for operation::KDF_PBKDF1 */ |
280 | 59 | 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 | 59 | (void)module; |
282 | 59 | (void)op; |
283 | | |
284 | 59 | if ( result.second != std::nullopt ) { |
285 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
286 | 0 | } |
287 | 59 | } |
288 | | |
289 | 59 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const { |
290 | 59 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
291 | | |
292 | 59 | return module->OpKDF_PBKDF1(op); |
293 | 59 | } |
294 | | |
295 | | /* Specialization for operation::KDF_PBKDF2 */ |
296 | 60 | 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 | 60 | (void)module; |
298 | 60 | (void)op; |
299 | | |
300 | 60 | if ( result.second != std::nullopt ) { |
301 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
302 | 0 | } |
303 | 60 | } |
304 | | |
305 | 60 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const { |
306 | 60 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
307 | | |
308 | 60 | return module->OpKDF_PBKDF2(op); |
309 | 60 | } |
310 | | |
311 | | /* Specialization for operation::KDF_ARGON2 */ |
312 | 25 | 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 | 25 | (void)module; |
314 | 25 | (void)op; |
315 | | |
316 | 25 | if ( result.second != std::nullopt ) { |
317 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
318 | 0 | } |
319 | 25 | } |
320 | | |
321 | 25 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const { |
322 | 25 | return module->OpKDF_ARGON2(op); |
323 | 25 | } |
324 | | |
325 | | /* Specialization for operation::KDF_SSH */ |
326 | 89 | 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 | 89 | (void)module; |
328 | 89 | (void)op; |
329 | | |
330 | 89 | if ( result.second != std::nullopt ) { |
331 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
332 | 0 | } |
333 | 89 | } |
334 | | |
335 | 89 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const { |
336 | 89 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
337 | | |
338 | 89 | return module->OpKDF_SSH(op); |
339 | 89 | } |
340 | | |
341 | | /* Specialization for operation::KDF_TLS1_PRF */ |
342 | 66 | 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 | 66 | (void)module; |
344 | 66 | (void)op; |
345 | | |
346 | 66 | if ( result.second != std::nullopt ) { |
347 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
348 | 0 | } |
349 | 66 | } |
350 | | |
351 | 66 | 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 | 66 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
353 | | |
354 | 66 | return module->OpKDF_TLS1_PRF(op); |
355 | 66 | } |
356 | | |
357 | | /* Specialization for operation::KDF_X963 */ |
358 | 82 | 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 | 82 | (void)module; |
360 | 82 | (void)op; |
361 | | |
362 | 82 | if ( result.second != std::nullopt ) { |
363 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
364 | 0 | } |
365 | 82 | } |
366 | | |
367 | 82 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const { |
368 | 82 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
369 | | |
370 | 82 | return module->OpKDF_X963(op); |
371 | 82 | } |
372 | | |
373 | | /* Specialization for operation::KDF_BCRYPT */ |
374 | 3 | 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 | 3 | (void)module; |
376 | 3 | (void)op; |
377 | | |
378 | 3 | if ( result.second != std::nullopt ) { |
379 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
380 | 0 | } |
381 | 3 | } |
382 | | |
383 | 3 | template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const { |
384 | 3 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
385 | | |
386 | 3 | return module->OpKDF_BCRYPT(op); |
387 | 3 | } |
388 | | |
389 | | /* Specialization for operation::KDF_SP_800_108 */ |
390 | 149 | 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 | 149 | (void)module; |
392 | 149 | (void)op; |
393 | | |
394 | 149 | if ( result.second != std::nullopt ) { |
395 | 0 | fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize()); |
396 | 0 | } |
397 | 149 | } |
398 | | |
399 | 149 | 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 | 149 | if ( op.mech.mode == true ) { |
401 | 42 | RETURN_IF_DISABLED(options.digests, op.mech.type.Get()); |
402 | 42 | } |
403 | | |
404 | 149 | return module->OpKDF_SP_800_108(op); |
405 | 149 | } |
406 | | |
407 | | |
408 | | /* Specialization for operation::ECC_PrivateToPublic */ |
409 | 339 | 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 { |
410 | 339 | (void)module; |
411 | | |
412 | 339 | if ( result.second != std::nullopt ) { |
413 | 267 | const auto curveID = op.curveType.Get(); |
414 | 267 | const auto privkey = op.priv.ToTrimmedString(); |
415 | 267 | const auto pub_x = result.second->first.ToTrimmedString(); |
416 | 267 | const auto pub_y = result.second->second.ToTrimmedString(); |
417 | | |
418 | 267 | Pool_CurvePrivkey.Set({ curveID, privkey }); |
419 | 267 | Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y }); |
420 | 267 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
421 | | |
422 | 267 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
423 | 267 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
424 | 267 | } |
425 | 339 | } |
426 | | |
427 | 339 | template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op) const { |
428 | 339 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
429 | | |
430 | 339 | const size_t size = op.priv.ToTrimmedString().size(); |
431 | | |
432 | 339 | if ( size == 0 || size > 4096 ) { |
433 | 0 | return std::nullopt; |
434 | 0 | } |
435 | | |
436 | 339 | return module->OpECC_PrivateToPublic(op); |
437 | 339 | } |
438 | | |
439 | | /* Specialization for operation::ECC_ValidatePubkey */ |
440 | 174 | 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 { |
441 | 174 | (void)module; |
442 | 174 | (void)op; |
443 | 174 | (void)result; |
444 | 174 | } |
445 | | |
446 | 174 | template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const { |
447 | 174 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
448 | | |
449 | 174 | return module->OpECC_ValidatePubkey(op); |
450 | 174 | } |
451 | | |
452 | | /* Specialization for operation::ECC_GenerateKeyPair */ |
453 | | |
454 | | /* Do not compare DH_GenerateKeyPair results, because the result can be produced indeterministically */ |
455 | | template <> |
456 | 430 | 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 { |
457 | 430 | (void)operations; |
458 | 430 | (void)results; |
459 | 430 | (void)data; |
460 | 430 | (void)size; |
461 | 430 | } |
462 | | |
463 | 843 | 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 { |
464 | 843 | (void)module; |
465 | | |
466 | 843 | if ( result.second != std::nullopt ) { |
467 | 809 | const auto curveID = op.curveType.Get(); |
468 | 809 | const auto privkey = result.second->priv.ToTrimmedString(); |
469 | 809 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
470 | 809 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
471 | | |
472 | 809 | Pool_CurvePrivkey.Set({ curveID, privkey }); |
473 | 809 | Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y }); |
474 | 809 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
475 | 809 | } |
476 | 843 | } |
477 | | |
478 | 843 | template<> std::optional<component::ECC_KeyPair> ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op) const { |
479 | 843 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
480 | | |
481 | 843 | return module->OpECC_GenerateKeyPair(op); |
482 | 843 | } |
483 | | |
484 | | /* Specialization for operation::ECDSA_Sign */ |
485 | 449 | 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 { |
486 | 449 | (void)module; |
487 | | |
488 | 449 | if ( result.second != std::nullopt ) { |
489 | 379 | const auto curveID = op.curveType.Get(); |
490 | 379 | const auto cleartext = op.cleartext.ToHex(); |
491 | 379 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
492 | 379 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
493 | 379 | const auto sig_r = result.second->signature.first.ToTrimmedString(); |
494 | 379 | const auto sig_s = result.second->signature.second.ToTrimmedString(); |
495 | | |
496 | 379 | Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s}); |
497 | 379 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
498 | 379 | Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s }); |
499 | | |
500 | 379 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
501 | 379 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
502 | 379 | if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); } |
503 | 379 | if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); } |
504 | | |
505 | 379 | { |
506 | 379 | auto opVerify = operation::ECDSA_Verify( |
507 | 379 | op, |
508 | 379 | *(result.second), |
509 | 379 | op.modifier); |
510 | | |
511 | 379 | const auto verifyResult = module->OpECDSA_Verify(opVerify); |
512 | 379 | CF_ASSERT( |
513 | 379 | verifyResult == std::nullopt || |
514 | 379 | *verifyResult == true, |
515 | 379 | "Cannot verify generated signature"); |
516 | 379 | } |
517 | 379 | } |
518 | 449 | } |
519 | | |
520 | 449 | template<> std::optional<component::ECDSA_Signature> ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Sign& op) const { |
521 | 449 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
522 | 449 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
523 | | |
524 | 449 | const size_t size = op.priv.ToTrimmedString().size(); |
525 | | |
526 | 449 | if ( size == 0 || size > 4096 ) { |
527 | 0 | return std::nullopt; |
528 | 0 | } |
529 | | |
530 | 449 | return module->OpECDSA_Sign(op); |
531 | 449 | } |
532 | | |
533 | | /* Specialization for operation::ECGDSA_Sign */ |
534 | 39 | 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 { |
535 | 39 | (void)module; |
536 | | |
537 | 39 | if ( result.second != std::nullopt ) { |
538 | 0 | const auto curveID = op.curveType.Get(); |
539 | 0 | const auto cleartext = op.cleartext.ToHex(); |
540 | 0 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
541 | 0 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
542 | 0 | const auto sig_r = result.second->signature.first.ToTrimmedString(); |
543 | 0 | const auto sig_s = result.second->signature.second.ToTrimmedString(); |
544 | |
|
545 | 0 | Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s}); |
546 | 0 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
547 | 0 | Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s }); |
548 | |
|
549 | 0 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
550 | 0 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
551 | 0 | if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); } |
552 | 0 | if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); } |
553 | 0 | } |
554 | 39 | } |
555 | | |
556 | 39 | template<> std::optional<component::ECGDSA_Signature> ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Sign& op) const { |
557 | 39 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
558 | 39 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
559 | | |
560 | 39 | const size_t size = op.priv.ToTrimmedString().size(); |
561 | | |
562 | 39 | if ( size == 0 || size > 4096 ) { |
563 | 0 | return std::nullopt; |
564 | 0 | } |
565 | | |
566 | 39 | return module->OpECGDSA_Sign(op); |
567 | 39 | } |
568 | | |
569 | | /* Specialization for operation::ECRDSA_Sign */ |
570 | 14 | 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 { |
571 | 14 | (void)module; |
572 | | |
573 | 14 | if ( result.second != std::nullopt ) { |
574 | 0 | const auto curveID = op.curveType.Get(); |
575 | 0 | const auto cleartext = op.cleartext.ToHex(); |
576 | 0 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
577 | 0 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
578 | 0 | const auto sig_r = result.second->signature.first.ToTrimmedString(); |
579 | 0 | const auto sig_s = result.second->signature.second.ToTrimmedString(); |
580 | |
|
581 | 0 | Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s}); |
582 | 0 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
583 | 0 | Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s }); |
584 | |
|
585 | 0 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
586 | 0 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
587 | 0 | if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); } |
588 | 0 | if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); } |
589 | 0 | } |
590 | 14 | } |
591 | | |
592 | 14 | template<> std::optional<component::ECRDSA_Signature> ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Sign& op) const { |
593 | 14 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
594 | 14 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
595 | | |
596 | 14 | const size_t size = op.priv.ToTrimmedString().size(); |
597 | | |
598 | 14 | if ( size == 0 || size > 4096 ) { |
599 | 0 | return std::nullopt; |
600 | 0 | } |
601 | | |
602 | 14 | return module->OpECRDSA_Sign(op); |
603 | 14 | } |
604 | | |
605 | | /* Specialization for operation::Schnorr_Sign */ |
606 | 20 | 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 { |
607 | 20 | (void)module; |
608 | | |
609 | 20 | if ( result.second != std::nullopt ) { |
610 | 0 | const auto curveID = op.curveType.Get(); |
611 | 0 | const auto cleartext = op.cleartext.ToHex(); |
612 | 0 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
613 | 0 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
614 | 0 | const auto sig_r = result.second->signature.first.ToTrimmedString(); |
615 | 0 | const auto sig_s = result.second->signature.second.ToTrimmedString(); |
616 | |
|
617 | 0 | Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s}); |
618 | 0 | Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y }); |
619 | 0 | Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s }); |
620 | |
|
621 | 0 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
622 | 0 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
623 | 0 | if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); } |
624 | 0 | if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); } |
625 | 0 | } |
626 | 20 | } |
627 | | |
628 | 20 | template<> std::optional<component::Schnorr_Signature> ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Sign& op) const { |
629 | 20 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
630 | 20 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
631 | | |
632 | 20 | const size_t size = op.priv.ToTrimmedString().size(); |
633 | | |
634 | 20 | if ( size == 0 || size > 4096 ) { |
635 | 0 | return std::nullopt; |
636 | 0 | } |
637 | | |
638 | 20 | return module->OpSchnorr_Sign(op); |
639 | 20 | } |
640 | | |
641 | | /* Specialization for operation::ECDSA_Verify */ |
642 | 257 | 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 { |
643 | 257 | (void)module; |
644 | 257 | (void)op; |
645 | 257 | (void)result; |
646 | 257 | } |
647 | | |
648 | 257 | template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const { |
649 | 257 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
650 | 257 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
651 | | |
652 | | /* Intentionally do not constrain the size of the public key or |
653 | | * signature (like we do for BignumCalc). |
654 | | * |
655 | | * If any large public key or signature causes a time-out (or |
656 | | * worse), this is something that needs attention; |
657 | | * because verifiers sometimes process untrusted public keys, |
658 | | * signatures or both, they should be resistant to bugs |
659 | | * arising from large inputs. |
660 | | */ |
661 | | |
662 | 257 | return module->OpECDSA_Verify(op); |
663 | 257 | } |
664 | | |
665 | | /* Specialization for operation::ECGDSA_Verify */ |
666 | 15 | 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 { |
667 | 15 | (void)module; |
668 | 15 | (void)op; |
669 | 15 | (void)result; |
670 | 15 | } |
671 | | |
672 | 15 | template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const { |
673 | 15 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
674 | 15 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
675 | | |
676 | | /* Intentionally do not constrain the size of the public key or |
677 | | * signature (like we do for BignumCalc). |
678 | | * |
679 | | * If any large public key or signature causes a time-out (or |
680 | | * worse), this is something that needs attention; |
681 | | * because verifiers sometimes process untrusted public keys, |
682 | | * signatures or both, they should be resistant to bugs |
683 | | * arising from large inputs. |
684 | | */ |
685 | | |
686 | 15 | return module->OpECGDSA_Verify(op); |
687 | 15 | } |
688 | | |
689 | | /* Specialization for operation::ECRDSA_Verify */ |
690 | 18 | 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 { |
691 | 18 | (void)module; |
692 | 18 | (void)op; |
693 | 18 | (void)result; |
694 | 18 | } |
695 | | |
696 | 18 | template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const { |
697 | 18 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
698 | 18 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
699 | | |
700 | | /* Intentionally do not constrain the size of the public key or |
701 | | * signature (like we do for BignumCalc). |
702 | | * |
703 | | * If any large public key or signature causes a time-out (or |
704 | | * worse), this is something that needs attention; |
705 | | * because verifiers sometimes process untrusted public keys, |
706 | | * signatures or both, they should be resistant to bugs |
707 | | * arising from large inputs. |
708 | | */ |
709 | | |
710 | 18 | return module->OpECRDSA_Verify(op); |
711 | 18 | } |
712 | | |
713 | | /* Specialization for operation::Schnorr_Verify */ |
714 | 26 | 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 { |
715 | 26 | (void)module; |
716 | 26 | (void)op; |
717 | 26 | (void)result; |
718 | 26 | } |
719 | | |
720 | 26 | template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const { |
721 | 26 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
722 | 26 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
723 | | |
724 | | /* Intentionally do not constrain the size of the public key or |
725 | | * signature (like we do for BignumCalc). |
726 | | * |
727 | | * If any large public key or signature causes a time-out (or |
728 | | * worse), this is something that needs attention; |
729 | | * because verifiers sometimes process untrusted public keys, |
730 | | * signatures or both, they should be resistant to bugs |
731 | | * arising from large inputs. |
732 | | */ |
733 | | |
734 | 26 | return module->OpSchnorr_Verify(op); |
735 | 26 | } |
736 | | |
737 | 11 | 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 { |
738 | 11 | (void)module; |
739 | 11 | (void)op; |
740 | 11 | (void)result; |
741 | 11 | } |
742 | | |
743 | 11 | template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Recover& op) const { |
744 | 11 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
745 | 11 | RETURN_IF_DISABLED(options.digests, op.digestType.Get()); |
746 | | |
747 | 11 | return module->OpECDSA_Recover(op); |
748 | 11 | } |
749 | | |
750 | | /* Specialization for operation::ECDH_Derive */ |
751 | 25 | 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 { |
752 | 25 | (void)module; |
753 | 25 | (void)op; |
754 | 25 | (void)result; |
755 | 25 | } |
756 | | |
757 | 25 | template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const { |
758 | 25 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
759 | | |
760 | 25 | return module->OpECDH_Derive(op); |
761 | 25 | } |
762 | | |
763 | | /* Specialization for operation::ECIES_Encrypt */ |
764 | 6 | 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 { |
765 | 6 | (void)module; |
766 | 6 | (void)op; |
767 | 6 | (void)result; |
768 | 6 | } |
769 | | |
770 | 6 | template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const { |
771 | 6 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
772 | | |
773 | 6 | return module->OpECIES_Encrypt(op); |
774 | 6 | } |
775 | | |
776 | | /* Specialization for operation::ECIES_Decrypt */ |
777 | 24 | 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 { |
778 | 24 | (void)module; |
779 | 24 | (void)op; |
780 | 24 | (void)result; |
781 | 24 | } |
782 | | |
783 | 24 | template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const { |
784 | 24 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
785 | | |
786 | 24 | return module->OpECIES_Decrypt(op); |
787 | 24 | } |
788 | | |
789 | | /* Specialization for operation::ECC_Point_Add */ |
790 | 42 | 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 { |
791 | 42 | (void)module; |
792 | | |
793 | 42 | if ( result.second != std::nullopt ) { |
794 | 7 | const auto curveID = op.curveType.Get(); |
795 | 7 | const auto x = result.second->first.ToTrimmedString(); |
796 | 7 | const auto y = result.second->second.ToTrimmedString(); |
797 | | |
798 | 7 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
799 | | |
800 | 7 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
801 | 7 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
802 | 7 | } |
803 | 42 | } |
804 | | |
805 | 42 | 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 { |
806 | 42 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
807 | | |
808 | 42 | return module->OpECC_Point_Add(op); |
809 | 42 | } |
810 | | |
811 | | /* Specialization for operation::ECC_Point_Mul */ |
812 | 40 | 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 { |
813 | 40 | (void)module; |
814 | | |
815 | 40 | if ( result.second != std::nullopt ) { |
816 | 22 | const auto curveID = op.curveType.Get(); |
817 | 22 | const auto x = result.second->first.ToTrimmedString(); |
818 | 22 | const auto y = result.second->second.ToTrimmedString(); |
819 | | |
820 | 22 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
821 | | |
822 | 22 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
823 | 22 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
824 | 22 | } |
825 | 40 | } |
826 | | |
827 | 40 | 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 { |
828 | 40 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
829 | | |
830 | 40 | return module->OpECC_Point_Mul(op); |
831 | 40 | } |
832 | | |
833 | | /* Specialization for operation::ECC_Point_Neg */ |
834 | 40 | 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 { |
835 | 40 | (void)module; |
836 | | |
837 | 40 | if ( result.second != std::nullopt ) { |
838 | 16 | const auto curveID = op.curveType.Get(); |
839 | 16 | const auto x = result.second->first.ToTrimmedString(); |
840 | 16 | const auto y = result.second->second.ToTrimmedString(); |
841 | | |
842 | 16 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
843 | | |
844 | 16 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
845 | 16 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
846 | 16 | } |
847 | 40 | } |
848 | | |
849 | 40 | 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 { |
850 | 40 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
851 | | |
852 | 40 | return module->OpECC_Point_Neg(op); |
853 | 40 | } |
854 | | |
855 | | /* Specialization for operation::ECC_Point_Dbl */ |
856 | 37 | 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 { |
857 | 37 | (void)module; |
858 | | |
859 | 37 | if ( result.second != std::nullopt ) { |
860 | 13 | const auto curveID = op.curveType.Get(); |
861 | 13 | const auto x = result.second->first.ToTrimmedString(); |
862 | 13 | const auto y = result.second->second.ToTrimmedString(); |
863 | | |
864 | 13 | Pool_CurveECC_Point.Set({ curveID, x, y }); |
865 | | |
866 | 13 | if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); } |
867 | 13 | if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); } |
868 | 13 | } |
869 | 37 | } |
870 | | |
871 | 37 | 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 { |
872 | 37 | RETURN_IF_DISABLED(options.curves, op.curveType.Get()); |
873 | | |
874 | 37 | return module->OpECC_Point_Dbl(op); |
875 | 37 | } |
876 | | |
877 | | /* Specialization for operation::DH_Derive */ |
878 | 103 | 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 { |
879 | 103 | (void)module; |
880 | 103 | (void)op; |
881 | 103 | (void)result; |
882 | 103 | } |
883 | | |
884 | 103 | template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const { |
885 | 103 | if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
886 | 103 | if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
887 | 103 | if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
888 | 103 | if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
889 | | |
890 | 103 | return module->OpDH_Derive(op); |
891 | 103 | } |
892 | | |
893 | | /* Specialization for operation::DH_GenerateKeyPair */ |
894 | 515 | 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 { |
895 | 515 | (void)result; |
896 | 515 | (void)op; |
897 | 515 | (void)module; |
898 | | |
899 | 515 | if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) { |
900 | 122 | const auto priv = result.second->first.ToTrimmedString(); |
901 | 122 | const auto pub = result.second->second.ToTrimmedString(); |
902 | | |
903 | 122 | Pool_DH_PrivateKey.Set(priv); |
904 | 122 | Pool_DH_PublicKey.Set(pub); |
905 | 122 | } |
906 | 515 | } |
907 | | |
908 | 515 | template<> std::optional<component::DH_KeyPair> ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DH_GenerateKeyPair& op) const { |
909 | 515 | if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
910 | 515 | if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
911 | | |
912 | 515 | return module->OpDH_GenerateKeyPair(op); |
913 | 515 | } |
914 | | |
915 | | /* Specialization for operation::BignumCalc */ |
916 | 2.50k | 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 { |
917 | 2.50k | (void)module; |
918 | 2.50k | (void)op; |
919 | | |
920 | 2.50k | if ( result.second != std::nullopt ) { |
921 | 1.73k | const auto bignum = result.second->ToTrimmedString(); |
922 | | |
923 | 1.73k | if ( bignum.size() <= config::kMaxBignumSize ) { |
924 | 1.72k | Pool_Bignum.Set(bignum); |
925 | 1.72k | if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) { |
926 | 0 | Pool_Bignum_Primes.Set(bignum); |
927 | 0 | } |
928 | 1.72k | } |
929 | 1.73k | if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) { |
930 | 225 | if ( bignum == "1" ) { |
931 | 147 | Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString()); |
932 | 147 | } |
933 | 225 | } |
934 | 1.73k | } |
935 | 2.50k | } |
936 | | |
937 | 2.50k | std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const { |
938 | 2.50k | RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get()); |
939 | | |
940 | | /* Prevent timeouts */ |
941 | 2.50k | if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
942 | 2.50k | if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
943 | 2.49k | if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
944 | 2.49k | if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
945 | | |
946 | 2.49k | if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) { |
947 | 0 | return std::nullopt; |
948 | 0 | } |
949 | | |
950 | 2.49k | switch ( op.calcOp.Get() ) { |
951 | 10 | case CF_CALCOP("SetBit(A,B)"): |
952 | | /* Don't allow setting very high bit positions (risk of memory exhaustion) */ |
953 | 10 | if ( op.bn1.GetSize() > 4 ) { |
954 | 4 | return std::nullopt; |
955 | 4 | } |
956 | 6 | break; |
957 | 82 | case CF_CALCOP("Exp(A,B)"): |
958 | 82 | if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) { |
959 | 2 | return std::nullopt; |
960 | 2 | } |
961 | 80 | break; |
962 | 80 | case CF_CALCOP("ModLShift(A,B,C)"): |
963 | 27 | if ( op.bn1.GetSize() > 4 ) { |
964 | 4 | return std::nullopt; |
965 | 4 | } |
966 | 23 | break; |
967 | 23 | case CF_CALCOP("Exp2(A)"): |
968 | 9 | if ( op.bn0.GetSize() > 4 ) { |
969 | 4 | return std::nullopt; |
970 | 4 | } |
971 | 5 | break; |
972 | 2.49k | } |
973 | | |
974 | 2.47k | return module->OpBignumCalc(op); |
975 | 2.49k | } |
976 | | |
977 | | /* Specialization for operation::BignumCalc_Fp2 */ |
978 | 62 | 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 { |
979 | 62 | (void)module; |
980 | 62 | (void)op; |
981 | | |
982 | 62 | if ( result.second != std::nullopt ) { |
983 | 0 | const auto bignum_first = result.second->first.ToTrimmedString(); |
984 | 0 | const auto bignum_second = result.second->second.ToTrimmedString(); |
985 | |
|
986 | 0 | if ( bignum_first.size() <= config::kMaxBignumSize ) { |
987 | 0 | Pool_Bignum.Set(bignum_first); |
988 | 0 | } |
989 | 0 | if ( bignum_second.size() <= config::kMaxBignumSize ) { |
990 | 0 | Pool_Bignum.Set(bignum_second); |
991 | 0 | } |
992 | 0 | } |
993 | 62 | } |
994 | | |
995 | 62 | std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const { |
996 | 62 | RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get()); |
997 | | |
998 | | /* Prevent timeouts */ |
999 | 62 | if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1000 | 58 | if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1001 | 58 | if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1002 | 58 | if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1003 | 51 | if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1004 | 49 | if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1005 | 45 | if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1006 | 36 | if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1007 | | |
1008 | 27 | if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) { |
1009 | 0 | return std::nullopt; |
1010 | 0 | } |
1011 | | |
1012 | 27 | return module->OpBignumCalc_Fp2(op); |
1013 | 27 | } |
1014 | | |
1015 | | /* Specialization for operation::BignumCalc_Fp12 */ |
1016 | 219 | 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 { |
1017 | 219 | (void)module; |
1018 | 219 | (void)op; |
1019 | | |
1020 | 219 | if ( result.second != std::nullopt ) { |
1021 | 0 | Pool_Fp12.Set({ |
1022 | 0 | result.second->bn1.ToTrimmedString(), |
1023 | 0 | result.second->bn2.ToTrimmedString(), |
1024 | 0 | result.second->bn3.ToTrimmedString(), |
1025 | 0 | result.second->bn4.ToTrimmedString(), |
1026 | 0 | result.second->bn5.ToTrimmedString(), |
1027 | 0 | result.second->bn6.ToTrimmedString(), |
1028 | 0 | result.second->bn7.ToTrimmedString(), |
1029 | 0 | result.second->bn8.ToTrimmedString(), |
1030 | 0 | result.second->bn9.ToTrimmedString(), |
1031 | 0 | result.second->bn10.ToTrimmedString(), |
1032 | 0 | result.second->bn11.ToTrimmedString(), |
1033 | 0 | result.second->bn12.ToTrimmedString() |
1034 | 0 | }); |
1035 | | /* TODO */ |
1036 | | #if 0 |
1037 | | const auto bignum_first = result.second->first.ToTrimmedString(); |
1038 | | const auto bignum_second = result.second->second.ToTrimmedString(); |
1039 | | |
1040 | | if ( bignum_first.size() <= config::kMaxBignumSize ) { |
1041 | | Pool_Bignum.Set(bignum_first); |
1042 | | } |
1043 | | if ( bignum_second.size() <= config::kMaxBignumSize ) { |
1044 | | Pool_Bignum.Set(bignum_second); |
1045 | | } |
1046 | | #endif |
1047 | 0 | } |
1048 | 219 | } |
1049 | | |
1050 | 219 | std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const { |
1051 | 219 | RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get()); |
1052 | | |
1053 | | /* Prevent timeouts */ |
1054 | 219 | if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1055 | 217 | if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1056 | 213 | if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1057 | 208 | if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1058 | 206 | if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1059 | 201 | if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1060 | 190 | if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1061 | 183 | if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1062 | 178 | if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1063 | 176 | if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1064 | 170 | if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1065 | 163 | if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1066 | | |
1067 | 163 | if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1068 | 160 | if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1069 | 158 | if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1070 | 154 | if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1071 | 146 | if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1072 | 140 | if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1073 | 134 | if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1074 | 125 | if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1075 | 124 | if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1076 | 117 | if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1077 | 117 | if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1078 | 115 | if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1079 | | |
1080 | 114 | if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1081 | 111 | if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1082 | 111 | if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1083 | 107 | if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1084 | 103 | if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1085 | 99 | if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1086 | 95 | if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1087 | 90 | if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1088 | 89 | if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1089 | 84 | if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1090 | 84 | if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1091 | 81 | if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1092 | | |
1093 | 79 | if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1094 | 76 | if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1095 | 72 | if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1096 | 71 | if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1097 | 67 | if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1098 | 66 | if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1099 | 62 | if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1100 | 59 | if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1101 | 49 | if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1102 | 43 | if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1103 | 38 | if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1104 | 34 | if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1105 | | |
1106 | 29 | if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) { |
1107 | 0 | return std::nullopt; |
1108 | 0 | } |
1109 | | |
1110 | 29 | return module->OpBignumCalc_Fp12(op); |
1111 | 29 | } |
1112 | | |
1113 | | /* Specialization for operation::BLS_PrivateToPublic */ |
1114 | 24 | 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 { |
1115 | 24 | (void)module; |
1116 | | |
1117 | 24 | if ( result.second != std::nullopt ) { |
1118 | 0 | const auto curveID = op.curveType.Get(); |
1119 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
1120 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
1121 | |
|
1122 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1123 | |
|
1124 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1125 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1126 | 0 | } |
1127 | 24 | } |
1128 | | |
1129 | 24 | template<> std::optional<component::BLS_PublicKey> ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic& op) const { |
1130 | 24 | const size_t size = op.priv.ToTrimmedString().size(); |
1131 | | |
1132 | 24 | if ( size == 0 || size > 4096 ) { |
1133 | 0 | return std::nullopt; |
1134 | 0 | } |
1135 | | |
1136 | 24 | return module->OpBLS_PrivateToPublic(op); |
1137 | 24 | } |
1138 | | |
1139 | | /* Specialization for operation::BLS_PrivateToPublic_G2 */ |
1140 | 25 | 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 { |
1141 | 25 | (void)module; |
1142 | 25 | if ( result.second != std::nullopt ) { |
1143 | 0 | const auto curveID = op.curveType.Get(); |
1144 | 0 | const auto g2_v = result.second->first.first.ToTrimmedString(); |
1145 | 0 | const auto g2_w = result.second->first.second.ToTrimmedString(); |
1146 | 0 | const auto g2_x = result.second->second.first.ToTrimmedString(); |
1147 | 0 | const auto g2_y = result.second->second.second.ToTrimmedString(); |
1148 | |
|
1149 | 0 | G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y); |
1150 | |
|
1151 | 0 | if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); } |
1152 | 0 | if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); } |
1153 | 0 | if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); } |
1154 | 0 | if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); } |
1155 | 0 | } |
1156 | 25 | } |
1157 | | |
1158 | 25 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic_G2& op) const { |
1159 | 25 | const size_t size = op.priv.ToTrimmedString().size(); |
1160 | | |
1161 | 25 | if ( size == 0 || size > 4096 ) { |
1162 | 0 | return std::nullopt; |
1163 | 0 | } |
1164 | | |
1165 | 25 | return module->OpBLS_PrivateToPublic_G2(op); |
1166 | 25 | } |
1167 | | |
1168 | | /* Specialization for operation::BLS_Sign */ |
1169 | 14 | 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 { |
1170 | 14 | (void)module; |
1171 | | |
1172 | 14 | if ( result.second != std::nullopt ) { |
1173 | 0 | const auto curveID = op.curveType.Get(); |
1174 | 0 | const auto point_v = op.hashOrPoint ? op.point.first.first.ToTrimmedString() : ""; |
1175 | 0 | const auto point_w = op.hashOrPoint ? op.point.first.second.ToTrimmedString() : ""; |
1176 | 0 | const auto point_x = op.hashOrPoint ? op.point.second.first.ToTrimmedString() : ""; |
1177 | 0 | const auto point_y = op.hashOrPoint ? op.point.second.second.ToTrimmedString() : ""; |
1178 | 0 | const auto cleartext = op.hashOrPoint ? op.cleartext.ToHex() : ""; |
1179 | 0 | const auto dest = op.dest.ToHex(); |
1180 | 0 | const auto aug = op.aug.ToHex(); |
1181 | 0 | const auto pub_x = result.second->pub.first.ToTrimmedString(); |
1182 | 0 | const auto pub_y = result.second->pub.second.ToTrimmedString(); |
1183 | 0 | const auto sig_v = result.second->signature.first.first.ToTrimmedString(); |
1184 | 0 | const auto sig_w = result.second->signature.first.second.ToTrimmedString(); |
1185 | 0 | const auto sig_x = result.second->signature.second.first.ToTrimmedString(); |
1186 | 0 | const auto sig_y = result.second->signature.second.second.ToTrimmedString(); |
1187 | |
|
1188 | 0 | G1AddToPool(curveID, pub_x, pub_y); |
1189 | 0 | G2AddToPool(curveID, sig_v, sig_w, sig_x, sig_y); |
1190 | 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}); |
1191 | |
|
1192 | 0 | if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); } |
1193 | 0 | if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); } |
1194 | 0 | if ( sig_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_v); } |
1195 | 0 | if ( sig_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_w); } |
1196 | 0 | if ( sig_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_x); } |
1197 | 0 | if ( sig_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_y); } |
1198 | 0 | } |
1199 | 14 | } |
1200 | | |
1201 | 14 | template<> std::optional<component::BLS_Signature> ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::callModule(std::shared_ptr<Module> module, operation::BLS_Sign& op) const { |
1202 | 14 | const size_t size = op.priv.ToTrimmedString().size(); |
1203 | | |
1204 | 14 | if ( size == 0 || size > 4096 ) { |
1205 | 0 | return std::nullopt; |
1206 | 0 | } |
1207 | | |
1208 | 14 | return module->OpBLS_Sign(op); |
1209 | 14 | } |
1210 | | |
1211 | | /* Specialization for operation::BLS_Verify */ |
1212 | 9 | 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 { |
1213 | 9 | (void)module; |
1214 | 9 | (void)op; |
1215 | 9 | (void)result; |
1216 | 9 | } |
1217 | | |
1218 | 9 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_Verify>::callModule(std::shared_ptr<Module> module, operation::BLS_Verify& op) const { |
1219 | | #if 0 |
1220 | | const std::vector<size_t> sizes = { |
1221 | | op.pub.first.ToTrimmedString().size(), |
1222 | | op.pub.second.ToTrimmedString().size(), |
1223 | | op.signature.first.ToTrimmedString().size(), |
1224 | | op.signature.second.ToTrimmedString().size(), |
1225 | | }; |
1226 | | |
1227 | | for (const auto& size : sizes) { |
1228 | | if ( size == 0 || size > 4096 ) { |
1229 | | return std::nullopt; |
1230 | | } |
1231 | | } |
1232 | | #endif |
1233 | | |
1234 | 9 | return module->OpBLS_Verify(op); |
1235 | 9 | } |
1236 | | |
1237 | | /* Specialization for operation::BLS_BatchSign */ |
1238 | 19 | 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 { |
1239 | 19 | (void)module; |
1240 | 19 | (void)op; |
1241 | | |
1242 | 19 | if ( result.second != std::nullopt ) { |
1243 | 0 | std::vector< std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2> > msgpub; |
1244 | 0 | for (const auto& mp : result.second->msgpub) { |
1245 | 0 | msgpub.push_back( |
1246 | 0 | std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2>{ |
1247 | 0 | { |
1248 | 0 | mp.first.first.ToTrimmedString(), |
1249 | 0 | mp.first.second.ToTrimmedString() |
1250 | 0 | }, |
1251 | 0 | { |
1252 | 0 | mp.second.first.first.ToTrimmedString(), |
1253 | 0 | mp.second.first.second.ToTrimmedString(), |
1254 | 0 | mp.second.second.first.ToTrimmedString(), |
1255 | 0 | mp.second.second.second.ToTrimmedString() |
1256 | 0 | } |
1257 | 0 | } |
1258 | 0 | ); |
1259 | 0 | G1AddToPool(CF_ECC_CURVE("BLS12_381"), mp.first.first.ToTrimmedString(), mp.first.second.ToTrimmedString()); |
1260 | 0 | Pool_CurveBLSG2.Set({ |
1261 | 0 | CF_ECC_CURVE("BLS12_381"), |
1262 | 0 | mp.second.first.first.ToTrimmedString(), |
1263 | 0 | mp.second.first.second.ToTrimmedString(), |
1264 | 0 | mp.second.second.first.ToTrimmedString(), |
1265 | 0 | mp.second.second.second.ToTrimmedString() |
1266 | 0 | }); |
1267 | 0 | } |
1268 | 0 | Pool_BLS_BatchSignature.Set({msgpub}); |
1269 | 0 | } |
1270 | 19 | } |
1271 | | |
1272 | 19 | template<> std::optional<component::BLS_BatchSignature> ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchSign& op) const { |
1273 | 19 | return module->OpBLS_BatchSign(op); |
1274 | 19 | } |
1275 | | |
1276 | | /* Specialization for operation::BLS_BatchVerify */ |
1277 | 8 | 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 { |
1278 | 8 | (void)module; |
1279 | 8 | (void)op; |
1280 | 8 | (void)result; |
1281 | 8 | } |
1282 | | |
1283 | 8 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const { |
1284 | 8 | return module->OpBLS_BatchVerify(op); |
1285 | 8 | } |
1286 | | |
1287 | | /* Specialization for operation::BLS_Aggregate_G1 */ |
1288 | 16 | 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 { |
1289 | 16 | (void)module; |
1290 | 16 | (void)op; |
1291 | 16 | (void)result; |
1292 | 16 | } |
1293 | | |
1294 | 16 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op) const { |
1295 | 16 | return module->OpBLS_Aggregate_G1(op); |
1296 | 16 | } |
1297 | | |
1298 | | /* Specialization for operation::BLS_Aggregate_G2 */ |
1299 | 14 | 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 { |
1300 | 14 | (void)module; |
1301 | 14 | (void)op; |
1302 | 14 | (void)result; |
1303 | 14 | } |
1304 | | |
1305 | 14 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op) const { |
1306 | 14 | return module->OpBLS_Aggregate_G2(op); |
1307 | 14 | } |
1308 | | |
1309 | | /* Specialization for operation::BLS_Pairing */ |
1310 | 23 | 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 { |
1311 | 23 | (void)module; |
1312 | 23 | (void)op; |
1313 | | |
1314 | 23 | if ( result.second != std::nullopt ) { |
1315 | 0 | Pool_Fp12.Set({ |
1316 | 0 | result.second->bn1.ToTrimmedString(), |
1317 | 0 | result.second->bn2.ToTrimmedString(), |
1318 | 0 | result.second->bn3.ToTrimmedString(), |
1319 | 0 | result.second->bn4.ToTrimmedString(), |
1320 | 0 | result.second->bn5.ToTrimmedString(), |
1321 | 0 | result.second->bn6.ToTrimmedString(), |
1322 | 0 | result.second->bn7.ToTrimmedString(), |
1323 | 0 | result.second->bn8.ToTrimmedString(), |
1324 | 0 | result.second->bn9.ToTrimmedString(), |
1325 | 0 | result.second->bn10.ToTrimmedString(), |
1326 | 0 | result.second->bn11.ToTrimmedString(), |
1327 | 0 | result.second->bn12.ToTrimmedString() |
1328 | 0 | }); |
1329 | 0 | } |
1330 | 23 | } |
1331 | | |
1332 | 23 | template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const { |
1333 | 23 | return module->OpBLS_Pairing(op); |
1334 | 23 | } |
1335 | | |
1336 | | /* Specialization for operation::BLS_MillerLoop */ |
1337 | 10 | 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 { |
1338 | 10 | (void)module; |
1339 | 10 | (void)op; |
1340 | | |
1341 | 10 | if ( result.second != std::nullopt ) { |
1342 | 0 | Pool_Fp12.Set({ |
1343 | 0 | result.second->bn1.ToTrimmedString(), |
1344 | 0 | result.second->bn2.ToTrimmedString(), |
1345 | 0 | result.second->bn3.ToTrimmedString(), |
1346 | 0 | result.second->bn4.ToTrimmedString(), |
1347 | 0 | result.second->bn5.ToTrimmedString(), |
1348 | 0 | result.second->bn6.ToTrimmedString(), |
1349 | 0 | result.second->bn7.ToTrimmedString(), |
1350 | 0 | result.second->bn8.ToTrimmedString(), |
1351 | 0 | result.second->bn9.ToTrimmedString(), |
1352 | 0 | result.second->bn10.ToTrimmedString(), |
1353 | 0 | result.second->bn11.ToTrimmedString(), |
1354 | 0 | result.second->bn12.ToTrimmedString() |
1355 | 0 | }); |
1356 | 0 | } |
1357 | 10 | } |
1358 | | |
1359 | 10 | template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const { |
1360 | 10 | return module->OpBLS_MillerLoop(op); |
1361 | 10 | } |
1362 | | |
1363 | | /* Specialization for operation::BLS_FinalExp */ |
1364 | 13 | 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 { |
1365 | 13 | (void)module; |
1366 | 13 | (void)op; |
1367 | | |
1368 | 13 | if ( result.second != std::nullopt ) { |
1369 | 0 | Pool_Fp12.Set({ |
1370 | 0 | result.second->bn1.ToTrimmedString(), |
1371 | 0 | result.second->bn2.ToTrimmedString(), |
1372 | 0 | result.second->bn3.ToTrimmedString(), |
1373 | 0 | result.second->bn4.ToTrimmedString(), |
1374 | 0 | result.second->bn5.ToTrimmedString(), |
1375 | 0 | result.second->bn6.ToTrimmedString(), |
1376 | 0 | result.second->bn7.ToTrimmedString(), |
1377 | 0 | result.second->bn8.ToTrimmedString(), |
1378 | 0 | result.second->bn9.ToTrimmedString(), |
1379 | 0 | result.second->bn10.ToTrimmedString(), |
1380 | 0 | result.second->bn11.ToTrimmedString(), |
1381 | 0 | result.second->bn12.ToTrimmedString() |
1382 | 0 | }); |
1383 | 0 | } |
1384 | 13 | } |
1385 | | |
1386 | 13 | template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const { |
1387 | 13 | return module->OpBLS_FinalExp(op); |
1388 | 13 | } |
1389 | | |
1390 | | /* Specialization for operation::BLS_HashToG1 */ |
1391 | 26 | 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 { |
1392 | 26 | (void)module; |
1393 | | |
1394 | 26 | if ( result.second != std::nullopt ) { |
1395 | 0 | const auto curveID = op.curveType.Get(); |
1396 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
1397 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
1398 | |
|
1399 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1400 | |
|
1401 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1402 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1403 | 0 | } |
1404 | 26 | } |
1405 | | |
1406 | 26 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const { |
1407 | 26 | return module->OpBLS_HashToG1(op); |
1408 | 26 | } |
1409 | | |
1410 | | /* Specialization for operation::BLS_MapToG1 */ |
1411 | 11 | 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 { |
1412 | 11 | (void)module; |
1413 | | |
1414 | 11 | if ( result.second != std::nullopt ) { |
1415 | 0 | const auto curveID = op.curveType.Get(); |
1416 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
1417 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
1418 | |
|
1419 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1420 | |
|
1421 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1422 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1423 | 0 | } |
1424 | 11 | } |
1425 | | |
1426 | 11 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const { |
1427 | 11 | return module->OpBLS_MapToG1(op); |
1428 | 11 | } |
1429 | | |
1430 | | /* Specialization for operation::BLS_MapToG2 */ |
1431 | 19 | 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 { |
1432 | 19 | (void)module; |
1433 | | |
1434 | 19 | if ( result.second != std::nullopt ) { |
1435 | 0 | const auto curveID = op.curveType.Get(); |
1436 | 0 | const auto g2_v = result.second->first.first.ToTrimmedString(); |
1437 | 0 | const auto g2_w = result.second->first.second.ToTrimmedString(); |
1438 | 0 | const auto g2_x = result.second->second.first.ToTrimmedString(); |
1439 | 0 | const auto g2_y = result.second->second.second.ToTrimmedString(); |
1440 | |
|
1441 | 0 | G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y); |
1442 | |
|
1443 | 0 | if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); } |
1444 | 0 | if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); } |
1445 | 0 | if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); } |
1446 | 0 | if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); } |
1447 | 0 | } |
1448 | 19 | } |
1449 | | |
1450 | 19 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const { |
1451 | 19 | return module->OpBLS_MapToG2(op); |
1452 | 19 | } |
1453 | | |
1454 | | /* Specialization for operation::BLS_IsG1OnCurve */ |
1455 | 21 | 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 { |
1456 | 21 | (void)module; |
1457 | 21 | (void)op; |
1458 | 21 | (void)result; |
1459 | 21 | } |
1460 | | |
1461 | 21 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const { |
1462 | 21 | if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1463 | 21 | if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1464 | | |
1465 | 17 | return module->OpBLS_IsG1OnCurve(op); |
1466 | 21 | } |
1467 | | |
1468 | | /* Specialization for operation::BLS_IsG2OnCurve */ |
1469 | 37 | 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 { |
1470 | 37 | (void)module; |
1471 | 37 | (void)op; |
1472 | 37 | (void)result; |
1473 | 37 | } |
1474 | | |
1475 | 37 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const { |
1476 | 37 | if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1477 | 37 | if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1478 | 37 | if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1479 | 37 | if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1480 | | |
1481 | 37 | return module->OpBLS_IsG2OnCurve(op); |
1482 | 37 | } |
1483 | | |
1484 | | /* Specialization for operation::BLS_GenerateKeyPair */ |
1485 | 14 | 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 { |
1486 | 14 | (void)module; |
1487 | | |
1488 | 14 | if ( result.second != std::nullopt ) { |
1489 | 0 | const auto curveID = op.curveType.Get(); |
1490 | 0 | const auto priv = result.second->priv.ToTrimmedString(); |
1491 | 0 | const auto g1_x = result.second->pub.first.ToTrimmedString(); |
1492 | 0 | const auto g1_y = result.second->pub.second.ToTrimmedString(); |
1493 | |
|
1494 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1495 | |
|
1496 | 0 | if ( priv.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(priv); } |
1497 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1498 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1499 | 0 | } |
1500 | 14 | } |
1501 | | |
1502 | 14 | template<> std::optional<component::BLS_KeyPair> ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::BLS_GenerateKeyPair& op) const { |
1503 | 14 | return module->OpBLS_GenerateKeyPair(op); |
1504 | 14 | } |
1505 | | |
1506 | | /* Specialization for operation::BLS_Decompress_G1 */ |
1507 | 15 | 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 { |
1508 | 15 | (void)module; |
1509 | | |
1510 | 15 | if ( result.second != std::nullopt ) { |
1511 | 0 | const auto curveID = op.curveType.Get(); |
1512 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
1513 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
1514 | |
|
1515 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1516 | |
|
1517 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1518 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1519 | 0 | } |
1520 | 15 | } |
1521 | | |
1522 | 15 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Decompress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G1& op) const { |
1523 | 15 | return module->OpBLS_Decompress_G1(op); |
1524 | 15 | } |
1525 | | |
1526 | | /* Specialization for operation::BLS_Compress_G1 */ |
1527 | 25 | 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 { |
1528 | 25 | (void)module; |
1529 | | |
1530 | 25 | if ( result.second != std::nullopt ) { |
1531 | 0 | const auto compressed = result.second->ToTrimmedString(); |
1532 | |
|
1533 | 0 | if ( compressed.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(compressed); } |
1534 | 0 | } |
1535 | 25 | } |
1536 | | |
1537 | 25 | template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G1& op) const { |
1538 | 25 | return module->OpBLS_Compress_G1(op); |
1539 | 25 | } |
1540 | | |
1541 | | /* Specialization for operation::BLS_Decompress_G2 */ |
1542 | 23 | 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 { |
1543 | 23 | (void)module; |
1544 | | |
1545 | 23 | if ( result.second != std::nullopt ) { |
1546 | 0 | const auto curveID = op.curveType.Get(); |
1547 | 0 | const auto g2_v = result.second->first.first.ToTrimmedString(); |
1548 | 0 | const auto g2_w = result.second->first.second.ToTrimmedString(); |
1549 | 0 | const auto g2_x = result.second->second.first.ToTrimmedString(); |
1550 | 0 | const auto g2_y = result.second->second.second.ToTrimmedString(); |
1551 | |
|
1552 | 0 | G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y); |
1553 | |
|
1554 | 0 | if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); } |
1555 | 0 | if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); } |
1556 | 0 | if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); } |
1557 | 0 | if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); } |
1558 | 0 | } |
1559 | 23 | } |
1560 | | |
1561 | 23 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Decompress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op) const { |
1562 | 23 | return module->OpBLS_Decompress_G2(op); |
1563 | 23 | } |
1564 | | |
1565 | | /* Specialization for operation::BLS_Compress_G2 */ |
1566 | 7 | 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 { |
1567 | 7 | (void)module; |
1568 | | |
1569 | 7 | if ( result.second != std::nullopt ) { |
1570 | 0 | const auto curveID = op.curveType.Get(); |
1571 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
1572 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
1573 | |
|
1574 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1575 | |
|
1576 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1577 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1578 | 0 | } |
1579 | 7 | } |
1580 | | |
1581 | 7 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Compress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G2& op) const { |
1582 | 7 | return module->OpBLS_Compress_G2(op); |
1583 | 7 | } |
1584 | | |
1585 | | /* Specialization for operation::BLS_G1_Add */ |
1586 | 41 | 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 { |
1587 | 41 | (void)module; |
1588 | | |
1589 | 41 | if ( result.second != std::nullopt ) { |
1590 | 0 | const auto curveID = op.curveType.Get(); |
1591 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
1592 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
1593 | |
|
1594 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1595 | |
|
1596 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1597 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1598 | 0 | } |
1599 | 41 | } |
1600 | | |
1601 | 41 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Add& op) const { |
1602 | 41 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1603 | 37 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1604 | 27 | if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1605 | 25 | if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1606 | | |
1607 | 18 | return module->OpBLS_G1_Add(op); |
1608 | 25 | } |
1609 | | |
1610 | | /* Specialization for operation::BLS_G1_Mul */ |
1611 | 18 | 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 { |
1612 | 18 | (void)module; |
1613 | | |
1614 | 18 | if ( result.second != std::nullopt ) { |
1615 | 0 | const auto curveID = op.curveType.Get(); |
1616 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
1617 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
1618 | |
|
1619 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1620 | |
|
1621 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1622 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1623 | 0 | } |
1624 | 18 | } |
1625 | | |
1626 | 18 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op) const { |
1627 | 18 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1628 | 18 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1629 | 18 | if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1630 | | |
1631 | 18 | return module->OpBLS_G1_Mul(op); |
1632 | 18 | } |
1633 | | |
1634 | | /* Specialization for operation::BLS_G1_IsEq */ |
1635 | 19 | 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 { |
1636 | 19 | (void)module; |
1637 | 19 | (void)op; |
1638 | 19 | (void)result; |
1639 | 19 | } |
1640 | | |
1641 | 19 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const { |
1642 | 19 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1643 | 19 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1644 | 19 | if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1645 | 19 | if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1646 | | |
1647 | 19 | return module->OpBLS_G1_IsEq(op); |
1648 | 19 | } |
1649 | | |
1650 | | /* Specialization for operation::BLS_G1_Neg */ |
1651 | 19 | 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 { |
1652 | 19 | (void)module; |
1653 | | |
1654 | 19 | if ( result.second != std::nullopt ) { |
1655 | 0 | const auto curveID = op.curveType.Get(); |
1656 | 0 | const auto g1_x = result.second->first.ToTrimmedString(); |
1657 | 0 | const auto g1_y = result.second->second.ToTrimmedString(); |
1658 | |
|
1659 | 0 | G1AddToPool(curveID, g1_x, g1_y); |
1660 | |
|
1661 | 0 | if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); } |
1662 | 0 | if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); } |
1663 | 0 | } |
1664 | 19 | } |
1665 | | |
1666 | 19 | template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Neg& op) const { |
1667 | 19 | if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1668 | 10 | if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1669 | | |
1670 | 10 | return module->OpBLS_G1_Neg(op); |
1671 | 10 | } |
1672 | | |
1673 | | /* Specialization for operation::BLS_G2_Add */ |
1674 | 50 | 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 { |
1675 | 50 | (void)module; |
1676 | | |
1677 | 50 | if ( result.second != std::nullopt ) { |
1678 | 0 | const auto curveID = op.curveType.Get(); |
1679 | 0 | const auto g2_v = result.second->first.first.ToTrimmedString(); |
1680 | 0 | const auto g2_w = result.second->first.second.ToTrimmedString(); |
1681 | 0 | const auto g2_x = result.second->second.first.ToTrimmedString(); |
1682 | 0 | const auto g2_y = result.second->second.second.ToTrimmedString(); |
1683 | |
|
1684 | 0 | G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y); |
1685 | |
|
1686 | 0 | if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); } |
1687 | 0 | if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); } |
1688 | 0 | if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); } |
1689 | 0 | if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); } |
1690 | 0 | } |
1691 | 50 | } |
1692 | | |
1693 | 50 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Add& op) const { |
1694 | 50 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1695 | 47 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1696 | 46 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1697 | 43 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1698 | 40 | if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1699 | 37 | if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1700 | 31 | if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1701 | 31 | if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1702 | | |
1703 | 24 | return module->OpBLS_G2_Add(op); |
1704 | 31 | } |
1705 | | |
1706 | | /* Specialization for operation::BLS_G2_Mul */ |
1707 | 35 | 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 { |
1708 | 35 | (void)module; |
1709 | | |
1710 | 35 | if ( result.second != std::nullopt ) { |
1711 | 0 | const auto curveID = op.curveType.Get(); |
1712 | 0 | const auto g2_v = result.second->first.first.ToTrimmedString(); |
1713 | 0 | const auto g2_w = result.second->first.second.ToTrimmedString(); |
1714 | 0 | const auto g2_x = result.second->second.first.ToTrimmedString(); |
1715 | 0 | const auto g2_y = result.second->second.second.ToTrimmedString(); |
1716 | |
|
1717 | 0 | G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y); |
1718 | |
|
1719 | 0 | if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); } |
1720 | 0 | if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); } |
1721 | 0 | if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); } |
1722 | 0 | if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); } |
1723 | 0 | } |
1724 | 35 | } |
1725 | | |
1726 | 35 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Mul& op) const { |
1727 | 35 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1728 | 33 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1729 | 27 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1730 | 26 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1731 | 24 | if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1732 | | |
1733 | 23 | return module->OpBLS_G2_Mul(op); |
1734 | 24 | } |
1735 | | |
1736 | | /* Specialization for operation::BLS_G2_IsEq */ |
1737 | 28 | 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 { |
1738 | 28 | (void)module; |
1739 | 28 | (void)op; |
1740 | 28 | (void)result; |
1741 | 28 | } |
1742 | | |
1743 | 28 | template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const { |
1744 | 28 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1745 | 28 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1746 | 24 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1747 | 24 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1748 | 24 | if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1749 | 24 | if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1750 | 24 | if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1751 | 21 | if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1752 | | |
1753 | 18 | return module->OpBLS_G2_IsEq(op); |
1754 | 21 | } |
1755 | | |
1756 | | /* Specialization for operation::BLS_G2_Neg */ |
1757 | 9 | 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 { |
1758 | 9 | (void)module; |
1759 | | |
1760 | 9 | if ( result.second != std::nullopt ) { |
1761 | 0 | const auto curveID = op.curveType.Get(); |
1762 | 0 | const auto g2_v = result.second->first.first.ToTrimmedString(); |
1763 | 0 | const auto g2_w = result.second->first.second.ToTrimmedString(); |
1764 | 0 | const auto g2_x = result.second->second.first.ToTrimmedString(); |
1765 | 0 | const auto g2_y = result.second->second.second.ToTrimmedString(); |
1766 | |
|
1767 | 0 | G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y); |
1768 | |
|
1769 | 0 | if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); } |
1770 | 0 | if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); } |
1771 | 0 | if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); } |
1772 | 0 | if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); } |
1773 | 0 | } |
1774 | 9 | } |
1775 | | |
1776 | 9 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Neg& op) const { |
1777 | 9 | if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1778 | 9 | if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1779 | 9 | if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1780 | 9 | if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt; |
1781 | | |
1782 | 9 | return module->OpBLS_G2_Neg(op); |
1783 | 9 | } |
1784 | | |
1785 | | /* Specialization for operation::Misc */ |
1786 | 14 | template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const { |
1787 | 14 | (void)module; |
1788 | 14 | (void)op; |
1789 | 14 | (void)result; |
1790 | 14 | } |
1791 | | |
1792 | 14 | template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const { |
1793 | 14 | return module->OpMisc(op); |
1794 | 14 | } |
1795 | | |
1796 | | /* Specialization for operation::BLS_HashToG2 */ |
1797 | 22 | 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 { |
1798 | 22 | (void)module; |
1799 | | |
1800 | 22 | if ( result.second != std::nullopt ) { |
1801 | 0 | const auto curveID = op.curveType.Get(); |
1802 | 0 | const auto g2_v = result.second->first.first.ToTrimmedString(); |
1803 | 0 | const auto g2_w = result.second->first.second.ToTrimmedString(); |
1804 | 0 | const auto g2_x = result.second->second.first.ToTrimmedString(); |
1805 | 0 | const auto g2_y = result.second->second.second.ToTrimmedString(); |
1806 | |
|
1807 | 0 | G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y); |
1808 | |
|
1809 | 0 | if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); } |
1810 | 0 | if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); } |
1811 | 0 | if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); } |
1812 | 0 | if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); } |
1813 | 0 | } |
1814 | 22 | } |
1815 | | |
1816 | 22 | template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const { |
1817 | 22 | return module->OpBLS_HashToG2(op); |
1818 | 22 | } |
1819 | | |
1820 | | ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
1821 | | ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options) |
1822 | 18 | { } |
1823 | 17 | void ExecutorBignumCalc::SetModulo(const std::string& modulo) { |
1824 | 17 | this->modulo = component::Bignum(modulo); |
1825 | 17 | } |
1826 | | |
1827 | | 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) : |
1828 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1829 | 1 | CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513")); |
1830 | 1 | } |
1831 | | |
1832 | | 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) : |
1833 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1834 | 1 | CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787")); |
1835 | 1 | } |
1836 | | |
1837 | | 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) : |
1838 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1839 | 1 | CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617")); |
1840 | 1 | } |
1841 | | |
1842 | | 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) : |
1843 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1844 | 1 | CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583")); |
1845 | 1 | } |
1846 | | |
1847 | | ExecutorBignumCalc_Mod_ED25519::ExecutorBignumCalc_Mod_ED25519(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
1848 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1849 | 1 | CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949")); |
1850 | 1 | } |
1851 | | |
1852 | | 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) : |
1853 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1854 | 1 | CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601")); |
1855 | 1 | } |
1856 | | |
1857 | | 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) : |
1858 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1859 | 1 | CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001")); |
1860 | 1 | } |
1861 | | |
1862 | | 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) : |
1863 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1864 | 1 | CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137")); |
1865 | 1 | } |
1866 | | |
1867 | | 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) : |
1868 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1869 | 1 | CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081")); |
1870 | 1 | } |
1871 | | |
1872 | | 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) : |
1873 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1874 | 1 | CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081")); |
1875 | 1 | } |
1876 | | |
1877 | | 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) : |
1878 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1879 | 1 | CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040")); |
1880 | 1 | } |
1881 | | |
1882 | | ExecutorBignumCalc_Mod_2Exp64::ExecutorBignumCalc_Mod_2Exp64(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
1883 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1884 | 1 | CF_NORET(SetModulo("18446744073709551616")); |
1885 | 1 | } |
1886 | | |
1887 | | ExecutorBignumCalc_Mod_2Exp128::ExecutorBignumCalc_Mod_2Exp128(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
1888 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1889 | 1 | CF_NORET(SetModulo("340282366920938463463374607431768211456")); |
1890 | 1 | } |
1891 | | |
1892 | | ExecutorBignumCalc_Mod_2Exp256::ExecutorBignumCalc_Mod_2Exp256(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
1893 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1894 | 1 | CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936")); |
1895 | 1 | } |
1896 | | |
1897 | | ExecutorBignumCalc_Mod_2Exp512::ExecutorBignumCalc_Mod_2Exp512(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
1898 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1899 | 1 | CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096")); |
1900 | 1 | } |
1901 | | |
1902 | | ExecutorBignumCalc_Mod_SECP256K1::ExecutorBignumCalc_Mod_SECP256K1(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
1903 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1904 | 1 | CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337")); |
1905 | 1 | } |
1906 | | |
1907 | | 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) : |
1908 | 1 | ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) { |
1909 | 1 | CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663")); |
1910 | 1 | } |
1911 | | |
1912 | | ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
1913 | | ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options) |
1914 | 1 | { } |
1915 | 0 | void ExecutorBignumCalc_Fp2::SetModulo(const std::string& modulo) { |
1916 | 0 | this->modulo = component::Bignum(modulo); |
1917 | 0 | } |
1918 | | |
1919 | | ExecutorBignumCalc_Fp12::ExecutorBignumCalc_Fp12(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
1920 | | ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options) |
1921 | 1 | { } |
1922 | 0 | void ExecutorBignumCalc_Fp12::SetModulo(const std::string& modulo) { |
1923 | 0 | this->modulo = component::Bignum(modulo); |
1924 | 0 | } |
1925 | | |
1926 | | template <class ResultType, class OperationType> |
1927 | | ExecutorBase<ResultType, OperationType>::ExecutorBase(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) : |
1928 | | operationID(operationID), |
1929 | | modules(modules), |
1930 | | options(options) |
1931 | 90 | { |
1932 | 90 | } 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 | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 18 | { | 1932 | 18 | } |
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 | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&) Line | Count | Source | 1931 | 1 | { | 1932 | 1 | } |
|
1933 | | |
1934 | | /* Specialization for operation::SR25519_Verify */ |
1935 | 11 | 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 { |
1936 | 11 | (void)module; |
1937 | 11 | (void)op; |
1938 | 11 | (void)result; |
1939 | 11 | } |
1940 | | |
1941 | 11 | template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const { |
1942 | 11 | return module->OpSR25519_Verify(op); |
1943 | 11 | } |
1944 | | |
1945 | | template <class ResultType, class OperationType> |
1946 | 90 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { |
1947 | 90 | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase() Line | Count | Source | 1946 | 18 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 18 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase() Line | Count | Source | 1946 | 1 | ExecutorBase<ResultType, OperationType>::~ExecutorBase() { | 1947 | 1 | } |
|
1948 | | |
1949 | | /* Filter away the values in the set that are std::nullopt */ |
1950 | | template <class ResultType, class OperationType> |
1951 | 2.95k | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { |
1952 | 2.95k | ResultSet ret; |
1953 | | |
1954 | 14.2k | for (const auto& result : results) { |
1955 | 14.2k | if ( result.second == std::nullopt ) { |
1956 | 7.04k | continue; |
1957 | 7.04k | } |
1958 | | |
1959 | 7.19k | ret.push_back(result); |
1960 | 7.19k | } |
1961 | | |
1962 | 2.95k | return ret; |
1963 | 2.95k | } 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 | 1951 | 214 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 214 | ResultSet ret; | 1953 | | | 1954 | 1.38k | for (const auto& result : results) { | 1955 | 1.38k | if ( result.second == std::nullopt ) { | 1956 | 121 | continue; | 1957 | 121 | } | 1958 | | | 1959 | 1.26k | ret.push_back(result); | 1960 | 1.26k | } | 1961 | | | 1962 | 214 | return ret; | 1963 | 214 | } |
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 | 1951 | 217 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 217 | ResultSet ret; | 1953 | | | 1954 | 1.44k | for (const auto& result : results) { | 1955 | 1.44k | if ( result.second == std::nullopt ) { | 1956 | 241 | continue; | 1957 | 241 | } | 1958 | | | 1959 | 1.20k | ret.push_back(result); | 1960 | 1.20k | } | 1961 | | | 1962 | 217 | return ret; | 1963 | 217 | } |
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 | 1951 | 4 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 4 | ResultSet ret; | 1953 | | | 1954 | 61 | for (const auto& result : results) { | 1955 | 61 | if ( result.second == std::nullopt ) { | 1956 | 61 | continue; | 1957 | 61 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 4 | return ret; | 1963 | 4 | } |
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 | 1951 | 541 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 541 | ResultSet ret; | 1953 | | | 1954 | 3.10k | for (const auto& result : results) { | 1955 | 3.10k | if ( result.second == std::nullopt ) { | 1956 | 1.35k | continue; | 1957 | 1.35k | } | 1958 | | | 1959 | 1.75k | ret.push_back(result); | 1960 | 1.75k | } | 1961 | | | 1962 | 541 | return ret; | 1963 | 541 | } |
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 | 1951 | 435 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 435 | ResultSet ret; | 1953 | | | 1954 | 2.39k | for (const auto& result : results) { | 1955 | 2.39k | if ( result.second == std::nullopt ) { | 1956 | 1.37k | continue; | 1957 | 1.37k | } | 1958 | | | 1959 | 1.01k | ret.push_back(result); | 1960 | 1.01k | } | 1961 | | | 1962 | 435 | return ret; | 1963 | 435 | } |
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 | 1951 | 302 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 302 | ResultSet ret; | 1953 | | | 1954 | 1.58k | for (const auto& result : results) { | 1955 | 1.58k | if ( result.second == std::nullopt ) { | 1956 | 1.31k | continue; | 1957 | 1.31k | } | 1958 | | | 1959 | 268 | ret.push_back(result); | 1960 | 268 | } | 1961 | | | 1962 | 302 | return ret; | 1963 | 302 | } |
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 | 1951 | 18 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 18 | ResultSet ret; | 1953 | | | 1954 | 117 | for (const auto& result : results) { | 1955 | 117 | if ( result.second == std::nullopt ) { | 1956 | 117 | continue; | 1957 | 117 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 18 | return ret; | 1963 | 18 | } |
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 | 1951 | 17 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 17 | ResultSet ret; | 1953 | | | 1954 | 87 | for (const auto& result : results) { | 1955 | 87 | if ( result.second == std::nullopt ) { | 1956 | 87 | continue; | 1957 | 87 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 17 | return ret; | 1963 | 17 | } |
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 | 1951 | 12 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 12 | ResultSet ret; | 1953 | | | 1954 | 62 | for (const auto& result : results) { | 1955 | 62 | if ( result.second == std::nullopt ) { | 1956 | 62 | continue; | 1957 | 62 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 12 | return ret; | 1963 | 12 | } |
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 | 1951 | 13 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 13 | ResultSet ret; | 1953 | | | 1954 | 91 | for (const auto& result : results) { | 1955 | 91 | if ( result.second == std::nullopt ) { | 1956 | 91 | continue; | 1957 | 91 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 13 | return ret; | 1963 | 13 | } |
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 | 1951 | 11 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 11 | ResultSet ret; | 1953 | | | 1954 | 55 | for (const auto& result : results) { | 1955 | 55 | if ( result.second == std::nullopt ) { | 1956 | 55 | continue; | 1957 | 55 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 11 | return ret; | 1963 | 11 | } |
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 | 1951 | 12 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 12 | ResultSet ret; | 1953 | | | 1954 | 59 | for (const auto& result : results) { | 1955 | 59 | if ( result.second == std::nullopt ) { | 1956 | 59 | continue; | 1957 | 59 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 12 | return ret; | 1963 | 12 | } |
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 | 1951 | 9 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 9 | ResultSet ret; | 1953 | | | 1954 | 22 | for (const auto& result : results) { | 1955 | 22 | if ( result.second == std::nullopt ) { | 1956 | 22 | continue; | 1957 | 22 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 9 | return ret; | 1963 | 9 | } |
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 | 1951 | 17 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 17 | ResultSet ret; | 1953 | | | 1954 | 86 | for (const auto& result : results) { | 1955 | 86 | if ( result.second == std::nullopt ) { | 1956 | 86 | continue; | 1957 | 86 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 17 | return ret; | 1963 | 17 | } |
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 | 1951 | 12 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 12 | ResultSet ret; | 1953 | | | 1954 | 80 | for (const auto& result : results) { | 1955 | 80 | if ( result.second == std::nullopt ) { | 1956 | 80 | continue; | 1957 | 80 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 12 | return ret; | 1963 | 12 | } |
Unexecuted instantiation: 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 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 | 1951 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 19 | ResultSet ret; | 1953 | | | 1954 | 148 | for (const auto& result : results) { | 1955 | 148 | if ( result.second == std::nullopt ) { | 1956 | 148 | continue; | 1957 | 148 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 19 | return ret; | 1963 | 19 | } |
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 | 1951 | 64 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 64 | ResultSet ret; | 1953 | | | 1954 | 203 | for (const auto& result : results) { | 1955 | 203 | if ( result.second == std::nullopt ) { | 1956 | 49 | continue; | 1957 | 49 | } | 1958 | | | 1959 | 154 | ret.push_back(result); | 1960 | 154 | } | 1961 | | | 1962 | 64 | return ret; | 1963 | 64 | } |
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 | 1951 | 10 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 10 | ResultSet ret; | 1953 | | | 1954 | 29 | for (const auto& result : results) { | 1955 | 29 | if ( result.second == std::nullopt ) { | 1956 | 22 | continue; | 1957 | 22 | } | 1958 | | | 1959 | 7 | ret.push_back(result); | 1960 | 7 | } | 1961 | | | 1962 | 10 | return ret; | 1963 | 10 | } |
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::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 | 1951 | 95 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 95 | ResultSet ret; | 1953 | | | 1954 | 325 | for (const auto& result : results) { | 1955 | 325 | if ( result.second == std::nullopt ) { | 1956 | 51 | continue; | 1957 | 51 | } | 1958 | | | 1959 | 274 | ret.push_back(result); | 1960 | 274 | } | 1961 | | | 1962 | 95 | return ret; | 1963 | 95 | } |
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 | 1951 | 10 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 10 | ResultSet ret; | 1953 | | | 1954 | 34 | for (const auto& result : results) { | 1955 | 34 | if ( result.second == std::nullopt ) { | 1956 | 34 | continue; | 1957 | 34 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 10 | return ret; | 1963 | 10 | } |
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 | 1951 | 5 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 5 | ResultSet ret; | 1953 | | | 1954 | 14 | for (const auto& result : results) { | 1955 | 14 | if ( result.second == std::nullopt ) { | 1956 | 14 | continue; | 1957 | 14 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 5 | return ret; | 1963 | 5 | } |
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 | 1951 | 4 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 4 | ResultSet ret; | 1953 | | | 1954 | 18 | for (const auto& result : results) { | 1955 | 18 | if ( result.second == std::nullopt ) { | 1956 | 18 | continue; | 1957 | 18 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 4 | return ret; | 1963 | 4 | } |
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 | 1951 | 51 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 51 | ResultSet ret; | 1953 | | | 1954 | 150 | for (const auto& result : results) { | 1955 | 150 | if ( result.second == std::nullopt ) { | 1956 | 100 | continue; | 1957 | 100 | } | 1958 | | | 1959 | 50 | ret.push_back(result); | 1960 | 50 | } | 1961 | | | 1962 | 51 | return ret; | 1963 | 51 | } |
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 | 1951 | 5 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 5 | ResultSet ret; | 1953 | | | 1954 | 14 | for (const auto& result : results) { | 1955 | 14 | if ( result.second == std::nullopt ) { | 1956 | 14 | continue; | 1957 | 14 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 5 | return ret; | 1963 | 5 | } |
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 | 1951 | 6 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 6 | ResultSet ret; | 1953 | | | 1954 | 18 | for (const auto& result : results) { | 1955 | 18 | if ( result.second == std::nullopt ) { | 1956 | 18 | continue; | 1957 | 18 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 6 | return ret; | 1963 | 6 | } |
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 | 1951 | 8 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 8 | ResultSet ret; | 1953 | | | 1954 | 24 | for (const auto& result : results) { | 1955 | 24 | if ( result.second == std::nullopt ) { | 1956 | 24 | continue; | 1957 | 24 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 8 | return ret; | 1963 | 8 | } |
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 | 1951 | 3 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 3 | ResultSet ret; | 1953 | | | 1954 | 10 | for (const auto& result : results) { | 1955 | 10 | if ( result.second == std::nullopt ) { | 1956 | 10 | continue; | 1957 | 10 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 3 | return ret; | 1963 | 3 | } |
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 | 1951 | 6 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 6 | ResultSet ret; | 1953 | | | 1954 | 20 | for (const auto& result : results) { | 1955 | 20 | if ( result.second == std::nullopt ) { | 1956 | 20 | continue; | 1957 | 20 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 6 | return ret; | 1963 | 6 | } |
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 Line | Count | Source | 1951 | 2 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 2 | ResultSet ret; | 1953 | | | 1954 | 5 | for (const auto& result : results) { | 1955 | 5 | if ( result.second == std::nullopt ) { | 1956 | 5 | continue; | 1957 | 5 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 2 | return ret; | 1963 | 2 | } |
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 | 1951 | 7 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 7 | ResultSet ret; | 1953 | | | 1954 | 22 | for (const auto& result : results) { | 1955 | 22 | if ( result.second == std::nullopt ) { | 1956 | 22 | continue; | 1957 | 22 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 7 | return ret; | 1963 | 7 | } |
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 | 1951 | 9 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 9 | ResultSet ret; | 1953 | | | 1954 | 31 | for (const auto& result : results) { | 1955 | 31 | if ( result.second == std::nullopt ) { | 1956 | 26 | continue; | 1957 | 26 | } | 1958 | | | 1959 | 5 | ret.push_back(result); | 1960 | 5 | } | 1961 | | | 1962 | 9 | return ret; | 1963 | 9 | } |
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 | 1951 | 11 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 11 | ResultSet ret; | 1953 | | | 1954 | 31 | for (const auto& result : results) { | 1955 | 31 | if ( result.second == std::nullopt ) { | 1956 | 12 | continue; | 1957 | 12 | } | 1958 | | | 1959 | 19 | ret.push_back(result); | 1960 | 19 | } | 1961 | | | 1962 | 11 | return ret; | 1963 | 11 | } |
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 | 1951 | 9 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 9 | ResultSet ret; | 1953 | | | 1954 | 28 | for (const auto& result : results) { | 1955 | 28 | if ( result.second == std::nullopt ) { | 1956 | 17 | continue; | 1957 | 17 | } | 1958 | | | 1959 | 11 | ret.push_back(result); | 1960 | 11 | } | 1961 | | | 1962 | 9 | return ret; | 1963 | 9 | } |
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 | 1951 | 5 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 5 | ResultSet ret; | 1953 | | | 1954 | 21 | for (const auto& result : results) { | 1955 | 21 | if ( result.second == std::nullopt ) { | 1956 | 12 | continue; | 1957 | 12 | } | 1958 | | | 1959 | 9 | ret.push_back(result); | 1960 | 9 | } | 1961 | | | 1962 | 5 | return ret; | 1963 | 5 | } |
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 | 1951 | 18 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 18 | ResultSet ret; | 1953 | | | 1954 | 58 | for (const auto& result : results) { | 1955 | 58 | if ( result.second == std::nullopt ) { | 1956 | 47 | continue; | 1957 | 47 | } | 1958 | | | 1959 | 11 | ret.push_back(result); | 1960 | 11 | } | 1961 | | | 1962 | 18 | return ret; | 1963 | 18 | } |
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 | 1951 | 524 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 524 | ResultSet ret; | 1953 | | | 1954 | 1.59k | for (const auto& result : results) { | 1955 | 1.59k | if ( result.second == std::nullopt ) { | 1956 | 444 | continue; | 1957 | 444 | } | 1958 | | | 1959 | 1.15k | ret.push_back(result); | 1960 | 1.15k | } | 1961 | | | 1962 | 524 | return ret; | 1963 | 524 | } |
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 | 1951 | 17 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 17 | ResultSet ret; | 1953 | | | 1954 | 57 | for (const auto& result : results) { | 1955 | 57 | if ( result.second == std::nullopt ) { | 1956 | 57 | continue; | 1957 | 57 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 17 | return ret; | 1963 | 17 | } |
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 | 1951 | 58 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 58 | ResultSet ret; | 1953 | | | 1954 | 189 | for (const auto& result : results) { | 1955 | 189 | if ( result.second == std::nullopt ) { | 1956 | 189 | continue; | 1957 | 189 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 58 | return ret; | 1963 | 58 | } |
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 | 1951 | 7 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 7 | ResultSet ret; | 1953 | | | 1954 | 21 | for (const auto& result : results) { | 1955 | 21 | if ( result.second == std::nullopt ) { | 1956 | 21 | continue; | 1957 | 21 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 7 | return ret; | 1963 | 7 | } |
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 | 1951 | 6 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 6 | ResultSet ret; | 1953 | | | 1954 | 21 | for (const auto& result : results) { | 1955 | 21 | if ( result.second == std::nullopt ) { | 1956 | 21 | continue; | 1957 | 21 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 6 | return ret; | 1963 | 6 | } |
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 | 1951 | 4 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 4 | ResultSet ret; | 1953 | | | 1954 | 13 | for (const auto& result : results) { | 1955 | 13 | if ( result.second == std::nullopt ) { | 1956 | 13 | continue; | 1957 | 13 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 4 | return ret; | 1963 | 4 | } |
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 | 1951 | 2 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 2 | ResultSet ret; | 1953 | | | 1954 | 8 | for (const auto& result : results) { | 1955 | 8 | if ( result.second == std::nullopt ) { | 1956 | 8 | continue; | 1957 | 8 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 2 | return ret; | 1963 | 2 | } |
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 | 1951 | 4 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 4 | ResultSet ret; | 1953 | | | 1954 | 16 | for (const auto& result : results) { | 1955 | 16 | if ( result.second == std::nullopt ) { | 1956 | 16 | continue; | 1957 | 16 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 4 | return ret; | 1963 | 4 | } |
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 | 1951 | 3 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 3 | ResultSet ret; | 1953 | | | 1954 | 8 | for (const auto& result : results) { | 1955 | 8 | if ( result.second == std::nullopt ) { | 1956 | 8 | continue; | 1957 | 8 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 3 | return ret; | 1963 | 3 | } |
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 | 1951 | 5 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 5 | ResultSet ret; | 1953 | | | 1954 | 16 | for (const auto& result : results) { | 1955 | 16 | if ( result.second == std::nullopt ) { | 1956 | 16 | continue; | 1957 | 16 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 5 | return ret; | 1963 | 5 | } |
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 | 1951 | 5 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 5 | ResultSet ret; | 1953 | | | 1954 | 12 | for (const auto& result : results) { | 1955 | 12 | if ( result.second == std::nullopt ) { | 1956 | 12 | continue; | 1957 | 12 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 5 | return ret; | 1963 | 5 | } |
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 | 1951 | 7 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 7 | ResultSet ret; | 1953 | | | 1954 | 22 | for (const auto& result : results) { | 1955 | 22 | if ( result.second == std::nullopt ) { | 1956 | 22 | continue; | 1957 | 22 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 7 | return ret; | 1963 | 7 | } |
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 | 1951 | 3 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 3 | ResultSet ret; | 1953 | | | 1954 | 8 | for (const auto& result : results) { | 1955 | 8 | if ( result.second == std::nullopt ) { | 1956 | 8 | continue; | 1957 | 8 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 3 | return ret; | 1963 | 3 | } |
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 | 1951 | 4 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 4 | ResultSet ret; | 1953 | | | 1954 | 12 | for (const auto& result : results) { | 1955 | 12 | if ( result.second == std::nullopt ) { | 1956 | 12 | continue; | 1957 | 12 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 4 | return ret; | 1963 | 4 | } |
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 | 1951 | 8 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 8 | ResultSet ret; | 1953 | | | 1954 | 25 | for (const auto& result : results) { | 1955 | 25 | if ( result.second == std::nullopt ) { | 1956 | 25 | continue; | 1957 | 25 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 8 | return ret; | 1963 | 8 | } |
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 | 1951 | 8 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 8 | ResultSet ret; | 1953 | | | 1954 | 22 | for (const auto& result : results) { | 1955 | 22 | if ( result.second == std::nullopt ) { | 1956 | 22 | continue; | 1957 | 22 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 8 | return ret; | 1963 | 8 | } |
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 | 1951 | 2 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 2 | ResultSet ret; | 1953 | | | 1954 | 8 | for (const auto& result : results) { | 1955 | 8 | if ( result.second == std::nullopt ) { | 1956 | 8 | continue; | 1957 | 8 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 2 | return ret; | 1963 | 2 | } |
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 | 1951 | 6 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 6 | ResultSet ret; | 1953 | | | 1954 | 17 | for (const auto& result : results) { | 1955 | 17 | if ( result.second == std::nullopt ) { | 1956 | 17 | continue; | 1957 | 17 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 6 | return ret; | 1963 | 6 | } |
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 | 1951 | 6 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 6 | ResultSet ret; | 1953 | | | 1954 | 20 | for (const auto& result : results) { | 1955 | 20 | if ( result.second == std::nullopt ) { | 1956 | 20 | continue; | 1957 | 20 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 6 | return ret; | 1963 | 6 | } |
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 | 1951 | 7 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 7 | ResultSet ret; | 1953 | | | 1954 | 30 | for (const auto& result : results) { | 1955 | 30 | if ( result.second == std::nullopt ) { | 1956 | 30 | continue; | 1957 | 30 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 7 | return ret; | 1963 | 7 | } |
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 | 1951 | 4 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 4 | ResultSet ret; | 1953 | | | 1954 | 14 | for (const auto& result : results) { | 1955 | 14 | if ( result.second == std::nullopt ) { | 1956 | 14 | continue; | 1957 | 14 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 4 | return ret; | 1963 | 4 | } |
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 | 1951 | 5 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 5 | ResultSet ret; | 1953 | | | 1954 | 14 | for (const auto& result : results) { | 1955 | 14 | if ( result.second == std::nullopt ) { | 1956 | 14 | continue; | 1957 | 14 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 5 | return ret; | 1963 | 5 | } |
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 | 1951 | 7 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 7 | ResultSet ret; | 1953 | | | 1954 | 23 | for (const auto& result : results) { | 1955 | 23 | if ( result.second == std::nullopt ) { | 1956 | 23 | continue; | 1957 | 23 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 7 | return ret; | 1963 | 7 | } |
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 | 1951 | 6 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 6 | ResultSet ret; | 1953 | | | 1954 | 21 | for (const auto& result : results) { | 1955 | 21 | if ( result.second == std::nullopt ) { | 1956 | 21 | continue; | 1957 | 21 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 6 | return ret; | 1963 | 6 | } |
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 | 1951 | 1 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 1 | ResultSet ret; | 1953 | | | 1954 | 5 | for (const auto& result : results) { | 1955 | 5 | if ( result.second == std::nullopt ) { | 1956 | 5 | continue; | 1957 | 5 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 1 | return ret; | 1963 | 1 | } |
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 | 1951 | 13 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 13 | ResultSet ret; | 1953 | | | 1954 | 38 | for (const auto& result : results) { | 1955 | 38 | if ( result.second == std::nullopt ) { | 1956 | 38 | continue; | 1957 | 38 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 13 | return ret; | 1963 | 13 | } |
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 | 1951 | 4 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 4 | ResultSet ret; | 1953 | | | 1954 | 16 | for (const auto& result : results) { | 1955 | 16 | if ( result.second == std::nullopt ) { | 1956 | 16 | continue; | 1957 | 16 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 4 | return ret; | 1963 | 4 | } |
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 | 1951 | 3 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 3 | ResultSet ret; | 1953 | | | 1954 | 9 | for (const auto& result : results) { | 1955 | 9 | if ( result.second == std::nullopt ) { | 1956 | 9 | continue; | 1957 | 9 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 3 | return ret; | 1963 | 3 | } |
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 | 1951 | 5 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 5 | ResultSet ret; | 1953 | | | 1954 | 17 | for (const auto& result : results) { | 1955 | 17 | if ( result.second == std::nullopt ) { | 1956 | 17 | continue; | 1957 | 17 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 5 | return ret; | 1963 | 5 | } |
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 | 1951 | 13 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 13 | ResultSet ret; | 1953 | | | 1954 | 42 | for (const auto& result : results) { | 1955 | 42 | if ( result.second == std::nullopt ) { | 1956 | 42 | continue; | 1957 | 42 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 13 | return ret; | 1963 | 13 | } |
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 | 1951 | 9 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 9 | ResultSet ret; | 1953 | | | 1954 | 23 | for (const auto& result : results) { | 1955 | 23 | if ( result.second == std::nullopt ) { | 1956 | 23 | continue; | 1957 | 23 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 9 | return ret; | 1963 | 9 | } |
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 | 1951 | 6 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 6 | ResultSet ret; | 1953 | | | 1954 | 23 | for (const auto& result : results) { | 1955 | 23 | if ( result.second == std::nullopt ) { | 1956 | 23 | continue; | 1957 | 23 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 6 | return ret; | 1963 | 6 | } |
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 | 1951 | 3 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 3 | ResultSet ret; | 1953 | | | 1954 | 6 | for (const auto& result : results) { | 1955 | 6 | if ( result.second == std::nullopt ) { | 1956 | 6 | continue; | 1957 | 6 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 3 | return ret; | 1963 | 3 | } |
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 | 1951 | 3 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 3 | ResultSet ret; | 1953 | | | 1954 | 14 | for (const auto& result : results) { | 1955 | 14 | if ( result.second == std::nullopt ) { | 1956 | 14 | continue; | 1957 | 14 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 3 | return ret; | 1963 | 3 | } |
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 | 1951 | 3 | typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const { | 1952 | 3 | ResultSet ret; | 1953 | | | 1954 | 10 | for (const auto& result : results) { | 1955 | 10 | if ( result.second == std::nullopt ) { | 1956 | 10 | continue; | 1957 | 10 | } | 1958 | | | 1959 | 0 | ret.push_back(result); | 1960 | 0 | } | 1961 | | | 1962 | 3 | return ret; | 1963 | 3 | } |
|
1964 | | |
1965 | | /* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */ |
1966 | | template <> |
1967 | 553 | 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 { |
1968 | 553 | (void)operations; |
1969 | 553 | (void)results; |
1970 | 553 | (void)data; |
1971 | 553 | (void)size; |
1972 | 553 | } |
1973 | | |
1974 | | template <class ResultType, class OperationType> |
1975 | 276 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { |
1976 | 276 | (void)operation; |
1977 | | |
1978 | 276 | return false; |
1979 | 276 | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const Line | Count | Source | 1975 | 192 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 1976 | 192 | (void)operation; | 1977 | | | 1978 | 192 | return false; | 1979 | 192 | } |
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 Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const 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 Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::dontCompare(cryptofuzz::operation::KDF_PBKDF2 const&) const 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 cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::dontCompare(cryptofuzz::operation::ECC_PrivateToPublic const&) const Line | Count | Source | 1975 | 48 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 1976 | 48 | (void)operation; | 1977 | | | 1978 | 48 | return false; | 1979 | 48 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const Line | Count | Source | 1975 | 3 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 1976 | 3 | (void)operation; | 1977 | | | 1978 | 3 | return false; | 1979 | 3 | } |
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 cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::dontCompare(cryptofuzz::operation::ECDSA_Verify const&) const Line | Count | Source | 1975 | 18 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 1976 | 18 | (void)operation; | 1977 | | | 1978 | 18 | return false; | 1979 | 18 | } |
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<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::dontCompare(cryptofuzz::operation::ECDH_Derive const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::dontCompare(cryptofuzz::operation::ECIES_Encrypt const&) const Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::dontCompare(cryptofuzz::operation::ECIES_Decrypt const&) const cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::dontCompare(cryptofuzz::operation::ECC_Point_Add const&) const Line | Count | Source | 1975 | 1 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 1976 | 1 | (void)operation; | 1977 | | | 1978 | 1 | return false; | 1979 | 1 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const Line | Count | Source | 1975 | 6 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 1976 | 6 | (void)operation; | 1977 | | | 1978 | 6 | return false; | 1979 | 6 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const Line | Count | Source | 1975 | 3 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 1976 | 3 | (void)operation; | 1977 | | | 1978 | 3 | return false; | 1979 | 3 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const Line | Count | Source | 1975 | 2 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 1976 | 2 | (void)operation; | 1977 | | | 1978 | 2 | return false; | 1979 | 2 | } |
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 | 1975 | 3 | bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const { | 1976 | 3 | (void)operation; | 1977 | | | 1978 | 3 | return false; | 1979 | 3 | } |
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::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 |
1980 | | |
1981 | | template <> |
1982 | 376 | bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const { |
1983 | 376 | if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; } |
1984 | 374 | if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; } |
1985 | | |
1986 | 374 | return false; |
1987 | 374 | } |
1988 | | |
1989 | | template <> |
1990 | 78 | bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const { |
1991 | 78 | if ( |
1992 | 78 | operation.curveType.Get() != CF_ECC_CURVE("ed25519") && |
1993 | 78 | operation.curveType.Get() != CF_ECC_CURVE("ed448") ) { |
1994 | 78 | if ( operation.UseRandomNonce() ) { |
1995 | | /* Don't compare ECDSA signatures comptued from a randomly generated nonce */ |
1996 | 78 | return true; |
1997 | 78 | } |
1998 | 78 | } |
1999 | | |
2000 | 0 | return false; |
2001 | 78 | } |
2002 | | |
2003 | | template <> |
2004 | 0 | bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const { |
2005 | 0 | if ( |
2006 | 0 | operation.curveType.Get() != CF_ECC_CURVE("ed25519") && |
2007 | 0 | operation.curveType.Get() != CF_ECC_CURVE("ed448") ) { |
2008 | 0 | if ( operation.UseRandomNonce() ) { |
2009 | | /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */ |
2010 | 0 | return true; |
2011 | 0 | } |
2012 | 0 | } |
2013 | | |
2014 | 0 | return false; |
2015 | 0 | } |
2016 | | |
2017 | | template <> |
2018 | 0 | bool ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::dontCompare(const operation::ECRDSA_Sign& operation) const { |
2019 | 0 | if ( |
2020 | 0 | operation.curveType.Get() != CF_ECC_CURVE("ed25519") && |
2021 | 0 | operation.curveType.Get() != CF_ECC_CURVE("ed448") ) { |
2022 | 0 | if ( operation.UseRandomNonce() ) { |
2023 | | /* Don't compare ECRDSA signatures comptued from a randomly generated nonce */ |
2024 | 0 | return true; |
2025 | 0 | } |
2026 | 0 | } |
2027 | | |
2028 | 0 | return false; |
2029 | 0 | } |
2030 | | |
2031 | | /* OpenSSL DES_EDE3_WRAP randomizes the IV, result is different each time */ |
2032 | | template <> |
2033 | 181 | bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const { |
2034 | 181 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; } |
2035 | | |
2036 | 181 | return false; |
2037 | 181 | } |
2038 | | |
2039 | | template <> |
2040 | 53 | bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const { |
2041 | 53 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true; |
2042 | | |
2043 | 53 | return false; |
2044 | 53 | } |
2045 | | |
2046 | | template <> |
2047 | 272 | bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const { |
2048 | 272 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true; |
2049 | | |
2050 | 272 | return false; |
2051 | 272 | } |
2052 | | |
2053 | | template <> |
2054 | 178 | bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const { |
2055 | 178 | if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true; |
2056 | | |
2057 | 178 | return false; |
2058 | 178 | } |
2059 | | |
2060 | | template <class ResultType, class OperationType> |
2061 | 6.47k | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { |
2062 | 6.47k | if ( results.size() < 2 ) { |
2063 | | /* Nothing to compare. Don't even bother filtering. */ |
2064 | 3.52k | return; |
2065 | 3.52k | } |
2066 | | |
2067 | 2.95k | const auto filtered = filter(results); |
2068 | | |
2069 | 2.95k | if ( filtered.size() < 2 ) { |
2070 | | /* Nothing to compare */ |
2071 | 1.53k | return; |
2072 | 1.53k | } |
2073 | | |
2074 | 1.41k | if ( dontCompare(operations[0].second) == true ) { |
2075 | 80 | return; |
2076 | 80 | } |
2077 | | |
2078 | 6.86k | for (size_t i = 1; i < filtered.size(); i++) { |
2079 | 5.53k | const std::optional<ResultType>& prev = filtered[i-1].second; |
2080 | 5.53k | const std::optional<ResultType>& cur = filtered[i].second; |
2081 | | |
2082 | 5.53k | const bool equal = *prev == *cur; |
2083 | | |
2084 | 5.53k | if ( !equal ) { |
2085 | | /* Reconstruct operation */ |
2086 | 0 | const auto op = getOp(nullptr, data, size); |
2087 | |
|
2088 | 0 | printf("Difference detected\n\n"); |
2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); |
2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); |
2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); |
2092 | |
|
2093 | 0 | abort( |
2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, |
2095 | 0 | op.Name(), |
2096 | 0 | op.GetAlgorithmString(), |
2097 | 0 | "difference" |
2098 | 0 | ); |
2099 | 0 | } |
2100 | 5.53k | } |
2101 | 1.33k | } 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 | 2061 | 460 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 460 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 246 | return; | 2065 | 246 | } | 2066 | | | 2067 | 214 | const auto filtered = filter(results); | 2068 | | | 2069 | 214 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 22 | return; | 2072 | 22 | } | 2073 | | | 2074 | 192 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 1.26k | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 1.07k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 1.07k | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | | | 2082 | 1.07k | const bool equal = *prev == *cur; | 2083 | | | 2084 | 1.07k | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 1.07k | } | 2101 | 192 | } |
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 | 2061 | 318 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 318 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 101 | return; | 2065 | 101 | } | 2066 | | | 2067 | 217 | const auto filtered = filter(results); | 2068 | | | 2069 | 217 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 39 | return; | 2072 | 39 | } | 2073 | | | 2074 | 178 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 1.20k | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 1.02k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 1.02k | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | | | 2082 | 1.02k | const bool equal = *prev == *cur; | 2083 | | | 2084 | 1.02k | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 1.02k | } | 2101 | 178 | } |
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 | 2061 | 4 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 4 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 0 | return; | 2065 | 0 | } | 2066 | | | 2067 | 4 | const auto filtered = filter(results); | 2068 | | | 2069 | 4 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 4 | return; | 2072 | 4 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 1.53k | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 1.53k | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 994 | return; | 2065 | 994 | } | 2066 | | | 2067 | 541 | const auto filtered = filter(results); | 2068 | | | 2069 | 541 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 269 | return; | 2072 | 269 | } | 2073 | | | 2074 | 272 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 1.75k | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 1.48k | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 1.48k | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | | | 2082 | 1.48k | const bool equal = *prev == *cur; | 2083 | | | 2084 | 1.48k | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 1.48k | } | 2101 | 272 | } |
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 | 2061 | 695 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 695 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 260 | return; | 2065 | 260 | } | 2066 | | | 2067 | 435 | const auto filtered = filter(results); | 2068 | | | 2069 | 435 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 254 | return; | 2072 | 254 | } | 2073 | | | 2074 | 181 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 993 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 812 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 812 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | | | 2082 | 812 | const bool equal = *prev == *cur; | 2083 | | | 2084 | 812 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 812 | } | 2101 | 181 | } |
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 | 2061 | 534 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 534 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 232 | return; | 2065 | 232 | } | 2066 | | | 2067 | 302 | const auto filtered = filter(results); | 2068 | | | 2069 | 302 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 249 | return; | 2072 | 249 | } | 2073 | | | 2074 | 53 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 265 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 212 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 212 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | | | 2082 | 212 | const bool equal = *prev == *cur; | 2083 | | | 2084 | 212 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 212 | } | 2101 | 53 | } |
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 | 2061 | 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 { | 2062 | 21 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 3 | return; | 2065 | 3 | } | 2066 | | | 2067 | 18 | const auto filtered = filter(results); | 2068 | | | 2069 | 18 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 18 | return; | 2072 | 18 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 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 { | 2062 | 22 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 5 | return; | 2065 | 5 | } | 2066 | | | 2067 | 17 | const auto filtered = filter(results); | 2068 | | | 2069 | 17 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 17 | return; | 2072 | 17 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 0 | } |
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 | 2061 | 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 { | 2062 | 16 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 4 | return; | 2065 | 4 | } | 2066 | | | 2067 | 12 | const auto filtered = filter(results); | 2068 | | | 2069 | 12 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 12 | return; | 2072 | 12 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 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 { | 2062 | 22 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 9 | return; | 2065 | 9 | } | 2066 | | | 2067 | 13 | const auto filtered = filter(results); | 2068 | | | 2069 | 13 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 13 | return; | 2072 | 13 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 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 { | 2062 | 15 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 4 | return; | 2065 | 4 | } | 2066 | | | 2067 | 11 | const auto filtered = filter(results); | 2068 | | | 2069 | 11 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 11 | return; | 2072 | 11 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 13 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 13 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 1 | return; | 2065 | 1 | } | 2066 | | | 2067 | 12 | const auto filtered = filter(results); | 2068 | | | 2069 | 12 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 12 | return; | 2072 | 12 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 0 | } |
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 | 2061 | 12 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 12 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 3 | return; | 2065 | 3 | } | 2066 | | | 2067 | 9 | const auto filtered = filter(results); | 2068 | | | 2069 | 9 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 9 | return; | 2072 | 9 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 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 { | 2062 | 20 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 3 | return; | 2065 | 3 | } | 2066 | | | 2067 | 17 | const auto filtered = filter(results); | 2068 | | | 2069 | 17 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 17 | return; | 2072 | 17 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 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 { | 2062 | 14 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 2 | return; | 2065 | 2 | } | 2066 | | | 2067 | 12 | const auto filtered = filter(results); | 2068 | | | 2069 | 12 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 12 | return; | 2072 | 12 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 3 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 3 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 3 | return; | 2065 | 3 | } | 2066 | | | 2067 | 0 | const auto filtered = filter(results); | 2068 | |
| 2069 | 0 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 0 | return; | 2072 | 0 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 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 { | 2062 | 20 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 1 | return; | 2065 | 1 | } | 2066 | | | 2067 | 19 | const auto filtered = filter(results); | 2068 | | | 2069 | 19 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 19 | return; | 2072 | 19 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 200 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 200 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 136 | return; | 2065 | 136 | } | 2066 | | | 2067 | 64 | const auto filtered = filter(results); | 2068 | | | 2069 | 64 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 16 | return; | 2072 | 16 | } | 2073 | | | 2074 | 48 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 154 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 106 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 106 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | | | 2082 | 106 | const bool equal = *prev == *cur; | 2083 | | | 2084 | 106 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 106 | } | 2101 | 48 | } |
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 | 2061 | 155 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 155 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 145 | return; | 2065 | 145 | } | 2066 | | | 2067 | 10 | const auto filtered = filter(results); | 2068 | | | 2069 | 10 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 7 | return; | 2072 | 7 | } | 2073 | | | 2074 | 3 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 7 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 4 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 4 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | | | 2082 | 4 | const bool equal = *prev == *cur; | 2083 | | | 2084 | 4 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 4 | } | 2101 | 3 | } |
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 | 2061 | 219 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 219 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 124 | return; | 2065 | 124 | } | 2066 | | | 2067 | 95 | const auto filtered = filter(results); | 2068 | | | 2069 | 95 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 17 | return; | 2072 | 17 | } | 2073 | | | 2074 | 78 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 78 | return; | 2076 | 78 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 0 | } |
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 | 2061 | 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 { | 2062 | 15 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 5 | return; | 2065 | 5 | } | 2066 | | | 2067 | 10 | const auto filtered = filter(results); | 2068 | | | 2069 | 10 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 10 | return; | 2072 | 10 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 5 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 5 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 0 | return; | 2065 | 0 | } | 2066 | | | 2067 | 5 | const auto filtered = filter(results); | 2068 | | | 2069 | 5 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 5 | return; | 2072 | 5 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 6 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 6 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 2 | return; | 2065 | 2 | } | 2066 | | | 2067 | 4 | const auto filtered = filter(results); | 2068 | | | 2069 | 4 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 4 | return; | 2072 | 4 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 158 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 158 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 107 | return; | 2065 | 107 | } | 2066 | | | 2067 | 51 | const auto filtered = filter(results); | 2068 | | | 2069 | 51 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 33 | return; | 2072 | 33 | } | 2073 | | | 2074 | 18 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 50 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 32 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 32 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | | | 2082 | 32 | const bool equal = *prev == *cur; | 2083 | | | 2084 | 32 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 32 | } | 2101 | 18 | } |
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 | 2061 | 6 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 6 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 1 | return; | 2065 | 1 | } | 2066 | | | 2067 | 5 | const auto filtered = filter(results); | 2068 | | | 2069 | 5 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 5 | return; | 2072 | 5 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 6 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 6 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 0 | return; | 2065 | 0 | } | 2066 | | | 2067 | 6 | const auto filtered = filter(results); | 2068 | | | 2069 | 6 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 6 | return; | 2072 | 6 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 10 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 10 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 2 | return; | 2065 | 2 | } | 2066 | | | 2067 | 8 | const auto filtered = filter(results); | 2068 | | | 2069 | 8 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 8 | return; | 2072 | 8 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 4 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 4 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 1 | return; | 2065 | 1 | } | 2066 | | | 2067 | 3 | const auto filtered = filter(results); | 2068 | | | 2069 | 3 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 3 | return; | 2072 | 3 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 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 { | 2062 | 11 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 5 | return; | 2065 | 5 | } | 2066 | | | 2067 | 6 | const auto filtered = filter(results); | 2068 | | | 2069 | 6 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 6 | return; | 2072 | 6 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Encrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Encrypt> > > 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 | 2061 | 3 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 3 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 1 | return; | 2065 | 1 | } | 2066 | | | 2067 | 2 | const auto filtered = filter(results); | 2068 | | | 2069 | 2 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 2 | return; | 2072 | 2 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Decrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Decrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2061 | 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 { | 2062 | 9 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 2 | return; | 2065 | 2 | } | 2066 | | | 2067 | 7 | const auto filtered = filter(results); | 2068 | | | 2069 | 7 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 7 | return; | 2072 | 7 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 0 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const Line | Count | Source | 2061 | 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 { | 2062 | 20 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 11 | return; | 2065 | 11 | } | 2066 | | | 2067 | 9 | const auto filtered = filter(results); | 2068 | | | 2069 | 9 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 8 | return; | 2072 | 8 | } | 2073 | | | 2074 | 1 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 5 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 4 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 4 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | | | 2082 | 4 | const bool equal = *prev == *cur; | 2083 | | | 2084 | 4 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 4 | } | 2101 | 1 | } |
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 | 2061 | 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 { | 2062 | 20 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 9 | return; | 2065 | 9 | } | 2066 | | | 2067 | 11 | const auto filtered = filter(results); | 2068 | | | 2069 | 11 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 5 | return; | 2072 | 5 | } | 2073 | | | 2074 | 6 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 19 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 13 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 13 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | | | 2082 | 13 | const bool equal = *prev == *cur; | 2083 | | | 2084 | 13 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 13 | } | 2101 | 6 | } |
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 | 2061 | 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 { | 2062 | 21 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 12 | return; | 2065 | 12 | } | 2066 | | | 2067 | 9 | const auto filtered = filter(results); | 2068 | | | 2069 | 9 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 6 | return; | 2072 | 6 | } | 2073 | | | 2074 | 3 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 11 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 8 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 8 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | | | 2082 | 8 | const bool equal = *prev == *cur; | 2083 | | | 2084 | 8 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 8 | } | 2101 | 3 | } |
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 | 2061 | 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 { | 2062 | 21 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 16 | return; | 2065 | 16 | } | 2066 | | | 2067 | 5 | const auto filtered = filter(results); | 2068 | | | 2069 | 5 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 3 | return; | 2072 | 3 | } | 2073 | | | 2074 | 2 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 9 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 7 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 7 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | | | 2082 | 7 | const bool equal = *prev == *cur; | 2083 | | | 2084 | 7 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 7 | } | 2101 | 2 | } |
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 | 2061 | 63 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 63 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 45 | return; | 2065 | 45 | } | 2066 | | | 2067 | 18 | const auto filtered = filter(results); | 2068 | | | 2069 | 18 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 15 | return; | 2072 | 15 | } | 2073 | | | 2074 | 3 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 11 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 8 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 8 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | | | 2082 | 8 | const bool equal = *prev == *cur; | 2083 | | | 2084 | 8 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 8 | } | 2101 | 3 | } |
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 | 2061 | 1.43k | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 1.43k | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 910 | return; | 2065 | 910 | } | 2066 | | | 2067 | 524 | const auto filtered = filter(results); | 2068 | | | 2069 | 524 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 148 | return; | 2072 | 148 | } | 2073 | | | 2074 | 376 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 2 | return; | 2076 | 2 | } | 2077 | | | 2078 | 1.12k | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 748 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 748 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | | | 2082 | 748 | const bool equal = *prev == *cur; | 2083 | | | 2084 | 748 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 748 | } | 2101 | 374 | } |
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 | 2061 | 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 { | 2062 | 22 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 5 | return; | 2065 | 5 | } | 2066 | | | 2067 | 17 | const auto filtered = filter(results); | 2068 | | | 2069 | 17 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 17 | return; | 2072 | 17 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 88 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 88 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 30 | return; | 2065 | 30 | } | 2066 | | | 2067 | 58 | const auto filtered = filter(results); | 2068 | | | 2069 | 58 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 58 | return; | 2072 | 58 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 10 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 10 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 3 | return; | 2065 | 3 | } | 2066 | | | 2067 | 7 | const auto filtered = filter(results); | 2068 | | | 2069 | 7 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 7 | return; | 2072 | 7 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 10 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 10 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 4 | return; | 2065 | 4 | } | 2066 | | | 2067 | 6 | const auto filtered = filter(results); | 2068 | | | 2069 | 6 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 6 | return; | 2072 | 6 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 5 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 5 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 1 | return; | 2065 | 1 | } | 2066 | | | 2067 | 4 | const auto filtered = filter(results); | 2068 | | | 2069 | 4 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 4 | return; | 2072 | 4 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 3 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 3 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 1 | return; | 2065 | 1 | } | 2066 | | | 2067 | 2 | const auto filtered = filter(results); | 2068 | | | 2069 | 2 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 2 | return; | 2072 | 2 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 7 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 7 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 3 | return; | 2065 | 3 | } | 2066 | | | 2067 | 4 | const auto filtered = filter(results); | 2068 | | | 2069 | 4 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 4 | return; | 2072 | 4 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 3 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 3 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 0 | return; | 2065 | 0 | } | 2066 | | | 2067 | 3 | const auto filtered = filter(results); | 2068 | | | 2069 | 3 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 3 | return; | 2072 | 3 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 5 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 5 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 0 | return; | 2065 | 0 | } | 2066 | | | 2067 | 5 | const auto filtered = filter(results); | 2068 | | | 2069 | 5 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 5 | return; | 2072 | 5 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 7 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 7 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 2 | return; | 2065 | 2 | } | 2066 | | | 2067 | 5 | const auto filtered = filter(results); | 2068 | | | 2069 | 5 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 5 | return; | 2072 | 5 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 8 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 8 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 1 | return; | 2065 | 1 | } | 2066 | | | 2067 | 7 | const auto filtered = filter(results); | 2068 | | | 2069 | 7 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 7 | return; | 2072 | 7 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 5 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 5 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 2 | return; | 2065 | 2 | } | 2066 | | | 2067 | 3 | const auto filtered = filter(results); | 2068 | | | 2069 | 3 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 3 | return; | 2072 | 3 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 5 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 5 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 1 | return; | 2065 | 1 | } | 2066 | | | 2067 | 4 | const auto filtered = filter(results); | 2068 | | | 2069 | 4 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 4 | return; | 2072 | 4 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 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 { | 2062 | 9 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 1 | return; | 2065 | 1 | } | 2066 | | | 2067 | 8 | const auto filtered = filter(results); | 2068 | | | 2069 | 8 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 8 | return; | 2072 | 8 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 8 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 8 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 0 | return; | 2065 | 0 | } | 2066 | | | 2067 | 8 | const auto filtered = filter(results); | 2068 | | | 2069 | 8 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 8 | return; | 2072 | 8 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 5 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 5 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 3 | return; | 2065 | 3 | } | 2066 | | | 2067 | 2 | const auto filtered = filter(results); | 2068 | | | 2069 | 2 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 2 | return; | 2072 | 2 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 8 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 8 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 2 | return; | 2065 | 2 | } | 2066 | | | 2067 | 6 | const auto filtered = filter(results); | 2068 | | | 2069 | 6 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 6 | return; | 2072 | 6 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 7 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 7 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 1 | return; | 2065 | 1 | } | 2066 | | | 2067 | 6 | const auto filtered = filter(results); | 2068 | | | 2069 | 6 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 6 | return; | 2072 | 6 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 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 { | 2062 | 14 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 7 | return; | 2065 | 7 | } | 2066 | | | 2067 | 7 | const auto filtered = filter(results); | 2068 | | | 2069 | 7 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 7 | return; | 2072 | 7 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 4 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 4 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 0 | return; | 2065 | 0 | } | 2066 | | | 2067 | 4 | const auto filtered = filter(results); | 2068 | | | 2069 | 4 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 4 | return; | 2072 | 4 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 6 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 6 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 1 | return; | 2065 | 1 | } | 2066 | | | 2067 | 5 | const auto filtered = filter(results); | 2068 | | | 2069 | 5 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 5 | return; | 2072 | 5 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 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 { | 2062 | 9 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 2 | return; | 2065 | 2 | } | 2066 | | | 2067 | 7 | const auto filtered = filter(results); | 2068 | | | 2069 | 7 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 7 | return; | 2072 | 7 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 8 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 8 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 2 | return; | 2065 | 2 | } | 2066 | | | 2067 | 6 | const auto filtered = filter(results); | 2068 | | | 2069 | 6 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 6 | return; | 2072 | 6 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 3 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 3 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 2 | return; | 2065 | 2 | } | 2066 | | | 2067 | 1 | const auto filtered = filter(results); | 2068 | | | 2069 | 1 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 1 | return; | 2072 | 1 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 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 { | 2062 | 16 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 3 | return; | 2065 | 3 | } | 2066 | | | 2067 | 13 | const auto filtered = filter(results); | 2068 | | | 2069 | 13 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 13 | return; | 2072 | 13 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 6 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 6 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 2 | return; | 2065 | 2 | } | 2066 | | | 2067 | 4 | const auto filtered = filter(results); | 2068 | | | 2069 | 4 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 4 | return; | 2072 | 4 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 13 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 13 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 10 | return; | 2065 | 10 | } | 2066 | | | 2067 | 3 | const auto filtered = filter(results); | 2068 | | | 2069 | 3 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 3 | return; | 2072 | 3 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 7 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 7 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 2 | return; | 2065 | 2 | } | 2066 | | | 2067 | 5 | const auto filtered = filter(results); | 2068 | | | 2069 | 5 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 5 | return; | 2072 | 5 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 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 { | 2062 | 21 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 8 | return; | 2065 | 8 | } | 2066 | | | 2067 | 13 | const auto filtered = filter(results); | 2068 | | | 2069 | 13 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 13 | return; | 2072 | 13 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 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 { | 2062 | 21 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 12 | return; | 2065 | 12 | } | 2066 | | | 2067 | 9 | const auto filtered = filter(results); | 2068 | | | 2069 | 9 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 9 | return; | 2072 | 9 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 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 { | 2062 | 11 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 5 | return; | 2065 | 5 | } | 2066 | | | 2067 | 6 | const auto filtered = filter(results); | 2068 | | | 2069 | 6 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 6 | return; | 2072 | 6 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 6 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 6 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 3 | return; | 2065 | 3 | } | 2066 | | | 2067 | 3 | const auto filtered = filter(results); | 2068 | | | 2069 | 3 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 3 | return; | 2072 | 3 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 3 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 3 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 0 | return; | 2065 | 0 | } | 2066 | | | 2067 | 3 | const auto filtered = filter(results); | 2068 | | | 2069 | 3 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 3 | return; | 2072 | 3 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 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 | 2061 | 4 | void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const { | 2062 | 4 | if ( results.size() < 2 ) { | 2063 | | /* Nothing to compare. Don't even bother filtering. */ | 2064 | 1 | return; | 2065 | 1 | } | 2066 | | | 2067 | 3 | const auto filtered = filter(results); | 2068 | | | 2069 | 3 | if ( filtered.size() < 2 ) { | 2070 | | /* Nothing to compare */ | 2071 | 3 | return; | 2072 | 3 | } | 2073 | | | 2074 | 0 | if ( dontCompare(operations[0].second) == true ) { | 2075 | 0 | return; | 2076 | 0 | } | 2077 | | | 2078 | 0 | for (size_t i = 1; i < filtered.size(); i++) { | 2079 | 0 | const std::optional<ResultType>& prev = filtered[i-1].second; | 2080 | 0 | const std::optional<ResultType>& cur = filtered[i].second; | 2081 | |
| 2082 | 0 | const bool equal = *prev == *cur; | 2083 | |
| 2084 | 0 | if ( !equal ) { | 2085 | | /* Reconstruct operation */ | 2086 | 0 | const auto op = getOp(nullptr, data, size); | 2087 | |
| 2088 | 0 | printf("Difference detected\n\n"); | 2089 | 0 | printf("Operation:\n%s\n", op.ToString().c_str()); | 2090 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str()); | 2091 | 0 | printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str()); | 2092 | |
| 2093 | 0 | abort( | 2094 | 0 | {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()}, | 2095 | 0 | op.Name(), | 2096 | 0 | op.GetAlgorithmString(), | 2097 | 0 | "difference" | 2098 | 0 | ); | 2099 | 0 | } | 2100 | 0 | } | 2101 | 0 | } |
|
2102 | | |
2103 | | template <class ResultType, class OperationType> |
2104 | 0 | void ExecutorBase<ResultType, OperationType>::abort(std::vector<std::string> moduleNames, const std::string operation, const std::string algorithm, const std::string reason) const { |
2105 | 0 | std::sort(moduleNames.begin(), moduleNames.end()); |
2106 | |
|
2107 | 0 | printf("Assertion failure: "); |
2108 | 0 | for (const auto& moduleName : moduleNames) { |
2109 | 0 | printf("%s-", moduleName.c_str()); |
2110 | 0 | } |
2111 | 0 | printf("%s-%s-%s\n", operation.c_str(), algorithm.c_str(), reason.c_str()); |
2112 | 0 | fflush(stdout); |
2113 | |
|
2114 | 0 | ::abort(); |
2115 | 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<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::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::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<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_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<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::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 |
2116 | | |
2117 | | template <class ResultType, class OperationType> |
2118 | 57.9k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { |
2119 | 57.9k | (void)parentDs; |
2120 | 57.9k | return std::move(op); |
2121 | 57.9k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const Line | Count | Source | 2118 | 2.78k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 2.78k | (void)parentDs; | 2120 | 2.78k | return std::move(op); | 2121 | 2.78k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const Line | Count | Source | 2118 | 2.56k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 2.56k | (void)parentDs; | 2120 | 2.56k | return std::move(op); | 2121 | 2.56k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const Line | Count | Source | 2118 | 325 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 325 | (void)parentDs; | 2120 | 325 | return std::move(op); | 2121 | 325 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const Line | Count | Source | 2118 | 5.58k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 5.58k | (void)parentDs; | 2120 | 5.58k | return std::move(op); | 2121 | 5.58k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const Line | Count | Source | 2118 | 4.65k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 4.65k | (void)parentDs; | 2120 | 4.65k | return std::move(op); | 2121 | 4.65k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const Line | Count | Source | 2118 | 3.03k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 3.03k | (void)parentDs; | 2120 | 3.03k | return std::move(op); | 2121 | 3.03k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const Line | Count | Source | 2118 | 977 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 977 | (void)parentDs; | 2120 | 977 | return std::move(op); | 2121 | 977 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const Line | Count | Source | 2118 | 854 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 854 | (void)parentDs; | 2120 | 854 | return std::move(op); | 2121 | 854 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const Line | Count | Source | 2118 | 747 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 747 | (void)parentDs; | 2120 | 747 | return std::move(op); | 2121 | 747 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const Line | Count | Source | 2118 | 1.29k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 1.29k | (void)parentDs; | 2120 | 1.29k | return std::move(op); | 2121 | 1.29k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const Line | Count | Source | 2118 | 811 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 811 | (void)parentDs; | 2120 | 811 | return std::move(op); | 2121 | 811 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const Line | Count | Source | 2118 | 936 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 936 | (void)parentDs; | 2120 | 936 | return std::move(op); | 2121 | 936 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const Line | Count | Source | 2118 | 936 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 936 | (void)parentDs; | 2120 | 936 | return std::move(op); | 2121 | 936 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const Line | Count | Source | 2118 | 633 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 633 | (void)parentDs; | 2120 | 633 | return std::move(op); | 2121 | 633 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const Line | Count | Source | 2118 | 518 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 518 | (void)parentDs; | 2120 | 518 | return std::move(op); | 2121 | 518 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const Line | Count | Source | 2118 | 675 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 675 | (void)parentDs; | 2120 | 675 | return std::move(op); | 2121 | 675 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SP_800_108) const Line | Count | Source | 2118 | 671 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 671 | (void)parentDs; | 2120 | 671 | return std::move(op); | 2121 | 671 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const Line | Count | Source | 2118 | 755 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 755 | (void)parentDs; | 2120 | 755 | return std::move(op); | 2121 | 755 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const Line | Count | Source | 2118 | 389 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 389 | (void)parentDs; | 2120 | 389 | return std::move(op); | 2121 | 389 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const Line | Count | Source | 2118 | 1.15k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 1.15k | (void)parentDs; | 2120 | 1.15k | return std::move(op); | 2121 | 1.15k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const Line | Count | Source | 2118 | 1.37k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 1.37k | (void)parentDs; | 2120 | 1.37k | return std::move(op); | 2121 | 1.37k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const Line | Count | Source | 2118 | 375 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 375 | (void)parentDs; | 2120 | 375 | return std::move(op); | 2121 | 375 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const Line | Count | Source | 2118 | 414 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 414 | (void)parentDs; | 2120 | 414 | return std::move(op); | 2121 | 414 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const Line | Count | Source | 2118 | 328 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 328 | (void)parentDs; | 2120 | 328 | return std::move(op); | 2121 | 328 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const Line | Count | Source | 2118 | 1.06k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 1.06k | (void)parentDs; | 2120 | 1.06k | return std::move(op); | 2121 | 1.06k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const Line | Count | Source | 2118 | 453 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 453 | (void)parentDs; | 2120 | 453 | return std::move(op); | 2121 | 453 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const Line | Count | Source | 2118 | 276 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 276 | (void)parentDs; | 2120 | 276 | return std::move(op); | 2121 | 276 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const Line | Count | Source | 2118 | 232 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 232 | (void)parentDs; | 2120 | 232 | return std::move(op); | 2121 | 232 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const Line | Count | Source | 2118 | 309 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 309 | (void)parentDs; | 2120 | 309 | return std::move(op); | 2121 | 309 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const Line | Count | Source | 2118 | 307 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 307 | (void)parentDs; | 2120 | 307 | return std::move(op); | 2121 | 307 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const Line | Count | Source | 2118 | 679 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 679 | (void)parentDs; | 2120 | 679 | return std::move(op); | 2121 | 679 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const Line | Count | Source | 2118 | 693 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 693 | (void)parentDs; | 2120 | 693 | return std::move(op); | 2121 | 693 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const Line | Count | Source | 2118 | 142 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 142 | (void)parentDs; | 2120 | 142 | return std::move(op); | 2121 | 142 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const Line | Count | Source | 2118 | 361 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 361 | (void)parentDs; | 2120 | 361 | return std::move(op); | 2121 | 361 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const Line | Count | Source | 2118 | 616 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 616 | (void)parentDs; | 2120 | 616 | return std::move(op); | 2121 | 616 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const Line | Count | Source | 2118 | 253 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 253 | (void)parentDs; | 2120 | 253 | return std::move(op); | 2121 | 253 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const Line | Count | Source | 2118 | 1.21k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 1.21k | (void)parentDs; | 2120 | 1.21k | return std::move(op); | 2121 | 1.21k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const Line | Count | Source | 2118 | 568 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 568 | (void)parentDs; | 2120 | 568 | return std::move(op); | 2121 | 568 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const Line | Count | Source | 2118 | 3.32k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 3.32k | (void)parentDs; | 2120 | 3.32k | return std::move(op); | 2121 | 3.32k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const Line | Count | Source | 2118 | 648 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 648 | (void)parentDs; | 2120 | 648 | return std::move(op); | 2121 | 648 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const Line | Count | Source | 2118 | 1.05k | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 1.05k | (void)parentDs; | 2120 | 1.05k | return std::move(op); | 2121 | 1.05k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const Line | Count | Source | 2118 | 172 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 172 | (void)parentDs; | 2120 | 172 | return std::move(op); | 2121 | 172 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const Line | Count | Source | 2118 | 438 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 438 | (void)parentDs; | 2120 | 438 | return std::move(op); | 2121 | 438 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const Line | Count | Source | 2118 | 601 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 601 | (void)parentDs; | 2120 | 601 | return std::move(op); | 2121 | 601 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const Line | Count | Source | 2118 | 563 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 563 | (void)parentDs; | 2120 | 563 | return std::move(op); | 2121 | 563 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const Line | Count | Source | 2118 | 536 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 536 | (void)parentDs; | 2120 | 536 | return std::move(op); | 2121 | 536 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const Line | Count | Source | 2118 | 500 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 500 | (void)parentDs; | 2120 | 500 | return std::move(op); | 2121 | 500 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const Line | Count | Source | 2118 | 302 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 302 | (void)parentDs; | 2120 | 302 | return std::move(op); | 2121 | 302 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const Line | Count | Source | 2118 | 298 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 298 | (void)parentDs; | 2120 | 298 | return std::move(op); | 2121 | 298 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const Line | Count | Source | 2118 | 573 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 573 | (void)parentDs; | 2120 | 573 | return std::move(op); | 2121 | 573 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const Line | Count | Source | 2118 | 478 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 478 | (void)parentDs; | 2120 | 478 | return std::move(op); | 2121 | 478 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const Line | Count | Source | 2118 | 133 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 133 | (void)parentDs; | 2120 | 133 | return std::move(op); | 2121 | 133 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const Line | Count | Source | 2118 | 243 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 243 | (void)parentDs; | 2120 | 243 | return std::move(op); | 2121 | 243 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const Line | Count | Source | 2118 | 346 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 346 | (void)parentDs; | 2120 | 346 | return std::move(op); | 2121 | 346 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const Line | Count | Source | 2118 | 269 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 269 | (void)parentDs; | 2120 | 269 | return std::move(op); | 2121 | 269 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const Line | Count | Source | 2118 | 584 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 584 | (void)parentDs; | 2120 | 584 | return std::move(op); | 2121 | 584 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const Line | Count | Source | 2118 | 284 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 284 | (void)parentDs; | 2120 | 284 | return std::move(op); | 2121 | 284 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const Line | Count | Source | 2118 | 489 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 489 | (void)parentDs; | 2120 | 489 | return std::move(op); | 2121 | 489 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const Line | Count | Source | 2118 | 729 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 729 | (void)parentDs; | 2120 | 729 | return std::move(op); | 2121 | 729 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const Line | Count | Source | 2118 | 901 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 901 | (void)parentDs; | 2120 | 901 | return std::move(op); | 2121 | 901 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const Line | Count | Source | 2118 | 414 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 414 | (void)parentDs; | 2120 | 414 | return std::move(op); | 2121 | 414 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const Line | Count | Source | 2118 | 289 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 289 | (void)parentDs; | 2120 | 289 | return std::move(op); | 2121 | 289 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const Line | Count | Source | 2118 | 180 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 180 | (void)parentDs; | 2120 | 180 | return std::move(op); | 2121 | 180 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const Line | Count | Source | 2118 | 616 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 616 | (void)parentDs; | 2120 | 616 | return std::move(op); | 2121 | 616 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const Line | Count | Source | 2118 | 625 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 625 | (void)parentDs; | 2120 | 625 | return std::move(op); | 2121 | 625 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const Line | Count | Source | 2118 | 122 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 122 | (void)parentDs; | 2120 | 122 | return std::move(op); | 2121 | 122 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const Line | Count | Source | 2118 | 109 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 109 | (void)parentDs; | 2120 | 109 | return std::move(op); | 2121 | 109 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const Line | Count | Source | 2118 | 203 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 203 | (void)parentDs; | 2120 | 203 | return std::move(op); | 2121 | 203 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const Line | Count | Source | 2118 | 412 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 412 | (void)parentDs; | 2120 | 412 | return std::move(op); | 2121 | 412 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const Line | Count | Source | 2118 | 661 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 661 | (void)parentDs; | 2120 | 661 | return std::move(op); | 2121 | 661 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const Line | Count | Source | 2118 | 441 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 441 | (void)parentDs; | 2120 | 441 | return std::move(op); | 2121 | 441 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const Line | Count | Source | 2118 | 149 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 149 | (void)parentDs; | 2120 | 149 | return std::move(op); | 2121 | 149 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const Line | Count | Source | 2118 | 240 | OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const { | 2119 | 240 | (void)parentDs; | 2120 | 240 | return std::move(op); | 2121 | 240 | } |
|
2122 | | |
2123 | 45 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2124 | 45 | (void)parentDs; |
2125 | 45 | op.modulo = modulo; |
2126 | 45 | return op; |
2127 | 45 | } |
2128 | | |
2129 | 33 | operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2130 | 33 | (void)parentDs; |
2131 | 33 | op.modulo = modulo; |
2132 | 33 | return op; |
2133 | 33 | } |
2134 | | |
2135 | 17 | operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2136 | 17 | (void)parentDs; |
2137 | 17 | op.modulo = modulo; |
2138 | 17 | return op; |
2139 | 17 | } |
2140 | | |
2141 | 313 | operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2142 | 313 | (void)parentDs; |
2143 | 313 | op.modulo = modulo; |
2144 | 313 | return op; |
2145 | 313 | } |
2146 | | |
2147 | 17 | operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2148 | 17 | (void)parentDs; |
2149 | 17 | op.modulo = modulo; |
2150 | 17 | return op; |
2151 | 17 | } |
2152 | | |
2153 | 1 | operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2154 | 1 | (void)parentDs; |
2155 | 1 | op.modulo = modulo; |
2156 | 1 | return op; |
2157 | 1 | } |
2158 | | |
2159 | 13 | operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2160 | 13 | (void)parentDs; |
2161 | 13 | op.modulo = modulo; |
2162 | 13 | return op; |
2163 | 13 | } |
2164 | | |
2165 | 7 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2166 | 7 | (void)parentDs; |
2167 | 7 | op.modulo = modulo; |
2168 | 7 | return op; |
2169 | 7 | } |
2170 | | |
2171 | 4 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2172 | 4 | (void)parentDs; |
2173 | 4 | op.modulo = modulo; |
2174 | 4 | return op; |
2175 | 4 | } |
2176 | | |
2177 | 49 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2178 | 49 | (void)parentDs; |
2179 | 49 | op.modulo = modulo; |
2180 | 49 | return op; |
2181 | 49 | } |
2182 | | |
2183 | 11 | operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2184 | 11 | (void)parentDs; |
2185 | 11 | op.modulo = modulo; |
2186 | 11 | return op; |
2187 | 11 | } |
2188 | | |
2189 | 4 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2190 | 4 | (void)parentDs; |
2191 | 4 | op.modulo = modulo; |
2192 | 4 | return op; |
2193 | 4 | } |
2194 | | |
2195 | 23 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2196 | 23 | (void)parentDs; |
2197 | 23 | op.modulo = modulo; |
2198 | 23 | return op; |
2199 | 23 | } |
2200 | | |
2201 | 42 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2202 | 42 | (void)parentDs; |
2203 | 42 | op.modulo = modulo; |
2204 | 42 | return op; |
2205 | 42 | } |
2206 | | |
2207 | 5 | operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2208 | 5 | (void)parentDs; |
2209 | 5 | op.modulo = modulo; |
2210 | 5 | return op; |
2211 | 5 | } |
2212 | | |
2213 | 23 | operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2214 | 23 | (void)parentDs; |
2215 | 23 | op.modulo = modulo; |
2216 | 23 | return op; |
2217 | 23 | } |
2218 | | |
2219 | 2 | operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const { |
2220 | 2 | (void)parentDs; |
2221 | 2 | op.modulo = modulo; |
2222 | 2 | return op; |
2223 | 2 | } |
2224 | | |
2225 | | template <class ResultType, class OperationType> |
2226 | 59.2k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { |
2227 | 59.2k | Datasource ds(data, size); |
2228 | 59.2k | if ( parentDs != nullptr ) { |
2229 | 59.2k | auto modifier = parentDs->GetData(0); |
2230 | 59.2k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); |
2231 | 59.2k | } else { |
2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); |
2233 | 0 | } |
2234 | 59.2k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 2.80k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 2.80k | Datasource ds(data, size); | 2228 | 2.80k | if ( parentDs != nullptr ) { | 2229 | 2.80k | auto modifier = parentDs->GetData(0); | 2230 | 2.80k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 2.80k | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 2.80k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 2.58k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 2.58k | Datasource ds(data, size); | 2228 | 2.58k | if ( parentDs != nullptr ) { | 2229 | 2.58k | auto modifier = parentDs->GetData(0); | 2230 | 2.58k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 2.58k | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 2.58k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 334 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 334 | Datasource ds(data, size); | 2228 | 334 | if ( parentDs != nullptr ) { | 2229 | 334 | auto modifier = parentDs->GetData(0); | 2230 | 334 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 334 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 334 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 5.59k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 5.59k | Datasource ds(data, size); | 2228 | 5.59k | if ( parentDs != nullptr ) { | 2229 | 5.59k | auto modifier = parentDs->GetData(0); | 2230 | 5.59k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 5.59k | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 5.59k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 4.67k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 4.67k | Datasource ds(data, size); | 2228 | 4.67k | if ( parentDs != nullptr ) { | 2229 | 4.67k | auto modifier = parentDs->GetData(0); | 2230 | 4.67k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 4.67k | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 4.67k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 3.05k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 3.05k | Datasource ds(data, size); | 2228 | 3.05k | if ( parentDs != nullptr ) { | 2229 | 3.05k | auto modifier = parentDs->GetData(0); | 2230 | 3.05k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 3.05k | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 3.05k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 992 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 992 | Datasource ds(data, size); | 2228 | 992 | if ( parentDs != nullptr ) { | 2229 | 992 | auto modifier = parentDs->GetData(0); | 2230 | 992 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 992 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 992 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 871 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 871 | Datasource ds(data, size); | 2228 | 871 | if ( parentDs != nullptr ) { | 2229 | 871 | auto modifier = parentDs->GetData(0); | 2230 | 871 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 871 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 871 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 762 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 762 | Datasource ds(data, size); | 2228 | 762 | if ( parentDs != nullptr ) { | 2229 | 762 | auto modifier = parentDs->GetData(0); | 2230 | 762 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 762 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 762 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 1.30k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 1.30k | Datasource ds(data, size); | 2228 | 1.30k | if ( parentDs != nullptr ) { | 2229 | 1.30k | auto modifier = parentDs->GetData(0); | 2230 | 1.30k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 1.30k | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 1.30k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 824 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 824 | Datasource ds(data, size); | 2228 | 824 | if ( parentDs != nullptr ) { | 2229 | 824 | auto modifier = parentDs->GetData(0); | 2230 | 824 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 824 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 824 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 951 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 951 | Datasource ds(data, size); | 2228 | 951 | if ( parentDs != nullptr ) { | 2229 | 951 | auto modifier = parentDs->GetData(0); | 2230 | 951 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 951 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 951 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 951 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 951 | Datasource ds(data, size); | 2228 | 951 | if ( parentDs != nullptr ) { | 2229 | 951 | auto modifier = parentDs->GetData(0); | 2230 | 951 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 951 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 951 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 652 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 652 | Datasource ds(data, size); | 2228 | 652 | if ( parentDs != nullptr ) { | 2229 | 652 | auto modifier = parentDs->GetData(0); | 2230 | 652 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 652 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 652 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 530 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 530 | Datasource ds(data, size); | 2228 | 530 | if ( parentDs != nullptr ) { | 2229 | 530 | auto modifier = parentDs->GetData(0); | 2230 | 530 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 530 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 530 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 686 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 686 | Datasource ds(data, size); | 2228 | 686 | if ( parentDs != nullptr ) { | 2229 | 686 | auto modifier = parentDs->GetData(0); | 2230 | 686 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 686 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 686 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 691 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 691 | Datasource ds(data, size); | 2228 | 691 | if ( parentDs != nullptr ) { | 2229 | 691 | auto modifier = parentDs->GetData(0); | 2230 | 691 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 691 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 691 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 765 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 765 | Datasource ds(data, size); | 2228 | 765 | if ( parentDs != nullptr ) { | 2229 | 765 | auto modifier = parentDs->GetData(0); | 2230 | 765 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 765 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 765 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 397 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 397 | Datasource ds(data, size); | 2228 | 397 | if ( parentDs != nullptr ) { | 2229 | 397 | auto modifier = parentDs->GetData(0); | 2230 | 397 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 397 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 397 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 1.17k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 1.17k | Datasource ds(data, size); | 2228 | 1.17k | if ( parentDs != nullptr ) { | 2229 | 1.17k | auto modifier = parentDs->GetData(0); | 2230 | 1.17k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 1.17k | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 1.17k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 1.38k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 1.38k | Datasource ds(data, size); | 2228 | 1.38k | if ( parentDs != nullptr ) { | 2229 | 1.38k | auto modifier = parentDs->GetData(0); | 2230 | 1.38k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 1.38k | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 1.38k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 382 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 382 | Datasource ds(data, size); | 2228 | 382 | if ( parentDs != nullptr ) { | 2229 | 382 | auto modifier = parentDs->GetData(0); | 2230 | 382 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 382 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 382 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 422 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 422 | Datasource ds(data, size); | 2228 | 422 | if ( parentDs != nullptr ) { | 2229 | 422 | auto modifier = parentDs->GetData(0); | 2230 | 422 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 422 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 422 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 340 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 340 | Datasource ds(data, size); | 2228 | 340 | if ( parentDs != nullptr ) { | 2229 | 340 | auto modifier = parentDs->GetData(0); | 2230 | 340 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 340 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 340 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 1.08k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 1.08k | Datasource ds(data, size); | 2228 | 1.08k | if ( parentDs != nullptr ) { | 2229 | 1.08k | auto modifier = parentDs->GetData(0); | 2230 | 1.08k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 1.08k | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 1.08k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 459 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 459 | Datasource ds(data, size); | 2228 | 459 | if ( parentDs != nullptr ) { | 2229 | 459 | auto modifier = parentDs->GetData(0); | 2230 | 459 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 459 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 459 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 282 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 282 | Datasource ds(data, size); | 2228 | 282 | if ( parentDs != nullptr ) { | 2229 | 282 | auto modifier = parentDs->GetData(0); | 2230 | 282 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 282 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 282 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 238 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 238 | Datasource ds(data, size); | 2228 | 238 | if ( parentDs != nullptr ) { | 2229 | 238 | auto modifier = parentDs->GetData(0); | 2230 | 238 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 238 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 238 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 313 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 313 | Datasource ds(data, size); | 2228 | 313 | if ( parentDs != nullptr ) { | 2229 | 313 | auto modifier = parentDs->GetData(0); | 2230 | 313 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 313 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 313 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 323 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 323 | Datasource ds(data, size); | 2228 | 323 | if ( parentDs != nullptr ) { | 2229 | 323 | auto modifier = parentDs->GetData(0); | 2230 | 323 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 323 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 323 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 686 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 686 | Datasource ds(data, size); | 2228 | 686 | if ( parentDs != nullptr ) { | 2229 | 686 | auto modifier = parentDs->GetData(0); | 2230 | 686 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 686 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 686 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 702 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 702 | Datasource ds(data, size); | 2228 | 702 | if ( parentDs != nullptr ) { | 2229 | 702 | auto modifier = parentDs->GetData(0); | 2230 | 702 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 702 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 702 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 149 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 149 | Datasource ds(data, size); | 2228 | 149 | if ( parentDs != nullptr ) { | 2229 | 149 | auto modifier = parentDs->GetData(0); | 2230 | 149 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 149 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 149 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 370 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 370 | Datasource ds(data, size); | 2228 | 370 | if ( parentDs != nullptr ) { | 2229 | 370 | auto modifier = parentDs->GetData(0); | 2230 | 370 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 370 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 370 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 619 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 619 | Datasource ds(data, size); | 2228 | 619 | if ( parentDs != nullptr ) { | 2229 | 619 | auto modifier = parentDs->GetData(0); | 2230 | 619 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 619 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 619 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 256 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 256 | Datasource ds(data, size); | 2228 | 256 | if ( parentDs != nullptr ) { | 2229 | 256 | auto modifier = parentDs->GetData(0); | 2230 | 256 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 256 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 256 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 1.22k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 1.22k | Datasource ds(data, size); | 2228 | 1.22k | if ( parentDs != nullptr ) { | 2229 | 1.22k | auto modifier = parentDs->GetData(0); | 2230 | 1.22k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 1.22k | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 1.22k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 577 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 577 | Datasource ds(data, size); | 2228 | 577 | if ( parentDs != nullptr ) { | 2229 | 577 | auto modifier = parentDs->GetData(0); | 2230 | 577 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 577 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 577 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 3.96k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 3.96k | Datasource ds(data, size); | 2228 | 3.96k | if ( parentDs != nullptr ) { | 2229 | 3.96k | auto modifier = parentDs->GetData(0); | 2230 | 3.96k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 3.96k | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 3.96k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 654 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 654 | Datasource ds(data, size); | 2228 | 654 | if ( parentDs != nullptr ) { | 2229 | 654 | auto modifier = parentDs->GetData(0); | 2230 | 654 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 654 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 654 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 1.06k | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 1.06k | Datasource ds(data, size); | 2228 | 1.06k | if ( parentDs != nullptr ) { | 2229 | 1.06k | auto modifier = parentDs->GetData(0); | 2230 | 1.06k | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 1.06k | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 1.06k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 180 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 180 | Datasource ds(data, size); | 2228 | 180 | if ( parentDs != nullptr ) { | 2229 | 180 | auto modifier = parentDs->GetData(0); | 2230 | 180 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 180 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 180 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 444 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 444 | Datasource ds(data, size); | 2228 | 444 | if ( parentDs != nullptr ) { | 2229 | 444 | auto modifier = parentDs->GetData(0); | 2230 | 444 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 444 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 444 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 613 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 613 | Datasource ds(data, size); | 2228 | 613 | if ( parentDs != nullptr ) { | 2229 | 613 | auto modifier = parentDs->GetData(0); | 2230 | 613 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 613 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 613 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 574 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 574 | Datasource ds(data, size); | 2228 | 574 | if ( parentDs != nullptr ) { | 2229 | 574 | auto modifier = parentDs->GetData(0); | 2230 | 574 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 574 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 574 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 554 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 554 | Datasource ds(data, size); | 2228 | 554 | if ( parentDs != nullptr ) { | 2229 | 554 | auto modifier = parentDs->GetData(0); | 2230 | 554 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 554 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 554 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 515 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 515 | Datasource ds(data, size); | 2228 | 515 | if ( parentDs != nullptr ) { | 2229 | 515 | auto modifier = parentDs->GetData(0); | 2230 | 515 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 515 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 515 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 315 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 315 | Datasource ds(data, size); | 2228 | 315 | if ( parentDs != nullptr ) { | 2229 | 315 | auto modifier = parentDs->GetData(0); | 2230 | 315 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 315 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 315 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 317 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 317 | Datasource ds(data, size); | 2228 | 317 | if ( parentDs != nullptr ) { | 2229 | 317 | auto modifier = parentDs->GetData(0); | 2230 | 317 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 317 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 317 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 579 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 579 | Datasource ds(data, size); | 2228 | 579 | if ( parentDs != nullptr ) { | 2229 | 579 | auto modifier = parentDs->GetData(0); | 2230 | 579 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 579 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 579 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 481 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 481 | Datasource ds(data, size); | 2228 | 481 | if ( parentDs != nullptr ) { | 2229 | 481 | auto modifier = parentDs->GetData(0); | 2230 | 481 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 481 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 481 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 136 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 136 | Datasource ds(data, size); | 2228 | 136 | if ( parentDs != nullptr ) { | 2229 | 136 | auto modifier = parentDs->GetData(0); | 2230 | 136 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 136 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 136 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 248 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 248 | Datasource ds(data, size); | 2228 | 248 | if ( parentDs != nullptr ) { | 2229 | 248 | auto modifier = parentDs->GetData(0); | 2230 | 248 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 248 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 248 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 352 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 352 | Datasource ds(data, size); | 2228 | 352 | if ( parentDs != nullptr ) { | 2229 | 352 | auto modifier = parentDs->GetData(0); | 2230 | 352 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 352 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 352 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 278 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 278 | Datasource ds(data, size); | 2228 | 278 | if ( parentDs != nullptr ) { | 2229 | 278 | auto modifier = parentDs->GetData(0); | 2230 | 278 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 278 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 278 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 591 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 591 | Datasource ds(data, size); | 2228 | 591 | if ( parentDs != nullptr ) { | 2229 | 591 | auto modifier = parentDs->GetData(0); | 2230 | 591 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 591 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 591 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 289 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 289 | Datasource ds(data, size); | 2228 | 289 | if ( parentDs != nullptr ) { | 2229 | 289 | auto modifier = parentDs->GetData(0); | 2230 | 289 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 289 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 289 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 498 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 498 | Datasource ds(data, size); | 2228 | 498 | if ( parentDs != nullptr ) { | 2229 | 498 | auto modifier = parentDs->GetData(0); | 2230 | 498 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 498 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 498 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 734 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 734 | Datasource ds(data, size); | 2228 | 734 | if ( parentDs != nullptr ) { | 2229 | 734 | auto modifier = parentDs->GetData(0); | 2230 | 734 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 734 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 734 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 906 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 906 | Datasource ds(data, size); | 2228 | 906 | if ( parentDs != nullptr ) { | 2229 | 906 | auto modifier = parentDs->GetData(0); | 2230 | 906 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 906 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 906 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 420 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 420 | Datasource ds(data, size); | 2228 | 420 | if ( parentDs != nullptr ) { | 2229 | 420 | auto modifier = parentDs->GetData(0); | 2230 | 420 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 420 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 420 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 297 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 297 | Datasource ds(data, size); | 2228 | 297 | if ( parentDs != nullptr ) { | 2229 | 297 | auto modifier = parentDs->GetData(0); | 2230 | 297 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 297 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 297 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 190 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 190 | Datasource ds(data, size); | 2228 | 190 | if ( parentDs != nullptr ) { | 2229 | 190 | auto modifier = parentDs->GetData(0); | 2230 | 190 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 190 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 190 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 620 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 620 | Datasource ds(data, size); | 2228 | 620 | if ( parentDs != nullptr ) { | 2229 | 620 | auto modifier = parentDs->GetData(0); | 2230 | 620 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 620 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 620 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 633 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 633 | Datasource ds(data, size); | 2228 | 633 | if ( parentDs != nullptr ) { | 2229 | 633 | auto modifier = parentDs->GetData(0); | 2230 | 633 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 633 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 633 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 125 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 125 | Datasource ds(data, size); | 2228 | 125 | if ( parentDs != nullptr ) { | 2229 | 125 | auto modifier = parentDs->GetData(0); | 2230 | 125 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 125 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 125 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 117 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 117 | Datasource ds(data, size); | 2228 | 117 | if ( parentDs != nullptr ) { | 2229 | 117 | auto modifier = parentDs->GetData(0); | 2230 | 117 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 117 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 117 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 212 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 212 | Datasource ds(data, size); | 2228 | 212 | if ( parentDs != nullptr ) { | 2229 | 212 | auto modifier = parentDs->GetData(0); | 2230 | 212 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 212 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 212 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 420 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 420 | Datasource ds(data, size); | 2228 | 420 | if ( parentDs != nullptr ) { | 2229 | 420 | auto modifier = parentDs->GetData(0); | 2230 | 420 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 420 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 420 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 678 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 678 | Datasource ds(data, size); | 2228 | 678 | if ( parentDs != nullptr ) { | 2229 | 678 | auto modifier = parentDs->GetData(0); | 2230 | 678 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 678 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 678 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 447 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 447 | Datasource ds(data, size); | 2228 | 447 | if ( parentDs != nullptr ) { | 2229 | 447 | auto modifier = parentDs->GetData(0); | 2230 | 447 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 447 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 447 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 153 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 153 | Datasource ds(data, size); | 2228 | 153 | if ( parentDs != nullptr ) { | 2229 | 153 | auto modifier = parentDs->GetData(0); | 2230 | 153 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 153 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 153 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const Line | Count | Source | 2226 | 248 | OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const { | 2227 | 248 | Datasource ds(data, size); | 2228 | 248 | if ( parentDs != nullptr ) { | 2229 | 248 | auto modifier = parentDs->GetData(0); | 2230 | 248 | return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) ); | 2231 | 248 | } else { | 2232 | 0 | return std::move( OperationType(ds, component::Modifier(nullptr, 0)) ); | 2233 | 0 | } | 2234 | 248 | } |
|
2235 | | |
2236 | | template <class ResultType, class OperationType> |
2237 | 58.5k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { |
2238 | 58.5k | auto moduleID = ds.Get<uint64_t>(); |
2239 | | |
2240 | | /* Override the extracted module ID with the preferred one, if specified */ |
2241 | 58.5k | if ( options.forceModule != std::nullopt ) { |
2242 | 0 | moduleID = *options.forceModule; |
2243 | 0 | } |
2244 | | |
2245 | | /* Skip if this is a disabled module */ |
2246 | 58.5k | if ( options.disableModules.HaveExplicit(moduleID) ) { |
2247 | 0 | return nullptr; |
2248 | 0 | } |
2249 | | |
2250 | 58.5k | if ( modules.find(moduleID) == modules.end() ) { |
2251 | 36.8k | return nullptr; |
2252 | 36.8k | } |
2253 | | |
2254 | 21.6k | return modules.at(moduleID); |
2255 | 58.5k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 2.78k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 2.78k | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 2.78k | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 2.78k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 2.78k | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 1.00k | return nullptr; | 2252 | 1.00k | } | 2253 | | | 2254 | 1.78k | return modules.at(moduleID); | 2255 | 2.78k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 2.56k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 2.56k | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 2.56k | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 2.56k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 2.56k | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 889 | return nullptr; | 2252 | 889 | } | 2253 | | | 2254 | 1.68k | return modules.at(moduleID); | 2255 | 2.56k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 325 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 325 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 325 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 325 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 325 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 203 | return nullptr; | 2252 | 203 | } | 2253 | | | 2254 | 122 | return modules.at(moduleID); | 2255 | 325 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 5.58k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 5.58k | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 5.58k | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 5.58k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 5.58k | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 1.26k | return nullptr; | 2252 | 1.26k | } | 2253 | | | 2254 | 4.32k | return modules.at(moduleID); | 2255 | 5.58k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 4.65k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 4.65k | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 4.65k | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 4.65k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 4.65k | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 1.88k | return nullptr; | 2252 | 1.88k | } | 2253 | | | 2254 | 2.77k | return modules.at(moduleID); | 2255 | 4.65k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 3.03k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 3.03k | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 3.03k | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 3.03k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 3.03k | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 1.11k | return nullptr; | 2252 | 1.11k | } | 2253 | | | 2254 | 1.91k | return modules.at(moduleID); | 2255 | 3.03k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 977 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 977 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 977 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 977 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 977 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 752 | return nullptr; | 2252 | 752 | } | 2253 | | | 2254 | 225 | return modules.at(moduleID); | 2255 | 977 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 854 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 854 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 854 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 854 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 854 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 669 | return nullptr; | 2252 | 669 | } | 2253 | | | 2254 | 185 | return modules.at(moduleID); | 2255 | 854 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 747 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 747 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 747 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 747 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 747 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 598 | return nullptr; | 2252 | 598 | } | 2253 | | | 2254 | 149 | return modules.at(moduleID); | 2255 | 747 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 1.29k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 1.29k | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 1.29k | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 1.29k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 1.29k | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 1.16k | return nullptr; | 2252 | 1.16k | } | 2253 | | | 2254 | 125 | return modules.at(moduleID); | 2255 | 1.29k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 811 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 811 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 811 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 811 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 811 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 684 | return nullptr; | 2252 | 684 | } | 2253 | | | 2254 | 127 | return modules.at(moduleID); | 2255 | 811 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 936 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 936 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 936 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 936 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 936 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 830 | return nullptr; | 2252 | 830 | } | 2253 | | | 2254 | 106 | return modules.at(moduleID); | 2255 | 936 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 936 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 936 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 936 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 936 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 936 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 893 | return nullptr; | 2252 | 893 | } | 2253 | | | 2254 | 43 | return modules.at(moduleID); | 2255 | 936 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 633 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 633 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 633 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 633 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 633 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 502 | return nullptr; | 2252 | 502 | } | 2253 | | | 2254 | 131 | return modules.at(moduleID); | 2255 | 633 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 518 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 518 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 518 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 518 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 518 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 375 | return nullptr; | 2252 | 375 | } | 2253 | | | 2254 | 143 | return modules.at(moduleID); | 2255 | 518 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 675 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 675 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 675 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 675 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 675 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 662 | return nullptr; | 2252 | 662 | } | 2253 | | | 2254 | 13 | return modules.at(moduleID); | 2255 | 675 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 671 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 671 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 671 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 671 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 671 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 422 | return nullptr; | 2252 | 422 | } | 2253 | | | 2254 | 249 | return modules.at(moduleID); | 2255 | 671 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 755 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 755 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 755 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 755 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 755 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 386 | return nullptr; | 2252 | 386 | } | 2253 | | | 2254 | 369 | return modules.at(moduleID); | 2255 | 755 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 389 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 389 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 389 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 389 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 389 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 196 | return nullptr; | 2252 | 196 | } | 2253 | | | 2254 | 193 | return modules.at(moduleID); | 2255 | 389 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 1.15k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 1.15k | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 1.15k | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 1.15k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 1.15k | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 282 | return nullptr; | 2252 | 282 | } | 2253 | | | 2254 | 871 | return modules.at(moduleID); | 2255 | 1.15k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 1.37k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 1.37k | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 1.37k | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 1.37k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 1.37k | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 908 | return nullptr; | 2252 | 908 | } | 2253 | | | 2254 | 470 | return modules.at(moduleID); | 2255 | 1.37k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 375 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 375 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 375 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 375 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 375 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 315 | return nullptr; | 2252 | 315 | } | 2253 | | | 2254 | 60 | return modules.at(moduleID); | 2255 | 375 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 414 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 414 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 414 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 414 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 414 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 378 | return nullptr; | 2252 | 378 | } | 2253 | | | 2254 | 36 | return modules.at(moduleID); | 2255 | 414 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 328 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 328 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 328 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 328 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 328 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 290 | return nullptr; | 2252 | 290 | } | 2253 | | | 2254 | 38 | return modules.at(moduleID); | 2255 | 328 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 1.06k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 1.06k | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 1.06k | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 1.06k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 1.06k | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 790 | return nullptr; | 2252 | 790 | } | 2253 | | | 2254 | 279 | return modules.at(moduleID); | 2255 | 1.06k | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 453 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 453 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 453 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 453 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 453 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 422 | return nullptr; | 2252 | 422 | } | 2253 | | | 2254 | 31 | return modules.at(moduleID); | 2255 | 453 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 276 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 276 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 276 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 276 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 276 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 253 | return nullptr; | 2252 | 253 | } | 2253 | | | 2254 | 23 | return modules.at(moduleID); | 2255 | 276 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 232 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 232 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 232 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 232 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 232 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 190 | return nullptr; | 2252 | 190 | } | 2253 | | | 2254 | 42 | return modules.at(moduleID); | 2255 | 232 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 309 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 309 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 309 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 309 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 309 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 283 | return nullptr; | 2252 | 283 | } | 2253 | | | 2254 | 26 | return modules.at(moduleID); | 2255 | 309 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 307 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 307 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 307 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 307 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 307 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 264 | return nullptr; | 2252 | 264 | } | 2253 | | | 2254 | 43 | return modules.at(moduleID); | 2255 | 307 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 679 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 679 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 679 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 679 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 679 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 653 | return nullptr; | 2252 | 653 | } | 2253 | | | 2254 | 26 | return modules.at(moduleID); | 2255 | 679 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 693 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 693 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 693 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 693 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 693 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 651 | return nullptr; | 2252 | 651 | } | 2253 | | | 2254 | 42 | return modules.at(moduleID); | 2255 | 693 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 142 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 142 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 142 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 142 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 142 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 83 | return nullptr; | 2252 | 83 | } | 2253 | | | 2254 | 59 | return modules.at(moduleID); | 2255 | 142 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 361 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 361 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 361 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 361 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 361 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 300 | return nullptr; | 2252 | 300 | } | 2253 | | | 2254 | 61 | return modules.at(moduleID); | 2255 | 361 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 616 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 616 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 616 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 616 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 616 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 568 | return nullptr; | 2252 | 568 | } | 2253 | | | 2254 | 48 | return modules.at(moduleID); | 2255 | 616 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 253 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 253 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 253 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 253 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 253 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 209 | return nullptr; | 2252 | 209 | } | 2253 | | | 2254 | 44 | return modules.at(moduleID); | 2255 | 253 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 1.21k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 1.21k | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 1.21k | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 1.21k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 1.21k | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 674 | return nullptr; | 2252 | 674 | } | 2253 | | | 2254 | 545 | return modules.at(moduleID); | 2255 | 1.21k | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 568 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 568 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 568 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 568 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 568 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 444 | return nullptr; | 2252 | 444 | } | 2253 | | | 2254 | 124 | return modules.at(moduleID); | 2255 | 568 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 3.93k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 3.93k | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 3.93k | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 3.93k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 3.93k | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 1.39k | return nullptr; | 2252 | 1.39k | } | 2253 | | | 2254 | 2.54k | return modules.at(moduleID); | 2255 | 3.93k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 648 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 648 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 648 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 648 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 648 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 572 | return nullptr; | 2252 | 572 | } | 2253 | | | 2254 | 76 | return modules.at(moduleID); | 2255 | 648 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 1.05k | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 1.05k | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 1.05k | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 1.05k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 1.05k | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 806 | return nullptr; | 2252 | 806 | } | 2253 | | | 2254 | 245 | return modules.at(moduleID); | 2255 | 1.05k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 172 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 172 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 172 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 172 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 172 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 132 | return nullptr; | 2252 | 132 | } | 2253 | | | 2254 | 40 | return modules.at(moduleID); | 2255 | 172 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 438 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 438 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 438 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 438 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 438 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 389 | return nullptr; | 2252 | 389 | } | 2253 | | | 2254 | 49 | return modules.at(moduleID); | 2255 | 438 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 601 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 601 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 601 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 601 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 601 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 557 | return nullptr; | 2252 | 557 | } | 2253 | | | 2254 | 44 | return modules.at(moduleID); | 2255 | 601 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 563 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 563 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 563 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 563 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 563 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 535 | return nullptr; | 2252 | 535 | } | 2253 | | | 2254 | 28 | return modules.at(moduleID); | 2255 | 563 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 536 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 536 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 536 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 536 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 536 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 495 | return nullptr; | 2252 | 495 | } | 2253 | | | 2254 | 41 | return modules.at(moduleID); | 2255 | 536 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 500 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 500 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 500 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 500 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 500 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 471 | return nullptr; | 2252 | 471 | } | 2253 | | | 2254 | 29 | return modules.at(moduleID); | 2255 | 500 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 302 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 302 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 302 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 302 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 302 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 260 | return nullptr; | 2252 | 260 | } | 2253 | | | 2254 | 42 | return modules.at(moduleID); | 2255 | 302 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 298 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 298 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 298 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 298 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 298 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 267 | return nullptr; | 2252 | 267 | } | 2253 | | | 2254 | 31 | return modules.at(moduleID); | 2255 | 298 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 573 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 573 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 573 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 573 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 573 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 532 | return nullptr; | 2252 | 532 | } | 2253 | | | 2254 | 41 | return modules.at(moduleID); | 2255 | 573 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 478 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 478 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 478 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 478 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 478 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 455 | return nullptr; | 2252 | 455 | } | 2253 | | | 2254 | 23 | return modules.at(moduleID); | 2255 | 478 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 133 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 133 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 133 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 133 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 133 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 94 | return nullptr; | 2252 | 94 | } | 2253 | | | 2254 | 39 | return modules.at(moduleID); | 2255 | 133 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 243 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 243 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 243 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 243 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 243 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 190 | return nullptr; | 2252 | 190 | } | 2253 | | | 2254 | 53 | return modules.at(moduleID); | 2255 | 243 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 346 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 346 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 346 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 346 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 346 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 304 | return nullptr; | 2252 | 304 | } | 2253 | | | 2254 | 42 | return modules.at(moduleID); | 2255 | 346 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 269 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 269 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 269 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 269 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 269 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 234 | return nullptr; | 2252 | 234 | } | 2253 | | | 2254 | 35 | return modules.at(moduleID); | 2255 | 269 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 584 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 584 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 584 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 584 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 584 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 540 | return nullptr; | 2252 | 540 | } | 2253 | | | 2254 | 44 | return modules.at(moduleID); | 2255 | 584 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 284 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 284 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 284 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 284 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 284 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 252 | return nullptr; | 2252 | 252 | } | 2253 | | | 2254 | 32 | return modules.at(moduleID); | 2255 | 284 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 489 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 489 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 489 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 489 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 489 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 447 | return nullptr; | 2252 | 447 | } | 2253 | | | 2254 | 42 | return modules.at(moduleID); | 2255 | 489 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 729 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 729 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 729 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 729 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 729 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 696 | return nullptr; | 2252 | 696 | } | 2253 | | | 2254 | 33 | return modules.at(moduleID); | 2255 | 729 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 901 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 901 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 901 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 901 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 901 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 864 | return nullptr; | 2252 | 864 | } | 2253 | | | 2254 | 37 | return modules.at(moduleID); | 2255 | 901 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 414 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 414 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 414 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 414 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 414 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 365 | return nullptr; | 2252 | 365 | } | 2253 | | | 2254 | 49 | return modules.at(moduleID); | 2255 | 414 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 289 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 289 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 289 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 289 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 289 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 245 | return nullptr; | 2252 | 245 | } | 2253 | | | 2254 | 44 | return modules.at(moduleID); | 2255 | 289 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 180 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 180 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 180 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 180 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 180 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 149 | return nullptr; | 2252 | 149 | } | 2253 | | | 2254 | 31 | return modules.at(moduleID); | 2255 | 180 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 616 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 616 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 616 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 616 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 616 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 568 | return nullptr; | 2252 | 568 | } | 2253 | | | 2254 | 48 | return modules.at(moduleID); | 2255 | 616 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 625 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 625 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 625 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 625 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 625 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 590 | return nullptr; | 2252 | 590 | } | 2253 | | | 2254 | 35 | return modules.at(moduleID); | 2255 | 625 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 122 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 122 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 122 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 122 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 122 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 96 | return nullptr; | 2252 | 96 | } | 2253 | | | 2254 | 26 | return modules.at(moduleID); | 2255 | 122 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 109 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 109 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 109 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 109 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 109 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 81 | return nullptr; | 2252 | 81 | } | 2253 | | | 2254 | 28 | return modules.at(moduleID); | 2255 | 109 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 203 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 203 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 203 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 203 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 203 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 138 | return nullptr; | 2252 | 138 | } | 2253 | | | 2254 | 65 | return modules.at(moduleID); | 2255 | 203 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 412 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 412 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 412 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 412 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 412 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 366 | return nullptr; | 2252 | 366 | } | 2253 | | | 2254 | 46 | return modules.at(moduleID); | 2255 | 412 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 661 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 661 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 661 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 661 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 661 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 617 | return nullptr; | 2252 | 617 | } | 2253 | | | 2254 | 44 | return modules.at(moduleID); | 2255 | 661 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 441 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 441 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 441 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 441 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 441 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 411 | return nullptr; | 2252 | 411 | } | 2253 | | | 2254 | 30 | return modules.at(moduleID); | 2255 | 441 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 149 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 149 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 149 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 149 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 149 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 118 | return nullptr; | 2252 | 118 | } | 2253 | | | 2254 | 31 | return modules.at(moduleID); | 2255 | 149 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const Line | Count | Source | 2237 | 240 | std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const { | 2238 | 240 | auto moduleID = ds.Get<uint64_t>(); | 2239 | | | 2240 | | /* Override the extracted module ID with the preferred one, if specified */ | 2241 | 240 | if ( options.forceModule != std::nullopt ) { | 2242 | 0 | moduleID = *options.forceModule; | 2243 | 0 | } | 2244 | | | 2245 | | /* Skip if this is a disabled module */ | 2246 | 240 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2247 | 0 | return nullptr; | 2248 | 0 | } | 2249 | | | 2250 | 240 | if ( modules.find(moduleID) == modules.end() ) { | 2251 | 208 | return nullptr; | 2252 | 208 | } | 2253 | | | 2254 | 32 | return modules.at(moduleID); | 2255 | 240 | } |
|
2256 | | |
2257 | | template <class ResultType, class OperationType> |
2258 | 9.81k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { |
2259 | 9.81k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; |
2260 | | |
2261 | 9.81k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; |
2262 | | |
2263 | 59.2k | do { |
2264 | 59.2k | auto op = getOp(&parentDs, data, size); |
2265 | 59.2k | auto module = getModule(parentDs); |
2266 | 59.2k | if ( module == nullptr ) { |
2267 | 36.8k | continue; |
2268 | 36.8k | } |
2269 | | |
2270 | 22.3k | operations.push_back( {module, op} ); |
2271 | | |
2272 | | /* Limit number of operations per run to prevent time-outs */ |
2273 | 22.3k | if ( operations.size() == OperationType::MaxOperations() ) { |
2274 | 223 | break; |
2275 | 223 | } |
2276 | 59.0k | } while ( parentDs.Get<bool>() == true ); |
2277 | | |
2278 | 9.81k | if ( operations.empty() == true ) { |
2279 | 575 | return; |
2280 | 575 | } |
2281 | | |
2282 | | /* Enable this to run every operation on every loaded module */ |
2283 | 9.24k | #if 1 |
2284 | 9.24k | { |
2285 | 9.24k | std::set<uint64_t> moduleIDs; |
2286 | 9.24k | for (const auto& m : modules ) { |
2287 | 7.46k | const auto moduleID = m.first; |
2288 | | |
2289 | | /* Skip if this is a disabled module */ |
2290 | 7.46k | if ( options.disableModules.HaveExplicit(moduleID) ) { |
2291 | 0 | continue; |
2292 | 0 | } |
2293 | | |
2294 | 7.46k | moduleIDs.insert(moduleID); |
2295 | 7.46k | } |
2296 | | |
2297 | 9.24k | std::set<uint64_t> operationModuleIDs; |
2298 | 19.1k | for (const auto& op : operations) { |
2299 | 19.1k | operationModuleIDs.insert(op.first->ID); |
2300 | 19.1k | } |
2301 | | |
2302 | 9.24k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); |
2303 | 9.24k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); |
2304 | 9.24k | addModuleIDs.resize(it - addModuleIDs.begin()); |
2305 | | |
2306 | 9.24k | for (const auto& id : addModuleIDs) { |
2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); |
2308 | 0 | } |
2309 | 9.24k | } |
2310 | 9.24k | #endif |
2311 | | |
2312 | 9.24k | if ( operations.size() < options.minModules ) { |
2313 | 0 | return; |
2314 | 0 | } |
2315 | | |
2316 | 9.24k | if ( options.debug == true && !operations.empty() ) { |
2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); |
2318 | 0 | } |
2319 | 28.3k | for (size_t i = 0; i < operations.size(); i++) { |
2320 | 19.1k | auto& operation = operations[i]; |
2321 | | |
2322 | 19.1k | auto& module = operation.first; |
2323 | 19.1k | auto& op = operation.second; |
2324 | | |
2325 | 19.1k | if ( i > 0 ) { |
2326 | 11.6k | auto& prevModule = operations[i-1].first; |
2327 | 11.6k | auto& prevOp = operations[i].second; |
2328 | | |
2329 | 11.6k | if ( prevModule == module && prevOp.modifier == op.modifier ) { |
2330 | 11.6k | auto& curModifier = op.modifier.GetVectorPtr(); |
2331 | 11.6k | if ( curModifier.size() == 0 ) { |
2332 | 4.65M | for (size_t j = 0; j < 512; j++) { |
2333 | 4.64M | curModifier.push_back(1); |
2334 | 4.64M | } |
2335 | 9.07k | } else { |
2336 | 127k | for (auto& c : curModifier) { |
2337 | 127k | c++; |
2338 | 127k | } |
2339 | 2.59k | } |
2340 | 11.6k | } |
2341 | 11.6k | } |
2342 | | |
2343 | 19.1k | if ( options.debug == true ) { |
2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); |
2345 | 0 | } |
2346 | | |
2347 | 19.1k | results.push_back( {module, std::move(callModule(module, op))} ); |
2348 | | |
2349 | 19.1k | const auto& result = results.back(); |
2350 | | |
2351 | 19.1k | if ( result.second != std::nullopt ) { |
2352 | 10.2k | if ( options.jsonDumpFP != std::nullopt ) { |
2353 | 0 | nlohmann::json j; |
2354 | 0 | j["operation"] = op.ToJSON(); |
2355 | 0 | j["result"] = util::ToJSON(*result.second); |
2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); |
2357 | 0 | } |
2358 | 10.2k | } |
2359 | | |
2360 | 19.1k | if ( options.debug == true ) { |
2361 | 0 | printf("Module %s result:\n\n%s\n\n", |
2362 | 0 | result.first->name.c_str(), |
2363 | 0 | result.second == std::nullopt ? |
2364 | 0 | "(empty)" : |
2365 | 0 | util::ToString(*result.second).c_str()); |
2366 | 0 | } |
2367 | | |
2368 | 19.1k | if ( options.disableTests == false ) { |
2369 | 19.1k | tests::test(op, result.second); |
2370 | 19.1k | } |
2371 | | |
2372 | 19.1k | postprocess(module, op, result); |
2373 | 19.1k | } |
2374 | | |
2375 | 9.24k | if ( options.noCompare == false ) { |
2376 | 7.46k | compare(operations, results, data, size); |
2377 | 7.46k | } |
2378 | 9.24k | } cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 523 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 523 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 523 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 2.80k | do { | 2264 | 2.80k | auto op = getOp(&parentDs, data, size); | 2265 | 2.80k | auto module = getModule(parentDs); | 2266 | 2.80k | if ( module == nullptr ) { | 2267 | 1.00k | continue; | 2268 | 1.00k | } | 2269 | | | 2270 | 1.80k | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 1.80k | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 7 | break; | 2275 | 7 | } | 2276 | 2.79k | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 523 | if ( operations.empty() == true ) { | 2279 | 19 | return; | 2280 | 19 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 504 | #if 1 | 2284 | 504 | { | 2285 | 504 | std::set<uint64_t> moduleIDs; | 2286 | 504 | for (const auto& m : modules ) { | 2287 | 460 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 460 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 460 | moduleIDs.insert(moduleID); | 2295 | 460 | } | 2296 | | | 2297 | 504 | std::set<uint64_t> operationModuleIDs; | 2298 | 1.63k | for (const auto& op : operations) { | 2299 | 1.63k | operationModuleIDs.insert(op.first->ID); | 2300 | 1.63k | } | 2301 | | | 2302 | 504 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 504 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 504 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 504 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 504 | } | 2310 | 504 | #endif | 2311 | | | 2312 | 504 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 504 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 2.13k | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 1.63k | auto& operation = operations[i]; | 2321 | | | 2322 | 1.63k | auto& module = operation.first; | 2323 | 1.63k | auto& op = operation.second; | 2324 | | | 2325 | 1.63k | if ( i > 0 ) { | 2326 | 1.17k | auto& prevModule = operations[i-1].first; | 2327 | 1.17k | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 1.17k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 1.17k | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 1.17k | if ( curModifier.size() == 0 ) { | 2332 | 562k | for (size_t j = 0; j < 512; j++) { | 2333 | 561k | curModifier.push_back(1); | 2334 | 561k | } | 2335 | 1.09k | } else { | 2336 | 9.90k | for (auto& c : curModifier) { | 2337 | 9.90k | c++; | 2338 | 9.90k | } | 2339 | 74 | } | 2340 | 1.17k | } | 2341 | 1.17k | } | 2342 | | | 2343 | 1.63k | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 1.63k | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 1.63k | const auto& result = results.back(); | 2350 | | | 2351 | 1.63k | if ( result.second != std::nullopt ) { | 2352 | 1.47k | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 1.47k | } | 2359 | | | 2360 | 1.63k | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 1.63k | if ( options.disableTests == false ) { | 2369 | 1.63k | tests::test(op, result.second); | 2370 | 1.63k | } | 2371 | | | 2372 | 1.63k | postprocess(module, op, result); | 2373 | 1.63k | } | 2374 | | | 2375 | 504 | if ( options.noCompare == false ) { | 2376 | 460 | compare(operations, results, data, size); | 2377 | 460 | } | 2378 | 504 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 374 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 374 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 374 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 2.58k | do { | 2264 | 2.58k | auto op = getOp(&parentDs, data, size); | 2265 | 2.58k | auto module = getModule(parentDs); | 2266 | 2.58k | if ( module == nullptr ) { | 2267 | 889 | continue; | 2268 | 889 | } | 2269 | | | 2270 | 1.69k | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 1.69k | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 2.58k | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 374 | if ( operations.empty() == true ) { | 2279 | 11 | return; | 2280 | 11 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 363 | #if 1 | 2284 | 363 | { | 2285 | 363 | std::set<uint64_t> moduleIDs; | 2286 | 363 | for (const auto& m : modules ) { | 2287 | 318 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 318 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 318 | moduleIDs.insert(moduleID); | 2295 | 318 | } | 2296 | | | 2297 | 363 | std::set<uint64_t> operationModuleIDs; | 2298 | 1.55k | for (const auto& op : operations) { | 2299 | 1.55k | operationModuleIDs.insert(op.first->ID); | 2300 | 1.55k | } | 2301 | | | 2302 | 363 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 363 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 363 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 363 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 363 | } | 2310 | 363 | #endif | 2311 | | | 2312 | 363 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 363 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 1.91k | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 1.55k | auto& operation = operations[i]; | 2321 | | | 2322 | 1.55k | auto& module = operation.first; | 2323 | 1.55k | auto& op = operation.second; | 2324 | | | 2325 | 1.55k | if ( i > 0 ) { | 2326 | 1.23k | auto& prevModule = operations[i-1].first; | 2327 | 1.23k | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 1.23k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 1.23k | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 1.23k | if ( curModifier.size() == 0 ) { | 2332 | 543k | for (size_t j = 0; j < 512; j++) { | 2333 | 542k | curModifier.push_back(1); | 2334 | 542k | } | 2335 | 1.06k | } else { | 2336 | 13.5k | for (auto& c : curModifier) { | 2337 | 13.5k | c++; | 2338 | 13.5k | } | 2339 | 172 | } | 2340 | 1.23k | } | 2341 | 1.23k | } | 2342 | | | 2343 | 1.55k | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 1.55k | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 1.55k | const auto& result = results.back(); | 2350 | | | 2351 | 1.55k | if ( result.second != std::nullopt ) { | 2352 | 1.29k | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 1.29k | } | 2359 | | | 2360 | 1.55k | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 1.55k | if ( options.disableTests == false ) { | 2369 | 1.55k | tests::test(op, result.second); | 2370 | 1.55k | } | 2371 | | | 2372 | 1.55k | postprocess(module, op, result); | 2373 | 1.55k | } | 2374 | | | 2375 | 363 | if ( options.noCompare == false ) { | 2376 | 318 | compare(operations, results, data, size); | 2377 | 318 | } | 2378 | 363 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 30 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 30 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 30 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 334 | do { | 2264 | 334 | auto op = getOp(&parentDs, data, size); | 2265 | 334 | auto module = getModule(parentDs); | 2266 | 334 | if ( module == nullptr ) { | 2267 | 203 | continue; | 2268 | 203 | } | 2269 | | | 2270 | 131 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 131 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 333 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 30 | if ( operations.empty() == true ) { | 2279 | 0 | return; | 2280 | 0 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 30 | #if 1 | 2284 | 30 | { | 2285 | 30 | std::set<uint64_t> moduleIDs; | 2286 | 30 | for (const auto& m : modules ) { | 2287 | 4 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 4 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 4 | moduleIDs.insert(moduleID); | 2295 | 4 | } | 2296 | | | 2297 | 30 | std::set<uint64_t> operationModuleIDs; | 2298 | 61 | for (const auto& op : operations) { | 2299 | 61 | operationModuleIDs.insert(op.first->ID); | 2300 | 61 | } | 2301 | | | 2302 | 30 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 30 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 30 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 30 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 30 | } | 2310 | 30 | #endif | 2311 | | | 2312 | 30 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 30 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 91 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 61 | auto& operation = operations[i]; | 2321 | | | 2322 | 61 | auto& module = operation.first; | 2323 | 61 | auto& op = operation.second; | 2324 | | | 2325 | 61 | if ( i > 0 ) { | 2326 | 57 | auto& prevModule = operations[i-1].first; | 2327 | 57 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 57 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 57 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 57 | if ( curModifier.size() == 0 ) { | 2332 | 9.23k | for (size_t j = 0; j < 512; j++) { | 2333 | 9.21k | curModifier.push_back(1); | 2334 | 9.21k | } | 2335 | 39 | } else { | 2336 | 39 | for (auto& c : curModifier) { | 2337 | 39 | c++; | 2338 | 39 | } | 2339 | 39 | } | 2340 | 57 | } | 2341 | 57 | } | 2342 | | | 2343 | 61 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 61 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 61 | const auto& result = results.back(); | 2350 | | | 2351 | 61 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 61 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 61 | if ( options.disableTests == false ) { | 2369 | 61 | tests::test(op, result.second); | 2370 | 61 | } | 2371 | | | 2372 | 61 | postprocess(module, op, result); | 2373 | 61 | } | 2374 | | | 2375 | 30 | if ( options.noCompare == false ) { | 2376 | 4 | compare(operations, results, data, size); | 2377 | 4 | } | 2378 | 30 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 1.60k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 1.60k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 1.60k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 5.59k | do { | 2264 | 5.59k | auto op = getOp(&parentDs, data, size); | 2265 | 5.59k | auto module = getModule(parentDs); | 2266 | 5.59k | if ( module == nullptr ) { | 2267 | 1.26k | continue; | 2268 | 1.26k | } | 2269 | | | 2270 | 4.33k | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 4.33k | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 6 | break; | 2275 | 6 | } | 2276 | 5.59k | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 1.60k | if ( operations.empty() == true ) { | 2279 | 20 | return; | 2280 | 20 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 1.58k | #if 1 | 2284 | 1.58k | { | 2285 | 1.58k | std::set<uint64_t> moduleIDs; | 2286 | 1.58k | for (const auto& m : modules ) { | 2287 | 1.53k | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 1.53k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 1.53k | moduleIDs.insert(moduleID); | 2295 | 1.53k | } | 2296 | | | 2297 | 1.58k | std::set<uint64_t> operationModuleIDs; | 2298 | 4.10k | for (const auto& op : operations) { | 2299 | 4.10k | operationModuleIDs.insert(op.first->ID); | 2300 | 4.10k | } | 2301 | | | 2302 | 1.58k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 1.58k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 1.58k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 1.58k | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 1.58k | } | 2310 | 1.58k | #endif | 2311 | | | 2312 | 1.58k | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 1.58k | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 5.69k | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 4.10k | auto& operation = operations[i]; | 2321 | | | 2322 | 4.10k | auto& module = operation.first; | 2323 | 4.10k | auto& op = operation.second; | 2324 | | | 2325 | 4.10k | if ( i > 0 ) { | 2326 | 2.56k | auto& prevModule = operations[i-1].first; | 2327 | 2.56k | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 2.56k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 2.56k | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 2.56k | if ( curModifier.size() == 0 ) { | 2332 | 1.26M | for (size_t j = 0; j < 512; j++) { | 2333 | 1.25M | curModifier.push_back(1); | 2334 | 1.25M | } | 2335 | 2.45k | } else { | 2336 | 12.1k | for (auto& c : curModifier) { | 2337 | 12.1k | c++; | 2338 | 12.1k | } | 2339 | 111 | } | 2340 | 2.56k | } | 2341 | 2.56k | } | 2342 | | | 2343 | 4.10k | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 4.10k | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 4.10k | const auto& result = results.back(); | 2350 | | | 2351 | 4.10k | if ( result.second != std::nullopt ) { | 2352 | 2.17k | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 2.17k | } | 2359 | | | 2360 | 4.10k | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 4.10k | if ( options.disableTests == false ) { | 2369 | 4.10k | tests::test(op, result.second); | 2370 | 4.10k | } | 2371 | | | 2372 | 4.10k | postprocess(module, op, result); | 2373 | 4.10k | } | 2374 | | | 2375 | 1.58k | if ( options.noCompare == false ) { | 2376 | 1.53k | compare(operations, results, data, size); | 2377 | 1.53k | } | 2378 | 1.58k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 753 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 753 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 753 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 4.67k | do { | 2264 | 4.67k | auto op = getOp(&parentDs, data, size); | 2265 | 4.67k | auto module = getModule(parentDs); | 2266 | 4.67k | if ( module == nullptr ) { | 2267 | 1.88k | continue; | 2268 | 1.88k | } | 2269 | | | 2270 | 2.78k | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 2.78k | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 7 | break; | 2275 | 7 | } | 2276 | 4.66k | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 753 | if ( operations.empty() == true ) { | 2279 | 22 | return; | 2280 | 22 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 731 | #if 1 | 2284 | 731 | { | 2285 | 731 | std::set<uint64_t> moduleIDs; | 2286 | 731 | for (const auto& m : modules ) { | 2287 | 695 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 695 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 695 | moduleIDs.insert(moduleID); | 2295 | 695 | } | 2296 | | | 2297 | 731 | std::set<uint64_t> operationModuleIDs; | 2298 | 2.65k | for (const auto& op : operations) { | 2299 | 2.65k | operationModuleIDs.insert(op.first->ID); | 2300 | 2.65k | } | 2301 | | | 2302 | 731 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 731 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 731 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 731 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 731 | } | 2310 | 731 | #endif | 2311 | | | 2312 | 731 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 731 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 3.38k | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 2.65k | auto& operation = operations[i]; | 2321 | | | 2322 | 2.65k | auto& module = operation.first; | 2323 | 2.65k | auto& op = operation.second; | 2324 | | | 2325 | 2.65k | if ( i > 0 ) { | 2326 | 1.95k | auto& prevModule = operations[i-1].first; | 2327 | 1.95k | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 1.95k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 1.95k | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 1.95k | if ( curModifier.size() == 0 ) { | 2332 | 791k | for (size_t j = 0; j < 512; j++) { | 2333 | 789k | curModifier.push_back(1); | 2334 | 789k | } | 2335 | 1.54k | } else { | 2336 | 6.14k | for (auto& c : curModifier) { | 2337 | 6.14k | c++; | 2338 | 6.14k | } | 2339 | 415 | } | 2340 | 1.95k | } | 2341 | 1.95k | } | 2342 | | | 2343 | 2.65k | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 2.65k | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 2.65k | const auto& result = results.back(); | 2350 | | | 2351 | 2.65k | if ( result.second != std::nullopt ) { | 2352 | 1.12k | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 1.12k | } | 2359 | | | 2360 | 2.65k | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 2.65k | if ( options.disableTests == false ) { | 2369 | 2.65k | tests::test(op, result.second); | 2370 | 2.65k | } | 2371 | | | 2372 | 2.65k | postprocess(module, op, result); | 2373 | 2.65k | } | 2374 | | | 2375 | 731 | if ( options.noCompare == false ) { | 2376 | 695 | compare(operations, results, data, size); | 2377 | 695 | } | 2378 | 731 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 605 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 605 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 605 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 3.05k | do { | 2264 | 3.05k | auto op = getOp(&parentDs, data, size); | 2265 | 3.05k | auto module = getModule(parentDs); | 2266 | 3.05k | if ( module == nullptr ) { | 2267 | 1.11k | continue; | 2268 | 1.11k | } | 2269 | | | 2270 | 1.93k | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 1.93k | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 2 | break; | 2275 | 2 | } | 2276 | 3.05k | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 605 | if ( operations.empty() == true ) { | 2279 | 27 | return; | 2280 | 27 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 578 | #if 1 | 2284 | 578 | { | 2285 | 578 | std::set<uint64_t> moduleIDs; | 2286 | 578 | for (const auto& m : modules ) { | 2287 | 534 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 534 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 534 | moduleIDs.insert(moduleID); | 2295 | 534 | } | 2296 | | | 2297 | 578 | std::set<uint64_t> operationModuleIDs; | 2298 | 1.81k | for (const auto& op : operations) { | 2299 | 1.81k | operationModuleIDs.insert(op.first->ID); | 2300 | 1.81k | } | 2301 | | | 2302 | 578 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 578 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 578 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 578 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 578 | } | 2310 | 578 | #endif | 2311 | | | 2312 | 578 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 578 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 2.39k | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 1.81k | auto& operation = operations[i]; | 2321 | | | 2322 | 1.81k | auto& module = operation.first; | 2323 | 1.81k | auto& op = operation.second; | 2324 | | | 2325 | 1.81k | if ( i > 0 ) { | 2326 | 1.28k | auto& prevModule = operations[i-1].first; | 2327 | 1.28k | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 1.28k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 1.28k | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 1.28k | if ( curModifier.size() == 0 ) { | 2332 | 568k | for (size_t j = 0; j < 512; j++) { | 2333 | 567k | curModifier.push_back(1); | 2334 | 567k | } | 2335 | 1.10k | } else { | 2336 | 3.10k | for (auto& c : curModifier) { | 2337 | 3.10k | c++; | 2338 | 3.10k | } | 2339 | 176 | } | 2340 | 1.28k | } | 2341 | 1.28k | } | 2342 | | | 2343 | 1.81k | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 1.81k | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 1.81k | const auto& result = results.back(); | 2350 | | | 2351 | 1.81k | if ( result.second != std::nullopt ) { | 2352 | 318 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 318 | } | 2359 | | | 2360 | 1.81k | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 1.81k | if ( options.disableTests == false ) { | 2369 | 1.81k | tests::test(op, result.second); | 2370 | 1.81k | } | 2371 | | | 2372 | 1.81k | postprocess(module, op, result); | 2373 | 1.81k | } | 2374 | | | 2375 | 578 | if ( options.noCompare == false ) { | 2376 | 534 | compare(operations, results, data, size); | 2377 | 534 | } | 2378 | 578 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 73 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 73 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 73 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 992 | do { | 2264 | 992 | auto op = getOp(&parentDs, data, size); | 2265 | 992 | auto module = getModule(parentDs); | 2266 | 992 | if ( module == nullptr ) { | 2267 | 752 | continue; | 2268 | 752 | } | 2269 | | | 2270 | 240 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 240 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 2 | break; | 2275 | 2 | } | 2276 | 990 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 73 | if ( operations.empty() == true ) { | 2279 | 15 | return; | 2280 | 15 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 58 | #if 1 | 2284 | 58 | { | 2285 | 58 | std::set<uint64_t> moduleIDs; | 2286 | 58 | for (const auto& m : modules ) { | 2287 | 21 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 21 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 21 | moduleIDs.insert(moduleID); | 2295 | 21 | } | 2296 | | | 2297 | 58 | std::set<uint64_t> operationModuleIDs; | 2298 | 120 | for (const auto& op : operations) { | 2299 | 120 | operationModuleIDs.insert(op.first->ID); | 2300 | 120 | } | 2301 | | | 2302 | 58 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 58 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 58 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 58 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 58 | } | 2310 | 58 | #endif | 2311 | | | 2312 | 58 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 58 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 178 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 120 | auto& operation = operations[i]; | 2321 | | | 2322 | 120 | auto& module = operation.first; | 2323 | 120 | auto& op = operation.second; | 2324 | | | 2325 | 120 | if ( i > 0 ) { | 2326 | 99 | auto& prevModule = operations[i-1].first; | 2327 | 99 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 99 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 99 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 99 | if ( curModifier.size() == 0 ) { | 2332 | 25.1k | for (size_t j = 0; j < 512; j++) { | 2333 | 25.0k | curModifier.push_back(1); | 2334 | 25.0k | } | 2335 | 50 | } else { | 2336 | 297 | for (auto& c : curModifier) { | 2337 | 297 | c++; | 2338 | 297 | } | 2339 | 50 | } | 2340 | 99 | } | 2341 | 99 | } | 2342 | | | 2343 | 120 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 120 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 120 | const auto& result = results.back(); | 2350 | | | 2351 | 120 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 120 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 120 | if ( options.disableTests == false ) { | 2369 | 120 | tests::test(op, result.second); | 2370 | 120 | } | 2371 | | | 2372 | 120 | postprocess(module, op, result); | 2373 | 120 | } | 2374 | | | 2375 | 58 | if ( options.noCompare == false ) { | 2376 | 21 | compare(operations, results, data, size); | 2377 | 21 | } | 2378 | 58 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 77 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 77 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 77 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 871 | do { | 2264 | 871 | auto op = getOp(&parentDs, data, size); | 2265 | 871 | auto module = getModule(parentDs); | 2266 | 871 | if ( module == nullptr ) { | 2267 | 669 | continue; | 2268 | 669 | } | 2269 | | | 2270 | 202 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 202 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 871 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 77 | if ( operations.empty() == true ) { | 2279 | 18 | return; | 2280 | 18 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 59 | #if 1 | 2284 | 59 | { | 2285 | 59 | std::set<uint64_t> moduleIDs; | 2286 | 59 | for (const auto& m : modules ) { | 2287 | 22 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 22 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 22 | moduleIDs.insert(moduleID); | 2295 | 22 | } | 2296 | | | 2297 | 59 | std::set<uint64_t> operationModuleIDs; | 2298 | 92 | for (const auto& op : operations) { | 2299 | 92 | operationModuleIDs.insert(op.first->ID); | 2300 | 92 | } | 2301 | | | 2302 | 59 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 59 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 59 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 59 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 59 | } | 2310 | 59 | #endif | 2311 | | | 2312 | 59 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 59 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 151 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 92 | auto& operation = operations[i]; | 2321 | | | 2322 | 92 | auto& module = operation.first; | 2323 | 92 | auto& op = operation.second; | 2324 | | | 2325 | 92 | if ( i > 0 ) { | 2326 | 70 | auto& prevModule = operations[i-1].first; | 2327 | 70 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 70 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 70 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 70 | if ( curModifier.size() == 0 ) { | 2332 | 22.0k | for (size_t j = 0; j < 512; j++) { | 2333 | 22.0k | curModifier.push_back(1); | 2334 | 22.0k | } | 2335 | 43 | } else { | 2336 | 263 | for (auto& c : curModifier) { | 2337 | 263 | c++; | 2338 | 263 | } | 2339 | 27 | } | 2340 | 70 | } | 2341 | 70 | } | 2342 | | | 2343 | 92 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 92 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 92 | const auto& result = results.back(); | 2350 | | | 2351 | 92 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 92 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 92 | if ( options.disableTests == false ) { | 2369 | 92 | tests::test(op, result.second); | 2370 | 92 | } | 2371 | | | 2372 | 92 | postprocess(module, op, result); | 2373 | 92 | } | 2374 | | | 2375 | 59 | if ( options.noCompare == false ) { | 2376 | 22 | compare(operations, results, data, size); | 2377 | 22 | } | 2378 | 59 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 68 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 68 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 68 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 762 | do { | 2264 | 762 | auto op = getOp(&parentDs, data, size); | 2265 | 762 | auto module = getModule(parentDs); | 2266 | 762 | if ( module == nullptr ) { | 2267 | 598 | continue; | 2268 | 598 | } | 2269 | | | 2270 | 164 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 164 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 762 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 68 | if ( operations.empty() == true ) { | 2279 | 11 | return; | 2280 | 11 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 57 | #if 1 | 2284 | 57 | { | 2285 | 57 | std::set<uint64_t> moduleIDs; | 2286 | 57 | for (const auto& m : modules ) { | 2287 | 16 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 16 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 16 | moduleIDs.insert(moduleID); | 2295 | 16 | } | 2296 | | | 2297 | 57 | std::set<uint64_t> operationModuleIDs; | 2298 | 66 | for (const auto& op : operations) { | 2299 | 66 | operationModuleIDs.insert(op.first->ID); | 2300 | 66 | } | 2301 | | | 2302 | 57 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 57 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 57 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 57 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 57 | } | 2310 | 57 | #endif | 2311 | | | 2312 | 57 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 57 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 123 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 66 | auto& operation = operations[i]; | 2321 | | | 2322 | 66 | auto& module = operation.first; | 2323 | 66 | auto& op = operation.second; | 2324 | | | 2325 | 66 | if ( i > 0 ) { | 2326 | 50 | auto& prevModule = operations[i-1].first; | 2327 | 50 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 50 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 50 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 50 | if ( curModifier.size() == 0 ) { | 2332 | 18.4k | for (size_t j = 0; j < 512; j++) { | 2333 | 18.4k | curModifier.push_back(1); | 2334 | 18.4k | } | 2335 | 36 | } else { | 2336 | 199 | for (auto& c : curModifier) { | 2337 | 199 | c++; | 2338 | 199 | } | 2339 | 14 | } | 2340 | 50 | } | 2341 | 50 | } | 2342 | | | 2343 | 66 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 66 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 66 | const auto& result = results.back(); | 2350 | | | 2351 | 66 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 66 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 66 | if ( options.disableTests == false ) { | 2369 | 66 | tests::test(op, result.second); | 2370 | 66 | } | 2371 | | | 2372 | 66 | postprocess(module, op, result); | 2373 | 66 | } | 2374 | | | 2375 | 57 | if ( options.noCompare == false ) { | 2376 | 16 | compare(operations, results, data, size); | 2377 | 16 | } | 2378 | 57 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 79 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 79 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 79 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 1.30k | do { | 2264 | 1.30k | auto op = getOp(&parentDs, data, size); | 2265 | 1.30k | auto module = getModule(parentDs); | 2266 | 1.30k | if ( module == nullptr ) { | 2267 | 1.16k | continue; | 2268 | 1.16k | } | 2269 | | | 2270 | 141 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 141 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 1.30k | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 79 | if ( operations.empty() == true ) { | 2279 | 25 | return; | 2280 | 25 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 54 | #if 1 | 2284 | 54 | { | 2285 | 54 | std::set<uint64_t> moduleIDs; | 2286 | 54 | for (const auto& m : modules ) { | 2287 | 22 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 22 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 22 | moduleIDs.insert(moduleID); | 2295 | 22 | } | 2296 | | | 2297 | 54 | std::set<uint64_t> operationModuleIDs; | 2298 | 100 | for (const auto& op : operations) { | 2299 | 100 | operationModuleIDs.insert(op.first->ID); | 2300 | 100 | } | 2301 | | | 2302 | 54 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 54 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 54 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 54 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 54 | } | 2310 | 54 | #endif | 2311 | | | 2312 | 54 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 54 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 154 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 100 | auto& operation = operations[i]; | 2321 | | | 2322 | 100 | auto& module = operation.first; | 2323 | 100 | auto& op = operation.second; | 2324 | | | 2325 | 100 | if ( i > 0 ) { | 2326 | 78 | auto& prevModule = operations[i-1].first; | 2327 | 78 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 78 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 78 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 78 | if ( curModifier.size() == 0 ) { | 2332 | 11.2k | for (size_t j = 0; j < 512; j++) { | 2333 | 11.2k | curModifier.push_back(1); | 2334 | 11.2k | } | 2335 | 56 | } else { | 2336 | 228 | for (auto& c : curModifier) { | 2337 | 228 | c++; | 2338 | 228 | } | 2339 | 56 | } | 2340 | 78 | } | 2341 | 78 | } | 2342 | | | 2343 | 100 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 100 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 100 | const auto& result = results.back(); | 2350 | | | 2351 | 100 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 100 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 100 | if ( options.disableTests == false ) { | 2369 | 100 | tests::test(op, result.second); | 2370 | 100 | } | 2371 | | | 2372 | 100 | postprocess(module, op, result); | 2373 | 100 | } | 2374 | | | 2375 | 54 | if ( options.noCompare == false ) { | 2376 | 22 | compare(operations, results, data, size); | 2377 | 22 | } | 2378 | 54 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 60 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 60 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 60 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 824 | do { | 2264 | 824 | auto op = getOp(&parentDs, data, size); | 2265 | 824 | auto module = getModule(parentDs); | 2266 | 824 | if ( module == nullptr ) { | 2267 | 684 | continue; | 2268 | 684 | } | 2269 | | | 2270 | 140 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 140 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 824 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 60 | if ( operations.empty() == true ) { | 2279 | 15 | return; | 2280 | 15 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 45 | #if 1 | 2284 | 45 | { | 2285 | 45 | std::set<uint64_t> moduleIDs; | 2286 | 45 | for (const auto& m : modules ) { | 2287 | 15 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 15 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 15 | moduleIDs.insert(moduleID); | 2295 | 15 | } | 2296 | | | 2297 | 45 | std::set<uint64_t> operationModuleIDs; | 2298 | 59 | for (const auto& op : operations) { | 2299 | 59 | operationModuleIDs.insert(op.first->ID); | 2300 | 59 | } | 2301 | | | 2302 | 45 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 45 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 45 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 45 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 45 | } | 2310 | 45 | #endif | 2311 | | | 2312 | 45 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 45 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 104 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 59 | auto& operation = operations[i]; | 2321 | | | 2322 | 59 | auto& module = operation.first; | 2323 | 59 | auto& op = operation.second; | 2324 | | | 2325 | 59 | if ( i > 0 ) { | 2326 | 44 | auto& prevModule = operations[i-1].first; | 2327 | 44 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 44 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 44 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 44 | if ( curModifier.size() == 0 ) { | 2332 | 14.3k | for (size_t j = 0; j < 512; j++) { | 2333 | 14.3k | curModifier.push_back(1); | 2334 | 14.3k | } | 2335 | 28 | } else { | 2336 | 203 | for (auto& c : curModifier) { | 2337 | 203 | c++; | 2338 | 203 | } | 2339 | 16 | } | 2340 | 44 | } | 2341 | 44 | } | 2342 | | | 2343 | 59 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 59 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 59 | const auto& result = results.back(); | 2350 | | | 2351 | 59 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 59 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 59 | if ( options.disableTests == false ) { | 2369 | 59 | tests::test(op, result.second); | 2370 | 59 | } | 2371 | | | 2372 | 59 | postprocess(module, op, result); | 2373 | 59 | } | 2374 | | | 2375 | 45 | if ( options.noCompare == false ) { | 2376 | 15 | compare(operations, results, data, size); | 2377 | 15 | } | 2378 | 45 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 68 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 68 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 68 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 951 | do { | 2264 | 951 | auto op = getOp(&parentDs, data, size); | 2265 | 951 | auto module = getModule(parentDs); | 2266 | 951 | if ( module == nullptr ) { | 2267 | 830 | continue; | 2268 | 830 | } | 2269 | | | 2270 | 121 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 121 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 951 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 68 | if ( operations.empty() == true ) { | 2279 | 19 | return; | 2280 | 19 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 49 | #if 1 | 2284 | 49 | { | 2285 | 49 | std::set<uint64_t> moduleIDs; | 2286 | 49 | for (const auto& m : modules ) { | 2287 | 13 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 13 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 13 | moduleIDs.insert(moduleID); | 2295 | 13 | } | 2296 | | | 2297 | 49 | std::set<uint64_t> operationModuleIDs; | 2298 | 60 | for (const auto& op : operations) { | 2299 | 60 | operationModuleIDs.insert(op.first->ID); | 2300 | 60 | } | 2301 | | | 2302 | 49 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 49 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 49 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 49 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 49 | } | 2310 | 49 | #endif | 2311 | | | 2312 | 49 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 49 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 109 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 60 | auto& operation = operations[i]; | 2321 | | | 2322 | 60 | auto& module = operation.first; | 2323 | 60 | auto& op = operation.second; | 2324 | | | 2325 | 60 | if ( i > 0 ) { | 2326 | 47 | auto& prevModule = operations[i-1].first; | 2327 | 47 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 47 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 47 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 47 | if ( curModifier.size() == 0 ) { | 2332 | 21.5k | for (size_t j = 0; j < 512; j++) { | 2333 | 21.5k | curModifier.push_back(1); | 2334 | 21.5k | } | 2335 | 42 | } else { | 2336 | 227 | for (auto& c : curModifier) { | 2337 | 227 | c++; | 2338 | 227 | } | 2339 | 5 | } | 2340 | 47 | } | 2341 | 47 | } | 2342 | | | 2343 | 60 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 60 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 60 | const auto& result = results.back(); | 2350 | | | 2351 | 60 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 60 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 60 | if ( options.disableTests == false ) { | 2369 | 60 | tests::test(op, result.second); | 2370 | 60 | } | 2371 | | | 2372 | 60 | postprocess(module, op, result); | 2373 | 60 | } | 2374 | | | 2375 | 49 | if ( options.noCompare == false ) { | 2376 | 13 | compare(operations, results, data, size); | 2377 | 13 | } | 2378 | 49 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 52 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 52 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 52 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 951 | do { | 2264 | 951 | auto op = getOp(&parentDs, data, size); | 2265 | 951 | auto module = getModule(parentDs); | 2266 | 951 | if ( module == nullptr ) { | 2267 | 893 | continue; | 2268 | 893 | } | 2269 | | | 2270 | 58 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 58 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 4 | break; | 2275 | 4 | } | 2276 | 947 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 52 | if ( operations.empty() == true ) { | 2279 | 11 | return; | 2280 | 11 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 41 | #if 1 | 2284 | 41 | { | 2285 | 41 | std::set<uint64_t> moduleIDs; | 2286 | 41 | for (const auto& m : modules ) { | 2287 | 12 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 12 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 12 | moduleIDs.insert(moduleID); | 2295 | 12 | } | 2296 | | | 2297 | 41 | std::set<uint64_t> operationModuleIDs; | 2298 | 41 | for (const auto& op : operations) { | 2299 | 25 | operationModuleIDs.insert(op.first->ID); | 2300 | 25 | } | 2301 | | | 2302 | 41 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 41 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 41 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 41 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 41 | } | 2310 | 41 | #endif | 2311 | | | 2312 | 41 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 41 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 66 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 25 | auto& operation = operations[i]; | 2321 | | | 2322 | 25 | auto& module = operation.first; | 2323 | 25 | auto& op = operation.second; | 2324 | | | 2325 | 25 | if ( i > 0 ) { | 2326 | 13 | auto& prevModule = operations[i-1].first; | 2327 | 13 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 13 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 13 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 13 | if ( curModifier.size() == 0 ) { | 2332 | 4.61k | for (size_t j = 0; j < 512; j++) { | 2333 | 4.60k | curModifier.push_back(1); | 2334 | 4.60k | } | 2335 | 9 | } else { | 2336 | 171 | for (auto& c : curModifier) { | 2337 | 171 | c++; | 2338 | 171 | } | 2339 | 4 | } | 2340 | 13 | } | 2341 | 13 | } | 2342 | | | 2343 | 25 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 25 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 25 | const auto& result = results.back(); | 2350 | | | 2351 | 25 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 25 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 25 | if ( options.disableTests == false ) { | 2369 | 25 | tests::test(op, result.second); | 2370 | 25 | } | 2371 | | | 2372 | 25 | postprocess(module, op, result); | 2373 | 25 | } | 2374 | | | 2375 | 41 | if ( options.noCompare == false ) { | 2376 | 12 | compare(operations, results, data, size); | 2377 | 12 | } | 2378 | 41 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 65 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 65 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 65 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 652 | do { | 2264 | 652 | auto op = getOp(&parentDs, data, size); | 2265 | 652 | auto module = getModule(parentDs); | 2266 | 652 | if ( module == nullptr ) { | 2267 | 502 | continue; | 2268 | 502 | } | 2269 | | | 2270 | 150 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 150 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 652 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 65 | if ( operations.empty() == true ) { | 2279 | 8 | return; | 2280 | 8 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 57 | #if 1 | 2284 | 57 | { | 2285 | 57 | std::set<uint64_t> moduleIDs; | 2286 | 57 | for (const auto& m : modules ) { | 2287 | 20 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 20 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 20 | moduleIDs.insert(moduleID); | 2295 | 20 | } | 2296 | | | 2297 | 57 | std::set<uint64_t> operationModuleIDs; | 2298 | 89 | for (const auto& op : operations) { | 2299 | 89 | operationModuleIDs.insert(op.first->ID); | 2300 | 89 | } | 2301 | | | 2302 | 57 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 57 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 57 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 57 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 57 | } | 2310 | 57 | #endif | 2311 | | | 2312 | 57 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 57 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 146 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 89 | auto& operation = operations[i]; | 2321 | | | 2322 | 89 | auto& module = operation.first; | 2323 | 89 | auto& op = operation.second; | 2324 | | | 2325 | 89 | if ( i > 0 ) { | 2326 | 69 | auto& prevModule = operations[i-1].first; | 2327 | 69 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 69 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 69 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 69 | if ( curModifier.size() == 0 ) { | 2332 | 15.9k | for (size_t j = 0; j < 512; j++) { | 2333 | 15.8k | curModifier.push_back(1); | 2334 | 15.8k | } | 2335 | 38 | } else { | 2336 | 362 | for (auto& c : curModifier) { | 2337 | 362 | c++; | 2338 | 362 | } | 2339 | 38 | } | 2340 | 69 | } | 2341 | 69 | } | 2342 | | | 2343 | 89 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 89 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 89 | const auto& result = results.back(); | 2350 | | | 2351 | 89 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 89 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 89 | if ( options.disableTests == false ) { | 2369 | 89 | tests::test(op, result.second); | 2370 | 89 | } | 2371 | | | 2372 | 89 | postprocess(module, op, result); | 2373 | 89 | } | 2374 | | | 2375 | 57 | if ( options.noCompare == false ) { | 2376 | 20 | compare(operations, results, data, size); | 2377 | 20 | } | 2378 | 57 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 57 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 57 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 57 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 530 | do { | 2264 | 530 | auto op = getOp(&parentDs, data, size); | 2265 | 530 | auto module = getModule(parentDs); | 2266 | 530 | if ( module == nullptr ) { | 2267 | 375 | continue; | 2268 | 375 | } | 2269 | | | 2270 | 155 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 155 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 530 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 57 | if ( operations.empty() == true ) { | 2279 | 13 | return; | 2280 | 13 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 44 | #if 1 | 2284 | 44 | { | 2285 | 44 | std::set<uint64_t> moduleIDs; | 2286 | 44 | for (const auto& m : modules ) { | 2287 | 14 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 14 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 14 | moduleIDs.insert(moduleID); | 2295 | 14 | } | 2296 | | | 2297 | 44 | std::set<uint64_t> operationModuleIDs; | 2298 | 82 | for (const auto& op : operations) { | 2299 | 82 | operationModuleIDs.insert(op.first->ID); | 2300 | 82 | } | 2301 | | | 2302 | 44 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 44 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 44 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 44 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 44 | } | 2310 | 44 | #endif | 2311 | | | 2312 | 44 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 44 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 126 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 82 | auto& operation = operations[i]; | 2321 | | | 2322 | 82 | auto& module = operation.first; | 2323 | 82 | auto& op = operation.second; | 2324 | | | 2325 | 82 | if ( i > 0 ) { | 2326 | 68 | auto& prevModule = operations[i-1].first; | 2327 | 68 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 68 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 68 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 68 | if ( curModifier.size() == 0 ) { | 2332 | 25.1k | for (size_t j = 0; j < 512; j++) { | 2333 | 25.0k | curModifier.push_back(1); | 2334 | 25.0k | } | 2335 | 49 | } else { | 2336 | 201 | for (auto& c : curModifier) { | 2337 | 201 | c++; | 2338 | 201 | } | 2339 | 19 | } | 2340 | 68 | } | 2341 | 68 | } | 2342 | | | 2343 | 82 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 82 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 82 | const auto& result = results.back(); | 2350 | | | 2351 | 82 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 82 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 82 | if ( options.disableTests == false ) { | 2369 | 82 | tests::test(op, result.second); | 2370 | 82 | } | 2371 | | | 2372 | 82 | postprocess(module, op, result); | 2373 | 82 | } | 2374 | | | 2375 | 44 | if ( options.noCompare == false ) { | 2376 | 14 | compare(operations, results, data, size); | 2377 | 14 | } | 2378 | 44 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 38 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 38 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 38 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 686 | do { | 2264 | 686 | auto op = getOp(&parentDs, data, size); | 2265 | 686 | auto module = getModule(parentDs); | 2266 | 686 | if ( module == nullptr ) { | 2267 | 662 | continue; | 2268 | 662 | } | 2269 | | | 2270 | 24 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 24 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 686 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 38 | if ( operations.empty() == true ) { | 2279 | 12 | return; | 2280 | 12 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 26 | #if 1 | 2284 | 26 | { | 2285 | 26 | std::set<uint64_t> moduleIDs; | 2286 | 26 | for (const auto& m : modules ) { | 2287 | 3 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 3 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 3 | moduleIDs.insert(moduleID); | 2295 | 3 | } | 2296 | | | 2297 | 26 | std::set<uint64_t> operationModuleIDs; | 2298 | 26 | for (const auto& op : operations) { | 2299 | 3 | operationModuleIDs.insert(op.first->ID); | 2300 | 3 | } | 2301 | | | 2302 | 26 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 26 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 26 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 26 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 26 | } | 2310 | 26 | #endif | 2311 | | | 2312 | 26 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 26 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 29 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 3 | auto& operation = operations[i]; | 2321 | | | 2322 | 3 | auto& module = operation.first; | 2323 | 3 | auto& op = operation.second; | 2324 | | | 2325 | 3 | if ( i > 0 ) { | 2326 | 0 | auto& prevModule = operations[i-1].first; | 2327 | 0 | auto& prevOp = operations[i].second; | 2328 | |
| 2329 | 0 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 0 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 0 | if ( curModifier.size() == 0 ) { | 2332 | 0 | for (size_t j = 0; j < 512; j++) { | 2333 | 0 | curModifier.push_back(1); | 2334 | 0 | } | 2335 | 0 | } else { | 2336 | 0 | for (auto& c : curModifier) { | 2337 | 0 | c++; | 2338 | 0 | } | 2339 | 0 | } | 2340 | 0 | } | 2341 | 0 | } | 2342 | | | 2343 | 3 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 3 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 3 | const auto& result = results.back(); | 2350 | | | 2351 | 3 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 3 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 3 | if ( options.disableTests == false ) { | 2369 | 3 | tests::test(op, result.second); | 2370 | 3 | } | 2371 | | | 2372 | 3 | postprocess(module, op, result); | 2373 | 3 | } | 2374 | | | 2375 | 26 | if ( options.noCompare == false ) { | 2376 | 3 | compare(operations, results, data, size); | 2377 | 3 | } | 2378 | 26 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 66 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 66 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 66 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 691 | do { | 2264 | 691 | auto op = getOp(&parentDs, data, size); | 2265 | 691 | auto module = getModule(parentDs); | 2266 | 691 | if ( module == nullptr ) { | 2267 | 422 | continue; | 2268 | 422 | } | 2269 | | | 2270 | 269 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 269 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 690 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 66 | if ( operations.empty() == true ) { | 2279 | 8 | return; | 2280 | 8 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 58 | #if 1 | 2284 | 58 | { | 2285 | 58 | std::set<uint64_t> moduleIDs; | 2286 | 58 | for (const auto& m : modules ) { | 2287 | 20 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 20 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 20 | moduleIDs.insert(moduleID); | 2295 | 20 | } | 2296 | | | 2297 | 58 | std::set<uint64_t> operationModuleIDs; | 2298 | 149 | for (const auto& op : operations) { | 2299 | 149 | operationModuleIDs.insert(op.first->ID); | 2300 | 149 | } | 2301 | | | 2302 | 58 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 58 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 58 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 58 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 58 | } | 2310 | 58 | #endif | 2311 | | | 2312 | 58 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 58 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 207 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 149 | auto& operation = operations[i]; | 2321 | | | 2322 | 149 | auto& module = operation.first; | 2323 | 149 | auto& op = operation.second; | 2324 | | | 2325 | 149 | if ( i > 0 ) { | 2326 | 129 | auto& prevModule = operations[i-1].first; | 2327 | 129 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 129 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 129 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 129 | if ( curModifier.size() == 0 ) { | 2332 | 45.6k | for (size_t j = 0; j < 512; j++) { | 2333 | 45.5k | curModifier.push_back(1); | 2334 | 45.5k | } | 2335 | 89 | } else { | 2336 | 239 | for (auto& c : curModifier) { | 2337 | 239 | c++; | 2338 | 239 | } | 2339 | 40 | } | 2340 | 129 | } | 2341 | 129 | } | 2342 | | | 2343 | 149 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 149 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 149 | const auto& result = results.back(); | 2350 | | | 2351 | 149 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 149 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 149 | if ( options.disableTests == false ) { | 2369 | 149 | tests::test(op, result.second); | 2370 | 149 | } | 2371 | | | 2372 | 149 | postprocess(module, op, result); | 2373 | 149 | } | 2374 | | | 2375 | 58 | if ( options.noCompare == false ) { | 2376 | 20 | compare(operations, results, data, size); | 2377 | 20 | } | 2378 | 58 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 265 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 265 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 265 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 765 | do { | 2264 | 765 | auto op = getOp(&parentDs, data, size); | 2265 | 765 | auto module = getModule(parentDs); | 2266 | 765 | if ( module == nullptr ) { | 2267 | 386 | continue; | 2268 | 386 | } | 2269 | | | 2270 | 379 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 379 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 11 | break; | 2275 | 11 | } | 2276 | 754 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 265 | if ( operations.empty() == true ) { | 2279 | 26 | return; | 2280 | 26 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 239 | #if 1 | 2284 | 239 | { | 2285 | 239 | std::set<uint64_t> moduleIDs; | 2286 | 239 | for (const auto& m : modules ) { | 2287 | 200 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 200 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 200 | moduleIDs.insert(moduleID); | 2295 | 200 | } | 2296 | | | 2297 | 239 | std::set<uint64_t> operationModuleIDs; | 2298 | 339 | for (const auto& op : operations) { | 2299 | 339 | operationModuleIDs.insert(op.first->ID); | 2300 | 339 | } | 2301 | | | 2302 | 239 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 239 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 239 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 239 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 239 | } | 2310 | 239 | #endif | 2311 | | | 2312 | 239 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 239 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 578 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 339 | auto& operation = operations[i]; | 2321 | | | 2322 | 339 | auto& module = operation.first; | 2323 | 339 | auto& op = operation.second; | 2324 | | | 2325 | 339 | if ( i > 0 ) { | 2326 | 139 | auto& prevModule = operations[i-1].first; | 2327 | 139 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 139 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 139 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 139 | if ( curModifier.size() == 0 ) { | 2332 | 39.5k | for (size_t j = 0; j < 512; j++) { | 2333 | 39.4k | curModifier.push_back(1); | 2334 | 39.4k | } | 2335 | 77 | } else { | 2336 | 2.97k | for (auto& c : curModifier) { | 2337 | 2.97k | c++; | 2338 | 2.97k | } | 2339 | 62 | } | 2340 | 139 | } | 2341 | 139 | } | 2342 | | | 2343 | 339 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 339 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 339 | const auto& result = results.back(); | 2350 | | | 2351 | 339 | if ( result.second != std::nullopt ) { | 2352 | 267 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 267 | } | 2359 | | | 2360 | 339 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 339 | if ( options.disableTests == false ) { | 2369 | 339 | tests::test(op, result.second); | 2370 | 339 | } | 2371 | | | 2372 | 339 | postprocess(module, op, result); | 2373 | 339 | } | 2374 | | | 2375 | 239 | if ( options.noCompare == false ) { | 2376 | 200 | compare(operations, results, data, size); | 2377 | 200 | } | 2378 | 239 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 185 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 185 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 185 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 397 | do { | 2264 | 397 | auto op = getOp(&parentDs, data, size); | 2265 | 397 | auto module = getModule(parentDs); | 2266 | 397 | if ( module == nullptr ) { | 2267 | 196 | continue; | 2268 | 196 | } | 2269 | | | 2270 | 201 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 201 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 396 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 185 | if ( operations.empty() == true ) { | 2279 | 13 | return; | 2280 | 13 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 172 | #if 1 | 2284 | 172 | { | 2285 | 172 | std::set<uint64_t> moduleIDs; | 2286 | 172 | for (const auto& m : modules ) { | 2287 | 155 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 155 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 155 | moduleIDs.insert(moduleID); | 2295 | 155 | } | 2296 | | | 2297 | 172 | std::set<uint64_t> operationModuleIDs; | 2298 | 174 | for (const auto& op : operations) { | 2299 | 174 | operationModuleIDs.insert(op.first->ID); | 2300 | 174 | } | 2301 | | | 2302 | 172 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 172 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 172 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 172 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 172 | } | 2310 | 172 | #endif | 2311 | | | 2312 | 172 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 172 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 346 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 174 | auto& operation = operations[i]; | 2321 | | | 2322 | 174 | auto& module = operation.first; | 2323 | 174 | auto& op = operation.second; | 2324 | | | 2325 | 174 | if ( i > 0 ) { | 2326 | 19 | auto& prevModule = operations[i-1].first; | 2327 | 19 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 19 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 19 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 19 | if ( curModifier.size() == 0 ) { | 2332 | 6.15k | for (size_t j = 0; j < 512; j++) { | 2333 | 6.14k | curModifier.push_back(1); | 2334 | 6.14k | } | 2335 | 12 | } else { | 2336 | 69 | for (auto& c : curModifier) { | 2337 | 69 | c++; | 2338 | 69 | } | 2339 | 7 | } | 2340 | 19 | } | 2341 | 19 | } | 2342 | | | 2343 | 174 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 174 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 174 | const auto& result = results.back(); | 2350 | | | 2351 | 174 | if ( result.second != std::nullopt ) { | 2352 | 11 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 11 | } | 2359 | | | 2360 | 174 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 174 | if ( options.disableTests == false ) { | 2369 | 174 | tests::test(op, result.second); | 2370 | 174 | } | 2371 | | | 2372 | 174 | postprocess(module, op, result); | 2373 | 174 | } | 2374 | | | 2375 | 172 | if ( options.noCompare == false ) { | 2376 | 155 | compare(operations, results, data, size); | 2377 | 155 | } | 2378 | 172 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 607 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 607 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 607 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 1.17k | do { | 2264 | 1.17k | auto op = getOp(&parentDs, data, size); | 2265 | 1.17k | auto module = getModule(parentDs); | 2266 | 1.17k | if ( module == nullptr ) { | 2267 | 282 | continue; | 2268 | 282 | } | 2269 | | | 2270 | 888 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 888 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 20 | break; | 2275 | 20 | } | 2276 | 1.15k | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 607 | if ( operations.empty() == true ) { | 2279 | 18 | return; | 2280 | 18 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 589 | #if 1 | 2284 | 589 | { | 2285 | 589 | std::set<uint64_t> moduleIDs; | 2286 | 589 | for (const auto& m : modules ) { | 2287 | 553 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 553 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 553 | moduleIDs.insert(moduleID); | 2295 | 553 | } | 2296 | | | 2297 | 589 | std::set<uint64_t> operationModuleIDs; | 2298 | 843 | for (const auto& op : operations) { | 2299 | 843 | operationModuleIDs.insert(op.first->ID); | 2300 | 843 | } | 2301 | | | 2302 | 589 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 589 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 589 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 589 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 589 | } | 2310 | 589 | #endif | 2311 | | | 2312 | 589 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 589 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 1.43k | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 843 | auto& operation = operations[i]; | 2321 | | | 2322 | 843 | auto& module = operation.first; | 2323 | 843 | auto& op = operation.second; | 2324 | | | 2325 | 843 | if ( i > 0 ) { | 2326 | 290 | auto& prevModule = operations[i-1].first; | 2327 | 290 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 290 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 290 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 290 | if ( curModifier.size() == 0 ) { | 2332 | 132k | for (size_t j = 0; j < 512; j++) { | 2333 | 132k | curModifier.push_back(1); | 2334 | 132k | } | 2335 | 258 | } else { | 2336 | 387 | for (auto& c : curModifier) { | 2337 | 387 | c++; | 2338 | 387 | } | 2339 | 32 | } | 2340 | 290 | } | 2341 | 290 | } | 2342 | | | 2343 | 843 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 843 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 843 | const auto& result = results.back(); | 2350 | | | 2351 | 843 | if ( result.second != std::nullopt ) { | 2352 | 809 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 809 | } | 2359 | | | 2360 | 843 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 843 | if ( options.disableTests == false ) { | 2369 | 843 | tests::test(op, result.second); | 2370 | 843 | } | 2371 | | | 2372 | 843 | postprocess(module, op, result); | 2373 | 843 | } | 2374 | | | 2375 | 589 | if ( options.noCompare == false ) { | 2376 | 553 | compare(operations, results, data, size); | 2377 | 553 | } | 2378 | 589 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 250 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 250 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 250 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 1.38k | do { | 2264 | 1.38k | auto op = getOp(&parentDs, data, size); | 2265 | 1.38k | auto module = getModule(parentDs); | 2266 | 1.38k | if ( module == nullptr ) { | 2267 | 908 | continue; | 2268 | 908 | } | 2269 | | | 2270 | 481 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 481 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 29 | break; | 2275 | 29 | } | 2276 | 1.36k | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 250 | if ( operations.empty() == true ) { | 2279 | 11 | return; | 2280 | 11 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 239 | #if 1 | 2284 | 239 | { | 2285 | 239 | std::set<uint64_t> moduleIDs; | 2286 | 239 | for (const auto& m : modules ) { | 2287 | 219 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 219 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 219 | moduleIDs.insert(moduleID); | 2295 | 219 | } | 2296 | | | 2297 | 239 | std::set<uint64_t> operationModuleIDs; | 2298 | 449 | for (const auto& op : operations) { | 2299 | 449 | operationModuleIDs.insert(op.first->ID); | 2300 | 449 | } | 2301 | | | 2302 | 239 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 239 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 239 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 239 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 239 | } | 2310 | 239 | #endif | 2311 | | | 2312 | 239 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 239 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 688 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 449 | auto& operation = operations[i]; | 2321 | | | 2322 | 449 | auto& module = operation.first; | 2323 | 449 | auto& op = operation.second; | 2324 | | | 2325 | 449 | if ( i > 0 ) { | 2326 | 230 | auto& prevModule = operations[i-1].first; | 2327 | 230 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 230 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 230 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 230 | if ( curModifier.size() == 0 ) { | 2332 | 86.6k | for (size_t j = 0; j < 512; j++) { | 2333 | 86.5k | curModifier.push_back(1); | 2334 | 86.5k | } | 2335 | 169 | } else { | 2336 | 8.77k | for (auto& c : curModifier) { | 2337 | 8.77k | c++; | 2338 | 8.77k | } | 2339 | 61 | } | 2340 | 230 | } | 2341 | 230 | } | 2342 | | | 2343 | 449 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 449 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 449 | const auto& result = results.back(); | 2350 | | | 2351 | 449 | if ( result.second != std::nullopt ) { | 2352 | 379 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 379 | } | 2359 | | | 2360 | 449 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 449 | if ( options.disableTests == false ) { | 2369 | 449 | tests::test(op, result.second); | 2370 | 449 | } | 2371 | | | 2372 | 449 | postprocess(module, op, result); | 2373 | 449 | } | 2374 | | | 2375 | 239 | if ( options.noCompare == false ) { | 2376 | 219 | compare(operations, results, data, size); | 2377 | 219 | } | 2378 | 239 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 38 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 38 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 38 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 382 | do { | 2264 | 382 | auto op = getOp(&parentDs, data, size); | 2265 | 382 | auto module = getModule(parentDs); | 2266 | 382 | if ( module == nullptr ) { | 2267 | 315 | continue; | 2268 | 315 | } | 2269 | | | 2270 | 67 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 67 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 2 | break; | 2275 | 2 | } | 2276 | 380 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 38 | if ( operations.empty() == true ) { | 2279 | 4 | return; | 2280 | 4 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 34 | #if 1 | 2284 | 34 | { | 2285 | 34 | std::set<uint64_t> moduleIDs; | 2286 | 34 | for (const auto& m : modules ) { | 2287 | 15 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 15 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 15 | moduleIDs.insert(moduleID); | 2295 | 15 | } | 2296 | | | 2297 | 34 | std::set<uint64_t> operationModuleIDs; | 2298 | 39 | for (const auto& op : operations) { | 2299 | 39 | operationModuleIDs.insert(op.first->ID); | 2300 | 39 | } | 2301 | | | 2302 | 34 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 34 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 34 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 34 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 34 | } | 2310 | 34 | #endif | 2311 | | | 2312 | 34 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 34 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 73 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 39 | auto& operation = operations[i]; | 2321 | | | 2322 | 39 | auto& module = operation.first; | 2323 | 39 | auto& op = operation.second; | 2324 | | | 2325 | 39 | if ( i > 0 ) { | 2326 | 24 | auto& prevModule = operations[i-1].first; | 2327 | 24 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 24 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 24 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 24 | if ( curModifier.size() == 0 ) { | 2332 | 6.15k | for (size_t j = 0; j < 512; j++) { | 2333 | 6.14k | curModifier.push_back(1); | 2334 | 6.14k | } | 2335 | 12 | } else { | 2336 | 67 | for (auto& c : curModifier) { | 2337 | 67 | c++; | 2338 | 67 | } | 2339 | 12 | } | 2340 | 24 | } | 2341 | 24 | } | 2342 | | | 2343 | 39 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 39 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 39 | const auto& result = results.back(); | 2350 | | | 2351 | 39 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 39 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 39 | if ( options.disableTests == false ) { | 2369 | 39 | tests::test(op, result.second); | 2370 | 39 | } | 2371 | | | 2372 | 39 | postprocess(module, op, result); | 2373 | 39 | } | 2374 | | | 2375 | 34 | if ( options.noCompare == false ) { | 2376 | 15 | compare(operations, results, data, size); | 2377 | 15 | } | 2378 | 34 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 26 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 26 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 26 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 422 | do { | 2264 | 422 | auto op = getOp(&parentDs, data, size); | 2265 | 422 | auto module = getModule(parentDs); | 2266 | 422 | if ( module == nullptr ) { | 2267 | 378 | continue; | 2268 | 378 | } | 2269 | | | 2270 | 44 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 44 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 422 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 26 | if ( operations.empty() == true ) { | 2279 | 4 | return; | 2280 | 4 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 22 | #if 1 | 2284 | 22 | { | 2285 | 22 | std::set<uint64_t> moduleIDs; | 2286 | 22 | for (const auto& m : modules ) { | 2287 | 5 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 5 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 5 | moduleIDs.insert(moduleID); | 2295 | 5 | } | 2296 | | | 2297 | 22 | std::set<uint64_t> operationModuleIDs; | 2298 | 22 | for (const auto& op : operations) { | 2299 | 14 | operationModuleIDs.insert(op.first->ID); | 2300 | 14 | } | 2301 | | | 2302 | 22 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 22 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 22 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 22 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 22 | } | 2310 | 22 | #endif | 2311 | | | 2312 | 22 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 22 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 36 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 14 | auto& operation = operations[i]; | 2321 | | | 2322 | 14 | auto& module = operation.first; | 2323 | 14 | auto& op = operation.second; | 2324 | | | 2325 | 14 | if ( i > 0 ) { | 2326 | 9 | auto& prevModule = operations[i-1].first; | 2327 | 9 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 9 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 9 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 9 | if ( curModifier.size() == 0 ) { | 2332 | 1.53k | for (size_t j = 0; j < 512; j++) { | 2333 | 1.53k | curModifier.push_back(1); | 2334 | 1.53k | } | 2335 | 6 | } else { | 2336 | 7 | for (auto& c : curModifier) { | 2337 | 7 | c++; | 2338 | 7 | } | 2339 | 6 | } | 2340 | 9 | } | 2341 | 9 | } | 2342 | | | 2343 | 14 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 14 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 14 | const auto& result = results.back(); | 2350 | | | 2351 | 14 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 14 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 14 | if ( options.disableTests == false ) { | 2369 | 14 | tests::test(op, result.second); | 2370 | 14 | } | 2371 | | | 2372 | 14 | postprocess(module, op, result); | 2373 | 14 | } | 2374 | | | 2375 | 22 | if ( options.noCompare == false ) { | 2376 | 5 | compare(operations, results, data, size); | 2377 | 5 | } | 2378 | 22 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 31 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 31 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 31 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 340 | do { | 2264 | 340 | auto op = getOp(&parentDs, data, size); | 2265 | 340 | auto module = getModule(parentDs); | 2266 | 340 | if ( module == nullptr ) { | 2267 | 290 | continue; | 2268 | 290 | } | 2269 | | | 2270 | 50 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 50 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 3 | break; | 2275 | 3 | } | 2276 | 337 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 31 | if ( operations.empty() == true ) { | 2279 | 4 | return; | 2280 | 4 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 27 | #if 1 | 2284 | 27 | { | 2285 | 27 | std::set<uint64_t> moduleIDs; | 2286 | 27 | for (const auto& m : modules ) { | 2287 | 6 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 6 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 6 | moduleIDs.insert(moduleID); | 2295 | 6 | } | 2296 | | | 2297 | 27 | std::set<uint64_t> operationModuleIDs; | 2298 | 27 | for (const auto& op : operations) { | 2299 | 20 | operationModuleIDs.insert(op.first->ID); | 2300 | 20 | } | 2301 | | | 2302 | 27 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 27 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 27 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 27 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 27 | } | 2310 | 27 | #endif | 2311 | | | 2312 | 27 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 27 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 47 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 20 | auto& operation = operations[i]; | 2321 | | | 2322 | 20 | auto& module = operation.first; | 2323 | 20 | auto& op = operation.second; | 2324 | | | 2325 | 20 | if ( i > 0 ) { | 2326 | 14 | auto& prevModule = operations[i-1].first; | 2327 | 14 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 14 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 14 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 14 | if ( curModifier.size() == 0 ) { | 2332 | 4.10k | for (size_t j = 0; j < 512; j++) { | 2333 | 4.09k | curModifier.push_back(1); | 2334 | 4.09k | } | 2335 | 8 | } else { | 2336 | 28 | for (auto& c : curModifier) { | 2337 | 28 | c++; | 2338 | 28 | } | 2339 | 6 | } | 2340 | 14 | } | 2341 | 14 | } | 2342 | | | 2343 | 20 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 20 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 20 | const auto& result = results.back(); | 2350 | | | 2351 | 20 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 20 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 20 | if ( options.disableTests == false ) { | 2369 | 20 | tests::test(op, result.second); | 2370 | 20 | } | 2371 | | | 2372 | 20 | postprocess(module, op, result); | 2373 | 20 | } | 2374 | | | 2375 | 27 | if ( options.noCompare == false ) { | 2376 | 6 | compare(operations, results, data, size); | 2377 | 6 | } | 2378 | 27 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 189 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 189 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 189 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 1.08k | do { | 2264 | 1.08k | auto op = getOp(&parentDs, data, size); | 2265 | 1.08k | auto module = getModule(parentDs); | 2266 | 1.08k | if ( module == nullptr ) { | 2267 | 790 | continue; | 2268 | 790 | } | 2269 | | | 2270 | 291 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 291 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 6 | break; | 2275 | 6 | } | 2276 | 1.07k | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 189 | if ( operations.empty() == true ) { | 2279 | 8 | return; | 2280 | 8 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 181 | #if 1 | 2284 | 181 | { | 2285 | 181 | std::set<uint64_t> moduleIDs; | 2286 | 181 | for (const auto& m : modules ) { | 2287 | 158 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 158 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 158 | moduleIDs.insert(moduleID); | 2295 | 158 | } | 2296 | | | 2297 | 181 | std::set<uint64_t> operationModuleIDs; | 2298 | 257 | for (const auto& op : operations) { | 2299 | 257 | operationModuleIDs.insert(op.first->ID); | 2300 | 257 | } | 2301 | | | 2302 | 181 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 181 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 181 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 181 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 181 | } | 2310 | 181 | #endif | 2311 | | | 2312 | 181 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 181 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 438 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 257 | auto& operation = operations[i]; | 2321 | | | 2322 | 257 | auto& module = operation.first; | 2323 | 257 | auto& op = operation.second; | 2324 | | | 2325 | 257 | if ( i > 0 ) { | 2326 | 99 | auto& prevModule = operations[i-1].first; | 2327 | 99 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 99 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 99 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 99 | if ( curModifier.size() == 0 ) { | 2332 | 37.9k | for (size_t j = 0; j < 512; j++) { | 2333 | 37.8k | curModifier.push_back(1); | 2334 | 37.8k | } | 2335 | 74 | } else { | 2336 | 1.12k | for (auto& c : curModifier) { | 2337 | 1.12k | c++; | 2338 | 1.12k | } | 2339 | 25 | } | 2340 | 99 | } | 2341 | 99 | } | 2342 | | | 2343 | 257 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 257 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 257 | const auto& result = results.back(); | 2350 | | | 2351 | 257 | if ( result.second != std::nullopt ) { | 2352 | 83 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 83 | } | 2359 | | | 2360 | 257 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 257 | if ( options.disableTests == false ) { | 2369 | 257 | tests::test(op, result.second); | 2370 | 257 | } | 2371 | | | 2372 | 257 | postprocess(module, op, result); | 2373 | 257 | } | 2374 | | | 2375 | 181 | if ( options.noCompare == false ) { | 2376 | 158 | compare(operations, results, data, size); | 2377 | 158 | } | 2378 | 181 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 25 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 25 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 25 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 459 | do { | 2264 | 459 | auto op = getOp(&parentDs, data, size); | 2265 | 459 | auto module = getModule(parentDs); | 2266 | 459 | if ( module == nullptr ) { | 2267 | 422 | continue; | 2268 | 422 | } | 2269 | | | 2270 | 37 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 37 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 458 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 25 | if ( operations.empty() == true ) { | 2279 | 2 | return; | 2280 | 2 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 23 | #if 1 | 2284 | 23 | { | 2285 | 23 | std::set<uint64_t> moduleIDs; | 2286 | 23 | for (const auto& m : modules ) { | 2287 | 6 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 6 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 6 | moduleIDs.insert(moduleID); | 2295 | 6 | } | 2296 | | | 2297 | 23 | std::set<uint64_t> operationModuleIDs; | 2298 | 23 | for (const auto& op : operations) { | 2299 | 15 | operationModuleIDs.insert(op.first->ID); | 2300 | 15 | } | 2301 | | | 2302 | 23 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 23 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 23 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 23 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 23 | } | 2310 | 23 | #endif | 2311 | | | 2312 | 23 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 23 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 38 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 15 | auto& operation = operations[i]; | 2321 | | | 2322 | 15 | auto& module = operation.first; | 2323 | 15 | auto& op = operation.second; | 2324 | | | 2325 | 15 | if ( i > 0 ) { | 2326 | 9 | auto& prevModule = operations[i-1].first; | 2327 | 9 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 9 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 9 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 9 | if ( curModifier.size() == 0 ) { | 2332 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2333 | 3.07k | curModifier.push_back(1); | 2334 | 3.07k | } | 2335 | 6 | } else { | 2336 | 204 | for (auto& c : curModifier) { | 2337 | 204 | c++; | 2338 | 204 | } | 2339 | 3 | } | 2340 | 9 | } | 2341 | 9 | } | 2342 | | | 2343 | 15 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 15 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 15 | const auto& result = results.back(); | 2350 | | | 2351 | 15 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 15 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 15 | if ( options.disableTests == false ) { | 2369 | 15 | tests::test(op, result.second); | 2370 | 15 | } | 2371 | | | 2372 | 15 | postprocess(module, op, result); | 2373 | 15 | } | 2374 | | | 2375 | 23 | if ( options.noCompare == false ) { | 2376 | 6 | compare(operations, results, data, size); | 2377 | 6 | } | 2378 | 23 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 22 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 22 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 22 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 282 | do { | 2264 | 282 | auto op = getOp(&parentDs, data, size); | 2265 | 282 | auto module = getModule(parentDs); | 2266 | 282 | if ( module == nullptr ) { | 2267 | 253 | continue; | 2268 | 253 | } | 2269 | | | 2270 | 29 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 29 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 282 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 22 | if ( operations.empty() == true ) { | 2279 | 3 | return; | 2280 | 3 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 19 | #if 1 | 2284 | 19 | { | 2285 | 19 | std::set<uint64_t> moduleIDs; | 2286 | 19 | for (const auto& m : modules ) { | 2287 | 6 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 6 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 6 | moduleIDs.insert(moduleID); | 2295 | 6 | } | 2296 | | | 2297 | 19 | std::set<uint64_t> operationModuleIDs; | 2298 | 19 | for (const auto& op : operations) { | 2299 | 18 | operationModuleIDs.insert(op.first->ID); | 2300 | 18 | } | 2301 | | | 2302 | 19 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 19 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 19 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 19 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 19 | } | 2310 | 19 | #endif | 2311 | | | 2312 | 19 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 19 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 37 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 18 | auto& operation = operations[i]; | 2321 | | | 2322 | 18 | auto& module = operation.first; | 2323 | 18 | auto& op = operation.second; | 2324 | | | 2325 | 18 | if ( i > 0 ) { | 2326 | 12 | auto& prevModule = operations[i-1].first; | 2327 | 12 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 12 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 12 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 12 | if ( curModifier.size() == 0 ) { | 2332 | 3.59k | for (size_t j = 0; j < 512; j++) { | 2333 | 3.58k | curModifier.push_back(1); | 2334 | 3.58k | } | 2335 | 7 | } else { | 2336 | 60 | for (auto& c : curModifier) { | 2337 | 60 | c++; | 2338 | 60 | } | 2339 | 5 | } | 2340 | 12 | } | 2341 | 12 | } | 2342 | | | 2343 | 18 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 18 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 18 | const auto& result = results.back(); | 2350 | | | 2351 | 18 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 18 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 18 | if ( options.disableTests == false ) { | 2369 | 18 | tests::test(op, result.second); | 2370 | 18 | } | 2371 | | | 2372 | 18 | postprocess(module, op, result); | 2373 | 18 | } | 2374 | | | 2375 | 19 | if ( options.noCompare == false ) { | 2376 | 6 | compare(operations, results, data, size); | 2377 | 6 | } | 2378 | 19 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 29 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 29 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 29 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 238 | do { | 2264 | 238 | auto op = getOp(&parentDs, data, size); | 2265 | 238 | auto module = getModule(parentDs); | 2266 | 238 | if ( module == nullptr ) { | 2267 | 190 | continue; | 2268 | 190 | } | 2269 | | | 2270 | 48 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 48 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 237 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 29 | if ( operations.empty() == true ) { | 2279 | 3 | return; | 2280 | 3 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 26 | #if 1 | 2284 | 26 | { | 2285 | 26 | std::set<uint64_t> moduleIDs; | 2286 | 26 | for (const auto& m : modules ) { | 2287 | 10 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 10 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 10 | moduleIDs.insert(moduleID); | 2295 | 10 | } | 2296 | | | 2297 | 26 | std::set<uint64_t> operationModuleIDs; | 2298 | 26 | for (const auto& op : operations) { | 2299 | 26 | operationModuleIDs.insert(op.first->ID); | 2300 | 26 | } | 2301 | | | 2302 | 26 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 26 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 26 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 26 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 26 | } | 2310 | 26 | #endif | 2311 | | | 2312 | 26 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 26 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 52 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 26 | auto& operation = operations[i]; | 2321 | | | 2322 | 26 | auto& module = operation.first; | 2323 | 26 | auto& op = operation.second; | 2324 | | | 2325 | 26 | if ( i > 0 ) { | 2326 | 16 | auto& prevModule = operations[i-1].first; | 2327 | 16 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 16 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 16 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 16 | if ( curModifier.size() == 0 ) { | 2332 | 2.56k | for (size_t j = 0; j < 512; j++) { | 2333 | 2.56k | curModifier.push_back(1); | 2334 | 2.56k | } | 2335 | 11 | } else { | 2336 | 55 | for (auto& c : curModifier) { | 2337 | 55 | c++; | 2338 | 55 | } | 2339 | 11 | } | 2340 | 16 | } | 2341 | 16 | } | 2342 | | | 2343 | 26 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 26 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 26 | const auto& result = results.back(); | 2350 | | | 2351 | 26 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 26 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 26 | if ( options.disableTests == false ) { | 2369 | 26 | tests::test(op, result.second); | 2370 | 26 | } | 2371 | | | 2372 | 26 | postprocess(module, op, result); | 2373 | 26 | } | 2374 | | | 2375 | 26 | if ( options.noCompare == false ) { | 2376 | 10 | compare(operations, results, data, size); | 2377 | 10 | } | 2378 | 26 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 18 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 18 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 18 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 313 | do { | 2264 | 313 | auto op = getOp(&parentDs, data, size); | 2265 | 313 | auto module = getModule(parentDs); | 2266 | 313 | if ( module == nullptr ) { | 2267 | 283 | continue; | 2268 | 283 | } | 2269 | | | 2270 | 30 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 30 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 312 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 18 | if ( operations.empty() == true ) { | 2279 | 4 | return; | 2280 | 4 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 14 | #if 1 | 2284 | 14 | { | 2285 | 14 | std::set<uint64_t> moduleIDs; | 2286 | 14 | for (const auto& m : modules ) { | 2287 | 4 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 4 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 4 | moduleIDs.insert(moduleID); | 2295 | 4 | } | 2296 | | | 2297 | 14 | std::set<uint64_t> operationModuleIDs; | 2298 | 14 | for (const auto& op : operations) { | 2299 | 11 | operationModuleIDs.insert(op.first->ID); | 2300 | 11 | } | 2301 | | | 2302 | 14 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 14 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 14 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 14 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 14 | } | 2310 | 14 | #endif | 2311 | | | 2312 | 14 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 14 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 25 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 11 | auto& operation = operations[i]; | 2321 | | | 2322 | 11 | auto& module = operation.first; | 2323 | 11 | auto& op = operation.second; | 2324 | | | 2325 | 11 | if ( i > 0 ) { | 2326 | 7 | auto& prevModule = operations[i-1].first; | 2327 | 7 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 7 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 7 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 7 | if ( curModifier.size() == 0 ) { | 2332 | 2.56k | for (size_t j = 0; j < 512; j++) { | 2333 | 2.56k | curModifier.push_back(1); | 2334 | 2.56k | } | 2335 | 5 | } else { | 2336 | 2 | for (auto& c : curModifier) { | 2337 | 2 | c++; | 2338 | 2 | } | 2339 | 2 | } | 2340 | 7 | } | 2341 | 7 | } | 2342 | | | 2343 | 11 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 11 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 11 | const auto& result = results.back(); | 2350 | | | 2351 | 11 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 11 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 11 | if ( options.disableTests == false ) { | 2369 | 11 | tests::test(op, result.second); | 2370 | 11 | } | 2371 | | | 2372 | 11 | postprocess(module, op, result); | 2373 | 11 | } | 2374 | | | 2375 | 14 | if ( options.noCompare == false ) { | 2376 | 4 | compare(operations, results, data, size); | 2377 | 4 | } | 2378 | 14 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 43 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 43 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 43 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 323 | do { | 2264 | 323 | auto op = getOp(&parentDs, data, size); | 2265 | 323 | auto module = getModule(parentDs); | 2266 | 323 | if ( module == nullptr ) { | 2267 | 264 | continue; | 2268 | 264 | } | 2269 | | | 2270 | 59 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 59 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 2 | break; | 2275 | 2 | } | 2276 | 321 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 43 | if ( operations.empty() == true ) { | 2279 | 7 | return; | 2280 | 7 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 36 | #if 1 | 2284 | 36 | { | 2285 | 36 | std::set<uint64_t> moduleIDs; | 2286 | 36 | for (const auto& m : modules ) { | 2287 | 11 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 11 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 11 | moduleIDs.insert(moduleID); | 2295 | 11 | } | 2296 | | | 2297 | 36 | std::set<uint64_t> operationModuleIDs; | 2298 | 36 | for (const auto& op : operations) { | 2299 | 25 | operationModuleIDs.insert(op.first->ID); | 2300 | 25 | } | 2301 | | | 2302 | 36 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 36 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 36 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 36 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 36 | } | 2310 | 36 | #endif | 2311 | | | 2312 | 36 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 36 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 61 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 25 | auto& operation = operations[i]; | 2321 | | | 2322 | 25 | auto& module = operation.first; | 2323 | 25 | auto& op = operation.second; | 2324 | | | 2325 | 25 | if ( i > 0 ) { | 2326 | 14 | auto& prevModule = operations[i-1].first; | 2327 | 14 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 14 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 14 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 14 | if ( curModifier.size() == 0 ) { | 2332 | 3.59k | for (size_t j = 0; j < 512; j++) { | 2333 | 3.58k | curModifier.push_back(1); | 2334 | 3.58k | } | 2335 | 7 | } else { | 2336 | 23 | for (auto& c : curModifier) { | 2337 | 23 | c++; | 2338 | 23 | } | 2339 | 7 | } | 2340 | 14 | } | 2341 | 14 | } | 2342 | | | 2343 | 25 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 25 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 25 | const auto& result = results.back(); | 2350 | | | 2351 | 25 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 25 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 25 | if ( options.disableTests == false ) { | 2369 | 25 | tests::test(op, result.second); | 2370 | 25 | } | 2371 | | | 2372 | 25 | postprocess(module, op, result); | 2373 | 25 | } | 2374 | | | 2375 | 36 | if ( options.noCompare == false ) { | 2376 | 11 | compare(operations, results, data, size); | 2377 | 11 | } | 2378 | 36 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 25 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 25 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 25 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 686 | do { | 2264 | 686 | auto op = getOp(&parentDs, data, size); | 2265 | 686 | auto module = getModule(parentDs); | 2266 | 686 | if ( module == nullptr ) { | 2267 | 653 | continue; | 2268 | 653 | } | 2269 | | | 2270 | 33 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 33 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 686 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 25 | if ( operations.empty() == true ) { | 2279 | 1 | return; | 2280 | 1 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 24 | #if 1 | 2284 | 24 | { | 2285 | 24 | std::set<uint64_t> moduleIDs; | 2286 | 24 | for (const auto& m : modules ) { | 2287 | 3 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 3 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 3 | moduleIDs.insert(moduleID); | 2295 | 3 | } | 2296 | | | 2297 | 24 | std::set<uint64_t> operationModuleIDs; | 2298 | 24 | for (const auto& op : operations) { | 2299 | 6 | operationModuleIDs.insert(op.first->ID); | 2300 | 6 | } | 2301 | | | 2302 | 24 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 24 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 24 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 24 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 24 | } | 2310 | 24 | #endif | 2311 | | | 2312 | 24 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 24 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 30 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 6 | auto& operation = operations[i]; | 2321 | | | 2322 | 6 | auto& module = operation.first; | 2323 | 6 | auto& op = operation.second; | 2324 | | | 2325 | 6 | if ( i > 0 ) { | 2326 | 3 | auto& prevModule = operations[i-1].first; | 2327 | 3 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 3 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 3 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 3 | if ( curModifier.size() == 0 ) { | 2332 | 0 | for (size_t j = 0; j < 512; j++) { | 2333 | 0 | curModifier.push_back(1); | 2334 | 0 | } | 2335 | 3 | } else { | 2336 | 16 | for (auto& c : curModifier) { | 2337 | 16 | c++; | 2338 | 16 | } | 2339 | 3 | } | 2340 | 3 | } | 2341 | 3 | } | 2342 | | | 2343 | 6 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 6 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 6 | const auto& result = results.back(); | 2350 | | | 2351 | 6 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 6 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 6 | if ( options.disableTests == false ) { | 2369 | 6 | tests::test(op, result.second); | 2370 | 6 | } | 2371 | | | 2372 | 6 | postprocess(module, op, result); | 2373 | 6 | } | 2374 | | | 2375 | 24 | if ( options.noCompare == false ) { | 2376 | 3 | compare(operations, results, data, size); | 2377 | 3 | } | 2378 | 24 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 32 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 32 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 32 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 702 | do { | 2264 | 702 | auto op = getOp(&parentDs, data, size); | 2265 | 702 | auto module = getModule(parentDs); | 2266 | 702 | if ( module == nullptr ) { | 2267 | 651 | continue; | 2268 | 651 | } | 2269 | | | 2270 | 51 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 51 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 2 | break; | 2275 | 2 | } | 2276 | 700 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 32 | if ( operations.empty() == true ) { | 2279 | 3 | return; | 2280 | 3 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 29 | #if 1 | 2284 | 29 | { | 2285 | 29 | std::set<uint64_t> moduleIDs; | 2286 | 29 | for (const auto& m : modules ) { | 2287 | 9 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 9 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 9 | moduleIDs.insert(moduleID); | 2295 | 9 | } | 2296 | | | 2297 | 29 | std::set<uint64_t> operationModuleIDs; | 2298 | 29 | for (const auto& op : operations) { | 2299 | 24 | operationModuleIDs.insert(op.first->ID); | 2300 | 24 | } | 2301 | | | 2302 | 29 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 29 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 29 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 29 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 29 | } | 2310 | 29 | #endif | 2311 | | | 2312 | 29 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 29 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 53 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 24 | auto& operation = operations[i]; | 2321 | | | 2322 | 24 | auto& module = operation.first; | 2323 | 24 | auto& op = operation.second; | 2324 | | | 2325 | 24 | if ( i > 0 ) { | 2326 | 15 | auto& prevModule = operations[i-1].first; | 2327 | 15 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 15 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 15 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 15 | if ( curModifier.size() == 0 ) { | 2332 | 4.61k | for (size_t j = 0; j < 512; j++) { | 2333 | 4.60k | curModifier.push_back(1); | 2334 | 4.60k | } | 2335 | 9 | } else { | 2336 | 157 | for (auto& c : curModifier) { | 2337 | 157 | c++; | 2338 | 157 | } | 2339 | 6 | } | 2340 | 15 | } | 2341 | 15 | } | 2342 | | | 2343 | 24 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 24 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 24 | const auto& result = results.back(); | 2350 | | | 2351 | 24 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 24 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 24 | if ( options.disableTests == false ) { | 2369 | 24 | tests::test(op, result.second); | 2370 | 24 | } | 2371 | | | 2372 | 24 | postprocess(module, op, result); | 2373 | 24 | } | 2374 | | | 2375 | 29 | if ( options.noCompare == false ) { | 2376 | 9 | compare(operations, results, data, size); | 2377 | 9 | } | 2378 | 29 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 41 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 41 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 41 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 149 | do { | 2264 | 149 | auto op = getOp(&parentDs, data, size); | 2265 | 149 | auto module = getModule(parentDs); | 2266 | 149 | if ( module == nullptr ) { | 2267 | 83 | continue; | 2268 | 83 | } | 2269 | | | 2270 | 66 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 66 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 3 | break; | 2275 | 3 | } | 2276 | 146 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 41 | if ( operations.empty() == true ) { | 2279 | 1 | return; | 2280 | 1 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 40 | #if 1 | 2284 | 40 | { | 2285 | 40 | std::set<uint64_t> moduleIDs; | 2286 | 40 | for (const auto& m : modules ) { | 2287 | 20 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 20 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 20 | moduleIDs.insert(moduleID); | 2295 | 20 | } | 2296 | | | 2297 | 40 | std::set<uint64_t> operationModuleIDs; | 2298 | 42 | for (const auto& op : operations) { | 2299 | 42 | operationModuleIDs.insert(op.first->ID); | 2300 | 42 | } | 2301 | | | 2302 | 40 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 40 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 40 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 40 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 40 | } | 2310 | 40 | #endif | 2311 | | | 2312 | 40 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 40 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 82 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 42 | auto& operation = operations[i]; | 2321 | | | 2322 | 42 | auto& module = operation.first; | 2323 | 42 | auto& op = operation.second; | 2324 | | | 2325 | 42 | if ( i > 0 ) { | 2326 | 22 | auto& prevModule = operations[i-1].first; | 2327 | 22 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 22 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 22 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 22 | if ( curModifier.size() == 0 ) { | 2332 | 4.61k | for (size_t j = 0; j < 512; j++) { | 2333 | 4.60k | curModifier.push_back(1); | 2334 | 4.60k | } | 2335 | 13 | } else { | 2336 | 265 | for (auto& c : curModifier) { | 2337 | 265 | c++; | 2338 | 265 | } | 2339 | 13 | } | 2340 | 22 | } | 2341 | 22 | } | 2342 | | | 2343 | 42 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 42 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 42 | const auto& result = results.back(); | 2350 | | | 2351 | 42 | if ( result.second != std::nullopt ) { | 2352 | 7 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 7 | } | 2359 | | | 2360 | 42 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 42 | if ( options.disableTests == false ) { | 2369 | 42 | tests::test(op, result.second); | 2370 | 42 | } | 2371 | | | 2372 | 42 | postprocess(module, op, result); | 2373 | 42 | } | 2374 | | | 2375 | 40 | if ( options.noCompare == false ) { | 2376 | 20 | compare(operations, results, data, size); | 2377 | 20 | } | 2378 | 40 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 38 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 38 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 38 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 370 | do { | 2264 | 370 | auto op = getOp(&parentDs, data, size); | 2265 | 370 | auto module = getModule(parentDs); | 2266 | 370 | if ( module == nullptr ) { | 2267 | 300 | continue; | 2268 | 300 | } | 2269 | | | 2270 | 70 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 70 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 369 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 38 | if ( operations.empty() == true ) { | 2279 | 2 | return; | 2280 | 2 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 36 | #if 1 | 2284 | 36 | { | 2285 | 36 | std::set<uint64_t> moduleIDs; | 2286 | 36 | for (const auto& m : modules ) { | 2287 | 20 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 20 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 20 | moduleIDs.insert(moduleID); | 2295 | 20 | } | 2296 | | | 2297 | 36 | std::set<uint64_t> operationModuleIDs; | 2298 | 40 | for (const auto& op : operations) { | 2299 | 40 | operationModuleIDs.insert(op.first->ID); | 2300 | 40 | } | 2301 | | | 2302 | 36 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 36 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 36 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 36 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 36 | } | 2310 | 36 | #endif | 2311 | | | 2312 | 36 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 36 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 76 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 40 | auto& operation = operations[i]; | 2321 | | | 2322 | 40 | auto& module = operation.first; | 2323 | 40 | auto& op = operation.second; | 2324 | | | 2325 | 40 | if ( i > 0 ) { | 2326 | 20 | auto& prevModule = operations[i-1].first; | 2327 | 20 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 20 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 20 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 20 | if ( curModifier.size() == 0 ) { | 2332 | 5.64k | for (size_t j = 0; j < 512; j++) { | 2333 | 5.63k | curModifier.push_back(1); | 2334 | 5.63k | } | 2335 | 11 | } else { | 2336 | 1.04k | for (auto& c : curModifier) { | 2337 | 1.04k | c++; | 2338 | 1.04k | } | 2339 | 9 | } | 2340 | 20 | } | 2341 | 20 | } | 2342 | | | 2343 | 40 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 40 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 40 | const auto& result = results.back(); | 2350 | | | 2351 | 40 | if ( result.second != std::nullopt ) { | 2352 | 22 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 22 | } | 2359 | | | 2360 | 40 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 40 | if ( options.disableTests == false ) { | 2369 | 40 | tests::test(op, result.second); | 2370 | 40 | } | 2371 | | | 2372 | 40 | postprocess(module, op, result); | 2373 | 40 | } | 2374 | | | 2375 | 36 | if ( options.noCompare == false ) { | 2376 | 20 | compare(operations, results, data, size); | 2377 | 20 | } | 2378 | 36 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 34 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 34 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 34 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 619 | do { | 2264 | 619 | auto op = getOp(&parentDs, data, size); | 2265 | 619 | auto module = getModule(parentDs); | 2266 | 619 | if ( module == nullptr ) { | 2267 | 568 | continue; | 2268 | 568 | } | 2269 | | | 2270 | 51 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 51 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 2 | break; | 2275 | 2 | } | 2276 | 617 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 34 | if ( operations.empty() == true ) { | 2279 | 2 | return; | 2280 | 2 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 32 | #if 1 | 2284 | 32 | { | 2285 | 32 | std::set<uint64_t> moduleIDs; | 2286 | 32 | for (const auto& m : modules ) { | 2287 | 21 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 21 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 21 | moduleIDs.insert(moduleID); | 2295 | 21 | } | 2296 | | | 2297 | 32 | std::set<uint64_t> operationModuleIDs; | 2298 | 40 | for (const auto& op : operations) { | 2299 | 40 | operationModuleIDs.insert(op.first->ID); | 2300 | 40 | } | 2301 | | | 2302 | 32 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 32 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 32 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 32 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 32 | } | 2310 | 32 | #endif | 2311 | | | 2312 | 32 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 32 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 72 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 40 | auto& operation = operations[i]; | 2321 | | | 2322 | 40 | auto& module = operation.first; | 2323 | 40 | auto& op = operation.second; | 2324 | | | 2325 | 40 | if ( i > 0 ) { | 2326 | 19 | auto& prevModule = operations[i-1].first; | 2327 | 19 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 19 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 19 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 19 | if ( curModifier.size() == 0 ) { | 2332 | 6.15k | for (size_t j = 0; j < 512; j++) { | 2333 | 6.14k | curModifier.push_back(1); | 2334 | 6.14k | } | 2335 | 12 | } else { | 2336 | 59 | for (auto& c : curModifier) { | 2337 | 59 | c++; | 2338 | 59 | } | 2339 | 7 | } | 2340 | 19 | } | 2341 | 19 | } | 2342 | | | 2343 | 40 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 40 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 40 | const auto& result = results.back(); | 2350 | | | 2351 | 40 | if ( result.second != std::nullopt ) { | 2352 | 16 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 16 | } | 2359 | | | 2360 | 40 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 40 | if ( options.disableTests == false ) { | 2369 | 40 | tests::test(op, result.second); | 2370 | 40 | } | 2371 | | | 2372 | 40 | postprocess(module, op, result); | 2373 | 40 | } | 2374 | | | 2375 | 32 | if ( options.noCompare == false ) { | 2376 | 21 | compare(operations, results, data, size); | 2377 | 21 | } | 2378 | 32 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 34 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 34 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 34 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 256 | do { | 2264 | 256 | auto op = getOp(&parentDs, data, size); | 2265 | 256 | auto module = getModule(parentDs); | 2266 | 256 | if ( module == nullptr ) { | 2267 | 209 | continue; | 2268 | 209 | } | 2269 | | | 2270 | 47 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 47 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 2 | break; | 2275 | 2 | } | 2276 | 254 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 34 | if ( operations.empty() == true ) { | 2279 | 6 | return; | 2280 | 6 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 28 | #if 1 | 2284 | 28 | { | 2285 | 28 | std::set<uint64_t> moduleIDs; | 2286 | 28 | for (const auto& m : modules ) { | 2287 | 21 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 21 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 21 | moduleIDs.insert(moduleID); | 2295 | 21 | } | 2296 | | | 2297 | 28 | std::set<uint64_t> operationModuleIDs; | 2298 | 37 | for (const auto& op : operations) { | 2299 | 37 | operationModuleIDs.insert(op.first->ID); | 2300 | 37 | } | 2301 | | | 2302 | 28 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 28 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 28 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 28 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 28 | } | 2310 | 28 | #endif | 2311 | | | 2312 | 28 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 28 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 65 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 37 | auto& operation = operations[i]; | 2321 | | | 2322 | 37 | auto& module = operation.first; | 2323 | 37 | auto& op = operation.second; | 2324 | | | 2325 | 37 | if ( i > 0 ) { | 2326 | 16 | auto& prevModule = operations[i-1].first; | 2327 | 16 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 16 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 16 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 16 | if ( curModifier.size() == 0 ) { | 2332 | 2.56k | for (size_t j = 0; j < 512; j++) { | 2333 | 2.56k | curModifier.push_back(1); | 2334 | 2.56k | } | 2335 | 11 | } else { | 2336 | 31 | for (auto& c : curModifier) { | 2337 | 31 | c++; | 2338 | 31 | } | 2339 | 11 | } | 2340 | 16 | } | 2341 | 16 | } | 2342 | | | 2343 | 37 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 37 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 37 | const auto& result = results.back(); | 2350 | | | 2351 | 37 | if ( result.second != std::nullopt ) { | 2352 | 13 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 13 | } | 2359 | | | 2360 | 37 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 37 | if ( options.disableTests == false ) { | 2369 | 37 | tests::test(op, result.second); | 2370 | 37 | } | 2371 | | | 2372 | 37 | postprocess(module, op, result); | 2373 | 37 | } | 2374 | | | 2375 | 28 | if ( options.noCompare == false ) { | 2376 | 21 | compare(operations, results, data, size); | 2377 | 21 | } | 2378 | 28 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 472 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 472 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 472 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 1.22k | do { | 2264 | 1.22k | auto op = getOp(&parentDs, data, size); | 2265 | 1.22k | auto module = getModule(parentDs); | 2266 | 1.22k | if ( module == nullptr ) { | 2267 | 674 | continue; | 2268 | 674 | } | 2269 | | | 2270 | 550 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 550 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 6 | break; | 2275 | 6 | } | 2276 | 1.21k | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 472 | if ( operations.empty() == true ) { | 2279 | 11 | return; | 2280 | 11 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 461 | #if 1 | 2284 | 461 | { | 2285 | 461 | std::set<uint64_t> moduleIDs; | 2286 | 461 | for (const auto& m : modules ) { | 2287 | 430 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 430 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 430 | moduleIDs.insert(moduleID); | 2295 | 430 | } | 2296 | | | 2297 | 461 | std::set<uint64_t> operationModuleIDs; | 2298 | 515 | for (const auto& op : operations) { | 2299 | 515 | operationModuleIDs.insert(op.first->ID); | 2300 | 515 | } | 2301 | | | 2302 | 461 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 461 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 461 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 461 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 461 | } | 2310 | 461 | #endif | 2311 | | | 2312 | 461 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 461 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 976 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 515 | auto& operation = operations[i]; | 2321 | | | 2322 | 515 | auto& module = operation.first; | 2323 | 515 | auto& op = operation.second; | 2324 | | | 2325 | 515 | if ( i > 0 ) { | 2326 | 85 | auto& prevModule = operations[i-1].first; | 2327 | 85 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 85 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 85 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 85 | if ( curModifier.size() == 0 ) { | 2332 | 30.2k | for (size_t j = 0; j < 512; j++) { | 2333 | 30.2k | curModifier.push_back(1); | 2334 | 30.2k | } | 2335 | 59 | } else { | 2336 | 334 | for (auto& c : curModifier) { | 2337 | 334 | c++; | 2338 | 334 | } | 2339 | 26 | } | 2340 | 85 | } | 2341 | 85 | } | 2342 | | | 2343 | 515 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 515 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 515 | const auto& result = results.back(); | 2350 | | | 2351 | 515 | if ( result.second != std::nullopt ) { | 2352 | 459 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 459 | } | 2359 | | | 2360 | 515 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 515 | if ( options.disableTests == false ) { | 2369 | 515 | tests::test(op, result.second); | 2370 | 515 | } | 2371 | | | 2372 | 515 | postprocess(module, op, result); | 2373 | 515 | } | 2374 | | | 2375 | 461 | if ( options.noCompare == false ) { | 2376 | 430 | compare(operations, results, data, size); | 2377 | 430 | } | 2378 | 461 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 91 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 91 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 91 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 577 | do { | 2264 | 577 | auto op = getOp(&parentDs, data, size); | 2265 | 577 | auto module = getModule(parentDs); | 2266 | 577 | if ( module == nullptr ) { | 2267 | 444 | continue; | 2268 | 444 | } | 2269 | | | 2270 | 133 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 133 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 2 | break; | 2275 | 2 | } | 2276 | 575 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 91 | if ( operations.empty() == true ) { | 2279 | 8 | return; | 2280 | 8 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 83 | #if 1 | 2284 | 83 | { | 2285 | 83 | std::set<uint64_t> moduleIDs; | 2286 | 83 | for (const auto& m : modules ) { | 2287 | 63 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 63 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 63 | moduleIDs.insert(moduleID); | 2295 | 63 | } | 2296 | | | 2297 | 83 | std::set<uint64_t> operationModuleIDs; | 2298 | 103 | for (const auto& op : operations) { | 2299 | 103 | operationModuleIDs.insert(op.first->ID); | 2300 | 103 | } | 2301 | | | 2302 | 83 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 83 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 83 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 83 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 83 | } | 2310 | 83 | #endif | 2311 | | | 2312 | 83 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 83 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 186 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 103 | auto& operation = operations[i]; | 2321 | | | 2322 | 103 | auto& module = operation.first; | 2323 | 103 | auto& op = operation.second; | 2324 | | | 2325 | 103 | if ( i > 0 ) { | 2326 | 40 | auto& prevModule = operations[i-1].first; | 2327 | 40 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 40 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 40 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 40 | if ( curModifier.size() == 0 ) { | 2332 | 13.8k | for (size_t j = 0; j < 512; j++) { | 2333 | 13.8k | curModifier.push_back(1); | 2334 | 13.8k | } | 2335 | 27 | } else { | 2336 | 86 | for (auto& c : curModifier) { | 2337 | 86 | c++; | 2338 | 86 | } | 2339 | 13 | } | 2340 | 40 | } | 2341 | 40 | } | 2342 | | | 2343 | 103 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 103 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 103 | const auto& result = results.back(); | 2350 | | | 2351 | 103 | if ( result.second != std::nullopt ) { | 2352 | 41 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 41 | } | 2359 | | | 2360 | 103 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 103 | if ( options.disableTests == false ) { | 2369 | 103 | tests::test(op, result.second); | 2370 | 103 | } | 2371 | | | 2372 | 103 | postprocess(module, op, result); | 2373 | 103 | } | 2374 | | | 2375 | 83 | if ( options.noCompare == false ) { | 2376 | 63 | compare(operations, results, data, size); | 2377 | 63 | } | 2378 | 83 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 1.53k | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 1.53k | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 1.53k | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 3.96k | do { | 2264 | 3.96k | auto op = getOp(&parentDs, data, size); | 2265 | 3.96k | auto module = getModule(parentDs); | 2266 | 3.96k | if ( module == nullptr ) { | 2267 | 1.39k | continue; | 2268 | 1.39k | } | 2269 | | | 2270 | 2.56k | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 2.56k | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 57 | break; | 2275 | 57 | } | 2276 | 3.90k | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 1.53k | if ( operations.empty() == true ) { | 2279 | 50 | return; | 2280 | 50 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 1.48k | #if 1 | 2284 | 1.48k | { | 2285 | 1.48k | std::set<uint64_t> moduleIDs; | 2286 | 1.48k | for (const auto& m : modules ) { | 2287 | 1.43k | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 1.43k | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 1.43k | moduleIDs.insert(moduleID); | 2295 | 1.43k | } | 2296 | | | 2297 | 1.48k | std::set<uint64_t> operationModuleIDs; | 2298 | 2.50k | for (const auto& op : operations) { | 2299 | 2.50k | operationModuleIDs.insert(op.first->ID); | 2300 | 2.50k | } | 2301 | | | 2302 | 1.48k | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 1.48k | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 1.48k | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 1.48k | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 1.48k | } | 2310 | 1.48k | #endif | 2311 | | | 2312 | 1.48k | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 1.48k | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 3.99k | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 2.50k | auto& operation = operations[i]; | 2321 | | | 2322 | 2.50k | auto& module = operation.first; | 2323 | 2.50k | auto& op = operation.second; | 2324 | | | 2325 | 2.50k | if ( i > 0 ) { | 2326 | 1.07k | auto& prevModule = operations[i-1].first; | 2327 | 1.07k | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 1.07k | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 1.07k | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 1.07k | if ( curModifier.size() == 0 ) { | 2332 | 227k | for (size_t j = 0; j < 512; j++) { | 2333 | 226k | curModifier.push_back(1); | 2334 | 226k | } | 2335 | 627 | } else { | 2336 | 61.9k | for (auto& c : curModifier) { | 2337 | 61.9k | c++; | 2338 | 61.9k | } | 2339 | 627 | } | 2340 | 1.07k | } | 2341 | 1.07k | } | 2342 | | | 2343 | 2.50k | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 2.50k | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 2.50k | const auto& result = results.back(); | 2350 | | | 2351 | 2.50k | if ( result.second != std::nullopt ) { | 2352 | 1.73k | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 1.73k | } | 2359 | | | 2360 | 2.50k | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 2.50k | if ( options.disableTests == false ) { | 2369 | 2.50k | tests::test(op, result.second); | 2370 | 2.50k | } | 2371 | | | 2372 | 2.50k | postprocess(module, op, result); | 2373 | 2.50k | } | 2374 | | | 2375 | 1.48k | if ( options.noCompare == false ) { | 2376 | 1.43k | compare(operations, results, data, size); | 2377 | 1.43k | } | 2378 | 1.48k | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 44 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 44 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 44 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 654 | do { | 2264 | 654 | auto op = getOp(&parentDs, data, size); | 2265 | 654 | auto module = getModule(parentDs); | 2266 | 654 | if ( module == nullptr ) { | 2267 | 572 | continue; | 2268 | 572 | } | 2269 | | | 2270 | 82 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 82 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 2 | break; | 2275 | 2 | } | 2276 | 652 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 44 | if ( operations.empty() == true ) { | 2279 | 8 | return; | 2280 | 8 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 36 | #if 1 | 2284 | 36 | { | 2285 | 36 | std::set<uint64_t> moduleIDs; | 2286 | 36 | for (const auto& m : modules ) { | 2287 | 22 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 22 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 22 | moduleIDs.insert(moduleID); | 2295 | 22 | } | 2296 | | | 2297 | 36 | std::set<uint64_t> operationModuleIDs; | 2298 | 62 | for (const auto& op : operations) { | 2299 | 62 | operationModuleIDs.insert(op.first->ID); | 2300 | 62 | } | 2301 | | | 2302 | 36 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 36 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 36 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 36 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 36 | } | 2310 | 36 | #endif | 2311 | | | 2312 | 36 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 36 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 98 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 62 | auto& operation = operations[i]; | 2321 | | | 2322 | 62 | auto& module = operation.first; | 2323 | 62 | auto& op = operation.second; | 2324 | | | 2325 | 62 | if ( i > 0 ) { | 2326 | 40 | auto& prevModule = operations[i-1].first; | 2327 | 40 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 40 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 40 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 40 | if ( curModifier.size() == 0 ) { | 2332 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2333 | 3.07k | curModifier.push_back(1); | 2334 | 3.07k | } | 2335 | 34 | } else { | 2336 | 44 | for (auto& c : curModifier) { | 2337 | 44 | c++; | 2338 | 44 | } | 2339 | 34 | } | 2340 | 40 | } | 2341 | 40 | } | 2342 | | | 2343 | 62 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 62 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 62 | const auto& result = results.back(); | 2350 | | | 2351 | 62 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 62 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 62 | if ( options.disableTests == false ) { | 2369 | 62 | tests::test(op, result.second); | 2370 | 62 | } | 2371 | | | 2372 | 62 | postprocess(module, op, result); | 2373 | 62 | } | 2374 | | | 2375 | 36 | if ( options.noCompare == false ) { | 2376 | 22 | compare(operations, results, data, size); | 2377 | 22 | } | 2378 | 36 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 118 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 118 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 118 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 1.06k | do { | 2264 | 1.06k | auto op = getOp(&parentDs, data, size); | 2265 | 1.06k | auto module = getModule(parentDs); | 2266 | 1.06k | if ( module == nullptr ) { | 2267 | 806 | continue; | 2268 | 806 | } | 2269 | | | 2270 | 258 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 258 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 5 | break; | 2275 | 5 | } | 2276 | 1.05k | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 118 | if ( operations.empty() == true ) { | 2279 | 7 | return; | 2280 | 7 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 111 | #if 1 | 2284 | 111 | { | 2285 | 111 | std::set<uint64_t> moduleIDs; | 2286 | 111 | for (const auto& m : modules ) { | 2287 | 88 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 88 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 88 | moduleIDs.insert(moduleID); | 2295 | 88 | } | 2296 | | | 2297 | 111 | std::set<uint64_t> operationModuleIDs; | 2298 | 219 | for (const auto& op : operations) { | 2299 | 219 | operationModuleIDs.insert(op.first->ID); | 2300 | 219 | } | 2301 | | | 2302 | 111 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 111 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 111 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 111 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 111 | } | 2310 | 111 | #endif | 2311 | | | 2312 | 111 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 111 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 330 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 219 | auto& operation = operations[i]; | 2321 | | | 2322 | 219 | auto& module = operation.first; | 2323 | 219 | auto& op = operation.second; | 2324 | | | 2325 | 219 | if ( i > 0 ) { | 2326 | 131 | auto& prevModule = operations[i-1].first; | 2327 | 131 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 131 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 131 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 131 | if ( curModifier.size() == 0 ) { | 2332 | 4.10k | for (size_t j = 0; j < 512; j++) { | 2333 | 4.09k | curModifier.push_back(1); | 2334 | 4.09k | } | 2335 | 123 | } else { | 2336 | 322 | for (auto& c : curModifier) { | 2337 | 322 | c++; | 2338 | 322 | } | 2339 | 123 | } | 2340 | 131 | } | 2341 | 131 | } | 2342 | | | 2343 | 219 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 219 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 219 | const auto& result = results.back(); | 2350 | | | 2351 | 219 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 219 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 219 | if ( options.disableTests == false ) { | 2369 | 219 | tests::test(op, result.second); | 2370 | 219 | } | 2371 | | | 2372 | 219 | postprocess(module, op, result); | 2373 | 219 | } | 2374 | | | 2375 | 111 | if ( options.noCompare == false ) { | 2376 | 88 | compare(operations, results, data, size); | 2377 | 88 | } | 2378 | 111 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 30 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 30 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 30 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 180 | do { | 2264 | 180 | auto op = getOp(&parentDs, data, size); | 2265 | 180 | auto module = getModule(parentDs); | 2266 | 180 | if ( module == nullptr ) { | 2267 | 132 | continue; | 2268 | 132 | } | 2269 | | | 2270 | 48 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 48 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 179 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 30 | if ( operations.empty() == true ) { | 2279 | 1 | return; | 2280 | 1 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 29 | #if 1 | 2284 | 29 | { | 2285 | 29 | std::set<uint64_t> moduleIDs; | 2286 | 29 | for (const auto& m : modules ) { | 2287 | 10 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 10 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 10 | moduleIDs.insert(moduleID); | 2295 | 10 | } | 2296 | | | 2297 | 29 | std::set<uint64_t> operationModuleIDs; | 2298 | 29 | for (const auto& op : operations) { | 2299 | 24 | operationModuleIDs.insert(op.first->ID); | 2300 | 24 | } | 2301 | | | 2302 | 29 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 29 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 29 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 29 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 29 | } | 2310 | 29 | #endif | 2311 | | | 2312 | 29 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 29 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 53 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 24 | auto& operation = operations[i]; | 2321 | | | 2322 | 24 | auto& module = operation.first; | 2323 | 24 | auto& op = operation.second; | 2324 | | | 2325 | 24 | if ( i > 0 ) { | 2326 | 14 | auto& prevModule = operations[i-1].first; | 2327 | 14 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 14 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 14 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 14 | if ( curModifier.size() == 0 ) { | 2332 | 5.13k | for (size_t j = 0; j < 512; j++) { | 2333 | 5.12k | curModifier.push_back(1); | 2334 | 5.12k | } | 2335 | 10 | } else { | 2336 | 26 | for (auto& c : curModifier) { | 2337 | 26 | c++; | 2338 | 26 | } | 2339 | 4 | } | 2340 | 14 | } | 2341 | 14 | } | 2342 | | | 2343 | 24 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 24 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 24 | const auto& result = results.back(); | 2350 | | | 2351 | 24 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 24 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 24 | if ( options.disableTests == false ) { | 2369 | 24 | tests::test(op, result.second); | 2370 | 24 | } | 2371 | | | 2372 | 24 | postprocess(module, op, result); | 2373 | 24 | } | 2374 | | | 2375 | 29 | if ( options.noCompare == false ) { | 2376 | 10 | compare(operations, results, data, size); | 2377 | 10 | } | 2378 | 29 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 39 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 39 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 39 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 444 | do { | 2264 | 444 | auto op = getOp(&parentDs, data, size); | 2265 | 444 | auto module = getModule(parentDs); | 2266 | 444 | if ( module == nullptr ) { | 2267 | 389 | continue; | 2268 | 389 | } | 2269 | | | 2270 | 55 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 55 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 443 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 39 | if ( operations.empty() == true ) { | 2279 | 5 | return; | 2280 | 5 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 34 | #if 1 | 2284 | 34 | { | 2285 | 34 | std::set<uint64_t> moduleIDs; | 2286 | 34 | for (const auto& m : modules ) { | 2287 | 10 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 10 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 10 | moduleIDs.insert(moduleID); | 2295 | 10 | } | 2296 | | | 2297 | 34 | std::set<uint64_t> operationModuleIDs; | 2298 | 34 | for (const auto& op : operations) { | 2299 | 25 | operationModuleIDs.insert(op.first->ID); | 2300 | 25 | } | 2301 | | | 2302 | 34 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 34 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 34 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 34 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 34 | } | 2310 | 34 | #endif | 2311 | | | 2312 | 34 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 34 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 59 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 25 | auto& operation = operations[i]; | 2321 | | | 2322 | 25 | auto& module = operation.first; | 2323 | 25 | auto& op = operation.second; | 2324 | | | 2325 | 25 | if ( i > 0 ) { | 2326 | 15 | auto& prevModule = operations[i-1].first; | 2327 | 15 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 15 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 15 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 15 | if ( curModifier.size() == 0 ) { | 2332 | 4.10k | for (size_t j = 0; j < 512; j++) { | 2333 | 4.09k | curModifier.push_back(1); | 2334 | 4.09k | } | 2335 | 8 | } else { | 2336 | 171 | for (auto& c : curModifier) { | 2337 | 171 | c++; | 2338 | 171 | } | 2339 | 7 | } | 2340 | 15 | } | 2341 | 15 | } | 2342 | | | 2343 | 25 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 25 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 25 | const auto& result = results.back(); | 2350 | | | 2351 | 25 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 25 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 25 | if ( options.disableTests == false ) { | 2369 | 25 | tests::test(op, result.second); | 2370 | 25 | } | 2371 | | | 2372 | 25 | postprocess(module, op, result); | 2373 | 25 | } | 2374 | | | 2375 | 34 | if ( options.noCompare == false ) { | 2376 | 10 | compare(operations, results, data, size); | 2377 | 10 | } | 2378 | 34 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 32 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 32 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 32 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 613 | do { | 2264 | 613 | auto op = getOp(&parentDs, data, size); | 2265 | 613 | auto module = getModule(parentDs); | 2266 | 613 | if ( module == nullptr ) { | 2267 | 557 | continue; | 2268 | 557 | } | 2269 | | | 2270 | 56 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 56 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 612 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 32 | if ( operations.empty() == true ) { | 2279 | 4 | return; | 2280 | 4 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 28 | #if 1 | 2284 | 28 | { | 2285 | 28 | std::set<uint64_t> moduleIDs; | 2286 | 28 | for (const auto& m : modules ) { | 2287 | 5 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 5 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 5 | moduleIDs.insert(moduleID); | 2295 | 5 | } | 2296 | | | 2297 | 28 | std::set<uint64_t> operationModuleIDs; | 2298 | 28 | for (const auto& op : operations) { | 2299 | 14 | operationModuleIDs.insert(op.first->ID); | 2300 | 14 | } | 2301 | | | 2302 | 28 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 28 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 28 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 28 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 28 | } | 2310 | 28 | #endif | 2311 | | | 2312 | 28 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 28 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 42 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 14 | auto& operation = operations[i]; | 2321 | | | 2322 | 14 | auto& module = operation.first; | 2323 | 14 | auto& op = operation.second; | 2324 | | | 2325 | 14 | if ( i > 0 ) { | 2326 | 9 | auto& prevModule = operations[i-1].first; | 2327 | 9 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 9 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 9 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 9 | if ( curModifier.size() == 0 ) { | 2332 | 2.56k | for (size_t j = 0; j < 512; j++) { | 2333 | 2.56k | curModifier.push_back(1); | 2334 | 2.56k | } | 2335 | 5 | } else { | 2336 | 11 | for (auto& c : curModifier) { | 2337 | 11 | c++; | 2338 | 11 | } | 2339 | 4 | } | 2340 | 9 | } | 2341 | 9 | } | 2342 | | | 2343 | 14 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 14 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 14 | const auto& result = results.back(); | 2350 | | | 2351 | 14 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 14 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 14 | if ( options.disableTests == false ) { | 2369 | 14 | tests::test(op, result.second); | 2370 | 14 | } | 2371 | | | 2372 | 14 | postprocess(module, op, result); | 2373 | 14 | } | 2374 | | | 2375 | 28 | if ( options.noCompare == false ) { | 2376 | 5 | compare(operations, results, data, size); | 2377 | 5 | } | 2378 | 28 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 26 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 26 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 26 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 574 | do { | 2264 | 574 | auto op = getOp(&parentDs, data, size); | 2265 | 574 | auto module = getModule(parentDs); | 2266 | 574 | if ( module == nullptr ) { | 2267 | 535 | continue; | 2268 | 535 | } | 2269 | | | 2270 | 39 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 39 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 573 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 26 | if ( operations.empty() == true ) { | 2279 | 2 | return; | 2280 | 2 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 24 | #if 1 | 2284 | 24 | { | 2285 | 24 | std::set<uint64_t> moduleIDs; | 2286 | 24 | for (const auto& m : modules ) { | 2287 | 3 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 3 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 3 | moduleIDs.insert(moduleID); | 2295 | 3 | } | 2296 | | | 2297 | 24 | std::set<uint64_t> operationModuleIDs; | 2298 | 24 | for (const auto& op : operations) { | 2299 | 9 | operationModuleIDs.insert(op.first->ID); | 2300 | 9 | } | 2301 | | | 2302 | 24 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 24 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 24 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 24 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 24 | } | 2310 | 24 | #endif | 2311 | | | 2312 | 24 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 24 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 33 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 9 | auto& operation = operations[i]; | 2321 | | | 2322 | 9 | auto& module = operation.first; | 2323 | 9 | auto& op = operation.second; | 2324 | | | 2325 | 9 | if ( i > 0 ) { | 2326 | 6 | auto& prevModule = operations[i-1].first; | 2327 | 6 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 6 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 6 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 6 | if ( curModifier.size() == 0 ) { | 2332 | 1.02k | for (size_t j = 0; j < 512; j++) { | 2333 | 1.02k | curModifier.push_back(1); | 2334 | 1.02k | } | 2335 | 4 | } else { | 2336 | 35 | for (auto& c : curModifier) { | 2337 | 35 | c++; | 2338 | 35 | } | 2339 | 4 | } | 2340 | 6 | } | 2341 | 6 | } | 2342 | | | 2343 | 9 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 9 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 9 | const auto& result = results.back(); | 2350 | | | 2351 | 9 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 9 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 9 | if ( options.disableTests == false ) { | 2369 | 9 | tests::test(op, result.second); | 2370 | 9 | } | 2371 | | | 2372 | 9 | postprocess(module, op, result); | 2373 | 9 | } | 2374 | | | 2375 | 24 | if ( options.noCompare == false ) { | 2376 | 3 | compare(operations, results, data, size); | 2377 | 3 | } | 2378 | 24 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 48 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 48 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 48 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 554 | do { | 2264 | 554 | auto op = getOp(&parentDs, data, size); | 2265 | 554 | auto module = getModule(parentDs); | 2266 | 554 | if ( module == nullptr ) { | 2267 | 495 | continue; | 2268 | 495 | } | 2269 | | | 2270 | 59 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 59 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 553 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 48 | if ( operations.empty() == true ) { | 2279 | 8 | return; | 2280 | 8 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 40 | #if 1 | 2284 | 40 | { | 2285 | 40 | std::set<uint64_t> moduleIDs; | 2286 | 40 | for (const auto& m : modules ) { | 2287 | 7 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 7 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 7 | moduleIDs.insert(moduleID); | 2295 | 7 | } | 2296 | | | 2297 | 40 | std::set<uint64_t> operationModuleIDs; | 2298 | 40 | for (const auto& op : operations) { | 2299 | 19 | operationModuleIDs.insert(op.first->ID); | 2300 | 19 | } | 2301 | | | 2302 | 40 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 40 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 40 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 40 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 40 | } | 2310 | 40 | #endif | 2311 | | | 2312 | 40 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 40 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 59 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 19 | auto& operation = operations[i]; | 2321 | | | 2322 | 19 | auto& module = operation.first; | 2323 | 19 | auto& op = operation.second; | 2324 | | | 2325 | 19 | if ( i > 0 ) { | 2326 | 12 | auto& prevModule = operations[i-1].first; | 2327 | 12 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 12 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 12 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 12 | if ( curModifier.size() == 0 ) { | 2332 | 1.53k | for (size_t j = 0; j < 512; j++) { | 2333 | 1.53k | curModifier.push_back(1); | 2334 | 1.53k | } | 2335 | 9 | } else { | 2336 | 30 | for (auto& c : curModifier) { | 2337 | 30 | c++; | 2338 | 30 | } | 2339 | 9 | } | 2340 | 12 | } | 2341 | 12 | } | 2342 | | | 2343 | 19 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 19 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 19 | const auto& result = results.back(); | 2350 | | | 2351 | 19 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 19 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 19 | if ( options.disableTests == false ) { | 2369 | 19 | tests::test(op, result.second); | 2370 | 19 | } | 2371 | | | 2372 | 19 | postprocess(module, op, result); | 2373 | 19 | } | 2374 | | | 2375 | 40 | if ( options.noCompare == false ) { | 2376 | 7 | compare(operations, results, data, size); | 2377 | 7 | } | 2378 | 40 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 34 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 34 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 34 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 515 | do { | 2264 | 515 | auto op = getOp(&parentDs, data, size); | 2265 | 515 | auto module = getModule(parentDs); | 2266 | 515 | if ( module == nullptr ) { | 2267 | 471 | continue; | 2268 | 471 | } | 2269 | | | 2270 | 44 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 44 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 515 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 34 | if ( operations.empty() == true ) { | 2279 | 1 | return; | 2280 | 1 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 33 | #if 1 | 2284 | 33 | { | 2285 | 33 | std::set<uint64_t> moduleIDs; | 2286 | 33 | for (const auto& m : modules ) { | 2287 | 3 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 3 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 3 | moduleIDs.insert(moduleID); | 2295 | 3 | } | 2296 | | | 2297 | 33 | std::set<uint64_t> operationModuleIDs; | 2298 | 33 | for (const auto& op : operations) { | 2299 | 8 | operationModuleIDs.insert(op.first->ID); | 2300 | 8 | } | 2301 | | | 2302 | 33 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 33 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 33 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 33 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 33 | } | 2310 | 33 | #endif | 2311 | | | 2312 | 33 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 33 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 41 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 8 | auto& operation = operations[i]; | 2321 | | | 2322 | 8 | auto& module = operation.first; | 2323 | 8 | auto& op = operation.second; | 2324 | | | 2325 | 8 | if ( i > 0 ) { | 2326 | 5 | auto& prevModule = operations[i-1].first; | 2327 | 5 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 5 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 5 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 5 | if ( curModifier.size() == 0 ) { | 2332 | 1.53k | for (size_t j = 0; j < 512; j++) { | 2333 | 1.53k | curModifier.push_back(1); | 2334 | 1.53k | } | 2335 | 3 | } else { | 2336 | 52 | for (auto& c : curModifier) { | 2337 | 52 | c++; | 2338 | 52 | } | 2339 | 2 | } | 2340 | 5 | } | 2341 | 5 | } | 2342 | | | 2343 | 8 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 8 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 8 | const auto& result = results.back(); | 2350 | | | 2351 | 8 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 8 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 8 | if ( options.disableTests == false ) { | 2369 | 8 | tests::test(op, result.second); | 2370 | 8 | } | 2371 | | | 2372 | 8 | postprocess(module, op, result); | 2373 | 8 | } | 2374 | | | 2375 | 33 | if ( options.noCompare == false ) { | 2376 | 3 | compare(operations, results, data, size); | 2377 | 3 | } | 2378 | 33 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 42 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 42 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 42 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 315 | do { | 2264 | 315 | auto op = getOp(&parentDs, data, size); | 2265 | 315 | auto module = getModule(parentDs); | 2266 | 315 | if ( module == nullptr ) { | 2267 | 260 | continue; | 2268 | 260 | } | 2269 | | | 2270 | 55 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 55 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 314 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 42 | if ( operations.empty() == true ) { | 2279 | 4 | return; | 2280 | 4 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 38 | #if 1 | 2284 | 38 | { | 2285 | 38 | std::set<uint64_t> moduleIDs; | 2286 | 38 | for (const auto& m : modules ) { | 2287 | 5 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 5 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 5 | moduleIDs.insert(moduleID); | 2295 | 5 | } | 2296 | | | 2297 | 38 | std::set<uint64_t> operationModuleIDs; | 2298 | 38 | for (const auto& op : operations) { | 2299 | 16 | operationModuleIDs.insert(op.first->ID); | 2300 | 16 | } | 2301 | | | 2302 | 38 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 38 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 38 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 38 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 38 | } | 2310 | 38 | #endif | 2311 | | | 2312 | 38 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 38 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 54 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 16 | auto& operation = operations[i]; | 2321 | | | 2322 | 16 | auto& module = operation.first; | 2323 | 16 | auto& op = operation.second; | 2324 | | | 2325 | 16 | if ( i > 0 ) { | 2326 | 11 | auto& prevModule = operations[i-1].first; | 2327 | 11 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 11 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 11 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 11 | if ( curModifier.size() == 0 ) { | 2332 | 4.61k | for (size_t j = 0; j < 512; j++) { | 2333 | 4.60k | curModifier.push_back(1); | 2334 | 4.60k | } | 2335 | 9 | } else { | 2336 | 251 | for (auto& c : curModifier) { | 2337 | 251 | c++; | 2338 | 251 | } | 2339 | 2 | } | 2340 | 11 | } | 2341 | 11 | } | 2342 | | | 2343 | 16 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 16 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 16 | const auto& result = results.back(); | 2350 | | | 2351 | 16 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 16 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 16 | if ( options.disableTests == false ) { | 2369 | 16 | tests::test(op, result.second); | 2370 | 16 | } | 2371 | | | 2372 | 16 | postprocess(module, op, result); | 2373 | 16 | } | 2374 | | | 2375 | 38 | if ( options.noCompare == false ) { | 2376 | 5 | compare(operations, results, data, size); | 2377 | 5 | } | 2378 | 38 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 35 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 35 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 35 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 317 | do { | 2264 | 317 | auto op = getOp(&parentDs, data, size); | 2265 | 317 | auto module = getModule(parentDs); | 2266 | 317 | if ( module == nullptr ) { | 2267 | 267 | continue; | 2268 | 267 | } | 2269 | | | 2270 | 50 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 50 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 317 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 35 | if ( operations.empty() == true ) { | 2279 | 4 | return; | 2280 | 4 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 31 | #if 1 | 2284 | 31 | { | 2285 | 31 | std::set<uint64_t> moduleIDs; | 2286 | 31 | for (const auto& m : modules ) { | 2287 | 7 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 7 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 7 | moduleIDs.insert(moduleID); | 2295 | 7 | } | 2296 | | | 2297 | 31 | std::set<uint64_t> operationModuleIDs; | 2298 | 31 | for (const auto& op : operations) { | 2299 | 14 | operationModuleIDs.insert(op.first->ID); | 2300 | 14 | } | 2301 | | | 2302 | 31 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 31 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 31 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 31 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 31 | } | 2310 | 31 | #endif | 2311 | | | 2312 | 31 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 31 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 45 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 14 | auto& operation = operations[i]; | 2321 | | | 2322 | 14 | auto& module = operation.first; | 2323 | 14 | auto& op = operation.second; | 2324 | | | 2325 | 14 | if ( i > 0 ) { | 2326 | 7 | auto& prevModule = operations[i-1].first; | 2327 | 7 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 7 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 7 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 7 | if ( curModifier.size() == 0 ) { | 2332 | 1.02k | for (size_t j = 0; j < 512; j++) { | 2333 | 1.02k | curModifier.push_back(1); | 2334 | 1.02k | } | 2335 | 5 | } else { | 2336 | 46 | for (auto& c : curModifier) { | 2337 | 46 | c++; | 2338 | 46 | } | 2339 | 5 | } | 2340 | 7 | } | 2341 | 7 | } | 2342 | | | 2343 | 14 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 14 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 14 | const auto& result = results.back(); | 2350 | | | 2351 | 14 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 14 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 14 | if ( options.disableTests == false ) { | 2369 | 14 | tests::test(op, result.second); | 2370 | 14 | } | 2371 | | | 2372 | 14 | postprocess(module, op, result); | 2373 | 14 | } | 2374 | | | 2375 | 31 | if ( options.noCompare == false ) { | 2376 | 7 | compare(operations, results, data, size); | 2377 | 7 | } | 2378 | 31 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 29 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 29 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 29 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 579 | do { | 2264 | 579 | auto op = getOp(&parentDs, data, size); | 2265 | 579 | auto module = getModule(parentDs); | 2266 | 579 | if ( module == nullptr ) { | 2267 | 532 | continue; | 2268 | 532 | } | 2269 | | | 2270 | 47 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 47 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 578 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 29 | if ( operations.empty() == true ) { | 2279 | 1 | return; | 2280 | 1 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 28 | #if 1 | 2284 | 28 | { | 2285 | 28 | std::set<uint64_t> moduleIDs; | 2286 | 28 | for (const auto& m : modules ) { | 2287 | 8 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 8 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 8 | moduleIDs.insert(moduleID); | 2295 | 8 | } | 2296 | | | 2297 | 28 | std::set<uint64_t> operationModuleIDs; | 2298 | 28 | for (const auto& op : operations) { | 2299 | 23 | operationModuleIDs.insert(op.first->ID); | 2300 | 23 | } | 2301 | | | 2302 | 28 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 28 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 28 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 28 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 28 | } | 2310 | 28 | #endif | 2311 | | | 2312 | 28 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 28 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 51 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 23 | auto& operation = operations[i]; | 2321 | | | 2322 | 23 | auto& module = operation.first; | 2323 | 23 | auto& op = operation.second; | 2324 | | | 2325 | 23 | if ( i > 0 ) { | 2326 | 15 | auto& prevModule = operations[i-1].first; | 2327 | 15 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 15 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 15 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 15 | if ( curModifier.size() == 0 ) { | 2332 | 1.53k | for (size_t j = 0; j < 512; j++) { | 2333 | 1.53k | curModifier.push_back(1); | 2334 | 1.53k | } | 2335 | 12 | } else { | 2336 | 270 | for (auto& c : curModifier) { | 2337 | 270 | c++; | 2338 | 270 | } | 2339 | 12 | } | 2340 | 15 | } | 2341 | 15 | } | 2342 | | | 2343 | 23 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 23 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 23 | const auto& result = results.back(); | 2350 | | | 2351 | 23 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 23 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 23 | if ( options.disableTests == false ) { | 2369 | 23 | tests::test(op, result.second); | 2370 | 23 | } | 2371 | | | 2372 | 23 | postprocess(module, op, result); | 2373 | 23 | } | 2374 | | | 2375 | 28 | if ( options.noCompare == false ) { | 2376 | 8 | compare(operations, results, data, size); | 2377 | 8 | } | 2378 | 28 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 29 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 29 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 29 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 481 | do { | 2264 | 481 | auto op = getOp(&parentDs, data, size); | 2265 | 481 | auto module = getModule(parentDs); | 2266 | 481 | if ( module == nullptr ) { | 2267 | 455 | continue; | 2268 | 455 | } | 2269 | | | 2270 | 26 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 26 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 481 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 29 | if ( operations.empty() == true ) { | 2279 | 2 | return; | 2280 | 2 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 27 | #if 1 | 2284 | 27 | { | 2285 | 27 | std::set<uint64_t> moduleIDs; | 2286 | 27 | for (const auto& m : modules ) { | 2287 | 5 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 5 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 5 | moduleIDs.insert(moduleID); | 2295 | 5 | } | 2296 | | | 2297 | 27 | std::set<uint64_t> operationModuleIDs; | 2298 | 27 | for (const auto& op : operations) { | 2299 | 10 | operationModuleIDs.insert(op.first->ID); | 2300 | 10 | } | 2301 | | | 2302 | 27 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 27 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 27 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 27 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 27 | } | 2310 | 27 | #endif | 2311 | | | 2312 | 27 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 27 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 37 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 10 | auto& operation = operations[i]; | 2321 | | | 2322 | 10 | auto& module = operation.first; | 2323 | 10 | auto& op = operation.second; | 2324 | | | 2325 | 10 | if ( i > 0 ) { | 2326 | 5 | auto& prevModule = operations[i-1].first; | 2327 | 5 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 5 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 5 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 5 | if ( curModifier.size() == 0 ) { | 2332 | 0 | for (size_t j = 0; j < 512; j++) { | 2333 | 0 | curModifier.push_back(1); | 2334 | 0 | } | 2335 | 5 | } else { | 2336 | 52 | for (auto& c : curModifier) { | 2337 | 52 | c++; | 2338 | 52 | } | 2339 | 5 | } | 2340 | 5 | } | 2341 | 5 | } | 2342 | | | 2343 | 10 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 10 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 10 | const auto& result = results.back(); | 2350 | | | 2351 | 10 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 10 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 10 | if ( options.disableTests == false ) { | 2369 | 10 | tests::test(op, result.second); | 2370 | 10 | } | 2371 | | | 2372 | 10 | postprocess(module, op, result); | 2373 | 10 | } | 2374 | | | 2375 | 27 | if ( options.noCompare == false ) { | 2376 | 5 | compare(operations, results, data, size); | 2377 | 5 | } | 2378 | 27 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 30 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 30 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 30 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 136 | do { | 2264 | 136 | auto op = getOp(&parentDs, data, size); | 2265 | 136 | auto module = getModule(parentDs); | 2266 | 136 | if ( module == nullptr ) { | 2267 | 94 | continue; | 2268 | 94 | } | 2269 | | | 2270 | 42 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 42 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 135 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 30 | if ( operations.empty() == true ) { | 2279 | 8 | return; | 2280 | 8 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 22 | #if 1 | 2284 | 22 | { | 2285 | 22 | std::set<uint64_t> moduleIDs; | 2286 | 22 | for (const auto& m : modules ) { | 2287 | 5 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 5 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 5 | moduleIDs.insert(moduleID); | 2295 | 5 | } | 2296 | | | 2297 | 22 | std::set<uint64_t> operationModuleIDs; | 2298 | 22 | for (const auto& op : operations) { | 2299 | 13 | operationModuleIDs.insert(op.first->ID); | 2300 | 13 | } | 2301 | | | 2302 | 22 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 22 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 22 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 22 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 22 | } | 2310 | 22 | #endif | 2311 | | | 2312 | 22 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 22 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 35 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 13 | auto& operation = operations[i]; | 2321 | | | 2322 | 13 | auto& module = operation.first; | 2323 | 13 | auto& op = operation.second; | 2324 | | | 2325 | 13 | if ( i > 0 ) { | 2326 | 8 | auto& prevModule = operations[i-1].first; | 2327 | 8 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 8 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 8 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 8 | if ( curModifier.size() == 0 ) { | 2332 | 513 | for (size_t j = 0; j < 512; j++) { | 2333 | 512 | curModifier.push_back(1); | 2334 | 512 | } | 2335 | 7 | } else { | 2336 | 139 | for (auto& c : curModifier) { | 2337 | 139 | c++; | 2338 | 139 | } | 2339 | 7 | } | 2340 | 8 | } | 2341 | 8 | } | 2342 | | | 2343 | 13 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 13 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 13 | const auto& result = results.back(); | 2350 | | | 2351 | 13 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 13 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 13 | if ( options.disableTests == false ) { | 2369 | 13 | tests::test(op, result.second); | 2370 | 13 | } | 2371 | | | 2372 | 13 | postprocess(module, op, result); | 2373 | 13 | } | 2374 | | | 2375 | 22 | if ( options.noCompare == false ) { | 2376 | 5 | compare(operations, results, data, size); | 2377 | 5 | } | 2378 | 22 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 29 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 29 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 29 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 248 | do { | 2264 | 248 | auto op = getOp(&parentDs, data, size); | 2265 | 248 | auto module = getModule(parentDs); | 2266 | 248 | if ( module == nullptr ) { | 2267 | 190 | continue; | 2268 | 190 | } | 2269 | | | 2270 | 58 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 58 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 2 | break; | 2275 | 2 | } | 2276 | 246 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 29 | if ( operations.empty() == true ) { | 2279 | 2 | return; | 2280 | 2 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 27 | #if 1 | 2284 | 27 | { | 2285 | 27 | std::set<uint64_t> moduleIDs; | 2286 | 27 | for (const auto& m : modules ) { | 2287 | 9 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 9 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 9 | moduleIDs.insert(moduleID); | 2295 | 9 | } | 2296 | | | 2297 | 27 | std::set<uint64_t> operationModuleIDs; | 2298 | 27 | for (const auto& op : operations) { | 2299 | 26 | operationModuleIDs.insert(op.first->ID); | 2300 | 26 | } | 2301 | | | 2302 | 27 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 27 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 27 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 27 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 27 | } | 2310 | 27 | #endif | 2311 | | | 2312 | 27 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 27 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 53 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 26 | auto& operation = operations[i]; | 2321 | | | 2322 | 26 | auto& module = operation.first; | 2323 | 26 | auto& op = operation.second; | 2324 | | | 2325 | 26 | if ( i > 0 ) { | 2326 | 17 | auto& prevModule = operations[i-1].first; | 2327 | 17 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 17 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 17 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 17 | if ( curModifier.size() == 0 ) { | 2332 | 3.59k | for (size_t j = 0; j < 512; j++) { | 2333 | 3.58k | curModifier.push_back(1); | 2334 | 3.58k | } | 2335 | 10 | } else { | 2336 | 70 | for (auto& c : curModifier) { | 2337 | 70 | c++; | 2338 | 70 | } | 2339 | 10 | } | 2340 | 17 | } | 2341 | 17 | } | 2342 | | | 2343 | 26 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 26 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 26 | const auto& result = results.back(); | 2350 | | | 2351 | 26 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 26 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 26 | if ( options.disableTests == false ) { | 2369 | 26 | tests::test(op, result.second); | 2370 | 26 | } | 2371 | | | 2372 | 26 | postprocess(module, op, result); | 2373 | 26 | } | 2374 | | | 2375 | 27 | if ( options.noCompare == false ) { | 2376 | 9 | compare(operations, results, data, size); | 2377 | 9 | } | 2378 | 27 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 31 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 31 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 31 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 352 | do { | 2264 | 352 | auto op = getOp(&parentDs, data, size); | 2265 | 352 | auto module = getModule(parentDs); | 2266 | 352 | if ( module == nullptr ) { | 2267 | 304 | continue; | 2268 | 304 | } | 2269 | | | 2270 | 48 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 48 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 351 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 31 | if ( operations.empty() == true ) { | 2279 | 4 | return; | 2280 | 4 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 27 | #if 1 | 2284 | 27 | { | 2285 | 27 | std::set<uint64_t> moduleIDs; | 2286 | 27 | for (const auto& m : modules ) { | 2287 | 8 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 8 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 8 | moduleIDs.insert(moduleID); | 2295 | 8 | } | 2296 | | | 2297 | 27 | std::set<uint64_t> operationModuleIDs; | 2298 | 27 | for (const auto& op : operations) { | 2299 | 22 | operationModuleIDs.insert(op.first->ID); | 2300 | 22 | } | 2301 | | | 2302 | 27 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 27 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 27 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 27 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 27 | } | 2310 | 27 | #endif | 2311 | | | 2312 | 27 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 27 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 49 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 22 | auto& operation = operations[i]; | 2321 | | | 2322 | 22 | auto& module = operation.first; | 2323 | 22 | auto& op = operation.second; | 2324 | | | 2325 | 22 | if ( i > 0 ) { | 2326 | 14 | auto& prevModule = operations[i-1].first; | 2327 | 14 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 14 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 14 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 14 | if ( curModifier.size() == 0 ) { | 2332 | 4.10k | for (size_t j = 0; j < 512; j++) { | 2333 | 4.09k | curModifier.push_back(1); | 2334 | 4.09k | } | 2335 | 8 | } else { | 2336 | 72 | for (auto& c : curModifier) { | 2337 | 72 | c++; | 2338 | 72 | } | 2339 | 6 | } | 2340 | 14 | } | 2341 | 14 | } | 2342 | | | 2343 | 22 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 22 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 22 | const auto& result = results.back(); | 2350 | | | 2351 | 22 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 22 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 22 | if ( options.disableTests == false ) { | 2369 | 22 | tests::test(op, result.second); | 2370 | 22 | } | 2371 | | | 2372 | 22 | postprocess(module, op, result); | 2373 | 22 | } | 2374 | | | 2375 | 27 | if ( options.noCompare == false ) { | 2376 | 8 | compare(operations, results, data, size); | 2377 | 8 | } | 2378 | 27 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 24 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 24 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 24 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 278 | do { | 2264 | 278 | auto op = getOp(&parentDs, data, size); | 2265 | 278 | auto module = getModule(parentDs); | 2266 | 278 | if ( module == nullptr ) { | 2267 | 234 | continue; | 2268 | 234 | } | 2269 | | | 2270 | 44 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 44 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 277 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 24 | if ( operations.empty() == true ) { | 2279 | 2 | return; | 2280 | 2 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 22 | #if 1 | 2284 | 22 | { | 2285 | 22 | std::set<uint64_t> moduleIDs; | 2286 | 22 | for (const auto& m : modules ) { | 2287 | 5 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 5 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 5 | moduleIDs.insert(moduleID); | 2295 | 5 | } | 2296 | | | 2297 | 22 | std::set<uint64_t> operationModuleIDs; | 2298 | 22 | for (const auto& op : operations) { | 2299 | 11 | operationModuleIDs.insert(op.first->ID); | 2300 | 11 | } | 2301 | | | 2302 | 22 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 22 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 22 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 22 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 22 | } | 2310 | 22 | #endif | 2311 | | | 2312 | 22 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 22 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 33 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 11 | auto& operation = operations[i]; | 2321 | | | 2322 | 11 | auto& module = operation.first; | 2323 | 11 | auto& op = operation.second; | 2324 | | | 2325 | 11 | if ( i > 0 ) { | 2326 | 6 | auto& prevModule = operations[i-1].first; | 2327 | 6 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 6 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 6 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 6 | if ( curModifier.size() == 0 ) { | 2332 | 1.02k | for (size_t j = 0; j < 512; j++) { | 2333 | 1.02k | curModifier.push_back(1); | 2334 | 1.02k | } | 2335 | 4 | } else { | 2336 | 4 | for (auto& c : curModifier) { | 2337 | 4 | c++; | 2338 | 4 | } | 2339 | 4 | } | 2340 | 6 | } | 2341 | 6 | } | 2342 | | | 2343 | 11 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 11 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 11 | const auto& result = results.back(); | 2350 | | | 2351 | 11 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 11 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 11 | if ( options.disableTests == false ) { | 2369 | 11 | tests::test(op, result.second); | 2370 | 11 | } | 2371 | | | 2372 | 11 | postprocess(module, op, result); | 2373 | 11 | } | 2374 | | | 2375 | 22 | if ( options.noCompare == false ) { | 2376 | 5 | compare(operations, results, data, size); | 2377 | 5 | } | 2378 | 22 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 41 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 41 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 41 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 591 | do { | 2264 | 591 | auto op = getOp(&parentDs, data, size); | 2265 | 591 | auto module = getModule(parentDs); | 2266 | 591 | if ( module == nullptr ) { | 2267 | 540 | continue; | 2268 | 540 | } | 2269 | | | 2270 | 51 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 51 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 590 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 41 | if ( operations.empty() == true ) { | 2279 | 6 | return; | 2280 | 6 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 35 | #if 1 | 2284 | 35 | { | 2285 | 35 | std::set<uint64_t> moduleIDs; | 2286 | 35 | for (const auto& m : modules ) { | 2287 | 8 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 8 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 8 | moduleIDs.insert(moduleID); | 2295 | 8 | } | 2296 | | | 2297 | 35 | std::set<uint64_t> operationModuleIDs; | 2298 | 35 | for (const auto& op : operations) { | 2299 | 19 | operationModuleIDs.insert(op.first->ID); | 2300 | 19 | } | 2301 | | | 2302 | 35 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 35 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 35 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 35 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 35 | } | 2310 | 35 | #endif | 2311 | | | 2312 | 35 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 35 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 54 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 19 | auto& operation = operations[i]; | 2321 | | | 2322 | 19 | auto& module = operation.first; | 2323 | 19 | auto& op = operation.second; | 2324 | | | 2325 | 19 | if ( i > 0 ) { | 2326 | 11 | auto& prevModule = operations[i-1].first; | 2327 | 11 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 11 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 11 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 11 | if ( curModifier.size() == 0 ) { | 2332 | 2.05k | for (size_t j = 0; j < 512; j++) { | 2333 | 2.04k | curModifier.push_back(1); | 2334 | 2.04k | } | 2335 | 7 | } else { | 2336 | 14 | for (auto& c : curModifier) { | 2337 | 14 | c++; | 2338 | 14 | } | 2339 | 7 | } | 2340 | 11 | } | 2341 | 11 | } | 2342 | | | 2343 | 19 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 19 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 19 | const auto& result = results.back(); | 2350 | | | 2351 | 19 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 19 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 19 | if ( options.disableTests == false ) { | 2369 | 19 | tests::test(op, result.second); | 2370 | 19 | } | 2371 | | | 2372 | 19 | postprocess(module, op, result); | 2373 | 19 | } | 2374 | | | 2375 | 35 | if ( options.noCompare == false ) { | 2376 | 8 | compare(operations, results, data, size); | 2377 | 8 | } | 2378 | 35 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 34 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 34 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 34 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 289 | do { | 2264 | 289 | auto op = getOp(&parentDs, data, size); | 2265 | 289 | auto module = getModule(parentDs); | 2266 | 289 | if ( module == nullptr ) { | 2267 | 252 | continue; | 2268 | 252 | } | 2269 | | | 2270 | 37 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 37 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 288 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 34 | if ( operations.empty() == true ) { | 2279 | 10 | return; | 2280 | 10 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 24 | #if 1 | 2284 | 24 | { | 2285 | 24 | std::set<uint64_t> moduleIDs; | 2286 | 24 | for (const auto& m : modules ) { | 2287 | 7 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 7 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 7 | moduleIDs.insert(moduleID); | 2295 | 7 | } | 2296 | | | 2297 | 24 | std::set<uint64_t> operationModuleIDs; | 2298 | 24 | for (const auto& op : operations) { | 2299 | 21 | operationModuleIDs.insert(op.first->ID); | 2300 | 21 | } | 2301 | | | 2302 | 24 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 24 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 24 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 24 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 24 | } | 2310 | 24 | #endif | 2311 | | | 2312 | 24 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 24 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 45 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 21 | auto& operation = operations[i]; | 2321 | | | 2322 | 21 | auto& module = operation.first; | 2323 | 21 | auto& op = operation.second; | 2324 | | | 2325 | 21 | if ( i > 0 ) { | 2326 | 14 | auto& prevModule = operations[i-1].first; | 2327 | 14 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 14 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 14 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 14 | if ( curModifier.size() == 0 ) { | 2332 | 1.53k | for (size_t j = 0; j < 512; j++) { | 2333 | 1.53k | curModifier.push_back(1); | 2334 | 1.53k | } | 2335 | 11 | } else { | 2336 | 60 | for (auto& c : curModifier) { | 2337 | 60 | c++; | 2338 | 60 | } | 2339 | 11 | } | 2340 | 14 | } | 2341 | 14 | } | 2342 | | | 2343 | 21 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 21 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 21 | const auto& result = results.back(); | 2350 | | | 2351 | 21 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 21 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 21 | if ( options.disableTests == false ) { | 2369 | 21 | tests::test(op, result.second); | 2370 | 21 | } | 2371 | | | 2372 | 21 | postprocess(module, op, result); | 2373 | 21 | } | 2374 | | | 2375 | 24 | if ( options.noCompare == false ) { | 2376 | 7 | compare(operations, results, data, size); | 2377 | 7 | } | 2378 | 24 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 37 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 37 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 37 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 498 | do { | 2264 | 498 | auto op = getOp(&parentDs, data, size); | 2265 | 498 | auto module = getModule(parentDs); | 2266 | 498 | if ( module == nullptr ) { | 2267 | 447 | continue; | 2268 | 447 | } | 2269 | | | 2270 | 51 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 51 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 4 | break; | 2275 | 4 | } | 2276 | 494 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 37 | if ( operations.empty() == true ) { | 2279 | 4 | return; | 2280 | 4 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 33 | #if 1 | 2284 | 33 | { | 2285 | 33 | std::set<uint64_t> moduleIDs; | 2286 | 33 | for (const auto& m : modules ) { | 2287 | 14 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 14 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 14 | moduleIDs.insert(moduleID); | 2295 | 14 | } | 2296 | | | 2297 | 33 | std::set<uint64_t> operationModuleIDs; | 2298 | 37 | for (const auto& op : operations) { | 2299 | 37 | operationModuleIDs.insert(op.first->ID); | 2300 | 37 | } | 2301 | | | 2302 | 33 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 33 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 33 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 33 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 33 | } | 2310 | 33 | #endif | 2311 | | | 2312 | 33 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 33 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 70 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 37 | auto& operation = operations[i]; | 2321 | | | 2322 | 37 | auto& module = operation.first; | 2323 | 37 | auto& op = operation.second; | 2324 | | | 2325 | 37 | if ( i > 0 ) { | 2326 | 23 | auto& prevModule = operations[i-1].first; | 2327 | 23 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 23 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 23 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 23 | if ( curModifier.size() == 0 ) { | 2332 | 4.61k | for (size_t j = 0; j < 512; j++) { | 2333 | 4.60k | curModifier.push_back(1); | 2334 | 4.60k | } | 2335 | 14 | } else { | 2336 | 83 | for (auto& c : curModifier) { | 2337 | 83 | c++; | 2338 | 83 | } | 2339 | 14 | } | 2340 | 23 | } | 2341 | 23 | } | 2342 | | | 2343 | 37 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 37 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 37 | const auto& result = results.back(); | 2350 | | | 2351 | 37 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 37 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 37 | if ( options.disableTests == false ) { | 2369 | 37 | tests::test(op, result.second); | 2370 | 37 | } | 2371 | | | 2372 | 37 | postprocess(module, op, result); | 2373 | 37 | } | 2374 | | | 2375 | 33 | if ( options.noCompare == false ) { | 2376 | 14 | compare(operations, results, data, size); | 2377 | 14 | } | 2378 | 33 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 19 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 19 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 19 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 734 | do { | 2264 | 734 | auto op = getOp(&parentDs, data, size); | 2265 | 734 | auto module = getModule(parentDs); | 2266 | 734 | if ( module == nullptr ) { | 2267 | 696 | continue; | 2268 | 696 | } | 2269 | | | 2270 | 38 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 38 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 733 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 19 | if ( operations.empty() == true ) { | 2279 | 4 | return; | 2280 | 4 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 15 | #if 1 | 2284 | 15 | { | 2285 | 15 | std::set<uint64_t> moduleIDs; | 2286 | 15 | for (const auto& m : modules ) { | 2287 | 4 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 4 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 4 | moduleIDs.insert(moduleID); | 2295 | 4 | } | 2296 | | | 2297 | 15 | std::set<uint64_t> operationModuleIDs; | 2298 | 15 | for (const auto& op : operations) { | 2299 | 14 | operationModuleIDs.insert(op.first->ID); | 2300 | 14 | } | 2301 | | | 2302 | 15 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 15 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 15 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 15 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 15 | } | 2310 | 15 | #endif | 2311 | | | 2312 | 15 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 15 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 29 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 14 | auto& operation = operations[i]; | 2321 | | | 2322 | 14 | auto& module = operation.first; | 2323 | 14 | auto& op = operation.second; | 2324 | | | 2325 | 14 | if ( i > 0 ) { | 2326 | 10 | auto& prevModule = operations[i-1].first; | 2327 | 10 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 10 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 10 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 10 | if ( curModifier.size() == 0 ) { | 2332 | 1.53k | for (size_t j = 0; j < 512; j++) { | 2333 | 1.53k | curModifier.push_back(1); | 2334 | 1.53k | } | 2335 | 7 | } else { | 2336 | 7 | for (auto& c : curModifier) { | 2337 | 7 | c++; | 2338 | 7 | } | 2339 | 7 | } | 2340 | 10 | } | 2341 | 10 | } | 2342 | | | 2343 | 14 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 14 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 14 | const auto& result = results.back(); | 2350 | | | 2351 | 14 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 14 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 14 | if ( options.disableTests == false ) { | 2369 | 14 | tests::test(op, result.second); | 2370 | 14 | } | 2371 | | | 2372 | 14 | postprocess(module, op, result); | 2373 | 14 | } | 2374 | | | 2375 | 15 | if ( options.noCompare == false ) { | 2376 | 4 | compare(operations, results, data, size); | 2377 | 4 | } | 2378 | 15 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 28 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 28 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 28 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 906 | do { | 2264 | 906 | auto op = getOp(&parentDs, data, size); | 2265 | 906 | auto module = getModule(parentDs); | 2266 | 906 | if ( module == nullptr ) { | 2267 | 864 | continue; | 2268 | 864 | } | 2269 | | | 2270 | 42 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 42 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 905 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 28 | if ( operations.empty() == true ) { | 2279 | 1 | return; | 2280 | 1 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 27 | #if 1 | 2284 | 27 | { | 2285 | 27 | std::set<uint64_t> moduleIDs; | 2286 | 27 | for (const auto& m : modules ) { | 2287 | 6 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 6 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 6 | moduleIDs.insert(moduleID); | 2295 | 6 | } | 2296 | | | 2297 | 27 | std::set<uint64_t> operationModuleIDs; | 2298 | 27 | for (const auto& op : operations) { | 2299 | 15 | operationModuleIDs.insert(op.first->ID); | 2300 | 15 | } | 2301 | | | 2302 | 27 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 27 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 27 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 27 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 27 | } | 2310 | 27 | #endif | 2311 | | | 2312 | 27 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 27 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 42 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 15 | auto& operation = operations[i]; | 2321 | | | 2322 | 15 | auto& module = operation.first; | 2323 | 15 | auto& op = operation.second; | 2324 | | | 2325 | 15 | if ( i > 0 ) { | 2326 | 9 | auto& prevModule = operations[i-1].first; | 2327 | 9 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 9 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 9 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 9 | if ( curModifier.size() == 0 ) { | 2332 | 1.53k | for (size_t j = 0; j < 512; j++) { | 2333 | 1.53k | curModifier.push_back(1); | 2334 | 1.53k | } | 2335 | 6 | } else { | 2336 | 28 | for (auto& c : curModifier) { | 2337 | 28 | c++; | 2338 | 28 | } | 2339 | 6 | } | 2340 | 9 | } | 2341 | 9 | } | 2342 | | | 2343 | 15 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 15 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 15 | const auto& result = results.back(); | 2350 | | | 2351 | 15 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 15 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 15 | if ( options.disableTests == false ) { | 2369 | 15 | tests::test(op, result.second); | 2370 | 15 | } | 2371 | | | 2372 | 15 | postprocess(module, op, result); | 2373 | 15 | } | 2374 | | | 2375 | 27 | if ( options.noCompare == false ) { | 2376 | 6 | compare(operations, results, data, size); | 2377 | 6 | } | 2378 | 27 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 32 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 32 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 32 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 420 | do { | 2264 | 420 | auto op = getOp(&parentDs, data, size); | 2265 | 420 | auto module = getModule(parentDs); | 2266 | 420 | if ( module == nullptr ) { | 2267 | 365 | continue; | 2268 | 365 | } | 2269 | | | 2270 | 55 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 55 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 2 | break; | 2275 | 2 | } | 2276 | 418 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 32 | if ( operations.empty() == true ) { | 2279 | 3 | return; | 2280 | 3 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 29 | #if 1 | 2284 | 29 | { | 2285 | 29 | std::set<uint64_t> moduleIDs; | 2286 | 29 | for (const auto& m : modules ) { | 2287 | 9 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 9 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 9 | moduleIDs.insert(moduleID); | 2295 | 9 | } | 2296 | | | 2297 | 29 | std::set<uint64_t> operationModuleIDs; | 2298 | 29 | for (const auto& op : operations) { | 2299 | 25 | operationModuleIDs.insert(op.first->ID); | 2300 | 25 | } | 2301 | | | 2302 | 29 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 29 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 29 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 29 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 29 | } | 2310 | 29 | #endif | 2311 | | | 2312 | 29 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 29 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 54 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 25 | auto& operation = operations[i]; | 2321 | | | 2322 | 25 | auto& module = operation.first; | 2323 | 25 | auto& op = operation.second; | 2324 | | | 2325 | 25 | if ( i > 0 ) { | 2326 | 16 | auto& prevModule = operations[i-1].first; | 2327 | 16 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 16 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 16 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 16 | if ( curModifier.size() == 0 ) { | 2332 | 2.05k | for (size_t j = 0; j < 512; j++) { | 2333 | 2.04k | curModifier.push_back(1); | 2334 | 2.04k | } | 2335 | 12 | } else { | 2336 | 204 | for (auto& c : curModifier) { | 2337 | 204 | c++; | 2338 | 204 | } | 2339 | 12 | } | 2340 | 16 | } | 2341 | 16 | } | 2342 | | | 2343 | 25 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 25 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 25 | const auto& result = results.back(); | 2350 | | | 2351 | 25 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 25 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 25 | if ( options.disableTests == false ) { | 2369 | 25 | tests::test(op, result.second); | 2370 | 25 | } | 2371 | | | 2372 | 25 | postprocess(module, op, result); | 2373 | 25 | } | 2374 | | | 2375 | 29 | if ( options.noCompare == false ) { | 2376 | 9 | compare(operations, results, data, size); | 2377 | 9 | } | 2378 | 29 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 33 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 33 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 33 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 297 | do { | 2264 | 297 | auto op = getOp(&parentDs, data, size); | 2265 | 297 | auto module = getModule(parentDs); | 2266 | 297 | if ( module == nullptr ) { | 2267 | 245 | continue; | 2268 | 245 | } | 2269 | | | 2270 | 52 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 52 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 296 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 33 | if ( operations.empty() == true ) { | 2279 | 4 | return; | 2280 | 4 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 29 | #if 1 | 2284 | 29 | { | 2285 | 29 | std::set<uint64_t> moduleIDs; | 2286 | 29 | for (const auto& m : modules ) { | 2287 | 8 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 8 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 8 | moduleIDs.insert(moduleID); | 2295 | 8 | } | 2296 | | | 2297 | 29 | std::set<uint64_t> operationModuleIDs; | 2298 | 29 | for (const auto& op : operations) { | 2299 | 23 | operationModuleIDs.insert(op.first->ID); | 2300 | 23 | } | 2301 | | | 2302 | 29 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 29 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 29 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 29 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 29 | } | 2310 | 29 | #endif | 2311 | | | 2312 | 29 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 29 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 52 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 23 | auto& operation = operations[i]; | 2321 | | | 2322 | 23 | auto& module = operation.first; | 2323 | 23 | auto& op = operation.second; | 2324 | | | 2325 | 23 | if ( i > 0 ) { | 2326 | 15 | auto& prevModule = operations[i-1].first; | 2327 | 15 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 15 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 15 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 15 | if ( curModifier.size() == 0 ) { | 2332 | 4.61k | for (size_t j = 0; j < 512; j++) { | 2333 | 4.60k | curModifier.push_back(1); | 2334 | 4.60k | } | 2335 | 9 | } else { | 2336 | 58 | for (auto& c : curModifier) { | 2337 | 58 | c++; | 2338 | 58 | } | 2339 | 6 | } | 2340 | 15 | } | 2341 | 15 | } | 2342 | | | 2343 | 23 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 23 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 23 | const auto& result = results.back(); | 2350 | | | 2351 | 23 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 23 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 23 | if ( options.disableTests == false ) { | 2369 | 23 | tests::test(op, result.second); | 2370 | 23 | } | 2371 | | | 2372 | 23 | postprocess(module, op, result); | 2373 | 23 | } | 2374 | | | 2375 | 29 | if ( options.noCompare == false ) { | 2376 | 8 | compare(operations, results, data, size); | 2377 | 8 | } | 2378 | 29 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 32 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 32 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 32 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 190 | do { | 2264 | 190 | auto op = getOp(&parentDs, data, size); | 2265 | 190 | auto module = getModule(parentDs); | 2266 | 190 | if ( module == nullptr ) { | 2267 | 149 | continue; | 2268 | 149 | } | 2269 | | | 2270 | 41 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 41 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 189 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 32 | if ( operations.empty() == true ) { | 2279 | 5 | return; | 2280 | 5 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 27 | #if 1 | 2284 | 27 | { | 2285 | 27 | std::set<uint64_t> moduleIDs; | 2286 | 27 | for (const auto& m : modules ) { | 2287 | 3 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 3 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 3 | moduleIDs.insert(moduleID); | 2295 | 3 | } | 2296 | | | 2297 | 27 | std::set<uint64_t> operationModuleIDs; | 2298 | 27 | for (const auto& op : operations) { | 2299 | 7 | operationModuleIDs.insert(op.first->ID); | 2300 | 7 | } | 2301 | | | 2302 | 27 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 27 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 27 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 27 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 27 | } | 2310 | 27 | #endif | 2311 | | | 2312 | 27 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 27 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 34 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 7 | auto& operation = operations[i]; | 2321 | | | 2322 | 7 | auto& module = operation.first; | 2323 | 7 | auto& op = operation.second; | 2324 | | | 2325 | 7 | if ( i > 0 ) { | 2326 | 4 | auto& prevModule = operations[i-1].first; | 2327 | 4 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 4 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 4 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 4 | if ( curModifier.size() == 0 ) { | 2332 | 0 | for (size_t j = 0; j < 512; j++) { | 2333 | 0 | curModifier.push_back(1); | 2334 | 0 | } | 2335 | 4 | } else { | 2336 | 8 | for (auto& c : curModifier) { | 2337 | 8 | c++; | 2338 | 8 | } | 2339 | 4 | } | 2340 | 4 | } | 2341 | 4 | } | 2342 | | | 2343 | 7 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 7 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 7 | const auto& result = results.back(); | 2350 | | | 2351 | 7 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 7 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 7 | if ( options.disableTests == false ) { | 2369 | 7 | tests::test(op, result.second); | 2370 | 7 | } | 2371 | | | 2372 | 7 | postprocess(module, op, result); | 2373 | 7 | } | 2374 | | | 2375 | 27 | if ( options.noCompare == false ) { | 2376 | 3 | compare(operations, results, data, size); | 2377 | 3 | } | 2378 | 27 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 34 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 34 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 34 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 620 | do { | 2264 | 620 | auto op = getOp(&parentDs, data, size); | 2265 | 620 | auto module = getModule(parentDs); | 2266 | 620 | if ( module == nullptr ) { | 2267 | 568 | continue; | 2268 | 568 | } | 2269 | | | 2270 | 52 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 52 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 620 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 34 | if ( operations.empty() == true ) { | 2279 | 4 | return; | 2280 | 4 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 30 | #if 1 | 2284 | 30 | { | 2285 | 30 | std::set<uint64_t> moduleIDs; | 2286 | 30 | for (const auto& m : modules ) { | 2287 | 16 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 16 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 16 | moduleIDs.insert(moduleID); | 2295 | 16 | } | 2296 | | | 2297 | 30 | std::set<uint64_t> operationModuleIDs; | 2298 | 41 | for (const auto& op : operations) { | 2299 | 41 | operationModuleIDs.insert(op.first->ID); | 2300 | 41 | } | 2301 | | | 2302 | 30 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 30 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 30 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 30 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 30 | } | 2310 | 30 | #endif | 2311 | | | 2312 | 30 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 30 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 71 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 41 | auto& operation = operations[i]; | 2321 | | | 2322 | 41 | auto& module = operation.first; | 2323 | 41 | auto& op = operation.second; | 2324 | | | 2325 | 41 | if ( i > 0 ) { | 2326 | 25 | auto& prevModule = operations[i-1].first; | 2327 | 25 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 25 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 25 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 25 | if ( curModifier.size() == 0 ) { | 2332 | 7.69k | for (size_t j = 0; j < 512; j++) { | 2333 | 7.68k | curModifier.push_back(1); | 2334 | 7.68k | } | 2335 | 15 | } else { | 2336 | 37 | for (auto& c : curModifier) { | 2337 | 37 | c++; | 2338 | 37 | } | 2339 | 10 | } | 2340 | 25 | } | 2341 | 25 | } | 2342 | | | 2343 | 41 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 41 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 41 | const auto& result = results.back(); | 2350 | | | 2351 | 41 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 41 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 41 | if ( options.disableTests == false ) { | 2369 | 41 | tests::test(op, result.second); | 2370 | 41 | } | 2371 | | | 2372 | 41 | postprocess(module, op, result); | 2373 | 41 | } | 2374 | | | 2375 | 30 | if ( options.noCompare == false ) { | 2376 | 16 | compare(operations, results, data, size); | 2377 | 16 | } | 2378 | 30 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 26 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 26 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 26 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 633 | do { | 2264 | 633 | auto op = getOp(&parentDs, data, size); | 2265 | 633 | auto module = getModule(parentDs); | 2266 | 633 | if ( module == nullptr ) { | 2267 | 590 | continue; | 2268 | 590 | } | 2269 | | | 2270 | 43 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 43 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 2 | break; | 2275 | 2 | } | 2276 | 631 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 26 | if ( operations.empty() == true ) { | 2279 | 3 | return; | 2280 | 3 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 23 | #if 1 | 2284 | 23 | { | 2285 | 23 | std::set<uint64_t> moduleIDs; | 2286 | 23 | for (const auto& m : modules ) { | 2287 | 6 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 6 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 6 | moduleIDs.insert(moduleID); | 2295 | 6 | } | 2296 | | | 2297 | 23 | std::set<uint64_t> operationModuleIDs; | 2298 | 23 | for (const auto& op : operations) { | 2299 | 18 | operationModuleIDs.insert(op.first->ID); | 2300 | 18 | } | 2301 | | | 2302 | 23 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 23 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 23 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 23 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 23 | } | 2310 | 23 | #endif | 2311 | | | 2312 | 23 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 23 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 41 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 18 | auto& operation = operations[i]; | 2321 | | | 2322 | 18 | auto& module = operation.first; | 2323 | 18 | auto& op = operation.second; | 2324 | | | 2325 | 18 | if ( i > 0 ) { | 2326 | 12 | auto& prevModule = operations[i-1].first; | 2327 | 12 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 12 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 12 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 12 | if ( curModifier.size() == 0 ) { | 2332 | 1.53k | for (size_t j = 0; j < 512; j++) { | 2333 | 1.53k | curModifier.push_back(1); | 2334 | 1.53k | } | 2335 | 9 | } else { | 2336 | 44 | for (auto& c : curModifier) { | 2337 | 44 | c++; | 2338 | 44 | } | 2339 | 9 | } | 2340 | 12 | } | 2341 | 12 | } | 2342 | | | 2343 | 18 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 18 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 18 | const auto& result = results.back(); | 2350 | | | 2351 | 18 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 18 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 18 | if ( options.disableTests == false ) { | 2369 | 18 | tests::test(op, result.second); | 2370 | 18 | } | 2371 | | | 2372 | 18 | postprocess(module, op, result); | 2373 | 18 | } | 2374 | | | 2375 | 23 | if ( options.noCompare == false ) { | 2376 | 6 | compare(operations, results, data, size); | 2377 | 6 | } | 2378 | 23 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 27 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 27 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 27 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 125 | do { | 2264 | 125 | auto op = getOp(&parentDs, data, size); | 2265 | 125 | auto module = getModule(parentDs); | 2266 | 125 | if ( module == nullptr ) { | 2267 | 96 | continue; | 2268 | 96 | } | 2269 | | | 2270 | 29 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 29 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 125 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 27 | if ( operations.empty() == true ) { | 2279 | 2 | return; | 2280 | 2 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 25 | #if 1 | 2284 | 25 | { | 2285 | 25 | std::set<uint64_t> moduleIDs; | 2286 | 25 | for (const auto& m : modules ) { | 2287 | 13 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 13 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 13 | moduleIDs.insert(moduleID); | 2295 | 13 | } | 2296 | | | 2297 | 25 | std::set<uint64_t> operationModuleIDs; | 2298 | 25 | for (const auto& op : operations) { | 2299 | 19 | operationModuleIDs.insert(op.first->ID); | 2300 | 19 | } | 2301 | | | 2302 | 25 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 25 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 25 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 25 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 25 | } | 2310 | 25 | #endif | 2311 | | | 2312 | 25 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 25 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 44 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 19 | auto& operation = operations[i]; | 2321 | | | 2322 | 19 | auto& module = operation.first; | 2323 | 19 | auto& op = operation.second; | 2324 | | | 2325 | 19 | if ( i > 0 ) { | 2326 | 6 | auto& prevModule = operations[i-1].first; | 2327 | 6 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 6 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 6 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 6 | if ( curModifier.size() == 0 ) { | 2332 | 1.53k | for (size_t j = 0; j < 512; j++) { | 2333 | 1.53k | curModifier.push_back(1); | 2334 | 1.53k | } | 2335 | 3 | } else { | 2336 | 214 | for (auto& c : curModifier) { | 2337 | 214 | c++; | 2338 | 214 | } | 2339 | 3 | } | 2340 | 6 | } | 2341 | 6 | } | 2342 | | | 2343 | 19 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 19 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 19 | const auto& result = results.back(); | 2350 | | | 2351 | 19 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 19 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 19 | if ( options.disableTests == false ) { | 2369 | 19 | tests::test(op, result.second); | 2370 | 19 | } | 2371 | | | 2372 | 19 | postprocess(module, op, result); | 2373 | 19 | } | 2374 | | | 2375 | 25 | if ( options.noCompare == false ) { | 2376 | 13 | compare(operations, results, data, size); | 2377 | 13 | } | 2378 | 25 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 27 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 27 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 27 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 117 | do { | 2264 | 117 | auto op = getOp(&parentDs, data, size); | 2265 | 117 | auto module = getModule(parentDs); | 2266 | 117 | if ( module == nullptr ) { | 2267 | 81 | continue; | 2268 | 81 | } | 2269 | | | 2270 | 36 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 36 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 116 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 27 | if ( operations.empty() == true ) { | 2279 | 4 | return; | 2280 | 4 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 23 | #if 1 | 2284 | 23 | { | 2285 | 23 | std::set<uint64_t> moduleIDs; | 2286 | 23 | for (const auto& m : modules ) { | 2287 | 7 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 7 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 7 | moduleIDs.insert(moduleID); | 2295 | 7 | } | 2296 | | | 2297 | 23 | std::set<uint64_t> operationModuleIDs; | 2298 | 23 | for (const auto& op : operations) { | 2299 | 19 | operationModuleIDs.insert(op.first->ID); | 2300 | 19 | } | 2301 | | | 2302 | 23 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 23 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 23 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 23 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 23 | } | 2310 | 23 | #endif | 2311 | | | 2312 | 23 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 23 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 42 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 19 | auto& operation = operations[i]; | 2321 | | | 2322 | 19 | auto& module = operation.first; | 2323 | 19 | auto& op = operation.second; | 2324 | | | 2325 | 19 | if ( i > 0 ) { | 2326 | 12 | auto& prevModule = operations[i-1].first; | 2327 | 12 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 12 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 12 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 12 | if ( curModifier.size() == 0 ) { | 2332 | 3.07k | for (size_t j = 0; j < 512; j++) { | 2333 | 3.07k | curModifier.push_back(1); | 2334 | 3.07k | } | 2335 | 6 | } else { | 2336 | 6 | for (auto& c : curModifier) { | 2337 | 6 | c++; | 2338 | 6 | } | 2339 | 6 | } | 2340 | 12 | } | 2341 | 12 | } | 2342 | | | 2343 | 19 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 19 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 19 | const auto& result = results.back(); | 2350 | | | 2351 | 19 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 19 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 19 | if ( options.disableTests == false ) { | 2369 | 19 | tests::test(op, result.second); | 2370 | 19 | } | 2371 | | | 2372 | 19 | postprocess(module, op, result); | 2373 | 19 | } | 2374 | | | 2375 | 23 | if ( options.noCompare == false ) { | 2376 | 7 | compare(operations, results, data, size); | 2377 | 7 | } | 2378 | 23 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 44 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 44 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 44 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 212 | do { | 2264 | 212 | auto op = getOp(&parentDs, data, size); | 2265 | 212 | auto module = getModule(parentDs); | 2266 | 212 | if ( module == nullptr ) { | 2267 | 138 | continue; | 2268 | 138 | } | 2269 | | | 2270 | 74 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 74 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 211 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 44 | if ( operations.empty() == true ) { | 2279 | 1 | return; | 2280 | 1 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 43 | #if 1 | 2284 | 43 | { | 2285 | 43 | std::set<uint64_t> moduleIDs; | 2286 | 43 | for (const auto& m : modules ) { | 2287 | 21 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 21 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 21 | moduleIDs.insert(moduleID); | 2295 | 21 | } | 2296 | | | 2297 | 43 | std::set<uint64_t> operationModuleIDs; | 2298 | 50 | for (const auto& op : operations) { | 2299 | 50 | operationModuleIDs.insert(op.first->ID); | 2300 | 50 | } | 2301 | | | 2302 | 43 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 43 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 43 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 43 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 43 | } | 2310 | 43 | #endif | 2311 | | | 2312 | 43 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 43 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 93 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 50 | auto& operation = operations[i]; | 2321 | | | 2322 | 50 | auto& module = operation.first; | 2323 | 50 | auto& op = operation.second; | 2324 | | | 2325 | 50 | if ( i > 0 ) { | 2326 | 29 | auto& prevModule = operations[i-1].first; | 2327 | 29 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 29 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 29 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 29 | if ( curModifier.size() == 0 ) { | 2332 | 2.56k | for (size_t j = 0; j < 512; j++) { | 2333 | 2.56k | curModifier.push_back(1); | 2334 | 2.56k | } | 2335 | 24 | } else { | 2336 | 154 | for (auto& c : curModifier) { | 2337 | 154 | c++; | 2338 | 154 | } | 2339 | 24 | } | 2340 | 29 | } | 2341 | 29 | } | 2342 | | | 2343 | 50 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 50 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 50 | const auto& result = results.back(); | 2350 | | | 2351 | 50 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 50 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 50 | if ( options.disableTests == false ) { | 2369 | 50 | tests::test(op, result.second); | 2370 | 50 | } | 2371 | | | 2372 | 50 | postprocess(module, op, result); | 2373 | 50 | } | 2374 | | | 2375 | 43 | if ( options.noCompare == false ) { | 2376 | 21 | compare(operations, results, data, size); | 2377 | 21 | } | 2378 | 43 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 33 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 33 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 33 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 420 | do { | 2264 | 420 | auto op = getOp(&parentDs, data, size); | 2265 | 420 | auto module = getModule(parentDs); | 2266 | 420 | if ( module == nullptr ) { | 2267 | 366 | continue; | 2268 | 366 | } | 2269 | | | 2270 | 54 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 54 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 420 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 33 | if ( operations.empty() == true ) { | 2279 | 0 | return; | 2280 | 0 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 33 | #if 1 | 2284 | 33 | { | 2285 | 33 | std::set<uint64_t> moduleIDs; | 2286 | 33 | for (const auto& m : modules ) { | 2287 | 21 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 21 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 21 | moduleIDs.insert(moduleID); | 2295 | 21 | } | 2296 | | | 2297 | 33 | std::set<uint64_t> operationModuleIDs; | 2298 | 35 | for (const auto& op : operations) { | 2299 | 35 | operationModuleIDs.insert(op.first->ID); | 2300 | 35 | } | 2301 | | | 2302 | 33 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 33 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 33 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 33 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 33 | } | 2310 | 33 | #endif | 2311 | | | 2312 | 33 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 33 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 68 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 35 | auto& operation = operations[i]; | 2321 | | | 2322 | 35 | auto& module = operation.first; | 2323 | 35 | auto& op = operation.second; | 2324 | | | 2325 | 35 | if ( i > 0 ) { | 2326 | 14 | auto& prevModule = operations[i-1].first; | 2327 | 14 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 14 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 14 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 14 | if ( curModifier.size() == 0 ) { | 2332 | 5.64k | for (size_t j = 0; j < 512; j++) { | 2333 | 5.63k | curModifier.push_back(1); | 2334 | 5.63k | } | 2335 | 11 | } else { | 2336 | 47 | for (auto& c : curModifier) { | 2337 | 47 | c++; | 2338 | 47 | } | 2339 | 3 | } | 2340 | 14 | } | 2341 | 14 | } | 2342 | | | 2343 | 35 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 35 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 35 | const auto& result = results.back(); | 2350 | | | 2351 | 35 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 35 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 35 | if ( options.disableTests == false ) { | 2369 | 35 | tests::test(op, result.second); | 2370 | 35 | } | 2371 | | | 2372 | 35 | postprocess(module, op, result); | 2373 | 35 | } | 2374 | | | 2375 | 33 | if ( options.noCompare == false ) { | 2376 | 21 | compare(operations, results, data, size); | 2377 | 21 | } | 2378 | 33 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 43 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 43 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 43 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 678 | do { | 2264 | 678 | auto op = getOp(&parentDs, data, size); | 2265 | 678 | auto module = getModule(parentDs); | 2266 | 678 | if ( module == nullptr ) { | 2267 | 617 | continue; | 2268 | 617 | } | 2269 | | | 2270 | 61 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 61 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 2 | break; | 2275 | 2 | } | 2276 | 676 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 43 | if ( operations.empty() == true ) { | 2279 | 1 | return; | 2280 | 1 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 42 | #if 1 | 2284 | 42 | { | 2285 | 42 | std::set<uint64_t> moduleIDs; | 2286 | 42 | for (const auto& m : modules ) { | 2287 | 11 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 11 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 11 | moduleIDs.insert(moduleID); | 2295 | 11 | } | 2296 | | | 2297 | 42 | std::set<uint64_t> operationModuleIDs; | 2298 | 42 | for (const auto& op : operations) { | 2299 | 28 | operationModuleIDs.insert(op.first->ID); | 2300 | 28 | } | 2301 | | | 2302 | 42 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 42 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 42 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 42 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 42 | } | 2310 | 42 | #endif | 2311 | | | 2312 | 42 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 42 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 70 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 28 | auto& operation = operations[i]; | 2321 | | | 2322 | 28 | auto& module = operation.first; | 2323 | 28 | auto& op = operation.second; | 2324 | | | 2325 | 28 | if ( i > 0 ) { | 2326 | 17 | auto& prevModule = operations[i-1].first; | 2327 | 17 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 17 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 17 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 17 | if ( curModifier.size() == 0 ) { | 2332 | 2.56k | for (size_t j = 0; j < 512; j++) { | 2333 | 2.56k | curModifier.push_back(1); | 2334 | 2.56k | } | 2335 | 12 | } else { | 2336 | 237 | for (auto& c : curModifier) { | 2337 | 237 | c++; | 2338 | 237 | } | 2339 | 12 | } | 2340 | 17 | } | 2341 | 17 | } | 2342 | | | 2343 | 28 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 28 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 28 | const auto& result = results.back(); | 2350 | | | 2351 | 28 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 28 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 28 | if ( options.disableTests == false ) { | 2369 | 28 | tests::test(op, result.second); | 2370 | 28 | } | 2371 | | | 2372 | 28 | postprocess(module, op, result); | 2373 | 28 | } | 2374 | | | 2375 | 42 | if ( options.noCompare == false ) { | 2376 | 11 | compare(operations, results, data, size); | 2377 | 11 | } | 2378 | 42 | } |
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 25 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 25 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 25 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 447 | do { | 2264 | 447 | auto op = getOp(&parentDs, data, size); | 2265 | 447 | auto module = getModule(parentDs); | 2266 | 447 | if ( module == nullptr ) { | 2267 | 411 | continue; | 2268 | 411 | } | 2269 | | | 2270 | 36 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 36 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 0 | break; | 2275 | 0 | } | 2276 | 447 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 25 | if ( operations.empty() == true ) { | 2279 | 3 | return; | 2280 | 3 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 22 | #if 1 | 2284 | 22 | { | 2285 | 22 | std::set<uint64_t> moduleIDs; | 2286 | 22 | for (const auto& m : modules ) { | 2287 | 6 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 6 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 6 | moduleIDs.insert(moduleID); | 2295 | 6 | } | 2296 | | | 2297 | 22 | std::set<uint64_t> operationModuleIDs; | 2298 | 22 | for (const auto& op : operations) { | 2299 | 9 | operationModuleIDs.insert(op.first->ID); | 2300 | 9 | } | 2301 | | | 2302 | 22 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 22 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 22 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 22 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 22 | } | 2310 | 22 | #endif | 2311 | | | 2312 | 22 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 22 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 31 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 9 | auto& operation = operations[i]; | 2321 | | | 2322 | 9 | auto& module = operation.first; | 2323 | 9 | auto& op = operation.second; | 2324 | | | 2325 | 9 | if ( i > 0 ) { | 2326 | 3 | auto& prevModule = operations[i-1].first; | 2327 | 3 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 3 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 3 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 3 | if ( curModifier.size() == 0 ) { | 2332 | 513 | for (size_t j = 0; j < 512; j++) { | 2333 | 512 | curModifier.push_back(1); | 2334 | 512 | } | 2335 | 2 | } else { | 2336 | 35 | for (auto& c : curModifier) { | 2337 | 35 | c++; | 2338 | 35 | } | 2339 | 2 | } | 2340 | 3 | } | 2341 | 3 | } | 2342 | | | 2343 | 9 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 9 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 9 | const auto& result = results.back(); | 2350 | | | 2351 | 9 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 9 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 9 | if ( options.disableTests == false ) { | 2369 | 9 | tests::test(op, result.second); | 2370 | 9 | } | 2371 | | | 2372 | 9 | postprocess(module, op, result); | 2373 | 9 | } | 2374 | | | 2375 | 22 | if ( options.noCompare == false ) { | 2376 | 6 | compare(operations, results, data, size); | 2377 | 6 | } | 2378 | 22 | } |
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 23 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 23 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 23 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 153 | do { | 2264 | 153 | auto op = getOp(&parentDs, data, size); | 2265 | 153 | auto module = getModule(parentDs); | 2266 | 153 | if ( module == nullptr ) { | 2267 | 118 | continue; | 2268 | 118 | } | 2269 | | | 2270 | 35 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 35 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 2 | break; | 2275 | 2 | } | 2276 | 151 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 23 | if ( operations.empty() == true ) { | 2279 | 5 | return; | 2280 | 5 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 18 | #if 1 | 2284 | 18 | { | 2285 | 18 | std::set<uint64_t> moduleIDs; | 2286 | 18 | for (const auto& m : modules ) { | 2287 | 3 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 3 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 3 | moduleIDs.insert(moduleID); | 2295 | 3 | } | 2296 | | | 2297 | 18 | std::set<uint64_t> operationModuleIDs; | 2298 | 18 | for (const auto& op : operations) { | 2299 | 14 | operationModuleIDs.insert(op.first->ID); | 2300 | 14 | } | 2301 | | | 2302 | 18 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 18 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 18 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 18 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 18 | } | 2310 | 18 | #endif | 2311 | | | 2312 | 18 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 18 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 32 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 14 | auto& operation = operations[i]; | 2321 | | | 2322 | 14 | auto& module = operation.first; | 2323 | 14 | auto& op = operation.second; | 2324 | | | 2325 | 14 | if ( i > 0 ) { | 2326 | 11 | auto& prevModule = operations[i-1].first; | 2327 | 11 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 11 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 11 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 11 | if ( curModifier.size() == 0 ) { | 2332 | 3.59k | for (size_t j = 0; j < 512; j++) { | 2333 | 3.58k | curModifier.push_back(1); | 2334 | 3.58k | } | 2335 | 7 | } else { | 2336 | 5 | for (auto& c : curModifier) { | 2337 | 5 | c++; | 2338 | 5 | } | 2339 | 4 | } | 2340 | 11 | } | 2341 | 11 | } | 2342 | | | 2343 | 14 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 14 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 14 | const auto& result = results.back(); | 2350 | | | 2351 | 14 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 14 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 14 | if ( options.disableTests == false ) { | 2369 | 14 | tests::test(op, result.second); | 2370 | 14 | } | 2371 | | | 2372 | 14 | postprocess(module, op, result); | 2373 | 14 | } | 2374 | | | 2375 | 18 | if ( options.noCompare == false ) { | 2376 | 3 | compare(operations, results, data, size); | 2377 | 3 | } | 2378 | 18 | } |
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const Line | Count | Source | 2258 | 33 | void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const { | 2259 | 33 | typename ExecutorBase<ResultType, OperationType>::ResultSet results; | 2260 | | | 2261 | 33 | std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations; | 2262 | | | 2263 | 248 | do { | 2264 | 248 | auto op = getOp(&parentDs, data, size); | 2265 | 248 | auto module = getModule(parentDs); | 2266 | 248 | if ( module == nullptr ) { | 2267 | 208 | continue; | 2268 | 208 | } | 2269 | | | 2270 | 40 | operations.push_back( {module, op} ); | 2271 | | | 2272 | | /* Limit number of operations per run to prevent time-outs */ | 2273 | 40 | if ( operations.size() == OperationType::MaxOperations() ) { | 2274 | 1 | break; | 2275 | 1 | } | 2276 | 247 | } while ( parentDs.Get<bool>() == true ); | 2277 | | | 2278 | 33 | if ( operations.empty() == true ) { | 2279 | 7 | return; | 2280 | 7 | } | 2281 | | | 2282 | | /* Enable this to run every operation on every loaded module */ | 2283 | 26 | #if 1 | 2284 | 26 | { | 2285 | 26 | std::set<uint64_t> moduleIDs; | 2286 | 26 | for (const auto& m : modules ) { | 2287 | 4 | const auto moduleID = m.first; | 2288 | | | 2289 | | /* Skip if this is a disabled module */ | 2290 | 4 | if ( options.disableModules.HaveExplicit(moduleID) ) { | 2291 | 0 | continue; | 2292 | 0 | } | 2293 | | | 2294 | 4 | moduleIDs.insert(moduleID); | 2295 | 4 | } | 2296 | | | 2297 | 26 | std::set<uint64_t> operationModuleIDs; | 2298 | 26 | for (const auto& op : operations) { | 2299 | 11 | operationModuleIDs.insert(op.first->ID); | 2300 | 11 | } | 2301 | | | 2302 | 26 | std::vector<uint64_t> addModuleIDs(moduleIDs.size()); | 2303 | 26 | auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin()); | 2304 | 26 | addModuleIDs.resize(it - addModuleIDs.begin()); | 2305 | | | 2306 | 26 | for (const auto& id : addModuleIDs) { | 2307 | 0 | operations.push_back({ modules.at(id), operations[0].second}); | 2308 | 0 | } | 2309 | 26 | } | 2310 | 26 | #endif | 2311 | | | 2312 | 26 | if ( operations.size() < options.minModules ) { | 2313 | 0 | return; | 2314 | 0 | } | 2315 | | | 2316 | 26 | if ( options.debug == true && !operations.empty() ) { | 2317 | 0 | printf("Running:\n%s\n", operations[0].second.ToString().c_str()); | 2318 | 0 | } | 2319 | 37 | for (size_t i = 0; i < operations.size(); i++) { | 2320 | 11 | auto& operation = operations[i]; | 2321 | | | 2322 | 11 | auto& module = operation.first; | 2323 | 11 | auto& op = operation.second; | 2324 | | | 2325 | 11 | if ( i > 0 ) { | 2326 | 7 | auto& prevModule = operations[i-1].first; | 2327 | 7 | auto& prevOp = operations[i].second; | 2328 | | | 2329 | 7 | if ( prevModule == module && prevOp.modifier == op.modifier ) { | 2330 | 7 | auto& curModifier = op.modifier.GetVectorPtr(); | 2331 | 7 | if ( curModifier.size() == 0 ) { | 2332 | 2.05k | for (size_t j = 0; j < 512; j++) { | 2333 | 2.04k | curModifier.push_back(1); | 2334 | 2.04k | } | 2335 | 4 | } else { | 2336 | 14 | for (auto& c : curModifier) { | 2337 | 14 | c++; | 2338 | 14 | } | 2339 | 3 | } | 2340 | 7 | } | 2341 | 7 | } | 2342 | | | 2343 | 11 | if ( options.debug == true ) { | 2344 | 0 | printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str()); | 2345 | 0 | } | 2346 | | | 2347 | 11 | results.push_back( {module, std::move(callModule(module, op))} ); | 2348 | | | 2349 | 11 | const auto& result = results.back(); | 2350 | | | 2351 | 11 | if ( result.second != std::nullopt ) { | 2352 | 0 | if ( options.jsonDumpFP != std::nullopt ) { | 2353 | 0 | nlohmann::json j; | 2354 | 0 | j["operation"] = op.ToJSON(); | 2355 | 0 | j["result"] = util::ToJSON(*result.second); | 2356 | 0 | fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str()); | 2357 | 0 | } | 2358 | 0 | } | 2359 | | | 2360 | 11 | if ( options.debug == true ) { | 2361 | 0 | printf("Module %s result:\n\n%s\n\n", | 2362 | 0 | result.first->name.c_str(), | 2363 | 0 | result.second == std::nullopt ? | 2364 | 0 | "(empty)" : | 2365 | 0 | util::ToString(*result.second).c_str()); | 2366 | 0 | } | 2367 | | | 2368 | 11 | if ( options.disableTests == false ) { | 2369 | 11 | tests::test(op, result.second); | 2370 | 11 | } | 2371 | | | 2372 | 11 | postprocess(module, op, result); | 2373 | 11 | } | 2374 | | | 2375 | 26 | if ( options.noCompare == false ) { | 2376 | 4 | compare(operations, results, data, size); | 2377 | 4 | } | 2378 | 26 | } |
|
2379 | | |
2380 | | /* Explicit template instantiation */ |
2381 | | template class ExecutorBase<component::Digest, operation::Digest>; |
2382 | | template class ExecutorBase<component::MAC, operation::HMAC>; |
2383 | | template class ExecutorBase<component::MAC, operation::UMAC>; |
2384 | | template class ExecutorBase<component::MAC, operation::CMAC>; |
2385 | | template class ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>; |
2386 | | template class ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>; |
2387 | | template class ExecutorBase<component::Key, operation::KDF_SCRYPT>; |
2388 | | template class ExecutorBase<component::Key, operation::KDF_HKDF>; |
2389 | | template class ExecutorBase<component::Key, operation::KDF_TLS1_PRF>; |
2390 | | template class ExecutorBase<component::Key, operation::KDF_PBKDF>; |
2391 | | template class ExecutorBase<component::Key, operation::KDF_PBKDF1>; |
2392 | | template class ExecutorBase<component::Key, operation::KDF_PBKDF2>; |
2393 | | template class ExecutorBase<component::Key, operation::KDF_ARGON2>; |
2394 | | template class ExecutorBase<component::Key, operation::KDF_SSH>; |
2395 | | template class ExecutorBase<component::Key, operation::KDF_X963>; |
2396 | | template class ExecutorBase<component::Key, operation::KDF_BCRYPT>; |
2397 | | template class ExecutorBase<component::Key, operation::KDF_SP_800_108>; |
2398 | | template class ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>; |
2399 | | template class ExecutorBase<bool, operation::ECC_ValidatePubkey>; |
2400 | | template class ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>; |
2401 | | template class ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>; |
2402 | | template class ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>; |
2403 | | template class ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>; |
2404 | | template class ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>; |
2405 | | template class ExecutorBase<bool, operation::ECDSA_Verify>; |
2406 | | template class ExecutorBase<bool, operation::ECGDSA_Verify>; |
2407 | | template class ExecutorBase<bool, operation::ECRDSA_Verify>; |
2408 | | template class ExecutorBase<bool, operation::Schnorr_Verify>; |
2409 | | template class ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>; |
2410 | | template class ExecutorBase<component::Secret, operation::ECDH_Derive>; |
2411 | | template class ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>; |
2412 | | template class ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>; |
2413 | | template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>; |
2414 | | template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>; |
2415 | | template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>; |
2416 | | template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>; |
2417 | | template class ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>; |
2418 | | template class ExecutorBase<component::Bignum, operation::DH_Derive>; |
2419 | | template class ExecutorBase<component::Bignum, operation::BignumCalc>; |
2420 | | template class ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>; |
2421 | | template class ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>; |
2422 | | template class ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>; |
2423 | | template class ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>; |
2424 | | template class ExecutorBase<component::BLS_Signature, operation::BLS_Sign>; |
2425 | | template class ExecutorBase<bool, operation::BLS_Verify>; |
2426 | | template class ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>; |
2427 | | template class ExecutorBase<bool, operation::BLS_BatchVerify>; |
2428 | | template class ExecutorBase<component::G1, operation::BLS_Aggregate_G1>; |
2429 | | template class ExecutorBase<component::G2, operation::BLS_Aggregate_G2>; |
2430 | | template class ExecutorBase<component::Fp12, operation::BLS_Pairing>; |
2431 | | template class ExecutorBase<component::Fp12, operation::BLS_MillerLoop>; |
2432 | | template class ExecutorBase<component::Fp12, operation::BLS_FinalExp>; |
2433 | | template class ExecutorBase<component::G1, operation::BLS_HashToG1>; |
2434 | | template class ExecutorBase<component::G2, operation::BLS_HashToG2>; |
2435 | | template class ExecutorBase<component::G1, operation::BLS_MapToG1>; |
2436 | | template class ExecutorBase<component::G2, operation::BLS_MapToG2>; |
2437 | | template class ExecutorBase<bool, operation::BLS_IsG1OnCurve>; |
2438 | | template class ExecutorBase<bool, operation::BLS_IsG2OnCurve>; |
2439 | | template class ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>; |
2440 | | template class ExecutorBase<component::G1, operation::BLS_Decompress_G1>; |
2441 | | template class ExecutorBase<component::Bignum, operation::BLS_Compress_G1>; |
2442 | | template class ExecutorBase<component::G2, operation::BLS_Decompress_G2>; |
2443 | | template class ExecutorBase<component::G1, operation::BLS_Compress_G2>; |
2444 | | template class ExecutorBase<component::G1, operation::BLS_G1_Add>; |
2445 | | template class ExecutorBase<component::G1, operation::BLS_G1_Mul>; |
2446 | | template class ExecutorBase<bool, operation::BLS_G1_IsEq>; |
2447 | | template class ExecutorBase<component::G1, operation::BLS_G1_Neg>; |
2448 | | template class ExecutorBase<component::G2, operation::BLS_G2_Add>; |
2449 | | template class ExecutorBase<component::G2, operation::BLS_G2_Mul>; |
2450 | | template class ExecutorBase<bool, operation::BLS_G2_IsEq>; |
2451 | | template class ExecutorBase<component::G2, operation::BLS_G2_Neg>; |
2452 | | template class ExecutorBase<Buffer, operation::Misc>; |
2453 | | template class ExecutorBase<bool, operation::SR25519_Verify>; |
2454 | | |
2455 | | } /* namespace cryptofuzz */ |