Coverage Report

Created: 2026-08-15 06:21

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/cryptofuzz-sp-math-all-8bit/executor.cpp
Line
Count
Source
1
#include "executor.h"
2
#include "tests.h"
3
#include "mutatorpool.h"
4
#include "config.h"
5
#include <cryptofuzz/util.h>
6
#include <fuzzing/memory.hpp>
7
#include <algorithm>
8
#include <set>
9
#include <boost/multiprecision/cpp_int.hpp>
10
11
uint32_t PRNG(void);
12
13
99.5k
#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
434
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
434
    (void)module;
53
434
    (void)op;
54
55
434
    if ( result.second != std::nullopt ) {
56
366
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
366
    }
58
434
}
59
60
434
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
434
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
434
    return module->OpDigest(op);
64
434
}
65
66
/* Specialization for operation::HMAC */
67
538
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
538
    (void)module;
69
538
    (void)op;
70
71
538
    if ( result.second != std::nullopt ) {
72
323
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
323
    }
74
538
}
75
76
538
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
538
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
538
    return module->OpHMAC(op);
80
538
}
81
82
/* Specialization for operation::UMAC */
83
92
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
92
    (void)module;
85
92
    (void)op;
86
87
92
    if ( result.second != std::nullopt ) {
88
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
0
    }
90
92
}
91
92
92
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
92
    return module->OpUMAC(op);
94
92
}
95
96
/* Specialization for operation::CMAC */
97
319
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
319
    (void)module;
99
319
    (void)op;
100
101
319
    if ( result.second != std::nullopt ) {
102
135
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
135
    }
104
319
}
105
106
319
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
319
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
319
    return module->OpCMAC(op);
110
319
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
1.90k
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
1.90k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
1.90k
    if ( result.second != std::nullopt ) {
119
848
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
848
        if ( result.second->tag != std::nullopt ) {
121
27
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
27
        }
123
848
    }
124
125
1.90k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
821
        using fuzzing::datasource::ID;
127
128
821
        bool tryDecrypt = true;
129
130
821
        if ( module->ID == CF_MODULE("OpenSSL") ) {
131
0
            switch ( op.cipher.cipherType.Get() ) {
132
0
                case    ID("Cryptofuzz/Cipher/AES_128_OCB"):
133
0
                case    ID("Cryptofuzz/Cipher/AES_256_OCB"):
134
0
                    tryDecrypt = false;
135
0
                    break;
136
0
                case    ID("Cryptofuzz/Cipher/AES_128_GCM"):
137
0
                case    ID("Cryptofuzz/Cipher/AES_192_GCM"):
138
0
                case    ID("Cryptofuzz/Cipher/AES_256_GCM"):
139
0
                case    ID("Cryptofuzz/Cipher/AES_128_CCM"):
140
0
                case    ID("Cryptofuzz/Cipher/AES_192_CCM"):
141
0
                case    ID("Cryptofuzz/Cipher/AES_256_CCM"):
142
0
                case    ID("Cryptofuzz/Cipher/ARIA_128_CCM"):
143
0
                case    ID("Cryptofuzz/Cipher/ARIA_192_CCM"):
144
0
                case    ID("Cryptofuzz/Cipher/ARIA_256_CCM"):
145
0
                case    ID("Cryptofuzz/Cipher/ARIA_128_GCM"):
146
0
                case    ID("Cryptofuzz/Cipher/ARIA_192_GCM"):
147
0
                case    ID("Cryptofuzz/Cipher/ARIA_256_GCM"):
148
0
                    if ( op.tagSize == std::nullopt ) {
149
                        /* OpenSSL fails to decrypt its own CCM and GCM ciphertexts if
150
                         * a tag is not included
151
                         */
152
0
                        tryDecrypt = false;
153
0
                    }
154
0
                    break;
155
0
            }
156
0
        }
157
158
821
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
821
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
821
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
821
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
821
                    op.cleartext.GetSize() + 32,
171
172
821
                    op.aad,
173
174
                    /* Empty modifier */
175
821
                    {});
176
177
821
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
821
            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
821
            } 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
821
        }
208
821
    }
209
1.90k
}
210
211
1.90k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
1.90k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
1.90k
    return module->OpSymmetricEncrypt(op);
215
1.90k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
901
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
901
    (void)module;
220
901
    (void)op;
221
222
901
    if ( result.second != std::nullopt ) {
223
227
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
227
    }
225
901
}
226
227
901
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
901
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
901
    return module->OpSymmetricDecrypt(op);
231
901
}
232
233
/* Specialization for operation::KDF_SCRYPT */
234
72
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
72
    (void)module;
236
72
    (void)op;
237
238
72
    if ( result.second != std::nullopt ) {
239
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
240
0
    }
241
72
}
242
243
72
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_SCRYPT& op) const {
244
72
    return module->OpKDF_SCRYPT(op);
245
72
}
246
247
/* Specialization for operation::KDF_HKDF */
248
333
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
333
    (void)module;
250
333
    (void)op;
251
252
333
    if ( result.second != std::nullopt ) {
253
122
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
122
    }
255
333
}
256
257
333
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_HKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_HKDF& op) const {
258
333
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
259
260
333
    return module->OpKDF_HKDF(op);
261
333
}
262
263
/* Specialization for operation::KDF_PBKDF */
264
91
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
91
    (void)module;
266
91
    (void)op;
267
268
91
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
91
}
272
273
91
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
91
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
91
    return module->OpKDF_PBKDF(op);
277
91
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
98
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
98
    (void)module;
282
98
    (void)op;
283
284
98
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
98
}
288
289
98
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
98
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
98
    return module->OpKDF_PBKDF1(op);
293
98
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
280
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
280
    (void)module;
298
280
    (void)op;
299
300
280
    if ( result.second != std::nullopt ) {
301
151
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
151
    }
303
280
}
304
305
280
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
280
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
280
    return module->OpKDF_PBKDF2(op);
309
280
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
2
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
2
    (void)module;
314
2
    (void)op;
315
316
2
    if ( result.second != std::nullopt ) {
317
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
0
    }
319
2
}
320
321
2
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
2
    return module->OpKDF_ARGON2(op);
323
2
}
324
325
/* Specialization for operation::KDF_SSH */
326
90
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
90
    (void)module;
328
90
    (void)op;
329
330
90
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
90
}
334
335
90
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
90
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
90
    return module->OpKDF_SSH(op);
339
90
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
72
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
72
    (void)module;
344
72
    (void)op;
345
346
72
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
72
}
350
351
72
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
72
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
72
    return module->OpKDF_TLS1_PRF(op);
355
72
}
356
357
/* Specialization for operation::KDF_X963 */
358
77
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
77
    (void)module;
360
77
    (void)op;
361
362
77
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
77
}
366
367
77
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
77
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
77
    return module->OpKDF_X963(op);
371
77
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
12
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
12
    (void)module;
376
12
    (void)op;
377
378
12
    if ( result.second != std::nullopt ) {
379
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
0
    }
381
12
}
382
383
12
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
12
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
12
    return module->OpKDF_BCRYPT(op);
387
12
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
108
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
108
    (void)module;
392
108
    (void)op;
393
394
108
    if ( result.second != std::nullopt ) {
395
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
0
    }
397
108
}
398
399
108
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
108
    if ( op.mech.mode == true ) {
401
90
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
90
    }
403
404
108
    return module->OpKDF_SP_800_108(op);
405
108
}
406
407
/* Specialization for operation::KDF_SRTP */
408
56
template<> void ExecutorBase<component::Key3, operation::KDF_SRTP>::postprocess(std::shared_ptr<Module> module, operation::KDF_SRTP& op, const ExecutorBase<component::Key3, operation::KDF_SRTP>::ResultPair& result) const {
409
56
    (void)module;
410
56
    (void)op;
411
56
    (void)result;
412
56
}
413
414
56
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const {
415
56
    return module->OpKDF_SRTP(op);
416
56
}
417
418
/* Specialization for operation::KDF_SRTCP */
419
89
template<> void ExecutorBase<component::Key3, operation::KDF_SRTCP>::postprocess(std::shared_ptr<Module> module, operation::KDF_SRTCP& op, const ExecutorBase<component::Key3, operation::KDF_SRTCP>::ResultPair& result) const {
420
89
    (void)module;
421
89
    (void)op;
422
89
    (void)result;
423
89
}
424
425
89
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const {
426
89
    return module->OpKDF_SRTCP(op);
427
89
}
428
429
/* Specialization for operation::ECC_PrivateToPublic */
430
5.45k
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op, const ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::ResultPair& result) const {
431
5.45k
    (void)module;
432
433
5.45k
    if ( result.second != std::nullopt  ) {
434
2.21k
        const auto curveID = op.curveType.Get();
435
2.21k
        const auto privkey = op.priv.ToTrimmedString();
436
2.21k
        const auto pub_x = result.second->first.ToTrimmedString();
437
2.21k
        const auto pub_y = result.second->second.ToTrimmedString();
438
439
2.21k
        Pool_CurvePrivkey.Set({ curveID, privkey });
440
2.21k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
441
2.21k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
442
443
2.21k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
444
2.21k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
445
2.21k
    }
446
5.45k
}
447
448
5.45k
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::ECC_PrivateToPublic& op) const {
449
5.45k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
450
451
5.45k
    const size_t size = op.priv.ToTrimmedString().size();
452
453
5.45k
    if ( size == 0 || size > 4096 ) {
454
65
        return std::nullopt;
455
65
    }
456
457
5.39k
    return module->OpECC_PrivateToPublic(op);
458
5.45k
}
459
460
/* Specialization for operation::ECC_ValidatePubkey */
461
3.71k
template<> void ExecutorBase<bool, operation::ECC_ValidatePubkey>::postprocess(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op, const ExecutorBase<bool, operation::ECC_ValidatePubkey>::ResultPair& result) const {
462
3.71k
    (void)module;
463
3.71k
    (void)op;
464
3.71k
    (void)result;
465
3.71k
}
466
467
3.71k
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
468
3.71k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
469
470
3.71k
    return module->OpECC_ValidatePubkey(op);
471
3.71k
}
472
473
/* Specialization for operation::ECC_GenerateKeyPair */
474
475
/* Do not compare DH_GenerateKeyPair results, because the result can be produced indeterministically */
476
template <>
477
1.20k
void ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DH_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
478
1.20k
    (void)operations;
479
1.20k
    (void)results;
480
1.20k
    (void)data;
481
1.20k
    (void)size;
482
1.20k
}
483
484
7.31k
template<> void ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op, const ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::ResultPair& result) const {
485
7.31k
    (void)module;
486
487
7.31k
    if ( result.second != std::nullopt  ) {
488
2.59k
        const auto curveID = op.curveType.Get();
489
2.59k
        const auto privkey = result.second->priv.ToTrimmedString();
490
2.59k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
491
2.59k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
492
493
2.59k
        Pool_CurvePrivkey.Set({ curveID, privkey });
494
2.59k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
495
2.59k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
496
497
2.59k
        {
498
2.59k
            auto opValidate = operation::ECC_ValidatePubkey(
499
2.59k
                    op.curveType,
500
2.59k
                    result.second->pub,
501
2.59k
                    op.modifier);
502
503
2.59k
            const auto validateResult = module->OpECC_ValidatePubkey(opValidate);
504
2.59k
            CF_ASSERT(
505
2.59k
                    validateResult == std::nullopt ||
506
2.59k
                    *validateResult == true,
507
2.59k
                    "Cannot validate generated public key");
508
2.59k
        }
509
2.59k
    }
510
7.31k
}
511
512
7.31k
template<> std::optional<component::ECC_KeyPair> ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::ECC_GenerateKeyPair& op) const {
513
7.31k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
514
515
7.31k
    return module->OpECC_GenerateKeyPair(op);
516
7.31k
}
517
518
/* Specialization for operation::ECCSI_Sign */
519
601
template<> void ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECCSI_Sign& op, const ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::ResultPair& result) const {
520
601
    (void)module;
521
522
601
    if ( result.second != std::nullopt  ) {
523
0
        const auto curveID = op.curveType.Get();
524
0
        const auto cleartext = op.cleartext.ToHex();
525
0
        const auto id = op.id.ToHex();
526
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
527
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
528
0
        const auto pvt_x = result.second->pvt.first.ToTrimmedString();
529
0
        const auto pvt_y = result.second->pvt.second.ToTrimmedString();
530
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
531
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
532
533
0
        Pool_CurveECCSISignature.Set({
534
0
                curveID,
535
0
                cleartext,
536
0
                id,
537
0
                pub_x, pub_y,
538
0
                pvt_x, pvt_y,
539
0
                sig_r, sig_s});
540
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
541
0
        Pool_CurveECC_Point.Set({ curveID, pvt_x, pvt_y });
542
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
543
544
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
545
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
546
0
        if ( pvt_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pvt_x); }
547
0
        if ( pvt_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pvt_y); }
548
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
549
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
550
551
0
        {
552
0
            auto opVerify = operation::ECCSI_Verify(
553
0
                    op,
554
0
                    *(result.second),
555
0
                    op.modifier);
556
557
0
            const auto verifyResult = module->OpECCSI_Verify(opVerify);
558
0
            CF_ASSERT(
559
0
                    verifyResult == std::nullopt ||
560
0
                    *verifyResult == true,
561
0
                    "Cannot verify generated signature");
562
0
        }
563
0
    }
564
601
}
565
566
601
template<> std::optional<component::ECCSI_Signature> ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Sign& op) const {
567
601
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
568
601
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
569
570
422
    const size_t size = op.priv.ToTrimmedString().size();
571
572
422
    if ( size == 0 || size > 4096 ) {
573
3
        return std::nullopt;
574
3
    }
575
576
419
    return module->OpECCSI_Sign(op);
577
422
}
578
579
/* Specialization for operation::ECDSA_Sign */
580
8.06k
template<> void ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Sign& op, const ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::ResultPair& result) const {
581
8.06k
    (void)module;
582
583
8.06k
    if ( result.second != std::nullopt  ) {
584
4.96k
        const auto curveID = op.curveType.Get();
585
4.96k
        const auto cleartext = op.cleartext.ToHex();
586
4.96k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
587
4.96k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
588
4.96k
        const auto sig_r = result.second->signature.first.ToTrimmedString();
589
4.96k
        const auto sig_s = result.second->signature.second.ToTrimmedString();
590
591
4.96k
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
592
4.96k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
593
4.96k
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
594
595
4.96k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
596
4.96k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
597
4.96k
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
598
4.96k
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
599
600
4.96k
        {
601
4.96k
            auto opVerify = operation::ECDSA_Verify(
602
4.96k
                    op,
603
4.96k
                    *(result.second),
604
4.96k
                    op.modifier);
605
606
4.96k
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
607
4.96k
            CF_ASSERT(
608
4.96k
                    verifyResult == std::nullopt ||
609
4.96k
                    *verifyResult == true,
610
4.96k
                    "Cannot verify generated signature");
611
4.96k
        }
612
4.96k
    }
613
8.06k
}
614
615
8.06k
template<> std::optional<component::ECDSA_Signature> ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Sign& op) const {
616
8.06k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
617
8.06k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
618
619
7.84k
    const size_t size = op.priv.ToTrimmedString().size();
620
621
7.84k
    if ( size == 0 || size > 4096 ) {
622
3
        return std::nullopt;
623
3
    }
624
625
7.84k
    return module->OpECDSA_Sign(op);
626
7.84k
}
627
628
/* Specialization for operation::ECGDSA_Sign */
629
3
template<> void ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECGDSA_Sign& op, const ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::ResultPair& result) const {
630
3
    (void)module;
631
632
3
    if ( result.second != std::nullopt  ) {
633
0
        const auto curveID = op.curveType.Get();
634
0
        const auto cleartext = op.cleartext.ToHex();
635
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
636
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
637
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
638
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
639
640
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
641
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
642
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
643
644
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
645
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
646
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
647
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
648
0
    }
649
3
}
650
651
3
template<> std::optional<component::ECGDSA_Signature> ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Sign& op) const {
652
3
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
653
3
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
654
655
3
    const size_t size = op.priv.ToTrimmedString().size();
656
657
3
    if ( size == 0 || size > 4096 ) {
658
1
        return std::nullopt;
659
1
    }
660
661
2
    return module->OpECGDSA_Sign(op);
662
3
}
663
664
/* Specialization for operation::ECRDSA_Sign */
665
3
template<> void ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::ECRDSA_Sign& op, const ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::ResultPair& result) const {
666
3
    (void)module;
667
668
3
    if ( result.second != std::nullopt  ) {
669
0
        const auto curveID = op.curveType.Get();
670
0
        const auto cleartext = op.cleartext.ToHex();
671
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
672
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
673
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
674
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
675
676
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
677
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
678
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
679
680
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
681
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
682
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
683
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
684
0
    }
685
3
}
686
687
3
template<> std::optional<component::ECRDSA_Signature> ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Sign& op) const {
688
3
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
689
3
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
690
691
3
    const size_t size = op.priv.ToTrimmedString().size();
692
693
3
    if ( size == 0 || size > 4096 ) {
694
0
        return std::nullopt;
695
0
    }
696
697
3
    return module->OpECRDSA_Sign(op);
698
3
}
699
700
/* Specialization for operation::Schnorr_Sign */
701
2
template<> void ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::postprocess(std::shared_ptr<Module> module, operation::Schnorr_Sign& op, const ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::ResultPair& result) const {
702
2
    (void)module;
703
704
2
    if ( result.second != std::nullopt  ) {
705
0
        const auto curveID = op.curveType.Get();
706
0
        const auto cleartext = op.cleartext.ToHex();
707
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
708
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
709
0
        const auto sig_r = result.second->signature.first.ToTrimmedString();
710
0
        const auto sig_s = result.second->signature.second.ToTrimmedString();
711
712
0
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
713
0
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
714
0
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
715
716
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
717
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
718
0
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
719
0
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
720
0
    }
721
2
}
722
723
2
template<> std::optional<component::Schnorr_Signature> ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Sign& op) const {
724
2
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
2
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
726
727
2
    const size_t size = op.priv.ToTrimmedString().size();
728
729
2
    if ( size == 0 || size > 4096 ) {
730
0
        return std::nullopt;
731
0
    }
732
733
2
    return module->OpSchnorr_Sign(op);
734
2
}
735
736
/* Specialization for operation::ECCSI_Verify */
737
313
template<> void ExecutorBase<bool, operation::ECCSI_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECCSI_Verify& op, const ExecutorBase<bool, operation::ECCSI_Verify>::ResultPair& result) const {
738
313
    (void)module;
739
313
    (void)op;
740
313
    (void)result;
741
313
}
742
743
313
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
744
313
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
745
313
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
746
747
127
    return module->OpECCSI_Verify(op);
748
313
}
749
750
/* Specialization for operation::ECDSA_Verify */
751
4.05k
template<> void ExecutorBase<bool, operation::ECDSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Verify& op, const ExecutorBase<bool, operation::ECDSA_Verify>::ResultPair& result) const {
752
4.05k
    (void)module;
753
4.05k
    (void)op;
754
4.05k
    (void)result;
755
4.05k
}
756
757
4.05k
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
758
4.05k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
759
4.05k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
760
761
    /* Intentionally do not constrain the size of the public key or
762
     * signature (like we do for BignumCalc).
763
     *
764
     * If any large public key or signature causes a time-out (or
765
     * worse), this is something that needs attention;
766
     * because verifiers sometimes process untrusted public keys,
767
     * signatures or both, they should be resistant to bugs
768
     * arising from large inputs.
769
     */
770
771
3.83k
    return module->OpECDSA_Verify(op);
772
4.05k
}
773
774
/* Specialization for operation::ECGDSA_Verify */
775
2
template<> void ExecutorBase<bool, operation::ECGDSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op, const ExecutorBase<bool, operation::ECGDSA_Verify>::ResultPair& result) const {
776
2
    (void)module;
777
2
    (void)op;
778
2
    (void)result;
779
2
}
780
781
2
template<> std::optional<bool> ExecutorBase<bool, operation::ECGDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECGDSA_Verify& op) const {
782
2
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
783
2
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
784
785
    /* Intentionally do not constrain the size of the public key or
786
     * signature (like we do for BignumCalc).
787
     *
788
     * If any large public key or signature causes a time-out (or
789
     * worse), this is something that needs attention;
790
     * because verifiers sometimes process untrusted public keys,
791
     * signatures or both, they should be resistant to bugs
792
     * arising from large inputs.
793
     */
794
795
2
    return module->OpECGDSA_Verify(op);
796
2
}
797
798
/* Specialization for operation::ECRDSA_Verify */
799
2
template<> void ExecutorBase<bool, operation::ECRDSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op, const ExecutorBase<bool, operation::ECRDSA_Verify>::ResultPair& result) const {
800
2
    (void)module;
801
2
    (void)op;
802
2
    (void)result;
803
2
}
804
805
2
template<> std::optional<bool> ExecutorBase<bool, operation::ECRDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECRDSA_Verify& op) const {
806
2
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
807
2
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
808
809
    /* Intentionally do not constrain the size of the public key or
810
     * signature (like we do for BignumCalc).
811
     *
812
     * If any large public key or signature causes a time-out (or
813
     * worse), this is something that needs attention;
814
     * because verifiers sometimes process untrusted public keys,
815
     * signatures or both, they should be resistant to bugs
816
     * arising from large inputs.
817
     */
818
819
2
    return module->OpECRDSA_Verify(op);
820
2
}
821
822
/* Specialization for operation::Schnorr_Verify */
823
5
template<> void ExecutorBase<bool, operation::Schnorr_Verify>::postprocess(std::shared_ptr<Module> module, operation::Schnorr_Verify& op, const ExecutorBase<bool, operation::Schnorr_Verify>::ResultPair& result) const {
824
5
    (void)module;
825
5
    (void)op;
826
5
    (void)result;
827
5
}
828
829
5
template<> std::optional<bool> ExecutorBase<bool, operation::Schnorr_Verify>::callModule(std::shared_ptr<Module> module, operation::Schnorr_Verify& op) const {
830
5
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
831
5
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
832
833
    /* Intentionally do not constrain the size of the public key or
834
     * signature (like we do for BignumCalc).
835
     *
836
     * If any large public key or signature causes a time-out (or
837
     * worse), this is something that needs attention;
838
     * because verifiers sometimes process untrusted public keys,
839
     * signatures or both, they should be resistant to bugs
840
     * arising from large inputs.
841
     */
842
843
5
    return module->OpSchnorr_Verify(op);
844
5
}
845
846
7
template<> void ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::postprocess(std::shared_ptr<Module> module, operation::ECDSA_Recover& op, const ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::ResultPair& result) const {
847
7
    (void)module;
848
7
    (void)op;
849
7
    (void)result;
850
7
}
851
852
7
template<> std::optional<component::ECC_PublicKey> ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Recover& op) const {
853
7
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
854
7
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
855
856
7
    return module->OpECDSA_Recover(op);
857
7
}
858
859
/* Specialization for operation::DSA_Verify */
860
0
template<> void ExecutorBase<bool, operation::DSA_Verify>::updateExtraCounters(const uint64_t moduleID, operation::DSA_Verify& op) const {
861
0
    (void)moduleID;
862
0
    (void)op;
863
864
    /* TODO */
865
0
}
866
867
33
template<> void ExecutorBase<bool, operation::DSA_Verify>::postprocess(std::shared_ptr<Module> module, operation::DSA_Verify& op, const ExecutorBase<bool, operation::DSA_Verify>::ResultPair& result) const {
868
33
    (void)module;
869
33
    (void)op;
870
33
    (void)result;
871
33
}
872
873
33
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
874
33
    const std::vector<size_t> sizes = {
875
33
        op.parameters.p.ToTrimmedString().size(),
876
33
        op.parameters.q.ToTrimmedString().size(),
877
33
        op.parameters.g.ToTrimmedString().size(),
878
33
        op.pub.ToTrimmedString().size(),
879
33
        op.signature.first.ToTrimmedString().size(),
880
33
        op.signature.second.ToTrimmedString().size(),
881
33
    };
882
883
185
    for (const auto& size : sizes) {
884
185
        if ( size == 0 || size > 4096 ) {
885
5
            return std::nullopt;
886
5
        }
887
185
    }
888
889
28
    return module->OpDSA_Verify(op);
890
33
}
891
892
/* Specialization for operation::DSA_Sign */
893
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
894
template <>
895
7
void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DSA_Sign> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
896
7
    (void)operations;
897
7
    (void)results;
898
7
    (void)data;
899
7
    (void)size;
900
7
}
901
0
template<> void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::updateExtraCounters(const uint64_t moduleID, operation::DSA_Sign& op) const {
902
0
    (void)moduleID;
903
0
    (void)op;
904
905
    /* TODO */
906
0
}
907
908
16
template<> void ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::postprocess(std::shared_ptr<Module> module, operation::DSA_Sign& op, const ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::ResultPair& result) const {
909
16
    (void)module;
910
16
    (void)op;
911
16
    if ( result.second != std::nullopt ) {
912
0
        const auto cleartext = op.cleartext.ToHex();
913
0
        const auto p = op.parameters.p.ToTrimmedString();
914
0
        const auto q = op.parameters.q.ToTrimmedString();
915
0
        const auto g = op.parameters.g.ToTrimmedString();
916
0
        const auto r = result.second->signature.first.ToTrimmedString();
917
0
        const auto s = result.second->signature.second.ToTrimmedString();
918
0
        const auto pub = result.second->pub.ToTrimmedString();
919
920
0
        Pool_DSASignature.Set({
921
0
                cleartext,
922
0
                p,
923
0
                q,
924
0
                g,
925
0
                pub,
926
0
                r,
927
0
                s
928
0
        });
929
930
0
        if ( r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(r); }
931
0
        if ( s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(s); }
932
0
    }
933
16
}
934
935
16
template<> std::optional<component::DSA_Signature> ExecutorBase<component::DSA_Signature, operation::DSA_Sign>::callModule(std::shared_ptr<Module> module, operation::DSA_Sign& op) const {
936
16
    const std::vector<size_t> sizes = {
937
16
        op.parameters.p.ToTrimmedString().size(),
938
16
        op.parameters.q.ToTrimmedString().size(),
939
16
        op.parameters.g.ToTrimmedString().size(),
940
16
        op.priv.ToTrimmedString().size(),
941
16
    };
942
943
58
    for (const auto& size : sizes) {
944
58
        if ( size == 0 || size > 4096 ) {
945
14
            return std::nullopt;
946
14
        }
947
58
    }
948
949
2
    return module->OpDSA_Sign(op);
950
16
}
951
952
/* Specialization for operation::DSA_PrivateToPublic */
953
954
0
template<> void ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::updateExtraCounters(const uint64_t moduleID, operation::DSA_PrivateToPublic& op) const {
955
0
    (void)moduleID;
956
0
    (void)op;
957
958
    /* TODO */
959
0
}
960
961
8
template<> void ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op, const ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::ResultPair& result) const {
962
8
    (void)result;
963
8
    (void)module;
964
8
    (void)op;
965
8
    if ( result.second != std::nullopt ) {
966
        //Pool_DSA_PubPriv.Set({pub, priv});
967
0
    }
968
8
}
969
970
8
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
971
8
    return module->OpDSA_PrivateToPublic(op);
972
8
}
973
974
/* Specialization for operation::DSA_GenerateKeyPair */
975
976
/* Do not compare DSA_GenerateKeyPair results, because the result can be produced indeterministically */
977
template <>
978
9
void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DSA_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
979
9
    (void)operations;
980
9
    (void)results;
981
9
    (void)data;
982
9
    (void)size;
983
9
}
984
985
0
template<> void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateKeyPair& op) const {
986
0
    (void)moduleID;
987
0
    (void)op;
988
989
    /* TODO */
990
0
}
991
992
15
template<> void ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::DSA_GenerateKeyPair& op, const ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::ResultPair& result) const {
993
15
    (void)result;
994
15
    (void)module;
995
15
    (void)op;
996
15
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
997
0
        const auto priv = result.second->first.ToTrimmedString();
998
0
        const auto pub = result.second->second.ToTrimmedString();
999
1000
0
        Pool_DSA_PubPriv.Set({pub, priv});
1001
0
    }
1002
15
}
1003
1004
15
template<> std::optional<component::DSA_KeyPair> ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateKeyPair& op) const {
1005
15
    const std::vector<size_t> sizes = {
1006
15
        op.p.ToTrimmedString().size(),
1007
15
        op.q.ToTrimmedString().size(),
1008
15
        op.g.ToTrimmedString().size(),
1009
15
    };
1010
1011
45
    for (const auto& size : sizes) {
1012
45
        if ( size == 0 || size > 4096 ) {
1013
6
            return std::nullopt;
1014
6
        }
1015
45
    }
1016
1017
9
    return module->OpDSA_GenerateKeyPair(op);
1018
15
}
1019
1020
/* Specialization for operation::DSA_GenerateParameters */
1021
1022
/* Do not compare DSA_GenerateParameters results, because the result can be produced indeterministically */
1023
template <>
1024
0
void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::DSA_GenerateParameters> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
1025
0
    (void)operations;
1026
0
    (void)results;
1027
0
    (void)data;
1028
0
    (void)size;
1029
0
}
1030
1031
0
template<> void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::updateExtraCounters(const uint64_t moduleID, operation::DSA_GenerateParameters& op) const {
1032
0
    (void)moduleID;
1033
0
    (void)op;
1034
1035
    /* TODO */
1036
0
}
1037
1038
0
template<> void ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::postprocess(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op, const ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::ResultPair& result) const {
1039
0
    (void)result;
1040
0
    (void)module;
1041
0
    (void)op;
1042
0
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1043
0
        const auto P = result.second->p.ToTrimmedString();
1044
0
        const auto Q = result.second->q.ToTrimmedString();
1045
0
        const auto G = result.second->g.ToTrimmedString();
1046
1047
0
        Pool_DSA_PQG.Set({P, Q, G});
1048
1049
0
        if ( P.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(P); }
1050
0
        if ( Q.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(Q); }
1051
0
        if ( G.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(G); }
1052
0
    }
1053
0
}
1054
1055
0
template<> std::optional<component::DSA_Parameters> ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>::callModule(std::shared_ptr<Module> module, operation::DSA_GenerateParameters& op) const {
1056
0
    return module->OpDSA_GenerateParameters(op);
1057
0
}
1058
1059
/* Specialization for operation::ECDH_Derive */
1060
829
template<> void ExecutorBase<component::Secret, operation::ECDH_Derive>::postprocess(std::shared_ptr<Module> module, operation::ECDH_Derive& op, const ExecutorBase<component::Secret, operation::ECDH_Derive>::ResultPair& result) const {
1061
829
    (void)module;
1062
829
    (void)op;
1063
829
    (void)result;
1064
829
}
1065
1066
829
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1067
829
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1068
1069
829
    return module->OpECDH_Derive(op);
1070
829
}
1071
1072
/* Specialization for operation::ECIES_Encrypt */
1073
template <>
1074
470
void ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::ECIES_Encrypt> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
1075
470
    (void)operations;
1076
470
    (void)results;
1077
470
    (void)data;
1078
470
    (void)size;
1079
470
}
1080
960
template<> void ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::postprocess(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op, const ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::ResultPair& result) const {
1081
960
    (void)module;
1082
960
    (void)op;
1083
960
    (void)result;
1084
960
}
1085
1086
960
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1087
960
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1088
1089
960
    return module->OpECIES_Encrypt(op);
1090
960
}
1091
1092
/* Specialization for operation::ECIES_Decrypt */
1093
1.01k
template<> void ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::postprocess(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op, const ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::ResultPair& result) const {
1094
1.01k
    (void)module;
1095
1.01k
    (void)op;
1096
1.01k
    (void)result;
1097
1.01k
}
1098
1099
1.01k
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1100
1.01k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1101
1102
1.01k
    return module->OpECIES_Decrypt(op);
1103
1.01k
}
1104
1105
/* Specialization for operation::ECC_Point_Add */
1106
3.30k
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Add& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>::ResultPair& result) const {
1107
3.30k
    (void)module;
1108
1109
3.30k
    if ( result.second != std::nullopt  ) {
1110
147
        const auto curveID = op.curveType.Get();
1111
147
        const auto x = result.second->first.ToTrimmedString();
1112
147
        const auto y = result.second->second.ToTrimmedString();
1113
1114
147
        Pool_CurveECC_Point.Set({ curveID, x, y });
1115
1116
147
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1117
147
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1118
147
    }
1119
3.30k
}
1120
1121
3.30k
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Add& op) const {
1122
3.30k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1123
1124
3.30k
    return module->OpECC_Point_Add(op);
1125
3.30k
}
1126
1127
/* Specialization for operation::ECC_Point_Sub */
1128
0
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Sub& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>::ResultPair& result) const {
1129
0
    (void)module;
1130
1131
0
    if ( result.second != std::nullopt  ) {
1132
0
        const auto curveID = op.curveType.Get();
1133
0
        const auto x = result.second->first.ToTrimmedString();
1134
0
        const auto y = result.second->second.ToTrimmedString();
1135
1136
0
        Pool_CurveECC_Point.Set({ curveID, x, y });
1137
1138
0
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1139
0
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1140
0
    }
1141
0
}
1142
1143
0
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Sub& op) const {
1144
0
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1145
1146
0
    return module->OpECC_Point_Sub(op);
1147
0
}
1148
1149
/* Specialization for operation::ECC_Point_Mul */
1150
2.82k
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Mul& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::ResultPair& result) const {
1151
2.82k
    (void)module;
1152
1153
2.82k
    if ( result.second != std::nullopt  ) {
1154
156
        const auto curveID = op.curveType.Get();
1155
156
        const auto x = result.second->first.ToTrimmedString();
1156
156
        const auto y = result.second->second.ToTrimmedString();
1157
1158
156
        Pool_CurveECC_Point.Set({ curveID, x, y });
1159
1160
156
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1161
156
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1162
156
    }
1163
2.82k
}
1164
1165
2.82k
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Mul& op) const {
1166
2.82k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1167
1168
2.82k
    return module->OpECC_Point_Mul(op);
1169
2.82k
}
1170
1171
/* Specialization for operation::ECC_Point_Neg */
1172
29
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Neg& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::ResultPair& result) const {
1173
29
    (void)module;
1174
1175
29
    if ( result.second != std::nullopt  ) {
1176
2
        const auto curveID = op.curveType.Get();
1177
2
        const auto x = result.second->first.ToTrimmedString();
1178
2
        const auto y = result.second->second.ToTrimmedString();
1179
1180
2
        Pool_CurveECC_Point.Set({ curveID, x, y });
1181
1182
2
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1183
2
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1184
2
    }
1185
29
}
1186
1187
29
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Neg& op) const {
1188
29
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1189
1190
29
    return module->OpECC_Point_Neg(op);
1191
29
}
1192
1193
/* Specialization for operation::ECC_Point_Dbl */
1194
4.89k
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Dbl& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>::ResultPair& result) const {
1195
4.89k
    (void)module;
1196
1197
4.89k
    if ( result.second != std::nullopt  ) {
1198
99
        const auto curveID = op.curveType.Get();
1199
99
        const auto x = result.second->first.ToTrimmedString();
1200
99
        const auto y = result.second->second.ToTrimmedString();
1201
1202
99
        Pool_CurveECC_Point.Set({ curveID, x, y });
1203
1204
99
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1205
99
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1206
99
    }
1207
4.89k
}
1208
1209
4.89k
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Dbl& op) const {
1210
4.89k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1211
1212
4.89k
    return module->OpECC_Point_Dbl(op);
1213
4.89k
}
1214
1215
/* Specialization for operation::ECC_Point_Cmp */
1216
18
template<> void ExecutorBase<bool, operation::ECC_Point_Cmp>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op, const ExecutorBase<bool, operation::ECC_Point_Cmp>::ResultPair& result) const {
1217
18
    (void)module;
1218
18
    (void)result;
1219
18
    (void)op;
1220
18
}
1221
1222
18
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1223
18
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1224
1225
18
    return module->OpECC_Point_Cmp(op);
1226
18
}
1227
1228
/* Specialization for operation::DH_Derive */
1229
1.49k
template<> void ExecutorBase<component::Bignum, operation::DH_Derive>::postprocess(std::shared_ptr<Module> module, operation::DH_Derive& op, const ExecutorBase<component::Bignum, operation::DH_Derive>::ResultPair& result) const {
1230
1.49k
    (void)module;
1231
1.49k
    (void)op;
1232
1.49k
    (void)result;
1233
1.49k
}
1234
1235
1.49k
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1236
1.49k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1237
1.44k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1238
1.42k
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1239
1.38k
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1240
1241
1.33k
    return module->OpDH_Derive(op);
1242
1.38k
}
1243
1244
/* Specialization for operation::DH_GenerateKeyPair */
1245
1.97k
template<> void ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::DH_GenerateKeyPair& op, const ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::ResultPair& result) const {
1246
1.97k
    (void)result;
1247
1.97k
    (void)op;
1248
1.97k
    (void)module;
1249
1250
1.97k
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1251
27
        const auto priv = result.second->first.ToTrimmedString();
1252
27
        const auto pub = result.second->second.ToTrimmedString();
1253
1254
27
        Pool_DH_PrivateKey.Set(priv);
1255
27
        Pool_DH_PublicKey.Set(pub);
1256
27
    }
1257
1.97k
}
1258
1259
1.97k
template<> std::optional<component::DH_KeyPair> ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::DH_GenerateKeyPair& op) const {
1260
1.97k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1261
1.95k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1262
1263
1.91k
    return module->OpDH_GenerateKeyPair(op);
1264
1.95k
}
1265
1266
/* Specialization for operation::BignumCalc */
1267
36.3k
template<> void ExecutorBase<component::Bignum, operation::BignumCalc>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc& op, const ExecutorBase<component::Bignum, operation::BignumCalc>::ResultPair& result) const {
1268
36.3k
    (void)module;
1269
36.3k
    (void)op;
1270
1271
36.3k
    if ( result.second != std::nullopt  ) {
1272
14.5k
        const auto bignum = result.second->ToTrimmedString();
1273
1274
14.5k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1275
14.5k
            Pool_Bignum.Set(bignum);
1276
14.5k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1277
392
                Pool_Bignum_Primes.Set(bignum);
1278
392
            }
1279
14.5k
        }
1280
14.5k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1281
1.08k
            if ( bignum == "1" ) {
1282
519
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1283
519
            }
1284
1.08k
        }
1285
14.5k
    }
1286
36.3k
}
1287
1288
36.3k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1289
36.3k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1290
1291
    /* Prevent timeouts */
1292
36.3k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1293
36.2k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1294
36.2k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1295
36.2k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1296
1297
36.1k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1298
22
        return std::nullopt;
1299
22
    }
1300
1301
36.1k
    switch ( op.calcOp.Get() ) {
1302
454
        case    CF_CALCOP("SetBit(A,B)"):
1303
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1304
454
            if ( op.bn1.GetSize() > 4 ) {
1305
57
                return std::nullopt;
1306
57
            }
1307
397
            break;
1308
397
        case    CF_CALCOP("Exp(A,B)"):
1309
138
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1310
97
                return std::nullopt;
1311
97
            }
1312
41
            break;
1313
95
        case    CF_CALCOP("ModLShift(A,B,C)"):
1314
95
            if ( op.bn1.GetSize() > 4 ) {
1315
47
                return std::nullopt;
1316
47
            }
1317
48
            break;
1318
272
        case    CF_CALCOP("Exp2(A)"):
1319
272
            if ( op.bn0.GetSize() > 4 ) {
1320
62
                return std::nullopt;
1321
62
            }
1322
210
            break;
1323
36.1k
    }
1324
1325
35.8k
    return module->OpBignumCalc(op);
1326
36.1k
}
1327
1328
/* Specialization for operation::BignumCalc_Fp2 */
1329
93
template<> void ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op, const ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ResultPair& result) const {
1330
93
    (void)module;
1331
93
    (void)op;
1332
1333
93
    if ( result.second != std::nullopt  ) {
1334
0
        const auto bignum_first = result.second->first.ToTrimmedString();
1335
0
        const auto bignum_second = result.second->second.ToTrimmedString();
1336
1337
0
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1338
0
            Pool_Bignum.Set(bignum_first);
1339
0
        }
1340
0
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1341
0
            Pool_Bignum.Set(bignum_second);
1342
0
        }
1343
0
    }
1344
93
}
1345
1346
93
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1347
93
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1348
1349
    /* Prevent timeouts */
1350
93
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1351
90
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1352
80
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1353
69
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1354
58
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1355
48
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1356
38
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1357
28
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1358
1359
22
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1360
0
        return std::nullopt;
1361
0
    }
1362
1363
22
    return module->OpBignumCalc_Fp2(op);
1364
22
}
1365
1366
/* Specialization for operation::BignumCalc_Fp12 */
1367
633
template<> void ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::postprocess(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op, const ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ResultPair& result) const {
1368
633
    (void)module;
1369
633
    (void)op;
1370
1371
633
    if ( result.second != std::nullopt  ) {
1372
0
        Pool_Fp12.Set({
1373
0
                result.second->bn1.ToTrimmedString(),
1374
0
                result.second->bn2.ToTrimmedString(),
1375
0
                result.second->bn3.ToTrimmedString(),
1376
0
                result.second->bn4.ToTrimmedString(),
1377
0
                result.second->bn5.ToTrimmedString(),
1378
0
                result.second->bn6.ToTrimmedString(),
1379
0
                result.second->bn7.ToTrimmedString(),
1380
0
                result.second->bn8.ToTrimmedString(),
1381
0
                result.second->bn9.ToTrimmedString(),
1382
0
                result.second->bn10.ToTrimmedString(),
1383
0
                result.second->bn11.ToTrimmedString(),
1384
0
                result.second->bn12.ToTrimmedString()
1385
0
        });
1386
        /* TODO */
1387
#if 0
1388
        const auto bignum_first = result.second->first.ToTrimmedString();
1389
        const auto bignum_second = result.second->second.ToTrimmedString();
1390
1391
        if ( bignum_first.size() <= config::kMaxBignumSize ) {
1392
            Pool_Bignum.Set(bignum_first);
1393
        }
1394
        if ( bignum_second.size() <= config::kMaxBignumSize ) {
1395
            Pool_Bignum.Set(bignum_second);
1396
        }
1397
#endif
1398
0
    }
1399
633
}
1400
1401
633
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1402
633
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1403
1404
    /* Prevent timeouts */
1405
633
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1406
623
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1407
612
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1408
601
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1409
591
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1410
585
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1411
574
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1412
564
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1413
554
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1414
543
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1415
533
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1416
526
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1417
1418
516
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1419
506
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1420
496
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1421
486
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1422
476
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1423
465
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1424
455
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1425
445
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1426
435
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1427
424
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1428
414
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1429
407
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1430
1431
397
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1432
387
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1433
377
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1434
367
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1435
357
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1436
347
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1437
337
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1438
327
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1439
317
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1440
307
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1441
297
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1442
287
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1443
1444
277
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1445
267
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1446
257
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1447
247
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1448
237
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1449
227
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1450
216
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1451
205
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1452
195
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1453
185
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1454
175
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1455
165
    if ( op.bn3.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1456
1457
155
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1458
0
        return std::nullopt;
1459
0
    }
1460
1461
155
    return module->OpBignumCalc_Fp12(op);
1462
155
}
1463
1464
/* Specialization for operation::BLS_PrivateToPublic */
1465
5
template<> void ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::postprocess(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic& op, const ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::ResultPair& result) const {
1466
5
    (void)module;
1467
1468
5
    if ( result.second != std::nullopt  ) {
1469
0
        const auto curveID = op.curveType.Get();
1470
0
        const auto g1_x = result.second->first.ToTrimmedString();
1471
0
        const auto g1_y = result.second->second.ToTrimmedString();
1472
1473
0
        G1AddToPool(curveID, g1_x, g1_y);
1474
1475
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1476
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1477
0
    }
1478
5
}
1479
1480
5
template<> std::optional<component::BLS_PublicKey> ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic& op) const {
1481
5
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1482
1483
5
    const size_t size = op.priv.ToTrimmedString().size();
1484
1485
5
    if ( size == 0 || size > 4096 ) {
1486
3
        return std::nullopt;
1487
3
    }
1488
1489
2
    return module->OpBLS_PrivateToPublic(op);
1490
5
}
1491
1492
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1493
10
template<> void ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic_G2& op, const ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::ResultPair& result) const {
1494
10
    (void)module;
1495
10
    if ( result.second != std::nullopt  ) {
1496
0
        const auto curveID = op.curveType.Get();
1497
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1498
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1499
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1500
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1501
1502
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1503
1504
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1505
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1506
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1507
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1508
0
    }
1509
10
}
1510
1511
10
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_PrivateToPublic_G2& op) const {
1512
10
    const size_t size = op.priv.ToTrimmedString().size();
1513
1514
10
    if ( size == 0 || size > 4096 ) {
1515
1
        return std::nullopt;
1516
1
    }
1517
1518
9
    return module->OpBLS_PrivateToPublic_G2(op);
1519
10
}
1520
1521
/* Specialization for operation::BLS_Sign */
1522
9
template<> void ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::postprocess(std::shared_ptr<Module> module, operation::BLS_Sign& op, const ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::ResultPair& result) const {
1523
9
    (void)module;
1524
1525
9
    if ( result.second != std::nullopt  ) {
1526
0
        const auto curveID = op.curveType.Get();
1527
0
        const auto point_v = op.hashOrPoint ? op.point.first.first.ToTrimmedString() : "";
1528
0
        const auto point_w = op.hashOrPoint ? op.point.first.second.ToTrimmedString() : "";
1529
0
        const auto point_x = op.hashOrPoint ? op.point.second.first.ToTrimmedString() : "";
1530
0
        const auto point_y = op.hashOrPoint ? op.point.second.second.ToTrimmedString() : "";
1531
0
        const auto cleartext = op.hashOrPoint ? op.cleartext.ToHex() : "";
1532
0
        const auto dest = op.dest.ToHex();
1533
0
        const auto aug = op.aug.ToHex();
1534
0
        const auto pub_x = result.second->pub.first.ToTrimmedString();
1535
0
        const auto pub_y = result.second->pub.second.ToTrimmedString();
1536
0
        const auto sig_v = result.second->signature.first.first.ToTrimmedString();
1537
0
        const auto sig_w = result.second->signature.first.second.ToTrimmedString();
1538
0
        const auto sig_x = result.second->signature.second.first.ToTrimmedString();
1539
0
        const auto sig_y = result.second->signature.second.second.ToTrimmedString();
1540
1541
0
        G1AddToPool(curveID, pub_x, pub_y);
1542
0
        G2AddToPool(curveID, sig_v, sig_w, sig_x, sig_y);
1543
0
        Pool_CurveBLSSignature.Set({ curveID, op.hashOrPoint, point_v, point_w, point_x, point_y, cleartext, dest, aug, pub_x, pub_y, sig_v, sig_w, sig_x, sig_y});
1544
1545
0
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
1546
0
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
1547
0
        if ( sig_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_v); }
1548
0
        if ( sig_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_w); }
1549
0
        if ( sig_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_x); }
1550
0
        if ( sig_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_y); }
1551
0
    }
1552
9
}
1553
1554
9
template<> std::optional<component::BLS_Signature> ExecutorBase<component::BLS_Signature, operation::BLS_Sign>::callModule(std::shared_ptr<Module> module, operation::BLS_Sign& op) const {
1555
9
    const size_t size = op.priv.ToTrimmedString().size();
1556
1557
9
    if ( size == 0 || size > 4096 ) {
1558
1
        return std::nullopt;
1559
1
    }
1560
1561
8
    return module->OpBLS_Sign(op);
1562
9
}
1563
1564
/* Specialization for operation::BLS_Verify */
1565
18
template<> void ExecutorBase<bool, operation::BLS_Verify>::postprocess(std::shared_ptr<Module> module, operation::BLS_Verify& op, const ExecutorBase<bool, operation::BLS_Verify>::ResultPair& result) const {
1566
18
    (void)module;
1567
18
    (void)op;
1568
18
    (void)result;
1569
18
}
1570
1571
18
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_Verify>::callModule(std::shared_ptr<Module> module, operation::BLS_Verify& op) const {
1572
#if 0
1573
    const std::vector<size_t> sizes = {
1574
        op.pub.first.ToTrimmedString().size(),
1575
        op.pub.second.ToTrimmedString().size(),
1576
        op.signature.first.ToTrimmedString().size(),
1577
        op.signature.second.ToTrimmedString().size(),
1578
    };
1579
1580
    for (const auto& size : sizes) {
1581
        if ( size == 0 || size > 4096 ) {
1582
            return std::nullopt;
1583
        }
1584
    }
1585
#endif
1586
1587
18
    return module->OpBLS_Verify(op);
1588
18
}
1589
1590
/* Specialization for operation::BLS_BatchSign */
1591
8
template<> void ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::postprocess(std::shared_ptr<Module> module, operation::BLS_BatchSign& op, const ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::ResultPair& result) const {
1592
8
    (void)module;
1593
8
    (void)op;
1594
1595
8
    if ( result.second != std::nullopt  ) {
1596
0
        std::vector< std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2> > msgpub;
1597
0
        for (const auto& mp : result.second->msgpub) {
1598
0
            msgpub.push_back(
1599
0
                    std::pair<BLS_BatchSignature_::G1, BLS_BatchSignature_::G2>{
1600
0
                        {
1601
0
                            mp.first.first.ToTrimmedString(),
1602
0
                            mp.first.second.ToTrimmedString()
1603
0
                        },
1604
0
                        {
1605
0
                            mp.second.first.first.ToTrimmedString(),
1606
0
                            mp.second.first.second.ToTrimmedString(),
1607
0
                            mp.second.second.first.ToTrimmedString(),
1608
0
                            mp.second.second.second.ToTrimmedString()
1609
0
                        }
1610
0
                    }
1611
0
            );
1612
0
            G1AddToPool(CF_ECC_CURVE("BLS12_381"), mp.first.first.ToTrimmedString(), mp.first.second.ToTrimmedString());
1613
0
            Pool_CurveBLSG2.Set({
1614
0
                    CF_ECC_CURVE("BLS12_381"),
1615
0
                    mp.second.first.first.ToTrimmedString(),
1616
0
                    mp.second.first.second.ToTrimmedString(),
1617
0
                    mp.second.second.first.ToTrimmedString(),
1618
0
                    mp.second.second.second.ToTrimmedString()
1619
0
            });
1620
0
        }
1621
0
        Pool_BLS_BatchSignature.Set({msgpub});
1622
0
    }
1623
8
}
1624
1625
8
template<> std::optional<component::BLS_BatchSignature> ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchSign& op) const {
1626
8
    return module->OpBLS_BatchSign(op);
1627
8
}
1628
1629
/* Specialization for operation::BLS_BatchVerify */
1630
12
template<> void ExecutorBase<bool, operation::BLS_BatchVerify>::postprocess(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op, const ExecutorBase<bool, operation::BLS_BatchVerify>::ResultPair& result) const {
1631
12
    (void)module;
1632
12
    (void)op;
1633
12
    (void)result;
1634
12
}
1635
1636
12
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1637
12
    return module->OpBLS_BatchVerify(op);
1638
12
}
1639
1640
/* Specialization for operation::BLS_Aggregate_G1 */
1641
8
template<> void ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::postprocess(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op, const ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::ResultPair& result) const {
1642
8
    (void)module;
1643
8
    (void)op;
1644
8
    (void)result;
1645
8
}
1646
1647
8
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Aggregate_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G1& op) const {
1648
8
    return module->OpBLS_Aggregate_G1(op);
1649
8
}
1650
1651
/* Specialization for operation::BLS_Aggregate_G2 */
1652
10
template<> void ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op, const ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::ResultPair& result) const {
1653
10
    (void)module;
1654
10
    (void)op;
1655
10
    (void)result;
1656
10
}
1657
1658
10
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Aggregate_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Aggregate_G2& op) const {
1659
10
    return module->OpBLS_Aggregate_G2(op);
1660
10
}
1661
1662
/* Specialization for operation::BLS_Pairing */
1663
2
template<> void ExecutorBase<component::Fp12, operation::BLS_Pairing>::postprocess(std::shared_ptr<Module> module, operation::BLS_Pairing& op, const ExecutorBase<component::Fp12, operation::BLS_Pairing>::ResultPair& result) const {
1664
2
    (void)module;
1665
2
    (void)op;
1666
1667
2
    if ( result.second != std::nullopt  ) {
1668
0
        Pool_Fp12.Set({
1669
0
                result.second->bn1.ToTrimmedString(),
1670
0
                result.second->bn2.ToTrimmedString(),
1671
0
                result.second->bn3.ToTrimmedString(),
1672
0
                result.second->bn4.ToTrimmedString(),
1673
0
                result.second->bn5.ToTrimmedString(),
1674
0
                result.second->bn6.ToTrimmedString(),
1675
0
                result.second->bn7.ToTrimmedString(),
1676
0
                result.second->bn8.ToTrimmedString(),
1677
0
                result.second->bn9.ToTrimmedString(),
1678
0
                result.second->bn10.ToTrimmedString(),
1679
0
                result.second->bn11.ToTrimmedString(),
1680
0
                result.second->bn12.ToTrimmedString()
1681
0
        });
1682
0
    }
1683
2
}
1684
1685
2
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1686
2
    return module->OpBLS_Pairing(op);
1687
2
}
1688
1689
/* Specialization for operation::BLS_MillerLoop */
1690
2
template<> void ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::postprocess(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op, const ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::ResultPair& result) const {
1691
2
    (void)module;
1692
2
    (void)op;
1693
1694
2
    if ( result.second != std::nullopt  ) {
1695
0
        Pool_Fp12.Set({
1696
0
                result.second->bn1.ToTrimmedString(),
1697
0
                result.second->bn2.ToTrimmedString(),
1698
0
                result.second->bn3.ToTrimmedString(),
1699
0
                result.second->bn4.ToTrimmedString(),
1700
0
                result.second->bn5.ToTrimmedString(),
1701
0
                result.second->bn6.ToTrimmedString(),
1702
0
                result.second->bn7.ToTrimmedString(),
1703
0
                result.second->bn8.ToTrimmedString(),
1704
0
                result.second->bn9.ToTrimmedString(),
1705
0
                result.second->bn10.ToTrimmedString(),
1706
0
                result.second->bn11.ToTrimmedString(),
1707
0
                result.second->bn12.ToTrimmedString()
1708
0
        });
1709
0
    }
1710
2
}
1711
1712
2
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1713
2
    return module->OpBLS_MillerLoop(op);
1714
2
}
1715
1716
/* Specialization for operation::BLS_FinalExp */
1717
16
template<> void ExecutorBase<component::Fp12, operation::BLS_FinalExp>::postprocess(std::shared_ptr<Module> module, operation::BLS_FinalExp& op, const ExecutorBase<component::Fp12, operation::BLS_FinalExp>::ResultPair& result) const {
1718
16
    (void)module;
1719
16
    (void)op;
1720
1721
16
    if ( result.second != std::nullopt  ) {
1722
0
        Pool_Fp12.Set({
1723
0
                result.second->bn1.ToTrimmedString(),
1724
0
                result.second->bn2.ToTrimmedString(),
1725
0
                result.second->bn3.ToTrimmedString(),
1726
0
                result.second->bn4.ToTrimmedString(),
1727
0
                result.second->bn5.ToTrimmedString(),
1728
0
                result.second->bn6.ToTrimmedString(),
1729
0
                result.second->bn7.ToTrimmedString(),
1730
0
                result.second->bn8.ToTrimmedString(),
1731
0
                result.second->bn9.ToTrimmedString(),
1732
0
                result.second->bn10.ToTrimmedString(),
1733
0
                result.second->bn11.ToTrimmedString(),
1734
0
                result.second->bn12.ToTrimmedString()
1735
0
        });
1736
0
    }
1737
16
}
1738
1739
16
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_FinalExp>::callModule(std::shared_ptr<Module> module, operation::BLS_FinalExp& op) const {
1740
16
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1741
16
    return module->OpBLS_FinalExp(op);
1742
16
}
1743
1744
/* Specialization for operation::BLS_HashToG1 */
1745
2
template<> void ExecutorBase<component::G1, operation::BLS_HashToG1>::postprocess(std::shared_ptr<Module> module, operation::BLS_HashToG1& op, const ExecutorBase<component::G1, operation::BLS_HashToG1>::ResultPair& result) const {
1746
2
    (void)module;
1747
1748
2
    if ( result.second != std::nullopt  ) {
1749
0
        const auto curveID = op.curveType.Get();
1750
0
        const auto g1_x = result.second->first.ToTrimmedString();
1751
0
        const auto g1_y = result.second->second.ToTrimmedString();
1752
1753
0
        G1AddToPool(curveID, g1_x, g1_y);
1754
1755
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1756
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1757
0
    }
1758
2
}
1759
1760
2
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1761
2
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1762
2
    return module->OpBLS_HashToG1(op);
1763
2
}
1764
1765
/* Specialization for operation::BLS_MapToG1 */
1766
7
template<> void ExecutorBase<component::G1, operation::BLS_MapToG1>::postprocess(std::shared_ptr<Module> module, operation::BLS_MapToG1& op, const ExecutorBase<component::G1, operation::BLS_MapToG1>::ResultPair& result) const {
1767
7
    (void)module;
1768
1769
7
    if ( result.second != std::nullopt  ) {
1770
0
        const auto curveID = op.curveType.Get();
1771
0
        const auto g1_x = result.second->first.ToTrimmedString();
1772
0
        const auto g1_y = result.second->second.ToTrimmedString();
1773
1774
0
        G1AddToPool(curveID, g1_x, g1_y);
1775
1776
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1777
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1778
0
    }
1779
7
}
1780
1781
7
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1782
7
    return module->OpBLS_MapToG1(op);
1783
7
}
1784
1785
/* Specialization for operation::BLS_MapToG2 */
1786
2
template<> void ExecutorBase<component::G2, operation::BLS_MapToG2>::postprocess(std::shared_ptr<Module> module, operation::BLS_MapToG2& op, const ExecutorBase<component::G2, operation::BLS_MapToG2>::ResultPair& result) const {
1787
2
    (void)module;
1788
1789
2
    if ( result.second != std::nullopt  ) {
1790
0
        const auto curveID = op.curveType.Get();
1791
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1792
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1793
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1794
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1795
1796
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1797
1798
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1799
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1800
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1801
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1802
0
    }
1803
2
}
1804
1805
2
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_MapToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG2& op) const {
1806
2
    return module->OpBLS_MapToG2(op);
1807
2
}
1808
1809
/* Specialization for operation::BLS_IsG1OnCurve */
1810
31
template<> void ExecutorBase<bool, operation::BLS_IsG1OnCurve>::postprocess(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op, const ExecutorBase<bool, operation::BLS_IsG1OnCurve>::ResultPair& result) const {
1811
31
    (void)module;
1812
31
    (void)op;
1813
31
    (void)result;
1814
31
}
1815
1816
31
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1817
31
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1818
31
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1819
20
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1820
1821
20
    return module->OpBLS_IsG1OnCurve(op);
1822
20
}
1823
1824
/* Specialization for operation::BLS_IsG2OnCurve */
1825
48
template<> void ExecutorBase<bool, operation::BLS_IsG2OnCurve>::postprocess(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op, const ExecutorBase<bool, operation::BLS_IsG2OnCurve>::ResultPair& result) const {
1826
48
    (void)module;
1827
48
    (void)op;
1828
48
    (void)result;
1829
48
}
1830
1831
48
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG2OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG2OnCurve& op) const {
1832
48
    if ( op.g2.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1833
38
    if ( op.g2.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1834
28
    if ( op.g2.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1835
17
    if ( op.g2.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1836
1837
14
    return module->OpBLS_IsG2OnCurve(op);
1838
17
}
1839
1840
/* Specialization for operation::BLS_GenerateKeyPair */
1841
2
template<> void ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::postprocess(std::shared_ptr<Module> module, operation::BLS_GenerateKeyPair& op, const ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::ResultPair& result) const {
1842
2
    (void)module;
1843
1844
2
    if ( result.second != std::nullopt  ) {
1845
0
        const auto curveID = op.curveType.Get();
1846
0
        const auto priv = result.second->priv.ToTrimmedString();
1847
0
        const auto g1_x = result.second->pub.first.ToTrimmedString();
1848
0
        const auto g1_y = result.second->pub.second.ToTrimmedString();
1849
1850
0
        G1AddToPool(curveID, g1_x, g1_y);
1851
1852
0
        if ( priv.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(priv); }
1853
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1854
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1855
0
    }
1856
2
}
1857
1858
2
template<> std::optional<component::BLS_KeyPair> ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>::callModule(std::shared_ptr<Module> module, operation::BLS_GenerateKeyPair& op) const {
1859
2
    return module->OpBLS_GenerateKeyPair(op);
1860
2
}
1861
1862
/* Specialization for operation::BLS_Decompress_G1 */
1863
0
template<> void ExecutorBase<component::G1, operation::BLS_Decompress_G1>::postprocess(std::shared_ptr<Module> module, operation::BLS_Decompress_G1& op, const ExecutorBase<component::G1, operation::BLS_Decompress_G1>::ResultPair& result) const {
1864
0
    (void)module;
1865
1866
0
    if ( result.second != std::nullopt  ) {
1867
0
        const auto curveID = op.curveType.Get();
1868
0
        const auto g1_x = result.second->first.ToTrimmedString();
1869
0
        const auto g1_y = result.second->second.ToTrimmedString();
1870
1871
0
        G1AddToPool(curveID, g1_x, g1_y);
1872
1873
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1874
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1875
0
    }
1876
0
}
1877
1878
0
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Decompress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G1& op) const {
1879
0
    return module->OpBLS_Decompress_G1(op);
1880
0
}
1881
1882
/* Specialization for operation::BLS_Compress_G1 */
1883
0
template<> void ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::postprocess(std::shared_ptr<Module> module, operation::BLS_Compress_G1& op, const ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::ResultPair& result) const {
1884
0
    (void)module;
1885
0
    (void)op;
1886
1887
0
    if ( result.second != std::nullopt  ) {
1888
0
        const auto compressed = result.second->ToTrimmedString();
1889
1890
0
        if ( compressed.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(compressed); }
1891
0
    }
1892
0
}
1893
1894
0
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::BLS_Compress_G1>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G1& op) const {
1895
0
    return module->OpBLS_Compress_G1(op);
1896
0
}
1897
1898
/* Specialization for operation::BLS_Decompress_G2 */
1899
6
template<> void ExecutorBase<component::G2, operation::BLS_Decompress_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op, const ExecutorBase<component::G2, operation::BLS_Decompress_G2>::ResultPair& result) const {
1900
6
    (void)module;
1901
1902
6
    if ( result.second != std::nullopt  ) {
1903
0
        const auto curveID = op.curveType.Get();
1904
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
1905
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
1906
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
1907
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
1908
1909
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
1910
1911
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
1912
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
1913
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
1914
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
1915
0
    }
1916
6
}
1917
1918
6
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_Decompress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Decompress_G2& op) const {
1919
6
    return module->OpBLS_Decompress_G2(op);
1920
6
}
1921
1922
/* Specialization for operation::BLS_Compress_G2 */
1923
3
template<> void ExecutorBase<component::G1, operation::BLS_Compress_G2>::postprocess(std::shared_ptr<Module> module, operation::BLS_Compress_G2& op, const ExecutorBase<component::G1, operation::BLS_Compress_G2>::ResultPair& result) const {
1924
3
    (void)module;
1925
1926
3
    if ( result.second != std::nullopt  ) {
1927
0
        const auto curveID = op.curveType.Get();
1928
0
        const auto g1_x = result.second->first.ToTrimmedString();
1929
0
        const auto g1_y = result.second->second.ToTrimmedString();
1930
1931
0
        G1AddToPool(curveID, g1_x, g1_y);
1932
1933
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1934
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1935
0
    }
1936
3
}
1937
1938
3
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_Compress_G2>::callModule(std::shared_ptr<Module> module, operation::BLS_Compress_G2& op) const {
1939
3
    return module->OpBLS_Compress_G2(op);
1940
3
}
1941
1942
/* Specialization for operation::BLS_G1_Add */
1943
73
template<> void ExecutorBase<component::G1, operation::BLS_G1_Add>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_Add& op, const ExecutorBase<component::G1, operation::BLS_G1_Add>::ResultPair& result) const {
1944
73
    (void)module;
1945
1946
73
    if ( result.second != std::nullopt  ) {
1947
0
        const auto curveID = op.curveType.Get();
1948
0
        const auto g1_x = result.second->first.ToTrimmedString();
1949
0
        const auto g1_y = result.second->second.ToTrimmedString();
1950
1951
0
        G1AddToPool(curveID, g1_x, g1_y);
1952
1953
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1954
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1955
0
    }
1956
73
}
1957
1958
73
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Add& op) const {
1959
73
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1960
73
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1961
63
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1962
53
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1963
43
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1964
1965
33
    return module->OpBLS_G1_Add(op);
1966
43
}
1967
1968
/* Specialization for operation::BLS_G1_Mul */
1969
39
template<> void ExecutorBase<component::G1, operation::BLS_G1_Mul>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op, const ExecutorBase<component::G1, operation::BLS_G1_Mul>::ResultPair& result) const {
1970
39
    (void)module;
1971
1972
39
    if ( result.second != std::nullopt  ) {
1973
0
        const auto curveID = op.curveType.Get();
1974
0
        const auto g1_x = result.second->first.ToTrimmedString();
1975
0
        const auto g1_y = result.second->second.ToTrimmedString();
1976
1977
0
        G1AddToPool(curveID, g1_x, g1_y);
1978
1979
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
1980
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
1981
0
    }
1982
39
}
1983
1984
39
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Mul& op) const {
1985
39
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1986
39
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1987
37
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1988
25
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1989
1990
15
    return module->OpBLS_G1_Mul(op);
1991
25
}
1992
1993
/* Specialization for operation::BLS_G1_IsEq */
1994
78
template<> void ExecutorBase<bool, operation::BLS_G1_IsEq>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op, const ExecutorBase<bool, operation::BLS_G1_IsEq>::ResultPair& result) const {
1995
78
    (void)module;
1996
78
    (void)op;
1997
78
    (void)result;
1998
78
}
1999
2000
78
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
2001
78
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2002
78
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2003
68
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2004
57
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2005
46
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2006
2007
36
    return module->OpBLS_G1_IsEq(op);
2008
46
}
2009
2010
/* Specialization for operation::BLS_G1_Neg */
2011
31
template<> void ExecutorBase<component::G1, operation::BLS_G1_Neg>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_Neg& op, const ExecutorBase<component::G1, operation::BLS_G1_Neg>::ResultPair& result) const {
2012
31
    (void)module;
2013
2014
31
    if ( result.second != std::nullopt  ) {
2015
0
        const auto curveID = op.curveType.Get();
2016
0
        const auto g1_x = result.second->first.ToTrimmedString();
2017
0
        const auto g1_y = result.second->second.ToTrimmedString();
2018
2019
0
        G1AddToPool(curveID, g1_x, g1_y);
2020
2021
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
2022
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
2023
0
    }
2024
31
}
2025
2026
31
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_Neg& op) const {
2027
31
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2028
31
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
21
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
2031
18
    return module->OpBLS_G1_Neg(op);
2032
21
}
2033
2034
/* Specialization for operation::BLS_G2_Add */
2035
149
template<> void ExecutorBase<component::G2, operation::BLS_G2_Add>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_Add& op, const ExecutorBase<component::G2, operation::BLS_G2_Add>::ResultPair& result) const {
2036
149
    (void)module;
2037
2038
149
    if ( result.second != std::nullopt  ) {
2039
0
        const auto curveID = op.curveType.Get();
2040
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2041
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2042
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2043
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2044
2045
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2046
2047
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2048
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2049
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2050
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2051
0
    }
2052
149
}
2053
2054
149
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Add>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Add& op) const {
2055
149
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2056
149
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2057
139
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2058
129
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2059
115
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2060
105
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2061
99
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2062
89
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2063
79
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2064
2065
69
    return module->OpBLS_G2_Add(op);
2066
79
}
2067
2068
/* Specialization for operation::BLS_G2_Mul */
2069
76
template<> void ExecutorBase<component::G2, operation::BLS_G2_Mul>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_Mul& op, const ExecutorBase<component::G2, operation::BLS_G2_Mul>::ResultPair& result) const {
2070
76
    (void)module;
2071
2072
76
    if ( result.second != std::nullopt  ) {
2073
0
        const auto curveID = op.curveType.Get();
2074
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2075
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2076
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2077
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2078
2079
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2080
2081
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2082
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2083
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2084
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2085
0
    }
2086
76
}
2087
2088
76
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Mul>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Mul& op) const {
2089
76
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2090
76
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2091
66
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2092
56
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2093
50
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2094
39
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2095
2096
36
    return module->OpBLS_G2_Mul(op);
2097
39
}
2098
2099
/* Specialization for operation::BLS_G2_IsEq */
2100
158
template<> void ExecutorBase<bool, operation::BLS_G2_IsEq>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op, const ExecutorBase<bool, operation::BLS_G2_IsEq>::ResultPair& result) const {
2101
158
    (void)module;
2102
158
    (void)op;
2103
158
    (void)result;
2104
158
}
2105
2106
158
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2107
158
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2108
158
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2109
155
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2110
144
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2111
134
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2112
124
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2113
114
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2114
104
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2115
93
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2116
2117
78
    return module->OpBLS_G2_IsEq(op);
2118
93
}
2119
2120
/* Specialization for operation::BLS_G2_Neg */
2121
68
template<> void ExecutorBase<component::G2, operation::BLS_G2_Neg>::postprocess(std::shared_ptr<Module> module, operation::BLS_G2_Neg& op, const ExecutorBase<component::G2, operation::BLS_G2_Neg>::ResultPair& result) const {
2122
68
    (void)module;
2123
2124
68
    if ( result.second != std::nullopt  ) {
2125
0
        const auto curveID = op.curveType.Get();
2126
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2127
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2128
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2129
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2130
2131
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2132
2133
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2134
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2135
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2136
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2137
0
    }
2138
68
}
2139
2140
68
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_G2_Neg>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_Neg& op) const {
2141
68
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2142
68
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2143
58
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2144
48
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2145
45
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2146
2147
35
    return module->OpBLS_G2_Neg(op);
2148
45
}
2149
2150
/* Specialization for operation::BLS_G1_MultiExp */
2151
64
template<> void ExecutorBase<component::G1, operation::BLS_G1_MultiExp>::postprocess(std::shared_ptr<Module> module, operation::BLS_G1_MultiExp& op, const ExecutorBase<component::G1, operation::BLS_G1_MultiExp>::ResultPair& result) const {
2152
64
    (void)module;
2153
2154
64
    if ( result.second != std::nullopt  ) {
2155
0
        const auto curveID = op.curveType.Get();
2156
0
        const auto g1_x = result.second->first.ToTrimmedString();
2157
0
        const auto g1_y = result.second->second.ToTrimmedString();
2158
2159
0
        G1AddToPool(curveID, g1_x, g1_y);
2160
2161
0
        if ( g1_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_x); }
2162
0
        if ( g1_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g1_y); }
2163
0
    }
2164
64
}
2165
2166
64
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_G1_MultiExp>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_MultiExp& op) const {
2167
64
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2168
2169
1.70k
    for (const auto& point_scalar : op.points_scalars.points_scalars) {
2170
1.70k
        if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2171
1.69k
        if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2172
1.69k
        if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2173
1.69k
    }
2174
2175
51
    return module->OpBLS_G1_MultiExp(op);
2176
64
}
2177
2178
/* Specialization for operation::Misc */
2179
6
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2180
6
    (void)module;
2181
6
    (void)op;
2182
6
    (void)result;
2183
6
}
2184
2185
6
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2186
6
    return module->OpMisc(op);
2187
6
}
2188
2189
/* Specialization for operation::BLS_HashToG2 */
2190
7
template<> void ExecutorBase<component::G2, operation::BLS_HashToG2>::postprocess(std::shared_ptr<Module> module, operation::BLS_HashToG2& op, const ExecutorBase<component::G2, operation::BLS_HashToG2>::ResultPair& result) const {
2191
7
    (void)module;
2192
2193
7
    if ( result.second != std::nullopt  ) {
2194
0
        const auto curveID = op.curveType.Get();
2195
0
        const auto g2_v = result.second->first.first.ToTrimmedString();
2196
0
        const auto g2_w = result.second->first.second.ToTrimmedString();
2197
0
        const auto g2_x = result.second->second.first.ToTrimmedString();
2198
0
        const auto g2_y = result.second->second.second.ToTrimmedString();
2199
2200
0
        G2AddToPool(curveID, g2_v, g2_w, g2_x, g2_y);
2201
2202
0
        if ( g2_v.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_v); }
2203
0
        if ( g2_w.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_w); }
2204
0
        if ( g2_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_x); }
2205
0
        if ( g2_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(g2_y); }
2206
0
    }
2207
7
}
2208
2209
7
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2210
7
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2211
7
    return module->OpBLS_HashToG2(op);
2212
7
}
2213
2214
ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2215
115
    ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options)
2216
115
{ }
2217
110
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2218
110
    this->modulo = component::Bignum(modulo);
2219
110
}
2220
2221
ExecutorBignumCalc_Mod_BLS12_381_R::ExecutorBignumCalc_Mod_BLS12_381_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2222
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2223
5
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2224
5
}
2225
2226
ExecutorBignumCalc_Mod_BLS12_381_P::ExecutorBignumCalc_Mod_BLS12_381_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2227
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2228
5
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2229
5
}
2230
2231
ExecutorBignumCalc_Mod_BLS12_377_R::ExecutorBignumCalc_Mod_BLS12_377_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2232
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2233
5
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2234
5
}
2235
2236
ExecutorBignumCalc_Mod_BLS12_377_P::ExecutorBignumCalc_Mod_BLS12_377_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2237
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2238
5
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2239
5
}
2240
2241
ExecutorBignumCalc_Mod_BN128_R::ExecutorBignumCalc_Mod_BN128_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2242
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2243
5
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2244
5
}
2245
2246
ExecutorBignumCalc_Mod_BN128_P::ExecutorBignumCalc_Mod_BN128_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2247
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2248
5
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2249
5
}
2250
2251
ExecutorBignumCalc_Mod_Vesta_R::ExecutorBignumCalc_Mod_Vesta_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2252
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2253
5
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337"));
2254
5
}
2255
2256
ExecutorBignumCalc_Mod_Vesta_P::ExecutorBignumCalc_Mod_Vesta_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2257
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2258
5
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097"));
2259
5
}
2260
2261
ExecutorBignumCalc_Mod_ED25519::ExecutorBignumCalc_Mod_ED25519(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2262
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2263
5
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2264
5
}
2265
2266
ExecutorBignumCalc_Mod_Edwards_R::ExecutorBignumCalc_Mod_Edwards_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2267
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2268
5
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2269
5
}
2270
2271
ExecutorBignumCalc_Mod_Edwards_P::ExecutorBignumCalc_Mod_Edwards_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2272
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2273
5
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2274
5
}
2275
2276
ExecutorBignumCalc_Mod_Goldilocks::ExecutorBignumCalc_Mod_Goldilocks(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2277
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2278
5
    CF_NORET(SetModulo("18446744069414584321"));
2279
5
}
2280
2281
ExecutorBignumCalc_Mod_MNT4_R::ExecutorBignumCalc_Mod_MNT4_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2282
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2283
5
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2284
5
}
2285
2286
ExecutorBignumCalc_Mod_MNT4_P::ExecutorBignumCalc_Mod_MNT4_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2287
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2288
5
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2289
5
}
2290
2291
ExecutorBignumCalc_Mod_MNT6_R::ExecutorBignumCalc_Mod_MNT6_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2292
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2293
5
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2294
5
}
2295
2296
ExecutorBignumCalc_Mod_MNT6_P::ExecutorBignumCalc_Mod_MNT6_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2297
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2298
5
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2299
5
}
2300
2301
ExecutorBignumCalc_Mod_2Exp64::ExecutorBignumCalc_Mod_2Exp64(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2302
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2303
5
    CF_NORET(SetModulo("18446744073709551616"));
2304
5
}
2305
2306
ExecutorBignumCalc_Mod_2Exp128::ExecutorBignumCalc_Mod_2Exp128(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2307
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2308
5
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2309
5
}
2310
2311
ExecutorBignumCalc_Mod_2Exp256::ExecutorBignumCalc_Mod_2Exp256(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2312
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2313
5
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2314
5
}
2315
2316
ExecutorBignumCalc_Mod_2Exp512::ExecutorBignumCalc_Mod_2Exp512(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2317
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2318
5
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2319
5
}
2320
2321
ExecutorBignumCalc_Mod_SECP256K1::ExecutorBignumCalc_Mod_SECP256K1(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2322
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2323
5
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2324
5
}
2325
2326
ExecutorBignumCalc_Mod_SECP256K1_P::ExecutorBignumCalc_Mod_SECP256K1_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2327
5
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2328
5
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2329
5
}
2330
2331
ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2332
5
    ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options)
2333
5
{ }
2334
0
void ExecutorBignumCalc_Fp2::SetModulo(const std::string& modulo) {
2335
0
    this->modulo = component::Bignum(modulo);
2336
0
}
2337
2338
ExecutorBignumCalc_Fp12::ExecutorBignumCalc_Fp12(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2339
5
    ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options)
2340
5
{ }
2341
0
void ExecutorBignumCalc_Fp12::SetModulo(const std::string& modulo) {
2342
0
    this->modulo = component::Bignum(modulo);
2343
0
}
2344
2345
template <class ResultType, class OperationType>
2346
ExecutorBase<ResultType, OperationType>::ExecutorBase(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2347
535
    operationID(operationID),
2348
535
    modules(modules),
2349
535
    options(options)
2350
535
{
2351
535
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
115
    operationID(operationID),
2348
115
    modules(modules),
2349
115
    options(options)
2350
115
{
2351
115
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
5
    operationID(operationID),
2348
5
    modules(modules),
2349
5
    options(options)
2350
5
{
2351
5
}
2352
2353
/* Specialization for operation::SR25519_Verify */
2354
4
template<> void ExecutorBase<bool, operation::SR25519_Verify>::postprocess(std::shared_ptr<Module> module, operation::SR25519_Verify& op, const ExecutorBase<bool, operation::SR25519_Verify>::ResultPair& result) const {
2355
4
    (void)module;
2356
4
    (void)op;
2357
4
    (void)result;
2358
4
}
2359
2360
4
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2361
4
    return module->OpSR25519_Verify(op);
2362
4
}
2363
2364
template <class ResultType, class OperationType>
2365
535
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
535
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2365
115
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
115
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2365
5
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
5
}
2367
2368
/* Filter away the values in the set that are std::nullopt */
2369
template <class ResultType, class OperationType>
2370
14.6k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
14.6k
    ResultSet ret;
2372
2373
44.5k
    for (const auto& result : results) {
2374
44.5k
        if ( result.second == std::nullopt ) {
2375
27.8k
            continue;
2376
27.8k
        }
2377
2378
16.6k
        ret.push_back(result);
2379
16.6k
    }
2380
2381
14.6k
    return ret;
2382
14.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
50
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
50
    ResultSet ret;
2372
2373
401
    for (const auto& result : results) {
2374
401
        if ( result.second == std::nullopt ) {
2375
68
            continue;
2376
68
        }
2377
2378
333
        ret.push_back(result);
2379
333
    }
2380
2381
50
    return ret;
2382
50
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
65
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
65
    ResultSet ret;
2372
2373
528
    for (const auto& result : results) {
2374
528
        if ( result.second == std::nullopt ) {
2375
215
            continue;
2376
215
        }
2377
2378
313
        ret.push_back(result);
2379
313
    }
2380
2381
65
    return ret;
2382
65
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
7
    ResultSet ret;
2372
2373
92
    for (const auto& result : results) {
2374
92
        if ( result.second == std::nullopt ) {
2375
92
            continue;
2376
92
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
7
    return ret;
2382
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
35
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
35
    ResultSet ret;
2372
2373
297
    for (const auto& result : results) {
2374
297
        if ( result.second == std::nullopt ) {
2375
162
            continue;
2376
162
        }
2377
2378
135
        ret.push_back(result);
2379
135
    }
2380
2381
35
    return ret;
2382
35
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> > > > const&) const
Line
Count
Source
2370
240
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
240
    ResultSet ret;
2372
2373
1.77k
    for (const auto& result : results) {
2374
1.77k
        if ( result.second == std::nullopt ) {
2375
955
            continue;
2376
955
        }
2377
2378
818
        ret.push_back(result);
2379
818
    }
2380
2381
240
    return ret;
2382
240
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
103
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
103
    ResultSet ret;
2372
2373
832
    for (const auto& result : results) {
2374
832
        if ( result.second == std::nullopt ) {
2375
611
            continue;
2376
611
        }
2377
2378
221
        ret.push_back(result);
2379
221
    }
2380
2381
103
    return ret;
2382
103
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
5
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
5
    ResultSet ret;
2372
2373
72
    for (const auto& result : results) {
2374
72
        if ( result.second == std::nullopt ) {
2375
72
            continue;
2376
72
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
5
    return ret;
2382
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
34
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
34
    ResultSet ret;
2372
2373
296
    for (const auto& result : results) {
2374
296
        if ( result.second == std::nullopt ) {
2375
207
            continue;
2376
207
        }
2377
2378
89
        ret.push_back(result);
2379
89
    }
2380
2381
34
    return ret;
2382
34
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
5
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
5
    ResultSet ret;
2372
2373
72
    for (const auto& result : results) {
2374
72
        if ( result.second == std::nullopt ) {
2375
72
            continue;
2376
72
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
5
    return ret;
2382
5
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
6
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
6
    ResultSet ret;
2372
2373
91
    for (const auto& result : results) {
2374
91
        if ( result.second == std::nullopt ) {
2375
91
            continue;
2376
91
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
6
    return ret;
2382
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
7
    ResultSet ret;
2372
2373
98
    for (const auto& result : results) {
2374
98
        if ( result.second == std::nullopt ) {
2375
98
            continue;
2376
98
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
7
    return ret;
2382
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
25
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
25
    ResultSet ret;
2372
2373
267
    for (const auto& result : results) {
2374
267
        if ( result.second == std::nullopt ) {
2375
129
            continue;
2376
129
        }
2377
2378
138
        ret.push_back(result);
2379
138
    }
2380
2381
25
    return ret;
2382
25
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
6
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
6
    ResultSet ret;
2372
2373
90
    for (const auto& result : results) {
2374
90
        if ( result.second == std::nullopt ) {
2375
90
            continue;
2376
90
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
6
    return ret;
2382
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
6
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
6
    ResultSet ret;
2372
2373
77
    for (const auto& result : results) {
2374
77
        if ( result.second == std::nullopt ) {
2375
77
            continue;
2376
77
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
6
    return ret;
2382
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
6
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
6
    ResultSet ret;
2372
2373
12
    for (const auto& result : results) {
2374
12
        if ( result.second == std::nullopt ) {
2375
12
            continue;
2376
12
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
6
    return ret;
2382
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
7
    ResultSet ret;
2372
2373
108
    for (const auto& result : results) {
2374
108
        if ( result.second == std::nullopt ) {
2375
108
            continue;
2376
108
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
7
    return ret;
2382
7
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&) const
Line
Count
Source
2370
4
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
4
    ResultSet ret;
2372
2373
56
    for (const auto& result : results) {
2374
56
        if ( result.second == std::nullopt ) {
2375
56
            continue;
2376
56
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
4
    return ret;
2382
4
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&) const
Line
Count
Source
2370
6
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
6
    ResultSet ret;
2372
2373
89
    for (const auto& result : results) {
2374
89
        if ( result.second == std::nullopt ) {
2375
89
            continue;
2376
89
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
6
    return ret;
2382
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
969
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
969
    ResultSet ret;
2372
2373
2.62k
    for (const auto& result : results) {
2374
2.62k
        if ( result.second == std::nullopt ) {
2375
1.63k
            continue;
2376
1.63k
        }
2377
2378
998
        ret.push_back(result);
2379
998
    }
2380
2381
969
    return ret;
2382
969
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
709
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
709
    ResultSet ret;
2372
2373
1.86k
    for (const auto& result : results) {
2374
1.86k
        if ( result.second == std::nullopt ) {
2375
1.40k
            continue;
2376
1.40k
        }
2377
2378
458
        ret.push_back(result);
2379
458
    }
2380
2381
709
    return ret;
2382
709
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECC_KeyPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECC_KeyPair> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> > > > const&) const
Line
Count
Source
2370
195
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
195
    ResultSet ret;
2372
2373
549
    for (const auto& result : results) {
2374
549
        if ( result.second == std::nullopt ) {
2375
549
            continue;
2376
549
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
195
    return ret;
2382
195
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2370
2.19k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2.19k
    ResultSet ret;
2372
2373
6.28k
    for (const auto& result : results) {
2374
6.28k
        if ( result.second == std::nullopt ) {
2375
2.29k
            continue;
2376
2.29k
        }
2377
2378
3.99k
        ret.push_back(result);
2379
3.99k
    }
2380
2381
2.19k
    return ret;
2382
2.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
102
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
102
    ResultSet ret;
2372
2373
301
    for (const auto& result : results) {
2374
301
        if ( result.second == std::nullopt ) {
2375
301
            continue;
2376
301
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
102
    return ret;
2382
102
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
1.13k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.13k
    ResultSet ret;
2372
2373
3.12k
    for (const auto& result : results) {
2374
3.12k
        if ( result.second == std::nullopt ) {
2375
1.60k
            continue;
2376
1.60k
        }
2377
2378
1.52k
        ret.push_back(result);
2379
1.52k
    }
2380
2381
1.13k
    return ret;
2382
1.13k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
5
    for (const auto& result : results) {
2374
5
        if ( result.second == std::nullopt ) {
2375
5
            continue;
2376
5
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
2
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2
    ResultSet ret;
2372
2373
7
    for (const auto& result : results) {
2374
7
        if ( result.second == std::nullopt ) {
2375
7
            continue;
2376
7
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
2
    return ret;
2382
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
9
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
9
    ResultSet ret;
2372
2373
28
    for (const auto& result : results) {
2374
28
        if ( result.second == std::nullopt ) {
2375
28
            continue;
2376
28
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
9
    return ret;
2382
9
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Signature> > > > const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Parameters> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::DSA_Parameters> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const
Line
Count
Source
2370
4
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
4
    ResultSet ret;
2372
2373
8
    for (const auto& result : results) {
2374
8
        if ( result.second == std::nullopt ) {
2375
8
            continue;
2376
8
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
4
    return ret;
2382
4
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
241
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
241
    ResultSet ret;
2372
2373
702
    for (const auto& result : results) {
2374
702
        if ( result.second == std::nullopt ) {
2375
595
            continue;
2376
595
        }
2377
2378
107
        ret.push_back(result);
2379
107
    }
2380
2381
241
    return ret;
2382
241
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
285
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
285
    ResultSet ret;
2372
2373
827
    for (const auto& result : results) {
2374
827
        if ( result.second == std::nullopt ) {
2375
815
            continue;
2376
815
        }
2377
2378
12
        ret.push_back(result);
2379
12
    }
2380
2381
285
    return ret;
2382
285
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
799
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
799
    ResultSet ret;
2372
2373
2.12k
    for (const auto& result : results) {
2374
2.12k
        if ( result.second == std::nullopt ) {
2375
2.00k
            continue;
2376
2.00k
        }
2377
2378
119
        ret.push_back(result);
2379
119
    }
2380
2381
799
    return ret;
2382
799
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
553
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
553
    ResultSet ret;
2372
2373
1.55k
    for (const auto& result : results) {
2374
1.55k
        if ( result.second == std::nullopt ) {
2375
1.43k
            continue;
2376
1.43k
        }
2377
2378
116
        ret.push_back(result);
2379
116
    }
2380
2381
553
    return ret;
2382
553
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
6
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
6
    ResultSet ret;
2372
2373
17
    for (const auto& result : results) {
2374
17
        if ( result.second == std::nullopt ) {
2375
15
            continue;
2376
15
        }
2377
2378
2
        ret.push_back(result);
2379
2
    }
2380
2381
6
    return ret;
2382
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
834
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
834
    ResultSet ret;
2372
2373
2.23k
    for (const auto& result : results) {
2374
2.23k
        if ( result.second == std::nullopt ) {
2375
2.15k
            continue;
2376
2.15k
        }
2377
2378
74
        ret.push_back(result);
2379
74
    }
2380
2381
834
    return ret;
2382
834
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
5
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
5
    ResultSet ret;
2372
2373
13
    for (const auto& result : results) {
2374
13
        if ( result.second == std::nullopt ) {
2375
6
            continue;
2376
6
        }
2377
2378
7
        ret.push_back(result);
2379
7
    }
2380
2381
5
    return ret;
2382
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
2370
434
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
434
    ResultSet ret;
2372
2373
1.21k
    for (const auto& result : results) {
2374
1.21k
        if ( result.second == std::nullopt ) {
2375
1.10k
            continue;
2376
1.10k
        }
2377
2378
114
        ret.push_back(result);
2379
114
    }
2380
2381
434
    return ret;
2382
434
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const
Line
Count
Source
2370
5.02k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
5.02k
    ResultSet ret;
2372
2373
14.4k
    for (const auto& result : results) {
2374
14.4k
        if ( result.second == std::nullopt ) {
2375
7.35k
            continue;
2376
7.35k
        }
2377
2378
7.08k
        ret.push_back(result);
2379
7.08k
    }
2380
2381
5.02k
    return ret;
2382
5.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
25
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
25
    ResultSet ret;
2372
2373
71
    for (const auto& result : results) {
2374
71
        if ( result.second == std::nullopt ) {
2375
71
            continue;
2376
71
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
25
    return ret;
2382
25
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
189
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
189
    ResultSet ret;
2372
2373
532
    for (const auto& result : results) {
2374
532
        if ( result.second == std::nullopt ) {
2375
532
            continue;
2376
532
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
189
    return ret;
2382
189
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
2
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2
    ResultSet ret;
2372
2373
4
    for (const auto& result : results) {
2374
4
        if ( result.second == std::nullopt ) {
2375
4
            continue;
2376
4
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
2
    return ret;
2382
2
}
Unexecuted instantiation: 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
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> > > > const&) const
Line
Count
Source
2370
2
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2
    ResultSet ret;
2372
2373
7
    for (const auto& result : results) {
2374
7
        if ( result.second == std::nullopt ) {
2375
7
            continue;
2376
7
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
2
    return ret;
2382
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
8
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
8
    ResultSet ret;
2372
2373
18
    for (const auto& result : results) {
2374
18
        if ( result.second == std::nullopt ) {
2375
18
            continue;
2376
18
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
8
    return ret;
2382
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> > > > const&) const
Line
Count
Source
2370
2
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2
    ResultSet ret;
2372
2373
8
    for (const auto& result : results) {
2374
8
        if ( result.second == std::nullopt ) {
2375
8
            continue;
2376
8
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
2
    return ret;
2382
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
4
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
4
    ResultSet ret;
2372
2373
12
    for (const auto& result : results) {
2374
12
        if ( result.second == std::nullopt ) {
2375
12
            continue;
2376
12
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
4
    return ret;
2382
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
3
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3
    ResultSet ret;
2372
2373
8
    for (const auto& result : results) {
2374
8
        if ( result.second == std::nullopt ) {
2375
8
            continue;
2376
8
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
3
    return ret;
2382
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
3
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3
    ResultSet ret;
2372
2373
10
    for (const auto& result : results) {
2374
10
        if ( result.second == std::nullopt ) {
2375
10
            continue;
2376
10
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
3
    return ret;
2382
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&) const
Line
Count
Source
2370
8
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
8
    ResultSet ret;
2372
2373
16
    for (const auto& result : results) {
2374
16
        if ( result.second == std::nullopt ) {
2375
16
            continue;
2376
16
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
8
    return ret;
2382
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
2
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2
    ResultSet ret;
2372
2373
7
    for (const auto& result : results) {
2374
7
        if ( result.second == std::nullopt ) {
2375
7
            continue;
2376
7
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
2
    return ret;
2382
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
2
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2
    ResultSet ret;
2372
2373
7
    for (const auto& result : results) {
2374
7
        if ( result.second == std::nullopt ) {
2375
7
            continue;
2376
7
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
2
    return ret;
2382
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
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
8
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
8
    ResultSet ret;
2372
2373
20
    for (const auto& result : results) {
2374
20
        if ( result.second == std::nullopt ) {
2375
20
            continue;
2376
20
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
8
    return ret;
2382
8
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
14
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
14
    ResultSet ret;
2372
2373
44
    for (const auto& result : results) {
2374
44
        if ( result.second == std::nullopt ) {
2375
44
            continue;
2376
44
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
14
    return ret;
2382
14
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
Unexecuted instantiation: 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
Unexecuted instantiation: 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
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
5
    for (const auto& result : results) {
2374
5
        if ( result.second == std::nullopt ) {
2375
5
            continue;
2376
5
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
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
2370
20
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
20
    ResultSet ret;
2372
2373
52
    for (const auto& result : results) {
2374
52
        if ( result.second == std::nullopt ) {
2375
52
            continue;
2376
52
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
20
    return ret;
2382
20
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
8
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
8
    ResultSet ret;
2372
2373
22
    for (const auto& result : results) {
2374
22
        if ( result.second == std::nullopt ) {
2375
22
            continue;
2376
22
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
8
    return ret;
2382
8
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
21
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
21
    ResultSet ret;
2372
2373
56
    for (const auto& result : results) {
2374
56
        if ( result.second == std::nullopt ) {
2375
56
            continue;
2376
56
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
21
    return ret;
2382
21
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
8
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
8
    ResultSet ret;
2372
2373
19
    for (const auto& result : results) {
2374
19
        if ( result.second == std::nullopt ) {
2375
19
            continue;
2376
19
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
8
    return ret;
2382
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
43
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
43
    ResultSet ret;
2372
2373
115
    for (const auto& result : results) {
2374
115
        if ( result.second == std::nullopt ) {
2375
115
            continue;
2376
115
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
43
    return ret;
2382
43
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
23
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
23
    ResultSet ret;
2372
2373
57
    for (const auto& result : results) {
2374
57
        if ( result.second == std::nullopt ) {
2375
57
            continue;
2376
57
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
23
    return ret;
2382
23
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
48
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
48
    ResultSet ret;
2372
2373
122
    for (const auto& result : results) {
2374
122
        if ( result.second == std::nullopt ) {
2375
122
            continue;
2376
122
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
48
    return ret;
2382
48
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
19
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
19
    ResultSet ret;
2372
2373
50
    for (const auto& result : results) {
2374
50
        if ( result.second == std::nullopt ) {
2375
50
            continue;
2376
50
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
19
    return ret;
2382
19
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
22
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
22
    ResultSet ret;
2372
2373
54
    for (const auto& result : results) {
2374
54
        if ( result.second == std::nullopt ) {
2375
54
            continue;
2376
54
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
22
    return ret;
2382
22
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&) const
Line
Count
Source
2370
3
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3
    ResultSet ret;
2372
2373
6
    for (const auto& result : results) {
2374
6
        if ( result.second == std::nullopt ) {
2375
6
            continue;
2376
6
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
3
    return ret;
2382
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
2370
1
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1
    ResultSet ret;
2372
2373
2
    for (const auto& result : results) {
2374
2
        if ( result.second == std::nullopt ) {
2375
2
            continue;
2376
2
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
1
    return ret;
2382
1
}
2383
2384
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2385
template <>
2386
4.86k
void ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::ECC_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2387
4.86k
    (void)operations;
2388
4.86k
    (void)results;
2389
4.86k
    (void)data;
2390
4.86k
    (void)size;
2391
4.86k
}
2392
2393
template <class ResultType, class OperationType>
2394
1.25k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
1.25k
    (void)operation;
2396
2397
1.25k
    return false;
2398
1.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2394
45
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
45
    (void)operation;
2396
2397
45
    return false;
2398
45
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::dontCompare(cryptofuzz::operation::UMAC const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::dontCompare(cryptofuzz::operation::KDF_SCRYPT const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::dontCompare(cryptofuzz::operation::KDF_HKDF const&) const
Line
Count
Source
2394
16
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
16
    (void)operation;
2396
2397
16
    return false;
2398
16
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::dontCompare(cryptofuzz::operation::KDF_TLS1_PRF const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::dontCompare(cryptofuzz::operation::KDF_PBKDF const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::dontCompare(cryptofuzz::operation::KDF_PBKDF1 const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::dontCompare(cryptofuzz::operation::KDF_PBKDF2 const&) const
Line
Count
Source
2394
16
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
16
    (void)operation;
2396
2397
16
    return false;
2398
16
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::dontCompare(cryptofuzz::operation::KDF_ARGON2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::dontCompare(cryptofuzz::operation::KDF_SSH const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::dontCompare(cryptofuzz::operation::KDF_X963 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::dontCompare(cryptofuzz::operation::KDF_BCRYPT const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::dontCompare(cryptofuzz::operation::KDF_SP_800_108 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::dontCompare(cryptofuzz::operation::KDF_SRTP const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::dontCompare(cryptofuzz::operation::KDF_SRTCP const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::dontCompare(cryptofuzz::operation::ECC_PrivateToPublic const&) const
Line
Count
Source
2394
351
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
351
    (void)operation;
2396
2397
351
    return false;
2398
351
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2394
159
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
159
    (void)operation;
2396
2397
159
    return false;
2398
159
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::dontCompare(cryptofuzz::operation::ECC_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::dontCompare(cryptofuzz::operation::Schnorr_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::dontCompare(cryptofuzz::operation::ECCSI_Verify const&) const
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::dontCompare(cryptofuzz::operation::ECDSA_Verify const&) const
Line
Count
Source
2394
496
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
496
    (void)operation;
2396
2397
496
    return false;
2398
496
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::dontCompare(cryptofuzz::operation::ECGDSA_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::dontCompare(cryptofuzz::operation::ECRDSA_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::dontCompare(cryptofuzz::operation::Schnorr_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::dontCompare(cryptofuzz::operation::ECDSA_Recover const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::dontCompare(cryptofuzz::operation::DSA_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::dontCompare(cryptofuzz::operation::DSA_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::dontCompare(cryptofuzz::operation::DSA_GenerateParameters const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::dontCompare(cryptofuzz::operation::DSA_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::dontCompare(cryptofuzz::operation::DSA_GenerateKeyPair const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::dontCompare(cryptofuzz::operation::ECDH_Derive const&) const
Line
Count
Source
2394
35
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
35
    (void)operation;
2396
2397
35
    return false;
2398
35
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::dontCompare(cryptofuzz::operation::ECIES_Encrypt const&) const
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::dontCompare(cryptofuzz::operation::ECIES_Decrypt const&) const
Line
Count
Source
2394
3
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
3
    (void)operation;
2396
2397
3
    return false;
2398
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::dontCompare(cryptofuzz::operation::ECC_Point_Add const&) const
Line
Count
Source
2394
37
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
37
    (void)operation;
2396
2397
37
    return false;
2398
37
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::dontCompare(cryptofuzz::operation::ECC_Point_Sub const&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::dontCompare(cryptofuzz::operation::ECC_Point_Mul const&) const
Line
Count
Source
2394
36
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
36
    (void)operation;
2396
2397
36
    return false;
2398
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2394
1
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
1
    (void)operation;
2396
2397
1
    return false;
2398
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl const&) const
Line
Count
Source
2394
23
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
23
    (void)operation;
2396
2397
23
    return false;
2398
23
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::dontCompare(cryptofuzz::operation::ECC_Point_Cmp const&) const
Line
Count
Source
2394
2
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
2
    (void)operation;
2396
2397
2
    return false;
2398
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
2394
36
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
36
    (void)operation;
2396
2397
36
    return false;
2398
36
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::dontCompare(cryptofuzz::operation::BignumCalc_Fp2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::dontCompare(cryptofuzz::operation::BignumCalc_Fp12 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::dontCompare(cryptofuzz::operation::BLS_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::dontCompare(cryptofuzz::operation::BLS_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::dontCompare(cryptofuzz::operation::BLS_BatchSign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::dontCompare(cryptofuzz::operation::BLS_BatchVerify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::dontCompare(cryptofuzz::operation::BLS_Pairing const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::dontCompare(cryptofuzz::operation::BLS_MillerLoop const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::dontCompare(cryptofuzz::operation::BLS_FinalExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::dontCompare(cryptofuzz::operation::BLS_HashToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::dontCompare(cryptofuzz::operation::BLS_HashToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::dontCompare(cryptofuzz::operation::BLS_MapToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::dontCompare(cryptofuzz::operation::BLS_MapToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG1OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG2OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::dontCompare(cryptofuzz::operation::BLS_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::dontCompare(cryptofuzz::operation::BLS_Decompress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::dontCompare(cryptofuzz::operation::BLS_Compress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::dontCompare(cryptofuzz::operation::BLS_Decompress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::dontCompare(cryptofuzz::operation::BLS_Compress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::dontCompare(cryptofuzz::operation::BLS_G1_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::dontCompare(cryptofuzz::operation::BLS_G1_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::dontCompare(cryptofuzz::operation::BLS_G1_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::dontCompare(cryptofuzz::operation::BLS_G1_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::dontCompare(cryptofuzz::operation::BLS_G2_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::dontCompare(cryptofuzz::operation::BLS_G2_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::dontCompare(cryptofuzz::operation::BLS_G2_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::dontCompare(cryptofuzz::operation::BLS_G2_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::dontCompare(cryptofuzz::operation::BLS_G1_MultiExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::dontCompare(cryptofuzz::operation::Misc const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::dontCompare(cryptofuzz::operation::SR25519_Verify const&) const
2399
2400
template <>
2401
2.36k
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2402
2.36k
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2403
2.34k
    if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; }
2404
2.34k
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2405
2.27k
    if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; }
2406
2407
2.27k
    return false;
2408
2.27k
}
2409
2410
template <>
2411
0
bool ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>::dontCompare(const operation::ECCSI_Sign& operation) const {
2412
0
    (void)operation;
2413
0
    return true;
2414
0
}
2415
2416
template <>
2417
1.37k
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2418
1.37k
    if (
2419
1.37k
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2420
1.10k
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2421
712
        if ( operation.UseRandomNonce() ) {
2422
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2423
545
            return true;
2424
545
        }
2425
712
    }
2426
2427
832
    return false;
2428
1.37k
}
2429
2430
template <>
2431
0
bool ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>::dontCompare(const operation::ECGDSA_Sign& operation) const {
2432
0
    if (
2433
0
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2434
0
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2435
0
        if ( operation.UseRandomNonce() ) {
2436
            /* Don't compare ECGDSA signatures comptued from a randomly generated nonce */
2437
0
            return true;
2438
0
        }
2439
0
    }
2440
2441
0
    return false;
2442
0
}
2443
2444
template <>
2445
0
bool ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>::dontCompare(const operation::ECRDSA_Sign& operation) const {
2446
0
    if (
2447
0
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2448
0
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2449
0
        if ( operation.UseRandomNonce() ) {
2450
            /* Don't compare ECRDSA signatures comptued from a randomly generated nonce */
2451
0
            return true;
2452
0
        }
2453
0
    }
2454
2455
0
    return false;
2456
0
}
2457
2458
/* OpenSSL DES_EDE3_WRAP randomizes the IV, result is different each time */
2459
template <>
2460
112
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2461
112
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2462
2463
112
    return false;
2464
112
}
2465
2466
template <>
2467
25
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2468
25
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2469
2470
25
    return false;
2471
25
}
2472
2473
template <>
2474
14
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2475
14
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2476
2477
14
    return false;
2478
14
}
2479
2480
template <>
2481
48
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2482
48
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2483
2484
48
    return false;
2485
48
}
2486
2487
template <class ResultType, class OperationType>
2488
50.2k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
50.2k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
35.6k
        return;
2492
35.6k
    }
2493
2494
14.6k
    const auto filtered = filter(results);
2495
2496
14.6k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
9.41k
        return;
2499
9.41k
    }
2500
2501
5.20k
    if ( dontCompare(operations[0].second) == true ) {
2502
641
        return;
2503
641
    }
2504
2505
14.1k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
9.63k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
9.63k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
9.63k
        const bool equal = *prev == *cur;
2510
2511
9.63k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
9.63k
    }
2528
4.55k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Digest>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Digest> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
83
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
83
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
33
        return;
2492
33
    }
2493
2494
50
    const auto filtered = filter(results);
2495
2496
50
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
5
        return;
2499
5
    }
2500
2501
45
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
333
    for (size_t i = 1; i < filtered.size(); i++) {
2506
288
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
288
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
288
        const bool equal = *prev == *cur;
2510
2511
288
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
288
    }
2528
45
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::HMAC>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::HMAC> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
75
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
75
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
10
        return;
2492
10
    }
2493
2494
65
    const auto filtered = filter(results);
2495
2496
65
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
17
        return;
2499
17
    }
2500
2501
48
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
313
    for (size_t i = 1; i < filtered.size(); i++) {
2506
265
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
265
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
265
        const bool equal = *prev == *cur;
2510
2511
265
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
265
    }
2528
48
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::UMAC>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::UMAC> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
7
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
7
    const auto filtered = filter(results);
2495
2496
7
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
7
        return;
2499
7
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::CMAC>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::CMAC> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
57
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
57
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
22
        return;
2492
22
    }
2493
2494
35
    const auto filtered = filter(results);
2495
2496
35
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
21
        return;
2499
21
    }
2500
2501
14
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
135
    for (size_t i = 1; i < filtered.size(); i++) {
2506
121
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
121
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
121
        const bool equal = *prev == *cur;
2510
2511
121
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
121
    }
2528
14
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricEncrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricEncrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Ciphertext> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
371
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
371
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
131
        return;
2492
131
    }
2493
2494
240
    const auto filtered = filter(results);
2495
2496
240
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
128
        return;
2499
128
    }
2500
2501
112
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
818
    for (size_t i = 1; i < filtered.size(); i++) {
2506
706
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
706
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
706
        const bool equal = *prev == *cur;
2510
2511
706
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
706
    }
2528
112
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricDecrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SymmetricDecrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
172
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
172
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
69
        return;
2492
69
    }
2493
2494
103
    const auto filtered = filter(results);
2495
2496
103
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
78
        return;
2499
78
    }
2500
2501
25
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
221
    for (size_t i = 1; i < filtered.size(); i++) {
2506
196
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
196
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
196
        const bool equal = *prev == *cur;
2510
2511
196
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
196
    }
2528
25
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SCRYPT>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SCRYPT> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
5
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
5
    const auto filtered = filter(results);
2495
2496
5
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
5
        return;
2499
5
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_HKDF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_HKDF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
71
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
71
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
37
        return;
2492
37
    }
2493
2494
34
    const auto filtered = filter(results);
2495
2496
34
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
18
        return;
2499
18
    }
2500
2501
16
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
89
    for (size_t i = 1; i < filtered.size(); i++) {
2506
73
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
73
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
73
        const bool equal = *prev == *cur;
2510
2511
73
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
73
    }
2528
16
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_TLS1_PRF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_TLS1_PRF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
5
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
5
    const auto filtered = filter(results);
2495
2496
5
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
5
        return;
2499
5
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
6
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
6
    const auto filtered = filter(results);
2495
2496
6
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
6
        return;
2499
6
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
7
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
7
    const auto filtered = filter(results);
2495
2496
7
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
7
        return;
2499
7
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_PBKDF2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
38
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
38
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
13
        return;
2492
13
    }
2493
2494
25
    const auto filtered = filter(results);
2495
2496
25
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
9
        return;
2499
9
    }
2500
2501
16
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
138
    for (size_t i = 1; i < filtered.size(); i++) {
2506
122
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
122
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
122
        const bool equal = *prev == *cur;
2510
2511
122
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
122
    }
2528
16
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_ARGON2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_ARGON2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SSH>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SSH> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
6
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
6
    const auto filtered = filter(results);
2495
2496
6
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
6
        return;
2499
6
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_X963>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_X963> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
6
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
6
    const auto filtered = filter(results);
2495
2496
6
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
6
        return;
2499
6
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_BCRYPT>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_BCRYPT> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
6
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
6
    const auto filtered = filter(results);
2495
2496
6
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
6
        return;
2499
6
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SP_800_108> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
7
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
7
    const auto filtered = filter(results);
2495
2496
7
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
7
        return;
2499
7
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTP>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTP> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
4
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
4
    const auto filtered = filter(results);
2495
2496
4
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
4
        return;
2499
4
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTCP>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::KDF_SRTCP> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<std::__1::array<cryptofuzz::Buffer, 3ul> > > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
6
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
6
    const auto filtered = filter(results);
2495
2496
6
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
6
        return;
2499
6
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_PrivateToPublic>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_PrivateToPublic> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
3.79k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
3.79k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2.82k
        return;
2492
2.82k
    }
2493
2494
969
    const auto filtered = filter(results);
2495
2496
969
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
618
        return;
2499
618
    }
2500
2501
351
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
935
    for (size_t i = 1; i < filtered.size(); i++) {
2506
584
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
584
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
584
        const bool equal = *prev == *cur;
2510
2511
584
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
584
    }
2528
351
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_ValidatePubkey>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_ValidatePubkey> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2.55k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2.55k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.84k
        return;
2492
1.84k
    }
2493
2494
709
    const auto filtered = filter(results);
2495
2496
709
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
550
        return;
2499
550
    }
2500
2501
159
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
427
    for (size_t i = 1; i < filtered.size(); i++) {
2506
268
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
268
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
268
        const bool equal = *prev == *cur;
2510
2511
268
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
268
    }
2528
159
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECCSI_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
247
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
247
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
52
        return;
2492
52
    }
2493
2494
195
    const auto filtered = filter(results);
2495
2496
195
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
195
        return;
2499
195
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
3.97k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
3.97k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.77k
        return;
2492
1.77k
    }
2493
2494
2.19k
    const auto filtered = filter(results);
2495
2496
2.19k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
815
        return;
2499
815
    }
2500
2501
1.37k
    if ( dontCompare(operations[0].second) == true ) {
2502
545
        return;
2503
545
    }
2504
2505
2.44k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.61k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.61k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.61k
        const bool equal = *prev == *cur;
2510
2511
1.61k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
1.61k
    }
2528
832
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::ECDSA_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECCSI_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
114
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
114
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
12
        return;
2492
12
    }
2493
2494
102
    const auto filtered = filter(results);
2495
2496
102
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
102
        return;
2499
102
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2.06k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2.06k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
931
        return;
2492
931
    }
2493
2494
1.13k
    const auto filtered = filter(results);
2495
2496
1.13k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
635
        return;
2499
635
    }
2500
2501
496
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.38k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
892
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
892
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
892
        const bool equal = *prev == *cur;
2510
2511
892
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
892
    }
2528
496
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECGDSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECRDSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Schnorr_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Recover>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDSA_Recover> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
2
    const auto filtered = filter(results);
2495
2496
2
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2
        return;
2499
2
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
14
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
14
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
5
        return;
2492
5
    }
2493
2494
9
    const auto filtered = filter(results);
2495
2496
9
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
9
        return;
2499
9
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_PrivateToPublic>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::DSA_PrivateToPublic> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
4
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
4
    const auto filtered = filter(results);
2495
2496
4
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
4
        return;
2499
4
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDH_Derive>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECDH_Derive> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
368
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
368
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
127
        return;
2492
127
    }
2493
2494
241
    const auto filtered = filter(results);
2495
2496
241
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
206
        return;
2499
206
    }
2500
2501
35
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
99
    for (size_t i = 1; i < filtered.size(); i++) {
2506
64
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
64
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
64
        const bool equal = *prev == *cur;
2510
2511
64
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
64
    }
2528
35
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Decrypt>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECIES_Decrypt> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
469
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
469
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
184
        return;
2492
184
    }
2493
2494
285
    const auto filtered = filter(results);
2495
2496
285
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
282
        return;
2499
282
    }
2500
2501
3
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
7
    for (size_t i = 1; i < filtered.size(); i++) {
2506
4
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
4
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
4
        const bool equal = *prev == *cur;
2510
2511
4
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
4
    }
2528
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1.98k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1.98k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.18k
        return;
2492
1.18k
    }
2493
2494
799
    const auto filtered = filter(results);
2495
2496
799
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
762
        return;
2499
762
    }
2500
2501
37
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
113
    for (size_t i = 1; i < filtered.size(); i++) {
2506
76
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
76
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
76
        const bool equal = *prev == *cur;
2510
2511
76
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
76
    }
2528
37
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Mul>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Mul> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1.82k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1.82k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.27k
        return;
2492
1.27k
    }
2493
2494
553
    const auto filtered = filter(results);
2495
2496
553
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
517
        return;
2499
517
    }
2500
2501
36
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
109
    for (size_t i = 1; i < filtered.size(); i++) {
2506
73
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
73
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
73
        const bool equal = *prev == *cur;
2510
2511
73
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
73
    }
2528
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Neg>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Neg> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
18
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
12
        return;
2492
12
    }
2493
2494
6
    const auto filtered = filter(results);
2495
2496
6
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
5
        return;
2499
5
    }
2500
2501
1
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
2
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1
        const bool equal = *prev == *cur;
2510
2511
1
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
1
    }
2528
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Dbl> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
3.49k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
3.49k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2.66k
        return;
2492
2.66k
    }
2493
2494
834
    const auto filtered = filter(results);
2495
2496
834
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
811
        return;
2499
811
    }
2500
2501
23
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
65
    for (size_t i = 1; i < filtered.size(); i++) {
2506
42
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
42
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
42
        const bool equal = *prev == *cur;
2510
2511
42
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
42
    }
2528
23
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Cmp>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Cmp> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
10
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
10
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
5
        return;
2492
5
    }
2493
2494
5
    const auto filtered = filter(results);
2495
2496
5
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3
        return;
2499
3
    }
2500
2501
2
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
7
    for (size_t i = 1; i < filtered.size(); i++) {
2506
5
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
5
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
5
        const bool equal = *prev == *cur;
2510
2511
5
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
5
    }
2528
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
2488
713
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
713
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
279
        return;
2492
279
    }
2493
2494
434
    const auto filtered = filter(results);
2495
2496
434
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
398
        return;
2499
398
    }
2500
2501
36
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
108
    for (size_t i = 1; i < filtered.size(); i++) {
2506
72
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
72
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
72
        const bool equal = *prev == *cur;
2510
2511
72
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
72
    }
2528
36
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
26.8k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
26.8k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
21.8k
        return;
2492
21.8k
    }
2493
2494
5.02k
    const auto filtered = filter(results);
2495
2496
5.02k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2.65k
        return;
2499
2.65k
    }
2500
2501
2.36k
    if ( dontCompare(operations[0].second) == true ) {
2502
96
        return;
2503
96
    }
2504
2505
6.43k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
4.16k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
4.16k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
4.16k
        const bool equal = *prev == *cur;
2510
2511
4.16k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
4.16k
    }
2528
2.27k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
47
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
47
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
22
        return;
2492
22
    }
2493
2494
25
    const auto filtered = filter(results);
2495
2496
25
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
25
        return;
2499
25
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp12>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BignumCalc_Fp12> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
290
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
290
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
101
        return;
2492
101
    }
2493
2494
189
    const auto filtered = filter(results);
2495
2496
189
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
189
        return;
2499
189
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
3
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
2
    const auto filtered = filter(results);
2495
2496
2
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2
        return;
2499
2
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_PrivateToPublic_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
10
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
10
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
10
        return;
2492
10
    }
2493
2494
0
    const auto filtered = filter(results);
2495
2496
0
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
0
        return;
2499
0
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Sign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Sign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_Signature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
4
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
2493
2494
2
    const auto filtered = filter(results);
2495
2496
2
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2
        return;
2499
2
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
8
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
8
    const auto filtered = filter(results);
2495
2496
8
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
8
        return;
2499
8
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchSign>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchSign> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_BatchSignature> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
2
    const auto filtered = filter(results);
2495
2496
2
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2
        return;
2499
2
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchVerify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_BatchVerify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
4
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
4
    const auto filtered = filter(results);
2495
2496
4
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
4
        return;
2499
4
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
3
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
3
    const auto filtered = filter(results);
2495
2496
3
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3
        return;
2499
3
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Aggregate_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
3
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
3
    const auto filtered = filter(results);
2495
2496
3
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3
        return;
2499
3
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Pairing>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Pairing> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MillerLoop>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MillerLoop> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_FinalExp>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_FinalExp> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::Fp12> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
8
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
8
    const auto filtered = filter(results);
2495
2496
8
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
8
        return;
2499
8
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_HashToG2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
2
    const auto filtered = filter(results);
2495
2496
2
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2
        return;
2499
2
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG1>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG1> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
2
    const auto filtered = filter(results);
2495
2496
2
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
2
        return;
2499
2
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_MapToG2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG1OnCurve>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG1OnCurve> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
19
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
19
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
11
        return;
2492
11
    }
2493
2494
8
    const auto filtered = filter(results);
2495
2496
8
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
8
        return;
2499
8
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG2OnCurve>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_IsG2OnCurve> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
18
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
18
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
4
        return;
2492
4
    }
2493
2494
14
    const auto filtered = filter(results);
2495
2496
14
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
14
        return;
2499
14
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_GenerateKeyPair>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_GenerateKeyPair> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BLS_KeyPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
1
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
1
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
Unexecuted instantiation: 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
Unexecuted instantiation: 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
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Decompress_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G2>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_Compress_G2> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
2
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1
        return;
2492
1
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
41
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
41
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
21
        return;
2492
21
    }
2493
2494
20
    const auto filtered = filter(results);
2495
2496
20
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
20
        return;
2499
20
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Mul>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Mul> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
25
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
25
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
17
        return;
2492
17
    }
2493
2494
8
    const auto filtered = filter(results);
2495
2496
8
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
8
        return;
2499
8
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_IsEq>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_IsEq> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
43
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
43
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
22
        return;
2492
22
    }
2493
2494
21
    const auto filtered = filter(results);
2495
2496
21
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
21
        return;
2499
21
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Neg>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_Neg> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
20
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
20
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
12
        return;
2492
12
    }
2493
2494
8
    const auto filtered = filter(results);
2495
2496
8
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
8
        return;
2499
8
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
77
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
77
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
34
        return;
2492
34
    }
2493
2494
43
    const auto filtered = filter(results);
2495
2496
43
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
43
        return;
2499
43
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Mul>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Mul> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
42
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
42
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
19
        return;
2492
19
    }
2493
2494
23
    const auto filtered = filter(results);
2495
2496
23
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
23
        return;
2499
23
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_IsEq>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_IsEq> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
84
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
84
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
36
        return;
2492
36
    }
2493
2494
48
    const auto filtered = filter(results);
2495
2496
48
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
48
        return;
2499
48
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Neg>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G2_Neg> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
37
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
37
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
18
        return;
2492
18
    }
2493
2494
19
    const auto filtered = filter(results);
2495
2496
19
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
19
        return;
2499
19
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_MultiExp>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::BLS_G1_MultiExp> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
32
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
32
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
10
        return;
2492
10
    }
2493
2494
22
    const auto filtered = filter(results);
2495
2496
22
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
22
        return;
2499
22
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Misc>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::Misc> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Buffer> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
3
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
3
    const auto filtered = filter(results);
2495
2496
3
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3
        return;
2499
3
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SR25519_Verify>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::SR25519_Verify> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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 {
2489
3
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2
        return;
2492
2
    }
2493
2494
1
    const auto filtered = filter(results);
2495
2496
1
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1
        return;
2499
1
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
2529
2530
template <class ResultType, class OperationType>
2531
0
void ExecutorBase<ResultType, OperationType>::abort(std::vector<std::string> moduleNames, const std::string operation, const std::string algorithm, const std::string reason) const {
2532
0
    std::sort(moduleNames.begin(), moduleNames.end());
2533
2534
0
    printf("CPU:\n");
2535
0
    system("cat /proc/cpuinfo | grep '^model name' | head -n1");
2536
0
    system("cat /proc/cpuinfo | grep '^flags' | head -n1");
2537
2538
0
    printf("Assertion failure: ");
2539
0
    for (const auto& moduleName : moduleNames) {
2540
0
        printf("%s-", moduleName.c_str());
2541
0
    }
2542
0
    printf("%s-%s-%s\n", operation.c_str(), algorithm.c_str(), reason.c_str());
2543
0
    fflush(stdout);
2544
2545
0
    ::abort();
2546
0
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::abort(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) const
2547
2548
template <class ResultType, class OperationType>
2549
93.5k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
93.5k
    (void)parentDs;
2551
93.5k
    return op;
2552
93.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2549
467
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
467
    (void)parentDs;
2551
467
    return op;
2552
467
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2549
587
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
587
    (void)parentDs;
2551
587
    return op;
2552
587
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) const
Line
Count
Source
2549
124
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
124
    (void)parentDs;
2551
124
    return op;
2552
124
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2549
334
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
334
    (void)parentDs;
2551
334
    return op;
2552
334
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2549
1.95k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.95k
    (void)parentDs;
2551
1.95k
    return op;
2552
1.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2549
932
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
932
    (void)parentDs;
2551
932
    return op;
2552
932
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) const
Line
Count
Source
2549
104
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
104
    (void)parentDs;
2551
104
    return op;
2552
104
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2549
380
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
380
    (void)parentDs;
2551
380
    return op;
2552
380
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2549
88
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
88
    (void)parentDs;
2551
88
    return op;
2552
88
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2549
139
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
139
    (void)parentDs;
2551
139
    return op;
2552
139
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2549
146
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
146
    (void)parentDs;
2551
146
    return op;
2552
146
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2549
345
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
345
    (void)parentDs;
2551
345
    return op;
2552
345
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2549
90
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
90
    (void)parentDs;
2551
90
    return op;
2552
90
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2549
126
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
126
    (void)parentDs;
2551
126
    return op;
2552
126
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) const
Line
Count
Source
2549
12
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
12
    (void)parentDs;
2551
12
    return op;
2552
12
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SP_800_108) const
Line
Count
Source
2549
124
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
124
    (void)parentDs;
2551
124
    return op;
2552
124
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SRTP) const
Line
Count
Source
2549
89
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
89
    (void)parentDs;
2551
89
    return op;
2552
89
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SRTCP) const
Line
Count
Source
2549
106
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
106
    (void)parentDs;
2551
106
    return op;
2552
106
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2549
5.61k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.61k
    (void)parentDs;
2551
5.61k
    return op;
2552
5.61k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2549
3.92k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.92k
    (void)parentDs;
2551
3.92k
    return op;
2552
3.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2549
7.47k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
7.47k
    (void)parentDs;
2551
7.47k
    return op;
2552
7.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const
Line
Count
Source
2549
694
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
694
    (void)parentDs;
2551
694
    return op;
2552
694
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const
Line
Count
Source
2549
8.18k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
8.18k
    (void)parentDs;
2551
8.18k
    return op;
2552
8.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Sign) const
Line
Count
Source
2549
3
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3
    (void)parentDs;
2551
3
    return op;
2552
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Sign) const
Line
Count
Source
2549
3
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3
    (void)parentDs;
2551
3
    return op;
2552
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2549
416
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
416
    (void)parentDs;
2551
416
    return op;
2552
416
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2549
4.21k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.21k
    (void)parentDs;
2551
4.21k
    return op;
2552
4.21k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECRDSA_Verify) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Verify) const
Line
Count
Source
2549
5
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5
    (void)parentDs;
2551
5
    return op;
2552
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Recover) const
Line
Count
Source
2549
7
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
7
    (void)parentDs;
2551
7
    return op;
2552
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) const
Line
Count
Source
2549
33
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
33
    (void)parentDs;
2551
33
    return op;
2552
33
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2549
16
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
16
    (void)parentDs;
2551
16
    return op;
2552
16
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) const
Line
Count
Source
2549
8
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
8
    (void)parentDs;
2551
8
    return op;
2552
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) const
Line
Count
Source
2549
15
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
15
    (void)parentDs;
2551
15
    return op;
2552
15
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2549
932
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
932
    (void)parentDs;
2551
932
    return op;
2552
932
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2549
1.13k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.13k
    (void)parentDs;
2551
1.13k
    return op;
2552
1.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2549
1.19k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.19k
    (void)parentDs;
2551
1.19k
    return op;
2552
1.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2549
3.48k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3.48k
    (void)parentDs;
2551
3.48k
    return op;
2552
3.48k
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const
Line
Count
Source
2549
2.95k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.95k
    (void)parentDs;
2551
2.95k
    return op;
2552
2.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2549
29
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
29
    (void)parentDs;
2551
29
    return op;
2552
29
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2549
5.07k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.07k
    (void)parentDs;
2551
5.07k
    return op;
2552
5.07k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2549
18
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
18
    (void)parentDs;
2551
18
    return op;
2552
18
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2549
2.14k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.14k
    (void)parentDs;
2551
2.14k
    return op;
2552
2.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2549
1.65k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.65k
    (void)parentDs;
2551
1.65k
    return op;
2552
1.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2549
36.3k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
36.3k
    (void)parentDs;
2551
36.3k
    return op;
2552
36.3k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2549
93
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
93
    (void)parentDs;
2551
93
    return op;
2552
93
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2549
637
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
637
    (void)parentDs;
2551
637
    return op;
2552
637
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic) const
Line
Count
Source
2549
5
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5
    (void)parentDs;
2551
5
    return op;
2552
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) const
Line
Count
Source
2549
10
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
10
    (void)parentDs;
2551
10
    return op;
2552
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Sign) const
Line
Count
Source
2549
9
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
9
    (void)parentDs;
2551
9
    return op;
2552
9
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Verify) const
Line
Count
Source
2549
18
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
18
    (void)parentDs;
2551
18
    return op;
2552
18
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchSign) const
Line
Count
Source
2549
20
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
20
    (void)parentDs;
2551
20
    return op;
2552
20
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2549
29
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
29
    (void)parentDs;
2551
29
    return op;
2552
29
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) const
Line
Count
Source
2549
8
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
8
    (void)parentDs;
2551
8
    return op;
2552
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2549
22
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
22
    (void)parentDs;
2551
22
    return op;
2552
22
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_FinalExp) const
Line
Count
Source
2549
20
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
20
    (void)parentDs;
2551
20
    return op;
2552
20
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG1) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) const
Line
Count
Source
2549
7
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
7
    (void)parentDs;
2551
7
    return op;
2552
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) const
Line
Count
Source
2549
7
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
7
    (void)parentDs;
2551
7
    return op;
2552
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG2) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG1OnCurve) const
Line
Count
Source
2549
32
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
32
    (void)parentDs;
2551
32
    return op;
2552
32
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_IsG2OnCurve) const
Line
Count
Source
2549
48
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
48
    (void)parentDs;
2551
48
    return op;
2552
48
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_GenerateKeyPair) const
Line
Count
Source
2549
2
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2
    (void)parentDs;
2551
2
    return op;
2552
2
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G1) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
Line
Count
Source
2549
1
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1
    (void)parentDs;
2551
1
    return op;
2552
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) const
Line
Count
Source
2549
6
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
6
    (void)parentDs;
2551
6
    return op;
2552
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2549
3
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
3
    (void)parentDs;
2551
3
    return op;
2552
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2549
73
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
73
    (void)parentDs;
2551
73
    return op;
2552
73
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2549
40
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
40
    (void)parentDs;
2551
40
    return op;
2552
40
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2549
78
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
78
    (void)parentDs;
2551
78
    return op;
2552
78
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2549
31
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
31
    (void)parentDs;
2551
31
    return op;
2552
31
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2549
149
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
149
    (void)parentDs;
2551
149
    return op;
2552
149
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) const
Line
Count
Source
2549
76
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
76
    (void)parentDs;
2551
76
    return op;
2552
76
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2549
162
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
162
    (void)parentDs;
2551
162
    return op;
2552
162
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2549
68
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
68
    (void)parentDs;
2551
68
    return op;
2552
68
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const
Line
Count
Source
2549
96
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
96
    (void)parentDs;
2551
96
    return op;
2552
96
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) const
Line
Count
Source
2549
6
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
6
    (void)parentDs;
2551
6
    return op;
2552
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2549
5
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5
    (void)parentDs;
2551
5
    return op;
2552
5
}
2553
2554
4
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2555
4
    (void)parentDs;
2556
4
    op.modulo = modulo;
2557
4
    return op;
2558
4
}
2559
2560
10
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_381_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2561
10
    (void)parentDs;
2562
10
    op.modulo = modulo;
2563
10
    return op;
2564
10
}
2565
2566
1
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2567
1
    (void)parentDs;
2568
1
    op.modulo = modulo;
2569
1
    return op;
2570
1
}
2571
2572
1
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2573
1
    (void)parentDs;
2574
1
    op.modulo = modulo;
2575
1
    return op;
2576
1
}
2577
2578
2
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2579
2
    (void)parentDs;
2580
2
    op.modulo = modulo;
2581
2
    return op;
2582
2
}
2583
2584
0
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2585
0
    (void)parentDs;
2586
0
    op.modulo = modulo;
2587
0
    return op;
2588
0
}
2589
2590
0
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2591
0
    (void)parentDs;
2592
0
    op.modulo = modulo;
2593
0
    return op;
2594
0
}
2595
2596
5
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2597
5
    (void)parentDs;
2598
5
    op.modulo = modulo;
2599
5
    return op;
2600
5
}
2601
2602
0
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2603
0
    (void)parentDs;
2604
0
    op.modulo = modulo;
2605
0
    return op;
2606
0
}
2607
2608
0
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2609
0
    (void)parentDs;
2610
0
    op.modulo = modulo;
2611
0
    return op;
2612
0
}
2613
2614
1
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2615
1
    (void)parentDs;
2616
1
    op.modulo = modulo;
2617
1
    return op;
2618
1
}
2619
2620
2
operation::BignumCalc ExecutorBignumCalc_Mod_Goldilocks::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2621
2
    (void)parentDs;
2622
2
    op.modulo = modulo;
2623
2
    return op;
2624
2
}
2625
2626
2
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2627
2
    (void)parentDs;
2628
2
    op.modulo = modulo;
2629
2
    return op;
2630
2
}
2631
2632
6
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2633
6
    (void)parentDs;
2634
6
    op.modulo = modulo;
2635
6
    return op;
2636
6
}
2637
2638
3
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2639
3
    (void)parentDs;
2640
3
    op.modulo = modulo;
2641
3
    return op;
2642
3
}
2643
2644
0
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2645
0
    (void)parentDs;
2646
0
    op.modulo = modulo;
2647
0
    return op;
2648
0
}
2649
2650
0
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp64::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2651
0
    (void)parentDs;
2652
0
    op.modulo = modulo;
2653
0
    return op;
2654
0
}
2655
2656
0
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp128::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2657
0
    (void)parentDs;
2658
0
    op.modulo = modulo;
2659
0
    return op;
2660
0
}
2661
2662
4
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2663
4
    (void)parentDs;
2664
4
    op.modulo = modulo;
2665
4
    return op;
2666
4
}
2667
2668
0
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2669
0
    (void)parentDs;
2670
0
    op.modulo = modulo;
2671
0
    return op;
2672
0
}
2673
2674
4
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2675
4
    (void)parentDs;
2676
4
    op.modulo = modulo;
2677
4
    return op;
2678
4
}
2679
2680
1
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2681
1
    (void)parentDs;
2682
1
    op.modulo = modulo;
2683
1
    return op;
2684
1
}
2685
2686
template <class ResultType, class OperationType>
2687
94.5k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
94.5k
    Datasource ds(data, size);
2689
94.5k
    if ( parentDs != nullptr ) {
2690
94.5k
        auto modifier = parentDs->GetData(0);
2691
94.5k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
94.5k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
94.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
468
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
468
    Datasource ds(data, size);
2689
468
    if ( parentDs != nullptr ) {
2690
468
        auto modifier = parentDs->GetData(0);
2691
468
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
468
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
468
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
588
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
588
    Datasource ds(data, size);
2689
588
    if ( parentDs != nullptr ) {
2690
588
        auto modifier = parentDs->GetData(0);
2691
588
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
588
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
588
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
125
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
125
    Datasource ds(data, size);
2689
125
    if ( parentDs != nullptr ) {
2690
125
        auto modifier = parentDs->GetData(0);
2691
125
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
125
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
125
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
335
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
335
    Datasource ds(data, size);
2689
335
    if ( parentDs != nullptr ) {
2690
335
        auto modifier = parentDs->GetData(0);
2691
335
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
335
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
335
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.95k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.95k
    Datasource ds(data, size);
2689
1.95k
    if ( parentDs != nullptr ) {
2690
1.95k
        auto modifier = parentDs->GetData(0);
2691
1.95k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.95k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
934
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
934
    Datasource ds(data, size);
2689
934
    if ( parentDs != nullptr ) {
2690
934
        auto modifier = parentDs->GetData(0);
2691
934
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
934
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
934
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
105
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
105
    Datasource ds(data, size);
2689
105
    if ( parentDs != nullptr ) {
2690
105
        auto modifier = parentDs->GetData(0);
2691
105
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
105
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
105
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
382
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
382
    Datasource ds(data, size);
2689
382
    if ( parentDs != nullptr ) {
2690
382
        auto modifier = parentDs->GetData(0);
2691
382
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
382
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
382
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
89
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
89
    Datasource ds(data, size);
2689
89
    if ( parentDs != nullptr ) {
2690
89
        auto modifier = parentDs->GetData(0);
2691
89
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
89
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
89
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
141
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
141
    Datasource ds(data, size);
2689
141
    if ( parentDs != nullptr ) {
2690
141
        auto modifier = parentDs->GetData(0);
2691
141
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
141
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
141
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
148
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
148
    Datasource ds(data, size);
2689
148
    if ( parentDs != nullptr ) {
2690
148
        auto modifier = parentDs->GetData(0);
2691
148
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
148
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
148
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
346
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
346
    Datasource ds(data, size);
2689
346
    if ( parentDs != nullptr ) {
2690
346
        auto modifier = parentDs->GetData(0);
2691
346
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
346
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
346
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
90
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
90
    Datasource ds(data, size);
2689
90
    if ( parentDs != nullptr ) {
2690
90
        auto modifier = parentDs->GetData(0);
2691
90
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
90
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
90
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
127
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
127
    Datasource ds(data, size);
2689
127
    if ( parentDs != nullptr ) {
2690
127
        auto modifier = parentDs->GetData(0);
2691
127
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
127
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
127
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
12
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
12
    Datasource ds(data, size);
2689
12
    if ( parentDs != nullptr ) {
2690
12
        auto modifier = parentDs->GetData(0);
2691
12
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
12
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
12
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
124
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
124
    Datasource ds(data, size);
2689
124
    if ( parentDs != nullptr ) {
2690
124
        auto modifier = parentDs->GetData(0);
2691
124
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
124
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
124
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
89
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
89
    Datasource ds(data, size);
2689
89
    if ( parentDs != nullptr ) {
2690
89
        auto modifier = parentDs->GetData(0);
2691
89
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
89
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
89
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
106
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
106
    Datasource ds(data, size);
2689
106
    if ( parentDs != nullptr ) {
2690
106
        auto modifier = parentDs->GetData(0);
2691
106
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
106
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
106
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.70k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.70k
    Datasource ds(data, size);
2689
5.70k
    if ( parentDs != nullptr ) {
2690
5.70k
        auto modifier = parentDs->GetData(0);
2691
5.70k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.70k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.70k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.96k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.96k
    Datasource ds(data, size);
2689
3.96k
    if ( parentDs != nullptr ) {
2690
3.96k
        auto modifier = parentDs->GetData(0);
2691
3.96k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.96k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.96k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
7.51k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
7.51k
    Datasource ds(data, size);
2689
7.51k
    if ( parentDs != nullptr ) {
2690
7.51k
        auto modifier = parentDs->GetData(0);
2691
7.51k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
7.51k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
7.51k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
729
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
729
    Datasource ds(data, size);
2689
729
    if ( parentDs != nullptr ) {
2690
729
        auto modifier = parentDs->GetData(0);
2691
729
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
729
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
729
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
8.24k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
8.24k
    Datasource ds(data, size);
2689
8.24k
    if ( parentDs != nullptr ) {
2690
8.24k
        auto modifier = parentDs->GetData(0);
2691
8.24k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
8.24k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
8.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3
    Datasource ds(data, size);
2689
3
    if ( parentDs != nullptr ) {
2690
3
        auto modifier = parentDs->GetData(0);
2691
3
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3
    Datasource ds(data, size);
2689
3
    if ( parentDs != nullptr ) {
2690
3
        auto modifier = parentDs->GetData(0);
2691
3
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
463
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
463
    Datasource ds(data, size);
2689
463
    if ( parentDs != nullptr ) {
2690
463
        auto modifier = parentDs->GetData(0);
2691
463
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
463
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
463
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.27k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.27k
    Datasource ds(data, size);
2689
4.27k
    if ( parentDs != nullptr ) {
2690
4.27k
        auto modifier = parentDs->GetData(0);
2691
4.27k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.27k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.27k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5
    Datasource ds(data, size);
2689
5
    if ( parentDs != nullptr ) {
2690
5
        auto modifier = parentDs->GetData(0);
2691
5
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
7
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
7
    Datasource ds(data, size);
2689
7
    if ( parentDs != nullptr ) {
2690
7
        auto modifier = parentDs->GetData(0);
2691
7
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
7
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
33
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
33
    Datasource ds(data, size);
2689
33
    if ( parentDs != nullptr ) {
2690
33
        auto modifier = parentDs->GetData(0);
2691
33
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
33
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
33
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
16
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
16
    Datasource ds(data, size);
2689
16
    if ( parentDs != nullptr ) {
2690
16
        auto modifier = parentDs->GetData(0);
2691
16
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
16
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
16
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
8
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
8
    Datasource ds(data, size);
2689
8
    if ( parentDs != nullptr ) {
2690
8
        auto modifier = parentDs->GetData(0);
2691
8
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
8
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
15
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
15
    Datasource ds(data, size);
2689
15
    if ( parentDs != nullptr ) {
2690
15
        auto modifier = parentDs->GetData(0);
2691
15
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
15
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
15
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
963
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
963
    Datasource ds(data, size);
2689
963
    if ( parentDs != nullptr ) {
2690
963
        auto modifier = parentDs->GetData(0);
2691
963
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
963
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
963
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.17k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.17k
    Datasource ds(data, size);
2689
1.17k
    if ( parentDs != nullptr ) {
2690
1.17k
        auto modifier = parentDs->GetData(0);
2691
1.17k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.17k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.17k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.23k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.23k
    Datasource ds(data, size);
2689
1.23k
    if ( parentDs != nullptr ) {
2690
1.23k
        auto modifier = parentDs->GetData(0);
2691
1.23k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.23k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.23k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.56k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.56k
    Datasource ds(data, size);
2689
3.56k
    if ( parentDs != nullptr ) {
2690
3.56k
        auto modifier = parentDs->GetData(0);
2691
3.56k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.56k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.56k
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.02k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.02k
    Datasource ds(data, size);
2689
3.02k
    if ( parentDs != nullptr ) {
2690
3.02k
        auto modifier = parentDs->GetData(0);
2691
3.02k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.02k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
29
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
29
    Datasource ds(data, size);
2689
29
    if ( parentDs != nullptr ) {
2690
29
        auto modifier = parentDs->GetData(0);
2691
29
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
29
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
29
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.14k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.14k
    Datasource ds(data, size);
2689
5.14k
    if ( parentDs != nullptr ) {
2690
5.14k
        auto modifier = parentDs->GetData(0);
2691
5.14k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.14k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.14k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
18
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
18
    Datasource ds(data, size);
2689
18
    if ( parentDs != nullptr ) {
2690
18
        auto modifier = parentDs->GetData(0);
2691
18
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
18
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
18
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.24k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.24k
    Datasource ds(data, size);
2689
2.24k
    if ( parentDs != nullptr ) {
2690
2.24k
        auto modifier = parentDs->GetData(0);
2691
2.24k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.24k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.24k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.73k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.73k
    Datasource ds(data, size);
2689
1.73k
    if ( parentDs != nullptr ) {
2690
1.73k
        auto modifier = parentDs->GetData(0);
2691
1.73k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.73k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.73k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
36.4k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
36.4k
    Datasource ds(data, size);
2689
36.4k
    if ( parentDs != nullptr ) {
2690
36.4k
        auto modifier = parentDs->GetData(0);
2691
36.4k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
36.4k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
36.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
93
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
93
    Datasource ds(data, size);
2689
93
    if ( parentDs != nullptr ) {
2690
93
        auto modifier = parentDs->GetData(0);
2691
93
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
93
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
93
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
638
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
638
    Datasource ds(data, size);
2689
638
    if ( parentDs != nullptr ) {
2690
638
        auto modifier = parentDs->GetData(0);
2691
638
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
638
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
638
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5
    Datasource ds(data, size);
2689
5
    if ( parentDs != nullptr ) {
2690
5
        auto modifier = parentDs->GetData(0);
2691
5
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
10
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
10
    Datasource ds(data, size);
2689
10
    if ( parentDs != nullptr ) {
2690
10
        auto modifier = parentDs->GetData(0);
2691
10
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
10
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
9
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
9
    Datasource ds(data, size);
2689
9
    if ( parentDs != nullptr ) {
2690
9
        auto modifier = parentDs->GetData(0);
2691
9
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
9
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
9
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
18
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
18
    Datasource ds(data, size);
2689
18
    if ( parentDs != nullptr ) {
2690
18
        auto modifier = parentDs->GetData(0);
2691
18
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
18
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
18
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
22
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
22
    Datasource ds(data, size);
2689
22
    if ( parentDs != nullptr ) {
2690
22
        auto modifier = parentDs->GetData(0);
2691
22
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
22
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
22
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
30
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
30
    Datasource ds(data, size);
2689
30
    if ( parentDs != nullptr ) {
2690
30
        auto modifier = parentDs->GetData(0);
2691
30
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
30
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
30
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
9
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
9
    Datasource ds(data, size);
2689
9
    if ( parentDs != nullptr ) {
2690
9
        auto modifier = parentDs->GetData(0);
2691
9
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
9
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
9
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
24
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
24
    Datasource ds(data, size);
2689
24
    if ( parentDs != nullptr ) {
2690
24
        auto modifier = parentDs->GetData(0);
2691
24
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
24
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
24
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
21
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
21
    Datasource ds(data, size);
2689
21
    if ( parentDs != nullptr ) {
2690
21
        auto modifier = parentDs->GetData(0);
2691
21
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
21
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
21
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
7
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
7
    Datasource ds(data, size);
2689
7
    if ( parentDs != nullptr ) {
2690
7
        auto modifier = parentDs->GetData(0);
2691
7
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
7
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
7
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
7
    Datasource ds(data, size);
2689
7
    if ( parentDs != nullptr ) {
2690
7
        auto modifier = parentDs->GetData(0);
2691
7
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
7
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
32
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
32
    Datasource ds(data, size);
2689
32
    if ( parentDs != nullptr ) {
2690
32
        auto modifier = parentDs->GetData(0);
2691
32
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
32
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
32
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
48
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
48
    Datasource ds(data, size);
2689
48
    if ( parentDs != nullptr ) {
2690
48
        auto modifier = parentDs->GetData(0);
2691
48
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
48
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
48
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2
    Datasource ds(data, size);
2689
2
    if ( parentDs != nullptr ) {
2690
2
        auto modifier = parentDs->GetData(0);
2691
2
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
6
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
6
    Datasource ds(data, size);
2689
6
    if ( parentDs != nullptr ) {
2690
6
        auto modifier = parentDs->GetData(0);
2691
6
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
6
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3
    Datasource ds(data, size);
2689
3
    if ( parentDs != nullptr ) {
2690
3
        auto modifier = parentDs->GetData(0);
2691
3
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
74
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
74
    Datasource ds(data, size);
2689
74
    if ( parentDs != nullptr ) {
2690
74
        auto modifier = parentDs->GetData(0);
2691
74
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
74
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
74
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
40
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
40
    Datasource ds(data, size);
2689
40
    if ( parentDs != nullptr ) {
2690
40
        auto modifier = parentDs->GetData(0);
2691
40
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
40
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
40
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
78
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
78
    Datasource ds(data, size);
2689
78
    if ( parentDs != nullptr ) {
2690
78
        auto modifier = parentDs->GetData(0);
2691
78
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
78
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
78
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
31
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
31
    Datasource ds(data, size);
2689
31
    if ( parentDs != nullptr ) {
2690
31
        auto modifier = parentDs->GetData(0);
2691
31
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
31
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
31
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
149
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
149
    Datasource ds(data, size);
2689
149
    if ( parentDs != nullptr ) {
2690
149
        auto modifier = parentDs->GetData(0);
2691
149
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
149
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
149
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
76
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
76
    Datasource ds(data, size);
2689
76
    if ( parentDs != nullptr ) {
2690
76
        auto modifier = parentDs->GetData(0);
2691
76
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
76
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
76
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
162
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
162
    Datasource ds(data, size);
2689
162
    if ( parentDs != nullptr ) {
2690
162
        auto modifier = parentDs->GetData(0);
2691
162
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
162
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
162
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
68
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
68
    Datasource ds(data, size);
2689
68
    if ( parentDs != nullptr ) {
2690
68
        auto modifier = parentDs->GetData(0);
2691
68
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
68
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
68
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
97
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
97
    Datasource ds(data, size);
2689
97
    if ( parentDs != nullptr ) {
2690
97
        auto modifier = parentDs->GetData(0);
2691
97
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
97
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
97
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
6
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
6
    Datasource ds(data, size);
2689
6
    if ( parentDs != nullptr ) {
2690
6
        auto modifier = parentDs->GetData(0);
2691
6
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
6
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5
    Datasource ds(data, size);
2689
5
    if ( parentDs != nullptr ) {
2690
5
        auto modifier = parentDs->GetData(0);
2691
5
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5
}
2696
2697
template <class ResultType, class OperationType>
2698
93.6k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
93.6k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
93.6k
    if ( options.forceModule != std::nullopt ) {
2703
93.0k
        moduleID = *options.forceModule;
2704
93.0k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
93.6k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
93.6k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
93.6k
    return modules.at(moduleID);
2716
93.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
467
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
467
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
467
    if ( options.forceModule != std::nullopt ) {
2703
467
        moduleID = *options.forceModule;
2704
467
    }
2705
2706
    /* Skip if this is a disabled module */
2707
467
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
467
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
467
    return modules.at(moduleID);
2716
467
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
587
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
587
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
587
    if ( options.forceModule != std::nullopt ) {
2703
586
        moduleID = *options.forceModule;
2704
586
    }
2705
2706
    /* Skip if this is a disabled module */
2707
587
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
587
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
587
    return modules.at(moduleID);
2716
587
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
124
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
124
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
124
    if ( options.forceModule != std::nullopt ) {
2703
124
        moduleID = *options.forceModule;
2704
124
    }
2705
2706
    /* Skip if this is a disabled module */
2707
124
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
124
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
124
    return modules.at(moduleID);
2716
124
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
334
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
334
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
334
    if ( options.forceModule != std::nullopt ) {
2703
334
        moduleID = *options.forceModule;
2704
334
    }
2705
2706
    /* Skip if this is a disabled module */
2707
334
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
334
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
334
    return modules.at(moduleID);
2716
334
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.95k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.95k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.95k
    if ( options.forceModule != std::nullopt ) {
2703
1.95k
        moduleID = *options.forceModule;
2704
1.95k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.95k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.95k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.95k
    return modules.at(moduleID);
2716
1.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
932
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
932
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
932
    if ( options.forceModule != std::nullopt ) {
2703
932
        moduleID = *options.forceModule;
2704
932
    }
2705
2706
    /* Skip if this is a disabled module */
2707
932
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
932
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
932
    return modules.at(moduleID);
2716
932
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
104
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
104
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
104
    if ( options.forceModule != std::nullopt ) {
2703
104
        moduleID = *options.forceModule;
2704
104
    }
2705
2706
    /* Skip if this is a disabled module */
2707
104
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
104
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
104
    return modules.at(moduleID);
2716
104
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
380
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
380
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
380
    if ( options.forceModule != std::nullopt ) {
2703
380
        moduleID = *options.forceModule;
2704
380
    }
2705
2706
    /* Skip if this is a disabled module */
2707
380
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
380
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
380
    return modules.at(moduleID);
2716
380
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
88
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
88
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
88
    if ( options.forceModule != std::nullopt ) {
2703
88
        moduleID = *options.forceModule;
2704
88
    }
2705
2706
    /* Skip if this is a disabled module */
2707
88
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
88
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
88
    return modules.at(moduleID);
2716
88
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
139
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
139
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
139
    if ( options.forceModule != std::nullopt ) {
2703
139
        moduleID = *options.forceModule;
2704
139
    }
2705
2706
    /* Skip if this is a disabled module */
2707
139
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
139
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
139
    return modules.at(moduleID);
2716
139
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
146
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
146
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
146
    if ( options.forceModule != std::nullopt ) {
2703
146
        moduleID = *options.forceModule;
2704
146
    }
2705
2706
    /* Skip if this is a disabled module */
2707
146
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
146
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
146
    return modules.at(moduleID);
2716
146
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
345
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
345
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
345
    if ( options.forceModule != std::nullopt ) {
2703
344
        moduleID = *options.forceModule;
2704
344
    }
2705
2706
    /* Skip if this is a disabled module */
2707
345
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
345
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
345
    return modules.at(moduleID);
2716
345
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
90
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
90
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
90
    if ( options.forceModule != std::nullopt ) {
2703
90
        moduleID = *options.forceModule;
2704
90
    }
2705
2706
    /* Skip if this is a disabled module */
2707
90
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
90
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
90
    return modules.at(moduleID);
2716
90
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
126
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
126
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
126
    if ( options.forceModule != std::nullopt ) {
2703
126
        moduleID = *options.forceModule;
2704
126
    }
2705
2706
    /* Skip if this is a disabled module */
2707
126
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
126
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
126
    return modules.at(moduleID);
2716
126
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
12
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
12
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
12
    if ( options.forceModule != std::nullopt ) {
2703
12
        moduleID = *options.forceModule;
2704
12
    }
2705
2706
    /* Skip if this is a disabled module */
2707
12
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
12
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
12
    return modules.at(moduleID);
2716
12
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
124
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
124
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
124
    if ( options.forceModule != std::nullopt ) {
2703
124
        moduleID = *options.forceModule;
2704
124
    }
2705
2706
    /* Skip if this is a disabled module */
2707
124
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
124
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
124
    return modules.at(moduleID);
2716
124
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
89
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
89
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
89
    if ( options.forceModule != std::nullopt ) {
2703
88
        moduleID = *options.forceModule;
2704
88
    }
2705
2706
    /* Skip if this is a disabled module */
2707
89
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
89
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
89
    return modules.at(moduleID);
2716
89
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
106
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
106
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
106
    if ( options.forceModule != std::nullopt ) {
2703
106
        moduleID = *options.forceModule;
2704
106
    }
2705
2706
    /* Skip if this is a disabled module */
2707
106
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
106
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
106
    return modules.at(moduleID);
2716
106
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.61k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.61k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.61k
    if ( options.forceModule != std::nullopt ) {
2703
5.57k
        moduleID = *options.forceModule;
2704
5.57k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.61k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.61k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
5.61k
    return modules.at(moduleID);
2716
5.61k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.92k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.92k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.92k
    if ( options.forceModule != std::nullopt ) {
2703
3.84k
        moduleID = *options.forceModule;
2704
3.84k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.92k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.92k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
3.92k
    return modules.at(moduleID);
2716
3.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
7.47k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
7.47k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
7.47k
    if ( options.forceModule != std::nullopt ) {
2703
7.43k
        moduleID = *options.forceModule;
2704
7.43k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
7.47k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
7.47k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
7.47k
    return modules.at(moduleID);
2716
7.47k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
694
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
694
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
694
    if ( options.forceModule != std::nullopt ) {
2703
677
        moduleID = *options.forceModule;
2704
677
    }
2705
2706
    /* Skip if this is a disabled module */
2707
694
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
694
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
694
    return modules.at(moduleID);
2716
694
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
8.18k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
8.18k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
8.18k
    if ( options.forceModule != std::nullopt ) {
2703
8.17k
        moduleID = *options.forceModule;
2704
8.17k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
8.18k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
8.18k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
8.18k
    return modules.at(moduleID);
2716
8.18k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3
    if ( options.forceModule != std::nullopt ) {
2703
3
        moduleID = *options.forceModule;
2704
3
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
3
    return modules.at(moduleID);
2716
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3
    if ( options.forceModule != std::nullopt ) {
2703
3
        moduleID = *options.forceModule;
2704
3
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
3
    return modules.at(moduleID);
2716
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
416
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
416
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
416
    if ( options.forceModule != std::nullopt ) {
2703
399
        moduleID = *options.forceModule;
2704
399
    }
2705
2706
    /* Skip if this is a disabled module */
2707
416
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
416
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
416
    return modules.at(moduleID);
2716
416
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.21k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.21k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.21k
    if ( options.forceModule != std::nullopt ) {
2703
4.18k
        moduleID = *options.forceModule;
2704
4.18k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.21k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.21k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4.21k
    return modules.at(moduleID);
2716
4.21k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5
    if ( options.forceModule != std::nullopt ) {
2703
5
        moduleID = *options.forceModule;
2704
5
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
5
    return modules.at(moduleID);
2716
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
7
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
7
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
7
    if ( options.forceModule != std::nullopt ) {
2703
7
        moduleID = *options.forceModule;
2704
7
    }
2705
2706
    /* Skip if this is a disabled module */
2707
7
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
7
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
7
    return modules.at(moduleID);
2716
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
33
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
33
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
33
    if ( options.forceModule != std::nullopt ) {
2703
33
        moduleID = *options.forceModule;
2704
33
    }
2705
2706
    /* Skip if this is a disabled module */
2707
33
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
33
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
33
    return modules.at(moduleID);
2716
33
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
16
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
16
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
16
    if ( options.forceModule != std::nullopt ) {
2703
16
        moduleID = *options.forceModule;
2704
16
    }
2705
2706
    /* Skip if this is a disabled module */
2707
16
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
16
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
16
    return modules.at(moduleID);
2716
16
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
8
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
8
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
8
    if ( options.forceModule != std::nullopt ) {
2703
8
        moduleID = *options.forceModule;
2704
8
    }
2705
2706
    /* Skip if this is a disabled module */
2707
8
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
8
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
8
    return modules.at(moduleID);
2716
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
15
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
15
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
15
    if ( options.forceModule != std::nullopt ) {
2703
15
        moduleID = *options.forceModule;
2704
15
    }
2705
2706
    /* Skip if this is a disabled module */
2707
15
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
15
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
15
    return modules.at(moduleID);
2716
15
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
932
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
932
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
932
    if ( options.forceModule != std::nullopt ) {
2703
913
        moduleID = *options.forceModule;
2704
913
    }
2705
2706
    /* Skip if this is a disabled module */
2707
932
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
932
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
932
    return modules.at(moduleID);
2716
932
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.13k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.13k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.13k
    if ( options.forceModule != std::nullopt ) {
2703
1.10k
        moduleID = *options.forceModule;
2704
1.10k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.13k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.13k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.13k
    return modules.at(moduleID);
2716
1.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.19k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.19k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.19k
    if ( options.forceModule != std::nullopt ) {
2703
1.16k
        moduleID = *options.forceModule;
2704
1.16k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.19k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.19k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.19k
    return modules.at(moduleID);
2716
1.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3.48k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3.48k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3.48k
    if ( options.forceModule != std::nullopt ) {
2703
3.44k
        moduleID = *options.forceModule;
2704
3.44k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3.48k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3.48k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
3.48k
    return modules.at(moduleID);
2716
3.48k
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getModule(fuzzing::datasource::Datasource&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.95k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.95k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.95k
    if ( options.forceModule != std::nullopt ) {
2703
2.93k
        moduleID = *options.forceModule;
2704
2.93k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.95k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.95k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2.95k
    return modules.at(moduleID);
2716
2.95k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
29
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
29
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
29
    if ( options.forceModule != std::nullopt ) {
2703
29
        moduleID = *options.forceModule;
2704
29
    }
2705
2706
    /* Skip if this is a disabled module */
2707
29
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
29
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
29
    return modules.at(moduleID);
2716
29
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.07k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.07k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.07k
    if ( options.forceModule != std::nullopt ) {
2703
5.02k
        moduleID = *options.forceModule;
2704
5.02k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.07k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.07k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
5.07k
    return modules.at(moduleID);
2716
5.07k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
18
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
18
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
18
    if ( options.forceModule != std::nullopt ) {
2703
18
        moduleID = *options.forceModule;
2704
18
    }
2705
2706
    /* Skip if this is a disabled module */
2707
18
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
18
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
18
    return modules.at(moduleID);
2716
18
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.14k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.14k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.14k
    if ( options.forceModule != std::nullopt ) {
2703
2.09k
        moduleID = *options.forceModule;
2704
2.09k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.14k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.14k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2.14k
    return modules.at(moduleID);
2716
2.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.65k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.65k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.65k
    if ( options.forceModule != std::nullopt ) {
2703
1.61k
        moduleID = *options.forceModule;
2704
1.61k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.65k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.65k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.65k
    return modules.at(moduleID);
2716
1.65k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
36.4k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
36.4k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
36.4k
    if ( options.forceModule != std::nullopt ) {
2703
36.4k
        moduleID = *options.forceModule;
2704
36.4k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
36.4k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
36.4k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
36.4k
    return modules.at(moduleID);
2716
36.4k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
93
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
93
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
93
    if ( options.forceModule != std::nullopt ) {
2703
93
        moduleID = *options.forceModule;
2704
93
    }
2705
2706
    /* Skip if this is a disabled module */
2707
93
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
93
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
93
    return modules.at(moduleID);
2716
93
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
637
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
637
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
637
    if ( options.forceModule != std::nullopt ) {
2703
637
        moduleID = *options.forceModule;
2704
637
    }
2705
2706
    /* Skip if this is a disabled module */
2707
637
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
637
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
637
    return modules.at(moduleID);
2716
637
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5
    if ( options.forceModule != std::nullopt ) {
2703
5
        moduleID = *options.forceModule;
2704
5
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
5
    return modules.at(moduleID);
2716
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
10
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
10
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
10
    if ( options.forceModule != std::nullopt ) {
2703
10
        moduleID = *options.forceModule;
2704
10
    }
2705
2706
    /* Skip if this is a disabled module */
2707
10
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
10
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
10
    return modules.at(moduleID);
2716
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
9
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
9
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
9
    if ( options.forceModule != std::nullopt ) {
2703
9
        moduleID = *options.forceModule;
2704
9
    }
2705
2706
    /* Skip if this is a disabled module */
2707
9
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
9
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
9
    return modules.at(moduleID);
2716
9
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
18
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
18
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
18
    if ( options.forceModule != std::nullopt ) {
2703
18
        moduleID = *options.forceModule;
2704
18
    }
2705
2706
    /* Skip if this is a disabled module */
2707
18
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
18
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
18
    return modules.at(moduleID);
2716
18
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
20
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
20
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
20
    if ( options.forceModule != std::nullopt ) {
2703
16
        moduleID = *options.forceModule;
2704
16
    }
2705
2706
    /* Skip if this is a disabled module */
2707
20
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
20
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
20
    return modules.at(moduleID);
2716
20
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
29
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
29
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
29
    if ( options.forceModule != std::nullopt ) {
2703
25
        moduleID = *options.forceModule;
2704
25
    }
2705
2706
    /* Skip if this is a disabled module */
2707
29
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
29
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
29
    return modules.at(moduleID);
2716
29
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
8
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
8
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
8
    if ( options.forceModule != std::nullopt ) {
2703
8
        moduleID = *options.forceModule;
2704
8
    }
2705
2706
    /* Skip if this is a disabled module */
2707
8
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
8
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
8
    return modules.at(moduleID);
2716
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
22
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
22
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
22
    if ( options.forceModule != std::nullopt ) {
2703
20
        moduleID = *options.forceModule;
2704
20
    }
2705
2706
    /* Skip if this is a disabled module */
2707
22
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
22
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
22
    return modules.at(moduleID);
2716
22
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
20
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
20
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
20
    if ( options.forceModule != std::nullopt ) {
2703
20
        moduleID = *options.forceModule;
2704
20
    }
2705
2706
    /* Skip if this is a disabled module */
2707
20
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
20
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
20
    return modules.at(moduleID);
2716
20
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
7
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
7
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
7
    if ( options.forceModule != std::nullopt ) {
2703
7
        moduleID = *options.forceModule;
2704
7
    }
2705
2706
    /* Skip if this is a disabled module */
2707
7
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
7
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
7
    return modules.at(moduleID);
2716
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
7
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
7
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
7
    if ( options.forceModule != std::nullopt ) {
2703
7
        moduleID = *options.forceModule;
2704
7
    }
2705
2706
    /* Skip if this is a disabled module */
2707
7
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
7
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
7
    return modules.at(moduleID);
2716
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
32
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
32
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
32
    if ( options.forceModule != std::nullopt ) {
2703
31
        moduleID = *options.forceModule;
2704
31
    }
2705
2706
    /* Skip if this is a disabled module */
2707
32
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
32
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
32
    return modules.at(moduleID);
2716
32
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
48
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
48
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
48
    if ( options.forceModule != std::nullopt ) {
2703
48
        moduleID = *options.forceModule;
2704
48
    }
2705
2706
    /* Skip if this is a disabled module */
2707
48
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
48
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
48
    return modules.at(moduleID);
2716
48
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2
    if ( options.forceModule != std::nullopt ) {
2703
2
        moduleID = *options.forceModule;
2704
2
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2
    return modules.at(moduleID);
2716
2
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::getModule(fuzzing::datasource::Datasource&) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1
    if ( options.forceModule != std::nullopt ) {
2703
0
        moduleID = *options.forceModule;
2704
0
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1
    return modules.at(moduleID);
2716
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
6
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
6
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
6
    if ( options.forceModule != std::nullopt ) {
2703
6
        moduleID = *options.forceModule;
2704
6
    }
2705
2706
    /* Skip if this is a disabled module */
2707
6
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
6
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
6
    return modules.at(moduleID);
2716
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
3
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
3
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
3
    if ( options.forceModule != std::nullopt ) {
2703
3
        moduleID = *options.forceModule;
2704
3
    }
2705
2706
    /* Skip if this is a disabled module */
2707
3
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
3
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
3
    return modules.at(moduleID);
2716
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
73
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
73
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
73
    if ( options.forceModule != std::nullopt ) {
2703
73
        moduleID = *options.forceModule;
2704
73
    }
2705
2706
    /* Skip if this is a disabled module */
2707
73
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
73
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
73
    return modules.at(moduleID);
2716
73
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
40
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
40
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
40
    if ( options.forceModule != std::nullopt ) {
2703
39
        moduleID = *options.forceModule;
2704
39
    }
2705
2706
    /* Skip if this is a disabled module */
2707
40
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
40
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
40
    return modules.at(moduleID);
2716
40
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
78
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
78
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
78
    if ( options.forceModule != std::nullopt ) {
2703
78
        moduleID = *options.forceModule;
2704
78
    }
2705
2706
    /* Skip if this is a disabled module */
2707
78
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
78
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
78
    return modules.at(moduleID);
2716
78
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
31
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
31
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
31
    if ( options.forceModule != std::nullopt ) {
2703
31
        moduleID = *options.forceModule;
2704
31
    }
2705
2706
    /* Skip if this is a disabled module */
2707
31
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
31
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
31
    return modules.at(moduleID);
2716
31
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
149
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
149
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
149
    if ( options.forceModule != std::nullopt ) {
2703
149
        moduleID = *options.forceModule;
2704
149
    }
2705
2706
    /* Skip if this is a disabled module */
2707
149
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
149
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
149
    return modules.at(moduleID);
2716
149
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
76
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
76
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
76
    if ( options.forceModule != std::nullopt ) {
2703
76
        moduleID = *options.forceModule;
2704
76
    }
2705
2706
    /* Skip if this is a disabled module */
2707
76
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
76
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
76
    return modules.at(moduleID);
2716
76
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
162
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
162
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
162
    if ( options.forceModule != std::nullopt ) {
2703
162
        moduleID = *options.forceModule;
2704
162
    }
2705
2706
    /* Skip if this is a disabled module */
2707
162
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
162
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
162
    return modules.at(moduleID);
2716
162
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
68
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
68
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
68
    if ( options.forceModule != std::nullopt ) {
2703
68
        moduleID = *options.forceModule;
2704
68
    }
2705
2706
    /* Skip if this is a disabled module */
2707
68
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
68
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
68
    return modules.at(moduleID);
2716
68
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
96
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
96
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
96
    if ( options.forceModule != std::nullopt ) {
2703
88
        moduleID = *options.forceModule;
2704
88
    }
2705
2706
    /* Skip if this is a disabled module */
2707
96
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
96
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
96
    return modules.at(moduleID);
2716
96
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
6
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
6
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
6
    if ( options.forceModule != std::nullopt ) {
2703
6
        moduleID = *options.forceModule;
2704
6
    }
2705
2706
    /* Skip if this is a disabled module */
2707
6
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
6
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
6
    return modules.at(moduleID);
2716
6
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5
    if ( options.forceModule != std::nullopt ) {
2703
4
        moduleID = *options.forceModule;
2704
4
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
5
    return modules.at(moduleID);
2716
5
}
2717
2718
template <class ResultType, class OperationType>
2719
58.7k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
58.7k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
58.7k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
94.5k
    do {
2725
94.5k
        auto op = getOp(&parentDs, data, size);
2726
94.5k
        auto module = getModule(parentDs);
2727
94.5k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
94.5k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
94.5k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1.38k
            break;
2736
1.38k
        }
2737
94.5k
    } while ( parentDs.Get<bool>() == true );
2738
2739
58.7k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
58.7k
#if 1
2745
58.7k
    {
2746
58.7k
        std::set<uint64_t> moduleIDs;
2747
58.7k
        for (const auto& m : modules ) {
2748
56.8k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
56.8k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
56.8k
            moduleIDs.insert(moduleID);
2756
56.8k
        }
2757
2758
58.7k
        std::set<uint64_t> operationModuleIDs;
2759
90.5k
        for (const auto& op : operations) {
2760
90.5k
            operationModuleIDs.insert(op.first->ID);
2761
90.5k
        }
2762
2763
58.7k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
58.7k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
58.7k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
58.7k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
58.7k
    }
2771
58.7k
#endif
2772
2773
58.7k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
58.7k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
149k
    for (size_t i = 0; i < operations.size(); i++) {
2781
90.5k
        auto& operation = operations[i];
2782
2783
90.5k
        auto& module = operation.first;
2784
90.5k
        auto& op = operation.second;
2785
2786
90.5k
        if ( i > 0 ) {
2787
33.6k
            auto& prevModule = operations[i-1].first;
2788
33.6k
            auto& prevOp = operations[i-1].second;
2789
2790
33.6k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
10.4k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
10.4k
                if ( curModifier.size() == 0 ) {
2793
2.63M
                    for (size_t j = 0; j < 512; j++) {
2794
2.62M
                        curModifier.push_back(1);
2795
2.62M
                    }
2796
5.33k
                } else {
2797
521k
                    for (auto& c : curModifier) {
2798
521k
                        c++;
2799
521k
                    }
2800
5.33k
                }
2801
10.4k
            }
2802
33.6k
        }
2803
2804
90.5k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
90.5k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
90.5k
        const auto& result = results.back();
2811
2812
90.5k
        if ( result.second != std::nullopt ) {
2813
30.6k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
30.6k
        }
2820
2821
90.5k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
90.5k
        if ( options.disableTests == false ) {
2830
90.4k
            tests::test(op, result.second);
2831
90.4k
        }
2832
2833
90.5k
        postprocess(module, op, result);
2834
90.5k
    }
2835
2836
58.7k
    if ( options.noCompare == false ) {
2837
56.8k
        compare(operations, results, data, size);
2838
56.8k
    }
2839
58.7k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
85
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
85
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
85
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
468
    do {
2725
468
        auto op = getOp(&parentDs, data, size);
2726
468
        auto module = getModule(parentDs);
2727
468
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
468
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
468
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
468
    } while ( parentDs.Get<bool>() == true );
2738
2739
85
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
85
#if 1
2745
85
    {
2746
85
        std::set<uint64_t> moduleIDs;
2747
85
        for (const auto& m : modules ) {
2748
83
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
83
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
83
            moduleIDs.insert(moduleID);
2756
83
        }
2757
2758
85
        std::set<uint64_t> operationModuleIDs;
2759
434
        for (const auto& op : operations) {
2760
434
            operationModuleIDs.insert(op.first->ID);
2761
434
        }
2762
2763
85
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
85
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
85
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
85
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
85
    }
2771
85
#endif
2772
2773
85
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
85
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
519
    for (size_t i = 0; i < operations.size(); i++) {
2781
434
        auto& operation = operations[i];
2782
2783
434
        auto& module = operation.first;
2784
434
        auto& op = operation.second;
2785
2786
434
        if ( i > 0 ) {
2787
351
            auto& prevModule = operations[i-1].first;
2788
351
            auto& prevOp = operations[i-1].second;
2789
2790
351
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
140
                auto& curModifier = op.modifier.GetVectorPtr();
2792
140
                if ( curModifier.size() == 0 ) {
2793
54.3k
                    for (size_t j = 0; j < 512; j++) {
2794
54.2k
                        curModifier.push_back(1);
2795
54.2k
                    }
2796
106
                } else {
2797
34.6k
                    for (auto& c : curModifier) {
2798
34.6k
                        c++;
2799
34.6k
                    }
2800
34
                }
2801
140
            }
2802
351
        }
2803
2804
434
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
434
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
434
        const auto& result = results.back();
2811
2812
434
        if ( result.second != std::nullopt ) {
2813
366
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
366
        }
2820
2821
434
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
434
        if ( options.disableTests == false ) {
2830
434
            tests::test(op, result.second);
2831
434
        }
2832
2833
434
        postprocess(module, op, result);
2834
434
    }
2835
2836
85
    if ( options.noCompare == false ) {
2837
83
        compare(operations, results, data, size);
2838
83
    }
2839
85
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
78
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
78
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
78
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
588
    do {
2725
588
        auto op = getOp(&parentDs, data, size);
2726
588
        auto module = getModule(parentDs);
2727
588
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
588
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
588
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
588
    } while ( parentDs.Get<bool>() == true );
2738
2739
78
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
78
#if 1
2745
78
    {
2746
78
        std::set<uint64_t> moduleIDs;
2747
78
        for (const auto& m : modules ) {
2748
75
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
75
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
75
            moduleIDs.insert(moduleID);
2756
75
        }
2757
2758
78
        std::set<uint64_t> operationModuleIDs;
2759
538
        for (const auto& op : operations) {
2760
538
            operationModuleIDs.insert(op.first->ID);
2761
538
        }
2762
2763
78
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
78
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
78
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
78
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
78
    }
2771
78
#endif
2772
2773
78
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
78
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
616
    for (size_t i = 0; i < operations.size(); i++) {
2781
538
        auto& operation = operations[i];
2782
2783
538
        auto& module = operation.first;
2784
538
        auto& op = operation.second;
2785
2786
538
        if ( i > 0 ) {
2787
463
            auto& prevModule = operations[i-1].first;
2788
463
            auto& prevOp = operations[i-1].second;
2789
2790
463
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
157
                auto& curModifier = op.modifier.GetVectorPtr();
2792
157
                if ( curModifier.size() == 0 ) {
2793
58.9k
                    for (size_t j = 0; j < 512; j++) {
2794
58.8k
                        curModifier.push_back(1);
2795
58.8k
                    }
2796
115
                } else {
2797
1.28k
                    for (auto& c : curModifier) {
2798
1.28k
                        c++;
2799
1.28k
                    }
2800
42
                }
2801
157
            }
2802
463
        }
2803
2804
538
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
538
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
538
        const auto& result = results.back();
2811
2812
538
        if ( result.second != std::nullopt ) {
2813
323
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
323
        }
2820
2821
538
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
538
        if ( options.disableTests == false ) {
2830
538
            tests::test(op, result.second);
2831
538
        }
2832
2833
538
        postprocess(module, op, result);
2834
538
    }
2835
2836
78
    if ( options.noCompare == false ) {
2837
75
        compare(operations, results, data, size);
2838
75
    }
2839
78
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
9
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
9
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
9
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
125
    do {
2725
125
        auto op = getOp(&parentDs, data, size);
2726
125
        auto module = getModule(parentDs);
2727
125
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
125
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
125
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
125
    } while ( parentDs.Get<bool>() == true );
2738
2739
9
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
9
#if 1
2745
9
    {
2746
9
        std::set<uint64_t> moduleIDs;
2747
9
        for (const auto& m : modules ) {
2748
7
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
7
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
7
            moduleIDs.insert(moduleID);
2756
7
        }
2757
2758
9
        std::set<uint64_t> operationModuleIDs;
2759
92
        for (const auto& op : operations) {
2760
92
            operationModuleIDs.insert(op.first->ID);
2761
92
        }
2762
2763
9
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
9
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
9
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
9
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
9
    }
2771
9
#endif
2772
2773
9
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
9
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
101
    for (size_t i = 0; i < operations.size(); i++) {
2781
92
        auto& operation = operations[i];
2782
2783
92
        auto& module = operation.first;
2784
92
        auto& op = operation.second;
2785
2786
92
        if ( i > 0 ) {
2787
85
            auto& prevModule = operations[i-1].first;
2788
85
            auto& prevOp = operations[i-1].second;
2789
2790
85
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
43
                auto& curModifier = op.modifier.GetVectorPtr();
2792
43
                if ( curModifier.size() == 0 ) {
2793
14.8k
                    for (size_t j = 0; j < 512; j++) {
2794
14.8k
                        curModifier.push_back(1);
2795
14.8k
                    }
2796
29
                } else {
2797
166
                    for (auto& c : curModifier) {
2798
166
                        c++;
2799
166
                    }
2800
14
                }
2801
43
            }
2802
85
        }
2803
2804
92
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
92
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
92
        const auto& result = results.back();
2811
2812
92
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
92
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
92
        if ( options.disableTests == false ) {
2830
92
            tests::test(op, result.second);
2831
92
        }
2832
2833
92
        postprocess(module, op, result);
2834
92
    }
2835
2836
9
    if ( options.noCompare == false ) {
2837
7
        compare(operations, results, data, size);
2838
7
    }
2839
9
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
58
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
58
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
58
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
335
    do {
2725
335
        auto op = getOp(&parentDs, data, size);
2726
335
        auto module = getModule(parentDs);
2727
335
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
335
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
335
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
335
    } while ( parentDs.Get<bool>() == true );
2738
2739
58
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
58
#if 1
2745
58
    {
2746
58
        std::set<uint64_t> moduleIDs;
2747
58
        for (const auto& m : modules ) {
2748
57
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
57
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
57
            moduleIDs.insert(moduleID);
2756
57
        }
2757
2758
58
        std::set<uint64_t> operationModuleIDs;
2759
319
        for (const auto& op : operations) {
2760
319
            operationModuleIDs.insert(op.first->ID);
2761
319
        }
2762
2763
58
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
58
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
58
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
58
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
58
    }
2771
58
#endif
2772
2773
58
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
58
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
377
    for (size_t i = 0; i < operations.size(); i++) {
2781
319
        auto& operation = operations[i];
2782
2783
319
        auto& module = operation.first;
2784
319
        auto& op = operation.second;
2785
2786
319
        if ( i > 0 ) {
2787
262
            auto& prevModule = operations[i-1].first;
2788
262
            auto& prevOp = operations[i-1].second;
2789
2790
262
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
112
                auto& curModifier = op.modifier.GetVectorPtr();
2792
112
                if ( curModifier.size() == 0 ) {
2793
44.6k
                    for (size_t j = 0; j < 512; j++) {
2794
44.5k
                        curModifier.push_back(1);
2795
44.5k
                    }
2796
87
                } else {
2797
1.11k
                    for (auto& c : curModifier) {
2798
1.11k
                        c++;
2799
1.11k
                    }
2800
25
                }
2801
112
            }
2802
262
        }
2803
2804
319
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
319
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
319
        const auto& result = results.back();
2811
2812
319
        if ( result.second != std::nullopt ) {
2813
135
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
135
        }
2820
2821
319
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
319
        if ( options.disableTests == false ) {
2830
319
            tests::test(op, result.second);
2831
319
        }
2832
2833
319
        postprocess(module, op, result);
2834
319
    }
2835
2836
58
    if ( options.noCompare == false ) {
2837
57
        compare(operations, results, data, size);
2838
57
    }
2839
58
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
374
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
374
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
374
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.95k
    do {
2725
1.95k
        auto op = getOp(&parentDs, data, size);
2726
1.95k
        auto module = getModule(parentDs);
2727
1.95k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.95k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.95k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
14
            break;
2736
14
        }
2737
1.95k
    } while ( parentDs.Get<bool>() == true );
2738
2739
374
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
374
#if 1
2745
374
    {
2746
374
        std::set<uint64_t> moduleIDs;
2747
374
        for (const auto& m : modules ) {
2748
371
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
371
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
371
            moduleIDs.insert(moduleID);
2756
371
        }
2757
2758
374
        std::set<uint64_t> operationModuleIDs;
2759
1.90k
        for (const auto& op : operations) {
2760
1.90k
            operationModuleIDs.insert(op.first->ID);
2761
1.90k
        }
2762
2763
374
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
374
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
374
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
374
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
374
    }
2771
374
#endif
2772
2773
374
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
374
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.27k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.90k
        auto& operation = operations[i];
2782
2783
1.90k
        auto& module = operation.first;
2784
1.90k
        auto& op = operation.second;
2785
2786
1.90k
        if ( i > 0 ) {
2787
1.53k
            auto& prevModule = operations[i-1].first;
2788
1.53k
            auto& prevOp = operations[i-1].second;
2789
2790
1.53k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
521
                auto& curModifier = op.modifier.GetVectorPtr();
2792
521
                if ( curModifier.size() == 0 ) {
2793
213k
                    for (size_t j = 0; j < 512; j++) {
2794
213k
                        curModifier.push_back(1);
2795
213k
                    }
2796
417
                } else {
2797
3.19k
                    for (auto& c : curModifier) {
2798
3.19k
                        c++;
2799
3.19k
                    }
2800
104
                }
2801
521
            }
2802
1.53k
        }
2803
2804
1.90k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.90k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.90k
        const auto& result = results.back();
2811
2812
1.90k
        if ( result.second != std::nullopt ) {
2813
848
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
848
        }
2820
2821
1.90k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.90k
        if ( options.disableTests == false ) {
2830
1.90k
            tests::test(op, result.second);
2831
1.90k
        }
2832
2833
1.90k
        postprocess(module, op, result);
2834
1.90k
    }
2835
2836
374
    if ( options.noCompare == false ) {
2837
371
        compare(operations, results, data, size);
2838
371
    }
2839
374
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
174
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
174
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
174
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
934
    do {
2725
934
        auto op = getOp(&parentDs, data, size);
2726
934
        auto module = getModule(parentDs);
2727
934
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
934
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
934
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
934
    } while ( parentDs.Get<bool>() == true );
2738
2739
174
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
174
#if 1
2745
174
    {
2746
174
        std::set<uint64_t> moduleIDs;
2747
174
        for (const auto& m : modules ) {
2748
172
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
172
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
172
            moduleIDs.insert(moduleID);
2756
172
        }
2757
2758
174
        std::set<uint64_t> operationModuleIDs;
2759
901
        for (const auto& op : operations) {
2760
901
            operationModuleIDs.insert(op.first->ID);
2761
901
        }
2762
2763
174
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
174
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
174
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
174
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
174
    }
2771
174
#endif
2772
2773
174
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
174
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.07k
    for (size_t i = 0; i < operations.size(); i++) {
2781
901
        auto& operation = operations[i];
2782
2783
901
        auto& module = operation.first;
2784
901
        auto& op = operation.second;
2785
2786
901
        if ( i > 0 ) {
2787
729
            auto& prevModule = operations[i-1].first;
2788
729
            auto& prevOp = operations[i-1].second;
2789
2790
729
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
313
                auto& curModifier = op.modifier.GetVectorPtr();
2792
313
                if ( curModifier.size() == 0 ) {
2793
136k
                    for (size_t j = 0; j < 512; j++) {
2794
136k
                        curModifier.push_back(1);
2795
136k
                    }
2796
266
                } else {
2797
4.03k
                    for (auto& c : curModifier) {
2798
4.03k
                        c++;
2799
4.03k
                    }
2800
47
                }
2801
313
            }
2802
729
        }
2803
2804
901
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
901
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
901
        const auto& result = results.back();
2811
2812
901
        if ( result.second != std::nullopt ) {
2813
227
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
227
        }
2820
2821
901
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
901
        if ( options.disableTests == false ) {
2830
901
            tests::test(op, result.second);
2831
901
        }
2832
2833
901
        postprocess(module, op, result);
2834
901
    }
2835
2836
174
    if ( options.noCompare == false ) {
2837
172
        compare(operations, results, data, size);
2838
172
    }
2839
174
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
7
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
7
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
7
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
105
    do {
2725
105
        auto op = getOp(&parentDs, data, size);
2726
105
        auto module = getModule(parentDs);
2727
105
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
105
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
105
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
105
    } while ( parentDs.Get<bool>() == true );
2738
2739
7
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
7
#if 1
2745
7
    {
2746
7
        std::set<uint64_t> moduleIDs;
2747
7
        for (const auto& m : modules ) {
2748
5
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
5
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
5
            moduleIDs.insert(moduleID);
2756
5
        }
2757
2758
7
        std::set<uint64_t> operationModuleIDs;
2759
72
        for (const auto& op : operations) {
2760
72
            operationModuleIDs.insert(op.first->ID);
2761
72
        }
2762
2763
7
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
7
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
7
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
7
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
7
    }
2771
7
#endif
2772
2773
7
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
7
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
79
    for (size_t i = 0; i < operations.size(); i++) {
2781
72
        auto& operation = operations[i];
2782
2783
72
        auto& module = operation.first;
2784
72
        auto& op = operation.second;
2785
2786
72
        if ( i > 0 ) {
2787
67
            auto& prevModule = operations[i-1].first;
2788
67
            auto& prevOp = operations[i-1].second;
2789
2790
67
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
35
                auto& curModifier = op.modifier.GetVectorPtr();
2792
35
                if ( curModifier.size() == 0 ) {
2793
13.3k
                    for (size_t j = 0; j < 512; j++) {
2794
13.3k
                        curModifier.push_back(1);
2795
13.3k
                    }
2796
26
                } else {
2797
159
                    for (auto& c : curModifier) {
2798
159
                        c++;
2799
159
                    }
2800
9
                }
2801
35
            }
2802
67
        }
2803
2804
72
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
72
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
72
        const auto& result = results.back();
2811
2812
72
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
72
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
72
        if ( options.disableTests == false ) {
2830
72
            tests::test(op, result.second);
2831
72
        }
2832
2833
72
        postprocess(module, op, result);
2834
72
    }
2835
2836
7
    if ( options.noCompare == false ) {
2837
5
        compare(operations, results, data, size);
2838
5
    }
2839
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
74
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
74
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
74
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
382
    do {
2725
382
        auto op = getOp(&parentDs, data, size);
2726
382
        auto module = getModule(parentDs);
2727
382
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
382
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
382
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
382
    } while ( parentDs.Get<bool>() == true );
2738
2739
74
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
74
#if 1
2745
74
    {
2746
74
        std::set<uint64_t> moduleIDs;
2747
74
        for (const auto& m : modules ) {
2748
71
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
71
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
71
            moduleIDs.insert(moduleID);
2756
71
        }
2757
2758
74
        std::set<uint64_t> operationModuleIDs;
2759
333
        for (const auto& op : operations) {
2760
333
            operationModuleIDs.insert(op.first->ID);
2761
333
        }
2762
2763
74
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
74
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
74
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
74
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
74
    }
2771
74
#endif
2772
2773
74
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
74
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
407
    for (size_t i = 0; i < operations.size(); i++) {
2781
333
        auto& operation = operations[i];
2782
2783
333
        auto& module = operation.first;
2784
333
        auto& op = operation.second;
2785
2786
333
        if ( i > 0 ) {
2787
262
            auto& prevModule = operations[i-1].first;
2788
262
            auto& prevOp = operations[i-1].second;
2789
2790
262
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
127
                auto& curModifier = op.modifier.GetVectorPtr();
2792
127
                if ( curModifier.size() == 0 ) {
2793
56.4k
                    for (size_t j = 0; j < 512; j++) {
2794
56.3k
                        curModifier.push_back(1);
2795
56.3k
                    }
2796
110
                } else {
2797
3.20k
                    for (auto& c : curModifier) {
2798
3.20k
                        c++;
2799
3.20k
                    }
2800
17
                }
2801
127
            }
2802
262
        }
2803
2804
333
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
333
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
333
        const auto& result = results.back();
2811
2812
333
        if ( result.second != std::nullopt ) {
2813
122
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
122
        }
2820
2821
333
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
333
        if ( options.disableTests == false ) {
2830
333
            tests::test(op, result.second);
2831
333
        }
2832
2833
333
        postprocess(module, op, result);
2834
333
    }
2835
2836
74
    if ( options.noCompare == false ) {
2837
71
        compare(operations, results, data, size);
2838
71
    }
2839
74
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
6
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
6
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
6
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
89
    do {
2725
89
        auto op = getOp(&parentDs, data, size);
2726
89
        auto module = getModule(parentDs);
2727
89
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
89
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
89
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
89
    } while ( parentDs.Get<bool>() == true );
2738
2739
6
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
6
#if 1
2745
6
    {
2746
6
        std::set<uint64_t> moduleIDs;
2747
6
        for (const auto& m : modules ) {
2748
5
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
5
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
5
            moduleIDs.insert(moduleID);
2756
5
        }
2757
2758
6
        std::set<uint64_t> operationModuleIDs;
2759
72
        for (const auto& op : operations) {
2760
72
            operationModuleIDs.insert(op.first->ID);
2761
72
        }
2762
2763
6
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
6
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
6
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
6
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
6
    }
2771
6
#endif
2772
2773
6
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
6
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
78
    for (size_t i = 0; i < operations.size(); i++) {
2781
72
        auto& operation = operations[i];
2782
2783
72
        auto& module = operation.first;
2784
72
        auto& op = operation.second;
2785
2786
72
        if ( i > 0 ) {
2787
67
            auto& prevModule = operations[i-1].first;
2788
67
            auto& prevOp = operations[i-1].second;
2789
2790
67
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
35
                auto& curModifier = op.modifier.GetVectorPtr();
2792
35
                if ( curModifier.size() == 0 ) {
2793
13.3k
                    for (size_t j = 0; j < 512; j++) {
2794
13.3k
                        curModifier.push_back(1);
2795
13.3k
                    }
2796
26
                } else {
2797
140
                    for (auto& c : curModifier) {
2798
140
                        c++;
2799
140
                    }
2800
9
                }
2801
35
            }
2802
67
        }
2803
2804
72
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
72
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
72
        const auto& result = results.back();
2811
2812
72
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
72
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
72
        if ( options.disableTests == false ) {
2830
72
            tests::test(op, result.second);
2831
72
        }
2832
2833
72
        postprocess(module, op, result);
2834
72
    }
2835
2836
6
    if ( options.noCompare == false ) {
2837
5
        compare(operations, results, data, size);
2838
5
    }
2839
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
9
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
9
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
9
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
141
    do {
2725
141
        auto op = getOp(&parentDs, data, size);
2726
141
        auto module = getModule(parentDs);
2727
141
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
141
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
141
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
141
    } while ( parentDs.Get<bool>() == true );
2738
2739
9
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
9
#if 1
2745
9
    {
2746
9
        std::set<uint64_t> moduleIDs;
2747
9
        for (const auto& m : modules ) {
2748
6
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
6
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
6
            moduleIDs.insert(moduleID);
2756
6
        }
2757
2758
9
        std::set<uint64_t> operationModuleIDs;
2759
91
        for (const auto& op : operations) {
2760
91
            operationModuleIDs.insert(op.first->ID);
2761
91
        }
2762
2763
9
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
9
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
9
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
9
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
9
    }
2771
9
#endif
2772
2773
9
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
9
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
100
    for (size_t i = 0; i < operations.size(); i++) {
2781
91
        auto& operation = operations[i];
2782
2783
91
        auto& module = operation.first;
2784
91
        auto& op = operation.second;
2785
2786
91
        if ( i > 0 ) {
2787
85
            auto& prevModule = operations[i-1].first;
2788
85
            auto& prevOp = operations[i-1].second;
2789
2790
85
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
38
                auto& curModifier = op.modifier.GetVectorPtr();
2792
38
                if ( curModifier.size() == 0 ) {
2793
11.2k
                    for (size_t j = 0; j < 512; j++) {
2794
11.2k
                        curModifier.push_back(1);
2795
11.2k
                    }
2796
22
                } else {
2797
3.07k
                    for (auto& c : curModifier) {
2798
3.07k
                        c++;
2799
3.07k
                    }
2800
16
                }
2801
38
            }
2802
85
        }
2803
2804
91
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
91
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
91
        const auto& result = results.back();
2811
2812
91
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
91
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
91
        if ( options.disableTests == false ) {
2830
91
            tests::test(op, result.second);
2831
91
        }
2832
2833
91
        postprocess(module, op, result);
2834
91
    }
2835
2836
9
    if ( options.noCompare == false ) {
2837
6
        compare(operations, results, data, size);
2838
6
    }
2839
9
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
10
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
10
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
10
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
148
    do {
2725
148
        auto op = getOp(&parentDs, data, size);
2726
148
        auto module = getModule(parentDs);
2727
148
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
148
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
148
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
148
    } while ( parentDs.Get<bool>() == true );
2738
2739
10
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
10
#if 1
2745
10
    {
2746
10
        std::set<uint64_t> moduleIDs;
2747
10
        for (const auto& m : modules ) {
2748
7
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
7
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
7
            moduleIDs.insert(moduleID);
2756
7
        }
2757
2758
10
        std::set<uint64_t> operationModuleIDs;
2759
98
        for (const auto& op : operations) {
2760
98
            operationModuleIDs.insert(op.first->ID);
2761
98
        }
2762
2763
10
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
10
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
10
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
10
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
10
    }
2771
10
#endif
2772
2773
10
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
10
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
108
    for (size_t i = 0; i < operations.size(); i++) {
2781
98
        auto& operation = operations[i];
2782
2783
98
        auto& module = operation.first;
2784
98
        auto& op = operation.second;
2785
2786
98
        if ( i > 0 ) {
2787
91
            auto& prevModule = operations[i-1].first;
2788
91
            auto& prevOp = operations[i-1].second;
2789
2790
91
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
40
                auto& curModifier = op.modifier.GetVectorPtr();
2792
40
                if ( curModifier.size() == 0 ) {
2793
16.4k
                    for (size_t j = 0; j < 512; j++) {
2794
16.3k
                        curModifier.push_back(1);
2795
16.3k
                    }
2796
32
                } else {
2797
136
                    for (auto& c : curModifier) {
2798
136
                        c++;
2799
136
                    }
2800
8
                }
2801
40
            }
2802
91
        }
2803
2804
98
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
98
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
98
        const auto& result = results.back();
2811
2812
98
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
98
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
98
        if ( options.disableTests == false ) {
2830
98
            tests::test(op, result.second);
2831
98
        }
2832
2833
98
        postprocess(module, op, result);
2834
98
    }
2835
2836
10
    if ( options.noCompare == false ) {
2837
7
        compare(operations, results, data, size);
2838
7
    }
2839
10
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
42
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
42
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
42
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
346
    do {
2725
346
        auto op = getOp(&parentDs, data, size);
2726
346
        auto module = getModule(parentDs);
2727
346
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
346
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
346
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
346
    } while ( parentDs.Get<bool>() == true );
2738
2739
42
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
42
#if 1
2745
42
    {
2746
42
        std::set<uint64_t> moduleIDs;
2747
42
        for (const auto& m : modules ) {
2748
38
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
38
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
38
            moduleIDs.insert(moduleID);
2756
38
        }
2757
2758
42
        std::set<uint64_t> operationModuleIDs;
2759
280
        for (const auto& op : operations) {
2760
280
            operationModuleIDs.insert(op.first->ID);
2761
280
        }
2762
2763
42
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
42
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
42
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
42
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
42
    }
2771
42
#endif
2772
2773
42
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
42
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
322
    for (size_t i = 0; i < operations.size(); i++) {
2781
280
        auto& operation = operations[i];
2782
2783
280
        auto& module = operation.first;
2784
280
        auto& op = operation.second;
2785
2786
280
        if ( i > 0 ) {
2787
242
            auto& prevModule = operations[i-1].first;
2788
242
            auto& prevOp = operations[i-1].second;
2789
2790
242
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
112
                auto& curModifier = op.modifier.GetVectorPtr();
2792
112
                if ( curModifier.size() == 0 ) {
2793
50.2k
                    for (size_t j = 0; j < 512; j++) {
2794
50.1k
                        curModifier.push_back(1);
2795
50.1k
                    }
2796
98
                } else {
2797
1.17k
                    for (auto& c : curModifier) {
2798
1.17k
                        c++;
2799
1.17k
                    }
2800
14
                }
2801
112
            }
2802
242
        }
2803
2804
280
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
280
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
280
        const auto& result = results.back();
2811
2812
280
        if ( result.second != std::nullopt ) {
2813
151
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
151
        }
2820
2821
280
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
280
        if ( options.disableTests == false ) {
2830
280
            tests::test(op, result.second);
2831
280
        }
2832
2833
280
        postprocess(module, op, result);
2834
280
    }
2835
2836
42
    if ( options.noCompare == false ) {
2837
38
        compare(operations, results, data, size);
2838
38
    }
2839
42
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
139
                    for (auto& c : curModifier) {
2798
139
                        c++;
2799
139
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
6
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
6
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
6
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
90
    do {
2725
90
        auto op = getOp(&parentDs, data, size);
2726
90
        auto module = getModule(parentDs);
2727
90
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
90
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
90
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
90
    } while ( parentDs.Get<bool>() == true );
2738
2739
6
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
6
#if 1
2745
6
    {
2746
6
        std::set<uint64_t> moduleIDs;
2747
6
        for (const auto& m : modules ) {
2748
6
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
6
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
6
            moduleIDs.insert(moduleID);
2756
6
        }
2757
2758
6
        std::set<uint64_t> operationModuleIDs;
2759
90
        for (const auto& op : operations) {
2760
90
            operationModuleIDs.insert(op.first->ID);
2761
90
        }
2762
2763
6
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
6
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
6
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
6
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
6
    }
2771
6
#endif
2772
2773
6
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
6
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
96
    for (size_t i = 0; i < operations.size(); i++) {
2781
90
        auto& operation = operations[i];
2782
2783
90
        auto& module = operation.first;
2784
90
        auto& op = operation.second;
2785
2786
90
        if ( i > 0 ) {
2787
84
            auto& prevModule = operations[i-1].first;
2788
84
            auto& prevOp = operations[i-1].second;
2789
2790
84
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
41
                auto& curModifier = op.modifier.GetVectorPtr();
2792
41
                if ( curModifier.size() == 0 ) {
2793
13.3k
                    for (size_t j = 0; j < 512; j++) {
2794
13.3k
                        curModifier.push_back(1);
2795
13.3k
                    }
2796
26
                } else {
2797
150
                    for (auto& c : curModifier) {
2798
150
                        c++;
2799
150
                    }
2800
15
                }
2801
41
            }
2802
84
        }
2803
2804
90
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
90
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
90
        const auto& result = results.back();
2811
2812
90
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
90
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
90
        if ( options.disableTests == false ) {
2830
90
            tests::test(op, result.second);
2831
90
        }
2832
2833
90
        postprocess(module, op, result);
2834
90
    }
2835
2836
6
    if ( options.noCompare == false ) {
2837
6
        compare(operations, results, data, size);
2838
6
    }
2839
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
9
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
9
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
9
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
127
    do {
2725
127
        auto op = getOp(&parentDs, data, size);
2726
127
        auto module = getModule(parentDs);
2727
127
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
127
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
127
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
127
    } while ( parentDs.Get<bool>() == true );
2738
2739
9
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
9
#if 1
2745
9
    {
2746
9
        std::set<uint64_t> moduleIDs;
2747
9
        for (const auto& m : modules ) {
2748
6
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
6
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
6
            moduleIDs.insert(moduleID);
2756
6
        }
2757
2758
9
        std::set<uint64_t> operationModuleIDs;
2759
77
        for (const auto& op : operations) {
2760
77
            operationModuleIDs.insert(op.first->ID);
2761
77
        }
2762
2763
9
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
9
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
9
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
9
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
9
    }
2771
9
#endif
2772
2773
9
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
9
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
86
    for (size_t i = 0; i < operations.size(); i++) {
2781
77
        auto& operation = operations[i];
2782
2783
77
        auto& module = operation.first;
2784
77
        auto& op = operation.second;
2785
2786
77
        if ( i > 0 ) {
2787
71
            auto& prevModule = operations[i-1].first;
2788
71
            auto& prevOp = operations[i-1].second;
2789
2790
71
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
30
                auto& curModifier = op.modifier.GetVectorPtr();
2792
30
                if ( curModifier.size() == 0 ) {
2793
13.3k
                    for (size_t j = 0; j < 512; j++) {
2794
13.3k
                        curModifier.push_back(1);
2795
13.3k
                    }
2796
26
                } else {
2797
134
                    for (auto& c : curModifier) {
2798
134
                        c++;
2799
134
                    }
2800
4
                }
2801
30
            }
2802
71
        }
2803
2804
77
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
77
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
77
        const auto& result = results.back();
2811
2812
77
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
77
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
77
        if ( options.disableTests == false ) {
2830
77
            tests::test(op, result.second);
2831
77
        }
2832
2833
77
        postprocess(module, op, result);
2834
77
    }
2835
2836
9
    if ( options.noCompare == false ) {
2837
6
        compare(operations, results, data, size);
2838
6
    }
2839
9
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
6
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
6
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
6
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
12
    do {
2725
12
        auto op = getOp(&parentDs, data, size);
2726
12
        auto module = getModule(parentDs);
2727
12
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
12
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
12
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
12
    } while ( parentDs.Get<bool>() == true );
2738
2739
6
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
6
#if 1
2745
6
    {
2746
6
        std::set<uint64_t> moduleIDs;
2747
6
        for (const auto& m : modules ) {
2748
6
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
6
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
6
            moduleIDs.insert(moduleID);
2756
6
        }
2757
2758
6
        std::set<uint64_t> operationModuleIDs;
2759
12
        for (const auto& op : operations) {
2760
12
            operationModuleIDs.insert(op.first->ID);
2761
12
        }
2762
2763
6
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
6
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
6
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
6
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
6
    }
2771
6
#endif
2772
2773
6
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
6
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
18
    for (size_t i = 0; i < operations.size(); i++) {
2781
12
        auto& operation = operations[i];
2782
2783
12
        auto& module = operation.first;
2784
12
        auto& op = operation.second;
2785
2786
12
        if ( i > 0 ) {
2787
6
            auto& prevModule = operations[i-1].first;
2788
6
            auto& prevOp = operations[i-1].second;
2789
2790
6
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
6
                auto& curModifier = op.modifier.GetVectorPtr();
2792
6
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
6
                } else {
2797
294
                    for (auto& c : curModifier) {
2798
294
                        c++;
2799
294
                    }
2800
6
                }
2801
6
            }
2802
6
        }
2803
2804
12
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
12
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
12
        const auto& result = results.back();
2811
2812
12
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
12
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
12
        if ( options.disableTests == false ) {
2830
12
            tests::test(op, result.second);
2831
12
        }
2832
2833
12
        postprocess(module, op, result);
2834
12
    }
2835
2836
6
    if ( options.noCompare == false ) {
2837
6
        compare(operations, results, data, size);
2838
6
    }
2839
6
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
8
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
8
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
8
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
124
    do {
2725
124
        auto op = getOp(&parentDs, data, size);
2726
124
        auto module = getModule(parentDs);
2727
124
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
124
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
124
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
124
    } while ( parentDs.Get<bool>() == true );
2738
2739
8
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
8
#if 1
2745
8
    {
2746
8
        std::set<uint64_t> moduleIDs;
2747
8
        for (const auto& m : modules ) {
2748
7
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
7
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
7
            moduleIDs.insert(moduleID);
2756
7
        }
2757
2758
8
        std::set<uint64_t> operationModuleIDs;
2759
108
        for (const auto& op : operations) {
2760
108
            operationModuleIDs.insert(op.first->ID);
2761
108
        }
2762
2763
8
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
8
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
8
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
8
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
8
    }
2771
8
#endif
2772
2773
8
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
8
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
116
    for (size_t i = 0; i < operations.size(); i++) {
2781
108
        auto& operation = operations[i];
2782
2783
108
        auto& module = operation.first;
2784
108
        auto& op = operation.second;
2785
2786
108
        if ( i > 0 ) {
2787
101
            auto& prevModule = operations[i-1].first;
2788
101
            auto& prevOp = operations[i-1].second;
2789
2790
101
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
40
                auto& curModifier = op.modifier.GetVectorPtr();
2792
40
                if ( curModifier.size() == 0 ) {
2793
17.9k
                    for (size_t j = 0; j < 512; j++) {
2794
17.9k
                        curModifier.push_back(1);
2795
17.9k
                    }
2796
35
                } else {
2797
161
                    for (auto& c : curModifier) {
2798
161
                        c++;
2799
161
                    }
2800
5
                }
2801
40
            }
2802
101
        }
2803
2804
108
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
108
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
108
        const auto& result = results.back();
2811
2812
108
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
108
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
108
        if ( options.disableTests == false ) {
2830
108
            tests::test(op, result.second);
2831
108
        }
2832
2833
108
        postprocess(module, op, result);
2834
108
    }
2835
2836
8
    if ( options.noCompare == false ) {
2837
7
        compare(operations, results, data, size);
2838
7
    }
2839
8
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
6
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
6
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
6
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
89
    do {
2725
89
        auto op = getOp(&parentDs, data, size);
2726
89
        auto module = getModule(parentDs);
2727
89
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
89
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
89
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
89
    } while ( parentDs.Get<bool>() == true );
2738
2739
6
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
6
#if 1
2745
6
    {
2746
6
        std::set<uint64_t> moduleIDs;
2747
6
        for (const auto& m : modules ) {
2748
4
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4
            moduleIDs.insert(moduleID);
2756
4
        }
2757
2758
6
        std::set<uint64_t> operationModuleIDs;
2759
56
        for (const auto& op : operations) {
2760
56
            operationModuleIDs.insert(op.first->ID);
2761
56
        }
2762
2763
6
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
6
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
6
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
6
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
6
    }
2771
6
#endif
2772
2773
6
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
6
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
62
    for (size_t i = 0; i < operations.size(); i++) {
2781
56
        auto& operation = operations[i];
2782
2783
56
        auto& module = operation.first;
2784
56
        auto& op = operation.second;
2785
2786
56
        if ( i > 0 ) {
2787
52
            auto& prevModule = operations[i-1].first;
2788
52
            auto& prevOp = operations[i-1].second;
2789
2790
52
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
23
                auto& curModifier = op.modifier.GetVectorPtr();
2792
23
                if ( curModifier.size() == 0 ) {
2793
5.64k
                    for (size_t j = 0; j < 512; j++) {
2794
5.63k
                        curModifier.push_back(1);
2795
5.63k
                    }
2796
12
                } else {
2797
145
                    for (auto& c : curModifier) {
2798
145
                        c++;
2799
145
                    }
2800
12
                }
2801
23
            }
2802
52
        }
2803
2804
56
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
56
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
56
        const auto& result = results.back();
2811
2812
56
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
56
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
56
        if ( options.disableTests == false ) {
2830
56
            tests::test(op, result.second);
2831
56
        }
2832
2833
56
        postprocess(module, op, result);
2834
56
    }
2835
2836
6
    if ( options.noCompare == false ) {
2837
4
        compare(operations, results, data, size);
2838
4
    }
2839
6
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
7
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
7
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
7
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
106
    do {
2725
106
        auto op = getOp(&parentDs, data, size);
2726
106
        auto module = getModule(parentDs);
2727
106
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
106
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
106
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
106
    } while ( parentDs.Get<bool>() == true );
2738
2739
7
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
7
#if 1
2745
7
    {
2746
7
        std::set<uint64_t> moduleIDs;
2747
7
        for (const auto& m : modules ) {
2748
6
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
6
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
6
            moduleIDs.insert(moduleID);
2756
6
        }
2757
2758
7
        std::set<uint64_t> operationModuleIDs;
2759
89
        for (const auto& op : operations) {
2760
89
            operationModuleIDs.insert(op.first->ID);
2761
89
        }
2762
2763
7
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
7
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
7
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
7
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
7
    }
2771
7
#endif
2772
2773
7
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
7
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
96
    for (size_t i = 0; i < operations.size(); i++) {
2781
89
        auto& operation = operations[i];
2782
2783
89
        auto& module = operation.first;
2784
89
        auto& op = operation.second;
2785
2786
89
        if ( i > 0 ) {
2787
83
            auto& prevModule = operations[i-1].first;
2788
83
            auto& prevOp = operations[i-1].second;
2789
2790
83
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
35
                auto& curModifier = op.modifier.GetVectorPtr();
2792
35
                if ( curModifier.size() == 0 ) {
2793
13.3k
                    for (size_t j = 0; j < 512; j++) {
2794
13.3k
                        curModifier.push_back(1);
2795
13.3k
                    }
2796
26
                } else {
2797
143
                    for (auto& c : curModifier) {
2798
143
                        c++;
2799
143
                    }
2800
9
                }
2801
35
            }
2802
83
        }
2803
2804
89
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
89
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
89
        const auto& result = results.back();
2811
2812
89
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
89
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
89
        if ( options.disableTests == false ) {
2830
89
            tests::test(op, result.second);
2831
89
        }
2832
2833
89
        postprocess(module, op, result);
2834
89
    }
2835
2836
7
    if ( options.noCompare == false ) {
2837
6
        compare(operations, results, data, size);
2838
6
    }
2839
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.93k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.93k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.93k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.70k
    do {
2725
5.70k
        auto op = getOp(&parentDs, data, size);
2726
5.70k
        auto module = getModule(parentDs);
2727
5.70k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
5.70k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
5.70k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
57
            break;
2736
57
        }
2737
5.70k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.93k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.93k
#if 1
2745
3.93k
    {
2746
3.93k
        std::set<uint64_t> moduleIDs;
2747
3.93k
        for (const auto& m : modules ) {
2748
3.79k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.79k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.79k
            moduleIDs.insert(moduleID);
2756
3.79k
        }
2757
2758
3.93k
        std::set<uint64_t> operationModuleIDs;
2759
5.45k
        for (const auto& op : operations) {
2760
5.45k
            operationModuleIDs.insert(op.first->ID);
2761
5.45k
        }
2762
2763
3.93k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.93k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.93k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.93k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3.93k
    }
2771
3.93k
#endif
2772
2773
3.93k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.93k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
9.39k
    for (size_t i = 0; i < operations.size(); i++) {
2781
5.45k
        auto& operation = operations[i];
2782
2783
5.45k
        auto& module = operation.first;
2784
5.45k
        auto& op = operation.second;
2785
2786
5.45k
        if ( i > 0 ) {
2787
1.66k
            auto& prevModule = operations[i-1].first;
2788
1.66k
            auto& prevOp = operations[i-1].second;
2789
2790
1.66k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
554
                auto& curModifier = op.modifier.GetVectorPtr();
2792
554
                if ( curModifier.size() == 0 ) {
2793
122k
                    for (size_t j = 0; j < 512; j++) {
2794
121k
                        curModifier.push_back(1);
2795
121k
                    }
2796
316
                } else {
2797
15.5k
                    for (auto& c : curModifier) {
2798
15.5k
                        c++;
2799
15.5k
                    }
2800
316
                }
2801
554
            }
2802
1.66k
        }
2803
2804
5.45k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5.45k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5.45k
        const auto& result = results.back();
2811
2812
5.45k
        if ( result.second != std::nullopt ) {
2813
2.21k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
2.21k
        }
2820
2821
5.45k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
5.45k
        if ( options.disableTests == false ) {
2830
5.45k
            tests::test(op, result.second);
2831
5.45k
        }
2832
2833
5.45k
        postprocess(module, op, result);
2834
5.45k
    }
2835
2836
3.93k
    if ( options.noCompare == false ) {
2837
3.79k
        compare(operations, results, data, size);
2838
3.79k
    }
2839
3.93k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.69k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.69k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.69k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.96k
    do {
2725
3.96k
        auto op = getOp(&parentDs, data, size);
2726
3.96k
        auto module = getModule(parentDs);
2727
3.96k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
3.96k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.96k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
47
            break;
2736
47
        }
2737
3.96k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.69k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.69k
#if 1
2745
2.69k
    {
2746
2.69k
        std::set<uint64_t> moduleIDs;
2747
2.69k
        for (const auto& m : modules ) {
2748
2.55k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.55k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.55k
            moduleIDs.insert(moduleID);
2756
2.55k
        }
2757
2758
2.69k
        std::set<uint64_t> operationModuleIDs;
2759
3.71k
        for (const auto& op : operations) {
2760
3.71k
            operationModuleIDs.insert(op.first->ID);
2761
3.71k
        }
2762
2763
2.69k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.69k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.69k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.69k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2.69k
    }
2771
2.69k
#endif
2772
2773
2.69k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.69k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
6.40k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.71k
        auto& operation = operations[i];
2782
2783
3.71k
        auto& module = operation.first;
2784
3.71k
        auto& op = operation.second;
2785
2786
3.71k
        if ( i > 0 ) {
2787
1.15k
            auto& prevModule = operations[i-1].first;
2788
1.15k
            auto& prevOp = operations[i-1].second;
2789
2790
1.15k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
334
                auto& curModifier = op.modifier.GetVectorPtr();
2792
334
                if ( curModifier.size() == 0 ) {
2793
42.0k
                    for (size_t j = 0; j < 512; j++) {
2794
41.9k
                        curModifier.push_back(1);
2795
41.9k
                    }
2796
252
                } else {
2797
6.38k
                    for (auto& c : curModifier) {
2798
6.38k
                        c++;
2799
6.38k
                    }
2800
252
                }
2801
334
            }
2802
1.15k
        }
2803
2804
3.71k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.71k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.71k
        const auto& result = results.back();
2811
2812
3.71k
        if ( result.second != std::nullopt ) {
2813
1.18k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
1.18k
        }
2820
2821
3.71k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
3.71k
        if ( options.disableTests == false ) {
2830
3.71k
            tests::test(op, result.second);
2831
3.71k
        }
2832
2833
3.71k
        postprocess(module, op, result);
2834
3.71k
    }
2835
2836
2.69k
    if ( options.noCompare == false ) {
2837
2.55k
        compare(operations, results, data, size);
2838
2.55k
    }
2839
2.69k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4.97k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4.97k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4.97k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
7.51k
    do {
2725
7.51k
        auto op = getOp(&parentDs, data, size);
2726
7.51k
        auto module = getModule(parentDs);
2727
7.51k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
7.51k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
7.51k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
98
            break;
2736
98
        }
2737
7.51k
    } while ( parentDs.Get<bool>() == true );
2738
2739
4.97k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4.97k
#if 1
2745
4.97k
    {
2746
4.97k
        std::set<uint64_t> moduleIDs;
2747
4.97k
        for (const auto& m : modules ) {
2748
4.86k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4.86k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4.86k
            moduleIDs.insert(moduleID);
2756
4.86k
        }
2757
2758
4.97k
        std::set<uint64_t> operationModuleIDs;
2759
7.31k
        for (const auto& op : operations) {
2760
7.31k
            operationModuleIDs.insert(op.first->ID);
2761
7.31k
        }
2762
2763
4.97k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4.97k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4.97k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4.97k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
4.97k
    }
2771
4.97k
#endif
2772
2773
4.97k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4.97k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
12.2k
    for (size_t i = 0; i < operations.size(); i++) {
2781
7.31k
        auto& operation = operations[i];
2782
2783
7.31k
        auto& module = operation.first;
2784
7.31k
        auto& op = operation.second;
2785
2786
7.31k
        if ( i > 0 ) {
2787
2.45k
            auto& prevModule = operations[i-1].first;
2788
2.45k
            auto& prevOp = operations[i-1].second;
2789
2790
2.45k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
314
                auto& curModifier = op.modifier.GetVectorPtr();
2792
314
                if ( curModifier.size() == 0 ) {
2793
74.3k
                    for (size_t j = 0; j < 512; j++) {
2794
74.2k
                        curModifier.push_back(1);
2795
74.2k
                    }
2796
169
                } else {
2797
11.3k
                    for (auto& c : curModifier) {
2798
11.3k
                        c++;
2799
11.3k
                    }
2800
169
                }
2801
314
            }
2802
2.45k
        }
2803
2804
7.31k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
7.31k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
7.31k
        const auto& result = results.back();
2811
2812
7.31k
        if ( result.second != std::nullopt ) {
2813
2.59k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
2.59k
        }
2820
2821
7.31k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
7.31k
        if ( options.disableTests == false ) {
2830
7.31k
            tests::test(op, result.second);
2831
7.31k
        }
2832
2833
7.31k
        postprocess(module, op, result);
2834
7.31k
    }
2835
2836
4.97k
    if ( options.noCompare == false ) {
2837
4.86k
        compare(operations, results, data, size);
2838
4.86k
    }
2839
4.97k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
307
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
307
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
307
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
729
    do {
2725
729
        auto op = getOp(&parentDs, data, size);
2726
729
        auto module = getModule(parentDs);
2727
729
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
729
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
729
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
20
            break;
2736
20
        }
2737
729
    } while ( parentDs.Get<bool>() == true );
2738
2739
307
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
307
#if 1
2745
307
    {
2746
307
        std::set<uint64_t> moduleIDs;
2747
307
        for (const auto& m : modules ) {
2748
247
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
247
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
247
            moduleIDs.insert(moduleID);
2756
247
        }
2757
2758
307
        std::set<uint64_t> operationModuleIDs;
2759
601
        for (const auto& op : operations) {
2760
601
            operationModuleIDs.insert(op.first->ID);
2761
601
        }
2762
2763
307
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
307
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
307
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
307
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
307
    }
2771
307
#endif
2772
2773
307
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
307
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
908
    for (size_t i = 0; i < operations.size(); i++) {
2781
601
        auto& operation = operations[i];
2782
2783
601
        auto& module = operation.first;
2784
601
        auto& op = operation.second;
2785
2786
601
        if ( i > 0 ) {
2787
354
            auto& prevModule = operations[i-1].first;
2788
354
            auto& prevOp = operations[i-1].second;
2789
2790
354
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
117
                auto& curModifier = op.modifier.GetVectorPtr();
2792
117
                if ( curModifier.size() == 0 ) {
2793
14.8k
                    for (size_t j = 0; j < 512; j++) {
2794
14.8k
                        curModifier.push_back(1);
2795
14.8k
                    }
2796
88
                } else {
2797
1.80k
                    for (auto& c : curModifier) {
2798
1.80k
                        c++;
2799
1.80k
                    }
2800
88
                }
2801
117
            }
2802
354
        }
2803
2804
601
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
601
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
601
        const auto& result = results.back();
2811
2812
601
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
601
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
601
        if ( options.disableTests == false ) {
2830
601
            tests::test(op, result.second);
2831
601
        }
2832
2833
601
        postprocess(module, op, result);
2834
601
    }
2835
2836
307
    if ( options.noCompare == false ) {
2837
247
        compare(operations, results, data, size);
2838
247
    }
2839
307
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4.05k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4.05k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4.05k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
8.24k
    do {
2725
8.24k
        auto op = getOp(&parentDs, data, size);
2726
8.24k
        auto module = getModule(parentDs);
2727
8.24k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
8.24k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
8.24k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
270
            break;
2736
270
        }
2737
8.24k
    } while ( parentDs.Get<bool>() == true );
2738
2739
4.05k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4.05k
#if 1
2745
4.05k
    {
2746
4.05k
        std::set<uint64_t> moduleIDs;
2747
4.05k
        for (const auto& m : modules ) {
2748
3.97k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.97k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.97k
            moduleIDs.insert(moduleID);
2756
3.97k
        }
2757
2758
4.05k
        std::set<uint64_t> operationModuleIDs;
2759
8.06k
        for (const auto& op : operations) {
2760
8.06k
            operationModuleIDs.insert(op.first->ID);
2761
8.06k
        }
2762
2763
4.05k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4.05k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4.05k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4.05k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
4.05k
    }
2771
4.05k
#endif
2772
2773
4.05k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4.05k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
12.1k
    for (size_t i = 0; i < operations.size(); i++) {
2781
8.06k
        auto& operation = operations[i];
2782
2783
8.06k
        auto& module = operation.first;
2784
8.06k
        auto& op = operation.second;
2785
2786
8.06k
        if ( i > 0 ) {
2787
4.09k
            auto& prevModule = operations[i-1].first;
2788
4.09k
            auto& prevOp = operations[i-1].second;
2789
2790
4.09k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.01k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.01k
                if ( curModifier.size() == 0 ) {
2793
79.0k
                    for (size_t j = 0; j < 512; j++) {
2794
78.8k
                        curModifier.push_back(1);
2795
78.8k
                    }
2796
858
                } else {
2797
10.3k
                    for (auto& c : curModifier) {
2798
10.3k
                        c++;
2799
10.3k
                    }
2800
858
                }
2801
1.01k
            }
2802
4.09k
        }
2803
2804
8.06k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
8.06k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
8.06k
        const auto& result = results.back();
2811
2812
8.06k
        if ( result.second != std::nullopt ) {
2813
4.96k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
4.96k
        }
2820
2821
8.06k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
8.06k
        if ( options.disableTests == false ) {
2830
8.06k
            tests::test(op, result.second);
2831
8.06k
        }
2832
2833
8.06k
        postprocess(module, op, result);
2834
8.06k
    }
2835
2836
4.05k
    if ( options.noCompare == false ) {
2837
3.97k
        compare(operations, results, data, size);
2838
3.97k
    }
2839
4.05k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3
    do {
2725
3
        auto op = getOp(&parentDs, data, size);
2726
3
        auto module = getModule(parentDs);
2727
3
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
3
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
3
    } while ( parentDs.Get<bool>() == true );
2738
2739
2
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2
#if 1
2745
2
    {
2746
2
        std::set<uint64_t> moduleIDs;
2747
2
        for (const auto& m : modules ) {
2748
2
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2
            moduleIDs.insert(moduleID);
2756
2
        }
2757
2758
2
        std::set<uint64_t> operationModuleIDs;
2759
3
        for (const auto& op : operations) {
2760
3
            operationModuleIDs.insert(op.first->ID);
2761
3
        }
2762
2763
2
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2
    }
2771
2
#endif
2772
2773
2
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
5
    for (size_t i = 0; i < operations.size(); i++) {
2781
3
        auto& operation = operations[i];
2782
2783
3
        auto& module = operation.first;
2784
3
        auto& op = operation.second;
2785
2786
3
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
130
                    for (auto& c : curModifier) {
2798
130
                        c++;
2799
130
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
3
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3
        const auto& result = results.back();
2811
2812
3
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
3
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
3
        if ( options.disableTests == false ) {
2830
3
            tests::test(op, result.second);
2831
3
        }
2832
2833
3
        postprocess(module, op, result);
2834
3
    }
2835
2836
2
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3
    do {
2725
3
        auto op = getOp(&parentDs, data, size);
2726
3
        auto module = getModule(parentDs);
2727
3
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
3
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
3
    } while ( parentDs.Get<bool>() == true );
2738
2739
2
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2
#if 1
2745
2
    {
2746
2
        std::set<uint64_t> moduleIDs;
2747
2
        for (const auto& m : modules ) {
2748
2
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2
            moduleIDs.insert(moduleID);
2756
2
        }
2757
2758
2
        std::set<uint64_t> operationModuleIDs;
2759
3
        for (const auto& op : operations) {
2760
3
            operationModuleIDs.insert(op.first->ID);
2761
3
        }
2762
2763
2
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2
    }
2771
2
#endif
2772
2773
2
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
5
    for (size_t i = 0; i < operations.size(); i++) {
2781
3
        auto& operation = operations[i];
2782
2783
3
        auto& module = operation.first;
2784
3
        auto& op = operation.second;
2785
2786
3
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
0
                auto& curModifier = op.modifier.GetVectorPtr();
2792
0
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
0
                } else {
2797
0
                    for (auto& c : curModifier) {
2798
0
                        c++;
2799
0
                    }
2800
0
                }
2801
0
            }
2802
1
        }
2803
2804
3
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3
        const auto& result = results.back();
2811
2812
3
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
3
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
3
        if ( options.disableTests == false ) {
2830
3
            tests::test(op, result.second);
2831
3
        }
2832
2833
3
        postprocess(module, op, result);
2834
3
    }
2835
2836
2
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
129
                    for (auto& c : curModifier) {
2798
129
                        c++;
2799
129
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
190
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
190
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
190
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
463
    do {
2725
463
        auto op = getOp(&parentDs, data, size);
2726
463
        auto module = getModule(parentDs);
2727
463
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
463
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
463
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
12
            break;
2736
12
        }
2737
463
    } while ( parentDs.Get<bool>() == true );
2738
2739
190
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
190
#if 1
2745
190
    {
2746
190
        std::set<uint64_t> moduleIDs;
2747
190
        for (const auto& m : modules ) {
2748
114
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
114
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
114
            moduleIDs.insert(moduleID);
2756
114
        }
2757
2758
190
        std::set<uint64_t> operationModuleIDs;
2759
313
        for (const auto& op : operations) {
2760
313
            operationModuleIDs.insert(op.first->ID);
2761
313
        }
2762
2763
190
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
190
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
190
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
190
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
190
    }
2771
190
#endif
2772
2773
190
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
190
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
503
    for (size_t i = 0; i < operations.size(); i++) {
2781
313
        auto& operation = operations[i];
2782
2783
313
        auto& module = operation.first;
2784
313
        auto& op = operation.second;
2785
2786
313
        if ( i > 0 ) {
2787
199
            auto& prevModule = operations[i-1].first;
2788
199
            auto& prevOp = operations[i-1].second;
2789
2790
199
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
92
                auto& curModifier = op.modifier.GetVectorPtr();
2792
92
                if ( curModifier.size() == 0 ) {
2793
20.0k
                    for (size_t j = 0; j < 512; j++) {
2794
19.9k
                        curModifier.push_back(1);
2795
19.9k
                    }
2796
53
                } else {
2797
1.79k
                    for (auto& c : curModifier) {
2798
1.79k
                        c++;
2799
1.79k
                    }
2800
53
                }
2801
92
            }
2802
199
        }
2803
2804
313
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
313
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
313
        const auto& result = results.back();
2811
2812
313
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
313
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
313
        if ( options.disableTests == false ) {
2830
313
            tests::test(op, result.second);
2831
313
        }
2832
2833
313
        postprocess(module, op, result);
2834
313
    }
2835
2836
190
    if ( options.noCompare == false ) {
2837
114
        compare(operations, results, data, size);
2838
114
    }
2839
190
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.16k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.16k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.16k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.27k
    do {
2725
4.27k
        auto op = getOp(&parentDs, data, size);
2726
4.27k
        auto module = getModule(parentDs);
2727
4.27k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4.27k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.27k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
87
            break;
2736
87
        }
2737
4.27k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.16k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.16k
#if 1
2745
2.16k
    {
2746
2.16k
        std::set<uint64_t> moduleIDs;
2747
2.16k
        for (const auto& m : modules ) {
2748
2.06k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.06k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.06k
            moduleIDs.insert(moduleID);
2756
2.06k
        }
2757
2758
2.16k
        std::set<uint64_t> operationModuleIDs;
2759
4.05k
        for (const auto& op : operations) {
2760
4.05k
            operationModuleIDs.insert(op.first->ID);
2761
4.05k
        }
2762
2763
2.16k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.16k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.16k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.16k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2.16k
    }
2771
2.16k
#endif
2772
2773
2.16k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.16k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
6.22k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.05k
        auto& operation = operations[i];
2782
2783
4.05k
        auto& module = operation.first;
2784
4.05k
        auto& op = operation.second;
2785
2786
4.05k
        if ( i > 0 ) {
2787
1.99k
            auto& prevModule = operations[i-1].first;
2788
1.99k
            auto& prevOp = operations[i-1].second;
2789
2790
1.99k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
595
                auto& curModifier = op.modifier.GetVectorPtr();
2792
595
                if ( curModifier.size() == 0 ) {
2793
91.8k
                    for (size_t j = 0; j < 512; j++) {
2794
91.6k
                        curModifier.push_back(1);
2795
91.6k
                    }
2796
416
                } else {
2797
19.2k
                    for (auto& c : curModifier) {
2798
19.2k
                        c++;
2799
19.2k
                    }
2800
416
                }
2801
595
            }
2802
1.99k
        }
2803
2804
4.05k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.05k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.05k
        const auto& result = results.back();
2811
2812
4.05k
        if ( result.second != std::nullopt ) {
2813
1.94k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
1.94k
        }
2820
2821
4.05k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
4.05k
        if ( options.disableTests == false ) {
2830
4.05k
            tests::test(op, result.second);
2831
4.05k
        }
2832
2833
4.05k
        postprocess(module, op, result);
2834
4.05k
    }
2835
2836
2.16k
    if ( options.noCompare == false ) {
2837
2.06k
        compare(operations, results, data, size);
2838
2.06k
    }
2839
2.16k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
140
                    for (auto& c : curModifier) {
2798
140
                        c++;
2799
140
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
142
                    for (auto& c : curModifier) {
2798
142
                        c++;
2799
142
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5
    do {
2725
5
        auto op = getOp(&parentDs, data, size);
2726
5
        auto module = getModule(parentDs);
2727
5
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
5
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
5
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
5
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
5
        for (const auto& op : operations) {
2760
5
            operationModuleIDs.insert(op.first->ID);
2761
5
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
6
    for (size_t i = 0; i < operations.size(); i++) {
2781
5
        auto& operation = operations[i];
2782
2783
5
        auto& module = operation.first;
2784
5
        auto& op = operation.second;
2785
2786
5
        if ( i > 0 ) {
2787
4
            auto& prevModule = operations[i-1].first;
2788
4
            auto& prevOp = operations[i-1].second;
2789
2790
4
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
0
                auto& curModifier = op.modifier.GetVectorPtr();
2792
0
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
0
                } else {
2797
0
                    for (auto& c : curModifier) {
2798
0
                        c++;
2799
0
                    }
2800
0
                }
2801
0
            }
2802
4
        }
2803
2804
5
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5
        const auto& result = results.back();
2811
2812
5
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
5
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
5
        if ( options.disableTests == false ) {
2830
5
            tests::test(op, result.second);
2831
5
        }
2832
2833
5
        postprocess(module, op, result);
2834
5
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
7
    do {
2725
7
        auto op = getOp(&parentDs, data, size);
2726
7
        auto module = getModule(parentDs);
2727
7
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
7
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
7
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
7
    } while ( parentDs.Get<bool>() == true );
2738
2739
2
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2
#if 1
2745
2
    {
2746
2
        std::set<uint64_t> moduleIDs;
2747
2
        for (const auto& m : modules ) {
2748
2
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2
            moduleIDs.insert(moduleID);
2756
2
        }
2757
2758
2
        std::set<uint64_t> operationModuleIDs;
2759
7
        for (const auto& op : operations) {
2760
7
            operationModuleIDs.insert(op.first->ID);
2761
7
        }
2762
2763
2
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2
    }
2771
2
#endif
2772
2773
2
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
9
    for (size_t i = 0; i < operations.size(); i++) {
2781
7
        auto& operation = operations[i];
2782
2783
7
        auto& module = operation.first;
2784
7
        auto& op = operation.second;
2785
2786
7
        if ( i > 0 ) {
2787
5
            auto& prevModule = operations[i-1].first;
2788
5
            auto& prevOp = operations[i-1].second;
2789
2790
5
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
145
                    for (auto& c : curModifier) {
2798
145
                        c++;
2799
145
                    }
2800
1
                }
2801
1
            }
2802
5
        }
2803
2804
7
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
7
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
7
        const auto& result = results.back();
2811
2812
7
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
7
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
7
        if ( options.disableTests == false ) {
2830
7
            tests::test(op, result.second);
2831
7
        }
2832
2833
7
        postprocess(module, op, result);
2834
7
    }
2835
2836
2
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
2
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
14
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
14
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
14
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
33
    do {
2725
33
        auto op = getOp(&parentDs, data, size);
2726
33
        auto module = getModule(parentDs);
2727
33
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
33
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
33
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
33
    } while ( parentDs.Get<bool>() == true );
2738
2739
14
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
14
#if 1
2745
14
    {
2746
14
        std::set<uint64_t> moduleIDs;
2747
14
        for (const auto& m : modules ) {
2748
14
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
14
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
14
            moduleIDs.insert(moduleID);
2756
14
        }
2757
2758
14
        std::set<uint64_t> operationModuleIDs;
2759
33
        for (const auto& op : operations) {
2760
33
            operationModuleIDs.insert(op.first->ID);
2761
33
        }
2762
2763
14
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
14
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
14
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
14
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
14
    }
2771
14
#endif
2772
2773
14
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
14
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
47
    for (size_t i = 0; i < operations.size(); i++) {
2781
33
        auto& operation = operations[i];
2782
2783
33
        auto& module = operation.first;
2784
33
        auto& op = operation.second;
2785
2786
33
        if ( i > 0 ) {
2787
19
            auto& prevModule = operations[i-1].first;
2788
19
            auto& prevOp = operations[i-1].second;
2789
2790
19
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
8
                auto& curModifier = op.modifier.GetVectorPtr();
2792
8
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
6
                } else {
2797
170
                    for (auto& c : curModifier) {
2798
170
                        c++;
2799
170
                    }
2800
2
                }
2801
8
            }
2802
19
        }
2803
2804
33
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
33
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
33
        const auto& result = results.back();
2811
2812
33
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
33
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
33
        if ( options.disableTests == false ) {
2830
33
            tests::test(op, result.second);
2831
33
        }
2832
2833
33
        postprocess(module, op, result);
2834
33
    }
2835
2836
14
    if ( options.noCompare == false ) {
2837
14
        compare(operations, results, data, size);
2838
14
    }
2839
14
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
7
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
7
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
7
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
16
    do {
2725
16
        auto op = getOp(&parentDs, data, size);
2726
16
        auto module = getModule(parentDs);
2727
16
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
16
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
16
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
16
    } while ( parentDs.Get<bool>() == true );
2738
2739
7
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
7
#if 1
2745
7
    {
2746
7
        std::set<uint64_t> moduleIDs;
2747
7
        for (const auto& m : modules ) {
2748
7
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
7
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
7
            moduleIDs.insert(moduleID);
2756
7
        }
2757
2758
7
        std::set<uint64_t> operationModuleIDs;
2759
16
        for (const auto& op : operations) {
2760
16
            operationModuleIDs.insert(op.first->ID);
2761
16
        }
2762
2763
7
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
7
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
7
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
7
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
7
    }
2771
7
#endif
2772
2773
7
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
7
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
23
    for (size_t i = 0; i < operations.size(); i++) {
2781
16
        auto& operation = operations[i];
2782
2783
16
        auto& module = operation.first;
2784
16
        auto& op = operation.second;
2785
2786
16
        if ( i > 0 ) {
2787
9
            auto& prevModule = operations[i-1].first;
2788
9
            auto& prevOp = operations[i-1].second;
2789
2790
9
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
5
                auto& curModifier = op.modifier.GetVectorPtr();
2792
5
                if ( curModifier.size() == 0 ) {
2793
2.05k
                    for (size_t j = 0; j < 512; j++) {
2794
2.04k
                        curModifier.push_back(1);
2795
2.04k
                    }
2796
4
                } else {
2797
134
                    for (auto& c : curModifier) {
2798
134
                        c++;
2799
134
                    }
2800
1
                }
2801
5
            }
2802
9
        }
2803
2804
16
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
16
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
16
        const auto& result = results.back();
2811
2812
16
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
16
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
16
        if ( options.disableTests == false ) {
2830
16
            tests::test(op, result.second);
2831
16
        }
2832
2833
16
        postprocess(module, op, result);
2834
16
    }
2835
2836
7
    if ( options.noCompare == false ) {
2837
7
        compare(operations, results, data, size);
2838
7
    }
2839
7
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
8
    do {
2725
8
        auto op = getOp(&parentDs, data, size);
2726
8
        auto module = getModule(parentDs);
2727
8
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
8
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
8
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
8
    } while ( parentDs.Get<bool>() == true );
2738
2739
4
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4
#if 1
2745
4
    {
2746
4
        std::set<uint64_t> moduleIDs;
2747
4
        for (const auto& m : modules ) {
2748
4
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4
            moduleIDs.insert(moduleID);
2756
4
        }
2757
2758
4
        std::set<uint64_t> operationModuleIDs;
2759
8
        for (const auto& op : operations) {
2760
8
            operationModuleIDs.insert(op.first->ID);
2761
8
        }
2762
2763
4
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
4
    }
2771
4
#endif
2772
2773
4
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
12
    for (size_t i = 0; i < operations.size(); i++) {
2781
8
        auto& operation = operations[i];
2782
2783
8
        auto& module = operation.first;
2784
8
        auto& op = operation.second;
2785
2786
8
        if ( i > 0 ) {
2787
4
            auto& prevModule = operations[i-1].first;
2788
4
            auto& prevOp = operations[i-1].second;
2789
2790
4
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
4
                auto& curModifier = op.modifier.GetVectorPtr();
2792
4
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
4
                } else {
2797
299
                    for (auto& c : curModifier) {
2798
299
                        c++;
2799
299
                    }
2800
4
                }
2801
4
            }
2802
4
        }
2803
2804
8
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
8
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
8
        const auto& result = results.back();
2811
2812
8
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
8
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
8
        if ( options.disableTests == false ) {
2830
8
            tests::test(op, result.second);
2831
8
        }
2832
2833
8
        postprocess(module, op, result);
2834
8
    }
2835
2836
4
    if ( options.noCompare == false ) {
2837
4
        compare(operations, results, data, size);
2838
4
    }
2839
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
9
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
9
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
9
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
15
    do {
2725
15
        auto op = getOp(&parentDs, data, size);
2726
15
        auto module = getModule(parentDs);
2727
15
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
15
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
15
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
15
    } while ( parentDs.Get<bool>() == true );
2738
2739
9
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
9
#if 1
2745
9
    {
2746
9
        std::set<uint64_t> moduleIDs;
2747
9
        for (const auto& m : modules ) {
2748
9
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
9
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
9
            moduleIDs.insert(moduleID);
2756
9
        }
2757
2758
9
        std::set<uint64_t> operationModuleIDs;
2759
15
        for (const auto& op : operations) {
2760
15
            operationModuleIDs.insert(op.first->ID);
2761
15
        }
2762
2763
9
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
9
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
9
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
9
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
9
    }
2771
9
#endif
2772
2773
9
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
9
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
24
    for (size_t i = 0; i < operations.size(); i++) {
2781
15
        auto& operation = operations[i];
2782
2783
15
        auto& module = operation.first;
2784
15
        auto& op = operation.second;
2785
2786
15
        if ( i > 0 ) {
2787
6
            auto& prevModule = operations[i-1].first;
2788
6
            auto& prevOp = operations[i-1].second;
2789
2790
6
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
2
                } else {
2797
448
                    for (auto& c : curModifier) {
2798
448
                        c++;
2799
448
                    }
2800
2
                }
2801
2
            }
2802
6
        }
2803
2804
15
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
15
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
15
        const auto& result = results.back();
2811
2812
15
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
15
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
15
        if ( options.disableTests == false ) {
2830
15
            tests::test(op, result.second);
2831
15
        }
2832
2833
15
        postprocess(module, op, result);
2834
15
    }
2835
2836
9
    if ( options.noCompare == false ) {
2837
9
        compare(operations, results, data, size);
2838
9
    }
2839
9
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
431
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
431
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
431
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
963
    do {
2725
963
        auto op = getOp(&parentDs, data, size);
2726
963
        auto module = getModule(parentDs);
2727
963
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
963
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
963
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
25
            break;
2736
25
        }
2737
963
    } while ( parentDs.Get<bool>() == true );
2738
2739
431
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
431
#if 1
2745
431
    {
2746
431
        std::set<uint64_t> moduleIDs;
2747
431
        for (const auto& m : modules ) {
2748
368
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
368
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
368
            moduleIDs.insert(moduleID);
2756
368
        }
2757
2758
431
        std::set<uint64_t> operationModuleIDs;
2759
829
        for (const auto& op : operations) {
2760
829
            operationModuleIDs.insert(op.first->ID);
2761
829
        }
2762
2763
431
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
431
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
431
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
431
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
431
    }
2771
431
#endif
2772
2773
431
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
431
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.26k
    for (size_t i = 0; i < operations.size(); i++) {
2781
829
        auto& operation = operations[i];
2782
2783
829
        auto& module = operation.first;
2784
829
        auto& op = operation.second;
2785
2786
829
        if ( i > 0 ) {
2787
461
            auto& prevModule = operations[i-1].first;
2788
461
            auto& prevOp = operations[i-1].second;
2789
2790
461
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
157
                auto& curModifier = op.modifier.GetVectorPtr();
2792
157
                if ( curModifier.size() == 0 ) {
2793
13.8k
                    for (size_t j = 0; j < 512; j++) {
2794
13.8k
                        curModifier.push_back(1);
2795
13.8k
                    }
2796
130
                } else {
2797
1.34k
                    for (auto& c : curModifier) {
2798
1.34k
                        c++;
2799
1.34k
                    }
2800
130
                }
2801
157
            }
2802
461
        }
2803
2804
829
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
829
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
829
        const auto& result = results.back();
2811
2812
829
        if ( result.second != std::nullopt ) {
2813
136
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
136
        }
2820
2821
829
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
829
        if ( options.disableTests == false ) {
2830
829
            tests::test(op, result.second);
2831
829
        }
2832
2833
829
        postprocess(module, op, result);
2834
829
    }
2835
2836
431
    if ( options.noCompare == false ) {
2837
368
        compare(operations, results, data, size);
2838
368
    }
2839
431
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
567
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
567
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
567
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.17k
    do {
2725
1.17k
        auto op = getOp(&parentDs, data, size);
2726
1.17k
        auto module = getModule(parentDs);
2727
1.17k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.17k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.17k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
32
            break;
2736
32
        }
2737
1.17k
    } while ( parentDs.Get<bool>() == true );
2738
2739
567
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
567
#if 1
2745
567
    {
2746
567
        std::set<uint64_t> moduleIDs;
2747
567
        for (const auto& m : modules ) {
2748
470
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
470
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
470
            moduleIDs.insert(moduleID);
2756
470
        }
2757
2758
567
        std::set<uint64_t> operationModuleIDs;
2759
960
        for (const auto& op : operations) {
2760
960
            operationModuleIDs.insert(op.first->ID);
2761
960
        }
2762
2763
567
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
567
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
567
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
567
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
567
    }
2771
567
#endif
2772
2773
567
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
567
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.52k
    for (size_t i = 0; i < operations.size(); i++) {
2781
960
        auto& operation = operations[i];
2782
2783
960
        auto& module = operation.first;
2784
960
        auto& op = operation.second;
2785
2786
960
        if ( i > 0 ) {
2787
490
            auto& prevModule = operations[i-1].first;
2788
490
            auto& prevOp = operations[i-1].second;
2789
2790
490
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
136
                auto& curModifier = op.modifier.GetVectorPtr();
2792
136
                if ( curModifier.size() == 0 ) {
2793
23.5k
                    for (size_t j = 0; j < 512; j++) {
2794
23.5k
                        curModifier.push_back(1);
2795
23.5k
                    }
2796
90
                } else {
2797
6.04k
                    for (auto& c : curModifier) {
2798
6.04k
                        c++;
2799
6.04k
                    }
2800
90
                }
2801
136
            }
2802
490
        }
2803
2804
960
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
960
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
960
        const auto& result = results.back();
2811
2812
960
        if ( result.second != std::nullopt ) {
2813
159
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
159
        }
2820
2821
960
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
960
        if ( options.disableTests == false ) {
2830
960
            tests::test(op, result.second);
2831
960
        }
2832
2833
960
        postprocess(module, op, result);
2834
960
    }
2835
2836
567
    if ( options.noCompare == false ) {
2837
470
        compare(operations, results, data, size);
2838
470
    }
2839
567
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
572
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
572
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
572
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.23k
    do {
2725
1.23k
        auto op = getOp(&parentDs, data, size);
2726
1.23k
        auto module = getModule(parentDs);
2727
1.23k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.23k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.23k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
38
            break;
2736
38
        }
2737
1.23k
    } while ( parentDs.Get<bool>() == true );
2738
2739
572
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
572
#if 1
2745
572
    {
2746
572
        std::set<uint64_t> moduleIDs;
2747
572
        for (const auto& m : modules ) {
2748
469
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
469
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
469
            moduleIDs.insert(moduleID);
2756
469
        }
2757
2758
572
        std::set<uint64_t> operationModuleIDs;
2759
1.01k
        for (const auto& op : operations) {
2760
1.01k
            operationModuleIDs.insert(op.first->ID);
2761
1.01k
        }
2762
2763
572
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
572
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
572
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
572
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
572
    }
2771
572
#endif
2772
2773
572
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
572
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.58k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.01k
        auto& operation = operations[i];
2782
2783
1.01k
        auto& module = operation.first;
2784
1.01k
        auto& op = operation.second;
2785
2786
1.01k
        if ( i > 0 ) {
2787
542
            auto& prevModule = operations[i-1].first;
2788
542
            auto& prevOp = operations[i-1].second;
2789
2790
542
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
139
                auto& curModifier = op.modifier.GetVectorPtr();
2792
139
                if ( curModifier.size() == 0 ) {
2793
25.1k
                    for (size_t j = 0; j < 512; j++) {
2794
25.0k
                        curModifier.push_back(1);
2795
25.0k
                    }
2796
90
                } else {
2797
3.20k
                    for (auto& c : curModifier) {
2798
3.20k
                        c++;
2799
3.20k
                    }
2800
90
                }
2801
139
            }
2802
542
        }
2803
2804
1.01k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.01k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.01k
        const auto& result = results.back();
2811
2812
1.01k
        if ( result.second != std::nullopt ) {
2813
17
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
17
        }
2820
2821
1.01k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.01k
        if ( options.disableTests == false ) {
2830
1.01k
            tests::test(op, result.second);
2831
1.01k
        }
2832
2833
1.01k
        postprocess(module, op, result);
2834
1.01k
    }
2835
2836
572
    if ( options.noCompare == false ) {
2837
469
        compare(operations, results, data, size);
2838
469
    }
2839
572
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.12k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.12k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.12k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.56k
    do {
2725
3.56k
        auto op = getOp(&parentDs, data, size);
2726
3.56k
        auto module = getModule(parentDs);
2727
3.56k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
3.56k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.56k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
64
            break;
2736
64
        }
2737
3.56k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.12k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.12k
#if 1
2745
2.12k
    {
2746
2.12k
        std::set<uint64_t> moduleIDs;
2747
2.12k
        for (const auto& m : modules ) {
2748
1.98k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.98k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.98k
            moduleIDs.insert(moduleID);
2756
1.98k
        }
2757
2758
2.12k
        std::set<uint64_t> operationModuleIDs;
2759
3.30k
        for (const auto& op : operations) {
2760
3.30k
            operationModuleIDs.insert(op.first->ID);
2761
3.30k
        }
2762
2763
2.12k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.12k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.12k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.12k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2.12k
    }
2771
2.12k
#endif
2772
2773
2.12k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.12k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
5.42k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.30k
        auto& operation = operations[i];
2782
2783
3.30k
        auto& module = operation.first;
2784
3.30k
        auto& op = operation.second;
2785
2786
3.30k
        if ( i > 0 ) {
2787
1.32k
            auto& prevModule = operations[i-1].first;
2788
1.32k
            auto& prevOp = operations[i-1].second;
2789
2790
1.32k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
400
                auto& curModifier = op.modifier.GetVectorPtr();
2792
400
                if ( curModifier.size() == 0 ) {
2793
33.3k
                    for (size_t j = 0; j < 512; j++) {
2794
33.2k
                        curModifier.push_back(1);
2795
33.2k
                    }
2796
335
                } else {
2797
31.5k
                    for (auto& c : curModifier) {
2798
31.5k
                        c++;
2799
31.5k
                    }
2800
335
                }
2801
400
            }
2802
1.32k
        }
2803
2804
3.30k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.30k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.30k
        const auto& result = results.back();
2811
2812
3.30k
        if ( result.second != std::nullopt ) {
2813
147
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
147
        }
2820
2821
3.30k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
3.30k
        if ( options.disableTests == false ) {
2830
3.30k
            tests::test(op, result.second);
2831
3.30k
        }
2832
2833
3.30k
        postprocess(module, op, result);
2834
3.30k
    }
2835
2836
2.12k
    if ( options.noCompare == false ) {
2837
1.98k
        compare(operations, results, data, size);
2838
1.98k
    }
2839
2.12k
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.92k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.92k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.92k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.02k
    do {
2725
3.02k
        auto op = getOp(&parentDs, data, size);
2726
3.02k
        auto module = getModule(parentDs);
2727
3.02k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
3.02k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.02k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
51
            break;
2736
51
        }
2737
3.02k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.92k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.92k
#if 1
2745
1.92k
    {
2746
1.92k
        std::set<uint64_t> moduleIDs;
2747
1.92k
        for (const auto& m : modules ) {
2748
1.82k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.82k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.82k
            moduleIDs.insert(moduleID);
2756
1.82k
        }
2757
2758
1.92k
        std::set<uint64_t> operationModuleIDs;
2759
2.82k
        for (const auto& op : operations) {
2760
2.82k
            operationModuleIDs.insert(op.first->ID);
2761
2.82k
        }
2762
2763
1.92k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.92k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.92k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.92k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1.92k
    }
2771
1.92k
#endif
2772
2773
1.92k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.92k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
4.75k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.82k
        auto& operation = operations[i];
2782
2783
2.82k
        auto& module = operation.first;
2784
2.82k
        auto& op = operation.second;
2785
2786
2.82k
        if ( i > 0 ) {
2787
1.00k
            auto& prevModule = operations[i-1].first;
2788
1.00k
            auto& prevOp = operations[i-1].second;
2789
2790
1.00k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
287
                auto& curModifier = op.modifier.GetVectorPtr();
2792
287
                if ( curModifier.size() == 0 ) {
2793
26.1k
                    for (size_t j = 0; j < 512; j++) {
2794
26.1k
                        curModifier.push_back(1);
2795
26.1k
                    }
2796
236
                } else {
2797
13.9k
                    for (auto& c : curModifier) {
2798
13.9k
                        c++;
2799
13.9k
                    }
2800
236
                }
2801
287
            }
2802
1.00k
        }
2803
2804
2.82k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.82k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.82k
        const auto& result = results.back();
2811
2812
2.82k
        if ( result.second != std::nullopt ) {
2813
156
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
156
        }
2820
2821
2.82k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2.82k
        if ( options.disableTests == false ) {
2830
2.82k
            tests::test(op, result.second);
2831
2.82k
        }
2832
2833
2.82k
        postprocess(module, op, result);
2834
2.82k
    }
2835
2836
1.92k
    if ( options.noCompare == false ) {
2837
1.82k
        compare(operations, results, data, size);
2838
1.82k
    }
2839
1.92k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
18
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
18
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
18
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
29
    do {
2725
29
        auto op = getOp(&parentDs, data, size);
2726
29
        auto module = getModule(parentDs);
2727
29
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
29
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
29
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
29
    } while ( parentDs.Get<bool>() == true );
2738
2739
18
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
18
#if 1
2745
18
    {
2746
18
        std::set<uint64_t> moduleIDs;
2747
18
        for (const auto& m : modules ) {
2748
18
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
18
            moduleIDs.insert(moduleID);
2756
18
        }
2757
2758
18
        std::set<uint64_t> operationModuleIDs;
2759
29
        for (const auto& op : operations) {
2760
29
            operationModuleIDs.insert(op.first->ID);
2761
29
        }
2762
2763
18
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
18
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
18
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
18
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
18
    }
2771
18
#endif
2772
2773
18
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
18
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
47
    for (size_t i = 0; i < operations.size(); i++) {
2781
29
        auto& operation = operations[i];
2782
2783
29
        auto& module = operation.first;
2784
29
        auto& op = operation.second;
2785
2786
29
        if ( i > 0 ) {
2787
11
            auto& prevModule = operations[i-1].first;
2788
11
            auto& prevOp = operations[i-1].second;
2789
2790
11
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
2
                } else {
2797
38
                    for (auto& c : curModifier) {
2798
38
                        c++;
2799
38
                    }
2800
2
                }
2801
2
            }
2802
11
        }
2803
2804
29
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
29
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
29
        const auto& result = results.back();
2811
2812
29
        if ( result.second != std::nullopt ) {
2813
2
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
2
        }
2820
2821
29
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
29
        if ( options.disableTests == false ) {
2830
29
            tests::test(op, result.second);
2831
29
        }
2832
2833
29
        postprocess(module, op, result);
2834
29
    }
2835
2836
18
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
18
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.64k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.64k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.64k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.14k
    do {
2725
5.14k
        auto op = getOp(&parentDs, data, size);
2726
5.14k
        auto module = getModule(parentDs);
2727
5.14k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
5.14k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
5.14k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
66
            break;
2736
66
        }
2737
5.14k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.64k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.64k
#if 1
2745
3.64k
    {
2746
3.64k
        std::set<uint64_t> moduleIDs;
2747
3.64k
        for (const auto& m : modules ) {
2748
3.49k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.49k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.49k
            moduleIDs.insert(moduleID);
2756
3.49k
        }
2757
2758
3.64k
        std::set<uint64_t> operationModuleIDs;
2759
4.89k
        for (const auto& op : operations) {
2760
4.89k
            operationModuleIDs.insert(op.first->ID);
2761
4.89k
        }
2762
2763
3.64k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.64k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.64k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.64k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3.64k
    }
2771
3.64k
#endif
2772
2773
3.64k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.64k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
8.53k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.89k
        auto& operation = operations[i];
2782
2783
4.89k
        auto& module = operation.first;
2784
4.89k
        auto& op = operation.second;
2785
2786
4.89k
        if ( i > 0 ) {
2787
1.39k
            auto& prevModule = operations[i-1].first;
2788
1.39k
            auto& prevOp = operations[i-1].second;
2789
2790
1.39k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
340
                auto& curModifier = op.modifier.GetVectorPtr();
2792
340
                if ( curModifier.size() == 0 ) {
2793
28.7k
                    for (size_t j = 0; j < 512; j++) {
2794
28.6k
                        curModifier.push_back(1);
2795
28.6k
                    }
2796
284
                } else {
2797
6.68k
                    for (auto& c : curModifier) {
2798
6.68k
                        c++;
2799
6.68k
                    }
2800
284
                }
2801
340
            }
2802
1.39k
        }
2803
2804
4.89k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.89k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.89k
        const auto& result = results.back();
2811
2812
4.89k
        if ( result.second != std::nullopt ) {
2813
99
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
99
        }
2820
2821
4.89k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
4.89k
        if ( options.disableTests == false ) {
2830
4.89k
            tests::test(op, result.second);
2831
4.89k
        }
2832
2833
4.89k
        postprocess(module, op, result);
2834
4.89k
    }
2835
2836
3.64k
    if ( options.noCompare == false ) {
2837
3.49k
        compare(operations, results, data, size);
2838
3.49k
    }
2839
3.64k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
10
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
10
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
10
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
18
    do {
2725
18
        auto op = getOp(&parentDs, data, size);
2726
18
        auto module = getModule(parentDs);
2727
18
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
18
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
18
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
18
    } while ( parentDs.Get<bool>() == true );
2738
2739
10
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
10
#if 1
2745
10
    {
2746
10
        std::set<uint64_t> moduleIDs;
2747
10
        for (const auto& m : modules ) {
2748
10
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
10
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
10
            moduleIDs.insert(moduleID);
2756
10
        }
2757
2758
10
        std::set<uint64_t> operationModuleIDs;
2759
18
        for (const auto& op : operations) {
2760
18
            operationModuleIDs.insert(op.first->ID);
2761
18
        }
2762
2763
10
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
10
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
10
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
10
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
10
    }
2771
10
#endif
2772
2773
10
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
10
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
28
    for (size_t i = 0; i < operations.size(); i++) {
2781
18
        auto& operation = operations[i];
2782
2783
18
        auto& module = operation.first;
2784
18
        auto& op = operation.second;
2785
2786
18
        if ( i > 0 ) {
2787
8
            auto& prevModule = operations[i-1].first;
2788
8
            auto& prevOp = operations[i-1].second;
2789
2790
8
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
107
                    for (auto& c : curModifier) {
2798
107
                        c++;
2799
107
                    }
2800
1
                }
2801
1
            }
2802
8
        }
2803
2804
18
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
18
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
18
        const auto& result = results.back();
2811
2812
18
        if ( result.second != std::nullopt ) {
2813
7
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
7
        }
2820
2821
18
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
18
        if ( options.disableTests == false ) {
2830
18
            tests::test(op, result.second);
2831
18
        }
2832
2833
18
        postprocess(module, op, result);
2834
18
    }
2835
2836
10
    if ( options.noCompare == false ) {
2837
10
        compare(operations, results, data, size);
2838
10
    }
2839
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.38k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.38k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.38k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.24k
    do {
2725
2.24k
        auto op = getOp(&parentDs, data, size);
2726
2.24k
        auto module = getModule(parentDs);
2727
2.24k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2.24k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.24k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
30
            break;
2736
30
        }
2737
2.24k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.38k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.38k
#if 1
2745
1.38k
    {
2746
1.38k
        std::set<uint64_t> moduleIDs;
2747
1.38k
        for (const auto& m : modules ) {
2748
1.20k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.20k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.20k
            moduleIDs.insert(moduleID);
2756
1.20k
        }
2757
2758
1.38k
        std::set<uint64_t> operationModuleIDs;
2759
1.97k
        for (const auto& op : operations) {
2760
1.97k
            operationModuleIDs.insert(op.first->ID);
2761
1.97k
        }
2762
2763
1.38k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.38k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.38k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.38k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1.38k
    }
2771
1.38k
#endif
2772
2773
1.38k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.38k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.35k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.97k
        auto& operation = operations[i];
2782
2783
1.97k
        auto& module = operation.first;
2784
1.97k
        auto& op = operation.second;
2785
2786
1.97k
        if ( i > 0 ) {
2787
765
            auto& prevModule = operations[i-1].first;
2788
765
            auto& prevOp = operations[i-1].second;
2789
2790
765
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
305
                auto& curModifier = op.modifier.GetVectorPtr();
2792
305
                if ( curModifier.size() == 0 ) {
2793
50.7k
                    for (size_t j = 0; j < 512; j++) {
2794
50.6k
                        curModifier.push_back(1);
2795
50.6k
                    }
2796
206
                } else {
2797
8.60k
                    for (auto& c : curModifier) {
2798
8.60k
                        c++;
2799
8.60k
                    }
2800
206
                }
2801
305
            }
2802
765
        }
2803
2804
1.97k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.97k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.97k
        const auto& result = results.back();
2811
2812
1.97k
        if ( result.second != std::nullopt ) {
2813
151
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
151
        }
2820
2821
1.97k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.97k
        if ( options.disableTests == false ) {
2830
1.97k
            tests::test(op, result.second);
2831
1.97k
        }
2832
2833
1.97k
        postprocess(module, op, result);
2834
1.97k
    }
2835
2836
1.38k
    if ( options.noCompare == false ) {
2837
1.20k
        compare(operations, results, data, size);
2838
1.20k
    }
2839
1.38k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
852
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
852
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
852
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.73k
    do {
2725
1.73k
        auto op = getOp(&parentDs, data, size);
2726
1.73k
        auto module = getModule(parentDs);
2727
1.73k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.73k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.73k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
36
            break;
2736
36
        }
2737
1.73k
    } while ( parentDs.Get<bool>() == true );
2738
2739
852
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
852
#if 1
2745
852
    {
2746
852
        std::set<uint64_t> moduleIDs;
2747
852
        for (const auto& m : modules ) {
2748
713
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
713
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
713
            moduleIDs.insert(moduleID);
2756
713
        }
2757
2758
852
        std::set<uint64_t> operationModuleIDs;
2759
1.49k
        for (const auto& op : operations) {
2760
1.49k
            operationModuleIDs.insert(op.first->ID);
2761
1.49k
        }
2762
2763
852
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
852
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
852
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
852
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
852
    }
2771
852
#endif
2772
2773
852
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
852
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.34k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.49k
        auto& operation = operations[i];
2782
2783
1.49k
        auto& module = operation.first;
2784
1.49k
        auto& op = operation.second;
2785
2786
1.49k
        if ( i > 0 ) {
2787
781
            auto& prevModule = operations[i-1].first;
2788
781
            auto& prevOp = operations[i-1].second;
2789
2790
781
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
331
                auto& curModifier = op.modifier.GetVectorPtr();
2792
331
                if ( curModifier.size() == 0 ) {
2793
84.6k
                    for (size_t j = 0; j < 512; j++) {
2794
84.4k
                        curModifier.push_back(1);
2795
84.4k
                    }
2796
166
                } else {
2797
14.5k
                    for (auto& c : curModifier) {
2798
14.5k
                        c++;
2799
14.5k
                    }
2800
166
                }
2801
331
            }
2802
781
        }
2803
2804
1.49k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.49k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.49k
        const auto& result = results.back();
2811
2812
1.49k
        if ( result.second != std::nullopt ) {
2813
151
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
151
        }
2820
2821
1.49k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.49k
        if ( options.disableTests == false ) {
2830
1.49k
            tests::test(op, result.second);
2831
1.49k
        }
2832
2833
1.49k
        postprocess(module, op, result);
2834
1.49k
    }
2835
2836
852
    if ( options.noCompare == false ) {
2837
713
        compare(operations, results, data, size);
2838
713
    }
2839
852
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
26.9k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
26.9k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
26.9k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
36.4k
    do {
2725
36.4k
        auto op = getOp(&parentDs, data, size);
2726
36.4k
        auto module = getModule(parentDs);
2727
36.4k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
36.4k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
36.4k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
367
            break;
2736
367
        }
2737
36.4k
    } while ( parentDs.Get<bool>() == true );
2738
2739
26.9k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
26.9k
#if 1
2745
26.9k
    {
2746
26.9k
        std::set<uint64_t> moduleIDs;
2747
26.9k
        for (const auto& m : modules ) {
2748
26.8k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
26.8k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
26.8k
            moduleIDs.insert(moduleID);
2756
26.8k
        }
2757
2758
26.9k
        std::set<uint64_t> operationModuleIDs;
2759
36.3k
        for (const auto& op : operations) {
2760
36.3k
            operationModuleIDs.insert(op.first->ID);
2761
36.3k
        }
2762
2763
26.9k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
26.9k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
26.9k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
26.9k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
26.9k
    }
2771
26.9k
#endif
2772
2773
26.9k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
26.9k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
63.2k
    for (size_t i = 0; i < operations.size(); i++) {
2781
36.3k
        auto& operation = operations[i];
2782
2783
36.3k
        auto& module = operation.first;
2784
36.3k
        auto& op = operation.second;
2785
2786
36.3k
        if ( i > 0 ) {
2787
9.42k
            auto& prevModule = operations[i-1].first;
2788
9.42k
            auto& prevOp = operations[i-1].second;
2789
2790
9.42k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
3.04k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
3.04k
                if ( curModifier.size() == 0 ) {
2793
1.00M
                    for (size_t j = 0; j < 512; j++) {
2794
999k
                        curModifier.push_back(1);
2795
999k
                    }
2796
1.95k
                } else {
2797
272k
                    for (auto& c : curModifier) {
2798
272k
                        c++;
2799
272k
                    }
2800
1.09k
                }
2801
3.04k
            }
2802
9.42k
        }
2803
2804
36.3k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
36.3k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
36.3k
        const auto& result = results.back();
2811
2812
36.3k
        if ( result.second != std::nullopt ) {
2813
14.5k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
14.5k
        }
2820
2821
36.3k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
36.3k
        if ( options.disableTests == false ) {
2830
36.3k
            tests::test(op, result.second);
2831
36.3k
        }
2832
2833
36.3k
        postprocess(module, op, result);
2834
36.3k
    }
2835
2836
26.9k
    if ( options.noCompare == false ) {
2837
26.8k
        compare(operations, results, data, size);
2838
26.8k
    }
2839
26.9k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
47
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
47
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
47
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
93
    do {
2725
93
        auto op = getOp(&parentDs, data, size);
2726
93
        auto module = getModule(parentDs);
2727
93
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
93
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
93
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
93
    } while ( parentDs.Get<bool>() == true );
2738
2739
47
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
47
#if 1
2745
47
    {
2746
47
        std::set<uint64_t> moduleIDs;
2747
47
        for (const auto& m : modules ) {
2748
47
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
47
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
47
            moduleIDs.insert(moduleID);
2756
47
        }
2757
2758
47
        std::set<uint64_t> operationModuleIDs;
2759
93
        for (const auto& op : operations) {
2760
93
            operationModuleIDs.insert(op.first->ID);
2761
93
        }
2762
2763
47
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
47
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
47
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
47
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
47
    }
2771
47
#endif
2772
2773
47
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
47
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
140
    for (size_t i = 0; i < operations.size(); i++) {
2781
93
        auto& operation = operations[i];
2782
2783
93
        auto& module = operation.first;
2784
93
        auto& op = operation.second;
2785
2786
93
        if ( i > 0 ) {
2787
46
            auto& prevModule = operations[i-1].first;
2788
46
            auto& prevOp = operations[i-1].second;
2789
2790
46
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
26
                auto& curModifier = op.modifier.GetVectorPtr();
2792
26
                if ( curModifier.size() == 0 ) {
2793
10.7k
                    for (size_t j = 0; j < 512; j++) {
2794
10.7k
                        curModifier.push_back(1);
2795
10.7k
                    }
2796
21
                } else {
2797
218
                    for (auto& c : curModifier) {
2798
218
                        c++;
2799
218
                    }
2800
5
                }
2801
26
            }
2802
46
        }
2803
2804
93
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
93
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
93
        const auto& result = results.back();
2811
2812
93
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
93
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
93
        if ( options.disableTests == false ) {
2830
93
            tests::test(op, result.second);
2831
93
        }
2832
2833
93
        postprocess(module, op, result);
2834
93
    }
2835
2836
47
    if ( options.noCompare == false ) {
2837
47
        compare(operations, results, data, size);
2838
47
    }
2839
47
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
292
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
292
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
292
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
638
    do {
2725
638
        auto op = getOp(&parentDs, data, size);
2726
638
        auto module = getModule(parentDs);
2727
638
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
638
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
638
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
638
    } while ( parentDs.Get<bool>() == true );
2738
2739
292
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
292
#if 1
2745
292
    {
2746
292
        std::set<uint64_t> moduleIDs;
2747
292
        for (const auto& m : modules ) {
2748
290
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
290
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
290
            moduleIDs.insert(moduleID);
2756
290
        }
2757
2758
292
        std::set<uint64_t> operationModuleIDs;
2759
633
        for (const auto& op : operations) {
2760
633
            operationModuleIDs.insert(op.first->ID);
2761
633
        }
2762
2763
292
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
292
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
292
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
292
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
292
    }
2771
292
#endif
2772
2773
292
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
292
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
925
    for (size_t i = 0; i < operations.size(); i++) {
2781
633
        auto& operation = operations[i];
2782
2783
633
        auto& module = operation.first;
2784
633
        auto& op = operation.second;
2785
2786
633
        if ( i > 0 ) {
2787
343
            auto& prevModule = operations[i-1].first;
2788
343
            auto& prevOp = operations[i-1].second;
2789
2790
343
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
179
                auto& curModifier = op.modifier.GetVectorPtr();
2792
179
                if ( curModifier.size() == 0 ) {
2793
73.8k
                    for (size_t j = 0; j < 512; j++) {
2794
73.7k
                        curModifier.push_back(1);
2795
73.7k
                    }
2796
144
                } else {
2797
17.7k
                    for (auto& c : curModifier) {
2798
17.7k
                        c++;
2799
17.7k
                    }
2800
35
                }
2801
179
            }
2802
343
        }
2803
2804
633
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
633
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
633
        const auto& result = results.back();
2811
2812
633
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
633
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
633
        if ( options.disableTests == false ) {
2830
633
            tests::test(op, result.second);
2831
633
        }
2832
2833
633
        postprocess(module, op, result);
2834
633
    }
2835
2836
292
    if ( options.noCompare == false ) {
2837
290
        compare(operations, results, data, size);
2838
290
    }
2839
292
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5
    do {
2725
5
        auto op = getOp(&parentDs, data, size);
2726
5
        auto module = getModule(parentDs);
2727
5
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
5
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
5
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
5
    } while ( parentDs.Get<bool>() == true );
2738
2739
3
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3
#if 1
2745
3
    {
2746
3
        std::set<uint64_t> moduleIDs;
2747
3
        for (const auto& m : modules ) {
2748
3
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3
            moduleIDs.insert(moduleID);
2756
3
        }
2757
2758
3
        std::set<uint64_t> operationModuleIDs;
2759
5
        for (const auto& op : operations) {
2760
5
            operationModuleIDs.insert(op.first->ID);
2761
5
        }
2762
2763
3
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3
    }
2771
3
#endif
2772
2773
3
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
8
    for (size_t i = 0; i < operations.size(); i++) {
2781
5
        auto& operation = operations[i];
2782
2783
5
        auto& module = operation.first;
2784
5
        auto& op = operation.second;
2785
2786
5
        if ( i > 0 ) {
2787
2
            auto& prevModule = operations[i-1].first;
2788
2
            auto& prevOp = operations[i-1].second;
2789
2790
2
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
1.00k
                    for (auto& c : curModifier) {
2798
1.00k
                        c++;
2799
1.00k
                    }
2800
1
                }
2801
1
            }
2802
2
        }
2803
2804
5
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5
        const auto& result = results.back();
2811
2812
5
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
5
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
5
        if ( options.disableTests == false ) {
2830
5
            tests::test(op, result.second);
2831
5
        }
2832
2833
5
        postprocess(module, op, result);
2834
5
    }
2835
2836
3
    if ( options.noCompare == false ) {
2837
3
        compare(operations, results, data, size);
2838
3
    }
2839
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
10
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
10
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
10
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
10
    do {
2725
10
        auto op = getOp(&parentDs, data, size);
2726
10
        auto module = getModule(parentDs);
2727
10
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
10
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
10
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
10
    } while ( parentDs.Get<bool>() == true );
2738
2739
10
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
10
#if 1
2745
10
    {
2746
10
        std::set<uint64_t> moduleIDs;
2747
10
        for (const auto& m : modules ) {
2748
10
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
10
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
10
            moduleIDs.insert(moduleID);
2756
10
        }
2757
2758
10
        std::set<uint64_t> operationModuleIDs;
2759
10
        for (const auto& op : operations) {
2760
10
            operationModuleIDs.insert(op.first->ID);
2761
10
        }
2762
2763
10
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
10
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
10
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
10
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
10
    }
2771
10
#endif
2772
2773
10
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
10
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
20
    for (size_t i = 0; i < operations.size(); i++) {
2781
10
        auto& operation = operations[i];
2782
2783
10
        auto& module = operation.first;
2784
10
        auto& op = operation.second;
2785
2786
10
        if ( i > 0 ) {
2787
0
            auto& prevModule = operations[i-1].first;
2788
0
            auto& prevOp = operations[i-1].second;
2789
2790
0
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
0
                auto& curModifier = op.modifier.GetVectorPtr();
2792
0
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
0
                } else {
2797
0
                    for (auto& c : curModifier) {
2798
0
                        c++;
2799
0
                    }
2800
0
                }
2801
0
            }
2802
0
        }
2803
2804
10
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
10
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
10
        const auto& result = results.back();
2811
2812
10
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
10
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
10
        if ( options.disableTests == false ) {
2830
10
            tests::test(op, result.second);
2831
10
        }
2832
2833
10
        postprocess(module, op, result);
2834
10
    }
2835
2836
10
    if ( options.noCompare == false ) {
2837
10
        compare(operations, results, data, size);
2838
10
    }
2839
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
9
    do {
2725
9
        auto op = getOp(&parentDs, data, size);
2726
9
        auto module = getModule(parentDs);
2727
9
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
9
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
9
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
9
    } while ( parentDs.Get<bool>() == true );
2738
2739
4
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4
#if 1
2745
4
    {
2746
4
        std::set<uint64_t> moduleIDs;
2747
4
        for (const auto& m : modules ) {
2748
4
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4
            moduleIDs.insert(moduleID);
2756
4
        }
2757
2758
4
        std::set<uint64_t> operationModuleIDs;
2759
9
        for (const auto& op : operations) {
2760
9
            operationModuleIDs.insert(op.first->ID);
2761
9
        }
2762
2763
4
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
4
    }
2771
4
#endif
2772
2773
4
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
13
    for (size_t i = 0; i < operations.size(); i++) {
2781
9
        auto& operation = operations[i];
2782
2783
9
        auto& module = operation.first;
2784
9
        auto& op = operation.second;
2785
2786
9
        if ( i > 0 ) {
2787
5
            auto& prevModule = operations[i-1].first;
2788
5
            auto& prevOp = operations[i-1].second;
2789
2790
5
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
145
                    for (auto& c : curModifier) {
2798
145
                        c++;
2799
145
                    }
2800
1
                }
2801
1
            }
2802
5
        }
2803
2804
9
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
9
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
9
        const auto& result = results.back();
2811
2812
9
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
9
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
9
        if ( options.disableTests == false ) {
2830
9
            tests::test(op, result.second);
2831
9
        }
2832
2833
9
        postprocess(module, op, result);
2834
9
    }
2835
2836
4
    if ( options.noCompare == false ) {
2837
4
        compare(operations, results, data, size);
2838
4
    }
2839
4
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
8
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
8
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
8
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
18
    do {
2725
18
        auto op = getOp(&parentDs, data, size);
2726
18
        auto module = getModule(parentDs);
2727
18
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
18
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
18
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
18
    } while ( parentDs.Get<bool>() == true );
2738
2739
8
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
8
#if 1
2745
8
    {
2746
8
        std::set<uint64_t> moduleIDs;
2747
8
        for (const auto& m : modules ) {
2748
8
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
8
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
8
            moduleIDs.insert(moduleID);
2756
8
        }
2757
2758
8
        std::set<uint64_t> operationModuleIDs;
2759
18
        for (const auto& op : operations) {
2760
18
            operationModuleIDs.insert(op.first->ID);
2761
18
        }
2762
2763
8
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
8
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
8
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
8
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
8
    }
2771
8
#endif
2772
2773
8
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
8
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
26
    for (size_t i = 0; i < operations.size(); i++) {
2781
18
        auto& operation = operations[i];
2782
2783
18
        auto& module = operation.first;
2784
18
        auto& op = operation.second;
2785
2786
18
        if ( i > 0 ) {
2787
10
            auto& prevModule = operations[i-1].first;
2788
10
            auto& prevOp = operations[i-1].second;
2789
2790
10
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
9
                auto& curModifier = op.modifier.GetVectorPtr();
2792
9
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
9
                } else {
2797
683
                    for (auto& c : curModifier) {
2798
683
                        c++;
2799
683
                    }
2800
9
                }
2801
9
            }
2802
10
        }
2803
2804
18
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
18
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
18
        const auto& result = results.back();
2811
2812
18
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
18
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
18
        if ( options.disableTests == false ) {
2830
18
            tests::test(op, result.second);
2831
18
        }
2832
2833
18
        postprocess(module, op, result);
2834
18
    }
2835
2836
8
    if ( options.noCompare == false ) {
2837
8
        compare(operations, results, data, size);
2838
8
    }
2839
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
8
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
8
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
8
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
22
    do {
2725
22
        auto op = getOp(&parentDs, data, size);
2726
22
        auto module = getModule(parentDs);
2727
22
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
22
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
22
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
22
    } while ( parentDs.Get<bool>() == true );
2738
2739
8
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
8
#if 1
2745
8
    {
2746
8
        std::set<uint64_t> moduleIDs;
2747
8
        for (const auto& m : modules ) {
2748
2
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2
            moduleIDs.insert(moduleID);
2756
2
        }
2757
2758
8
        std::set<uint64_t> operationModuleIDs;
2759
8
        for (const auto& op : operations) {
2760
8
            operationModuleIDs.insert(op.first->ID);
2761
8
        }
2762
2763
8
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
8
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
8
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
8
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
8
    }
2771
8
#endif
2772
2773
8
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
8
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
16
    for (size_t i = 0; i < operations.size(); i++) {
2781
8
        auto& operation = operations[i];
2782
2783
8
        auto& module = operation.first;
2784
8
        auto& op = operation.second;
2785
2786
8
        if ( i > 0 ) {
2787
6
            auto& prevModule = operations[i-1].first;
2788
6
            auto& prevOp = operations[i-1].second;
2789
2790
6
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
2
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2
                if ( curModifier.size() == 0 ) {
2793
1.02k
                    for (size_t j = 0; j < 512; j++) {
2794
1.02k
                        curModifier.push_back(1);
2795
1.02k
                    }
2796
2
                } else {
2797
0
                    for (auto& c : curModifier) {
2798
0
                        c++;
2799
0
                    }
2800
0
                }
2801
2
            }
2802
6
        }
2803
2804
8
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
8
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
8
        const auto& result = results.back();
2811
2812
8
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
8
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
8
        if ( options.disableTests == false ) {
2830
8
            tests::test(op, result.second);
2831
8
        }
2832
2833
8
        postprocess(module, op, result);
2834
8
    }
2835
2836
8
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
8
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
11
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
11
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
11
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
30
    do {
2725
30
        auto op = getOp(&parentDs, data, size);
2726
30
        auto module = getModule(parentDs);
2727
30
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
30
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
30
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
30
    } while ( parentDs.Get<bool>() == true );
2738
2739
11
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
11
#if 1
2745
11
    {
2746
11
        std::set<uint64_t> moduleIDs;
2747
11
        for (const auto& m : modules ) {
2748
4
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4
            moduleIDs.insert(moduleID);
2756
4
        }
2757
2758
11
        std::set<uint64_t> operationModuleIDs;
2759
12
        for (const auto& op : operations) {
2760
12
            operationModuleIDs.insert(op.first->ID);
2761
12
        }
2762
2763
11
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
11
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
11
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
11
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
11
    }
2771
11
#endif
2772
2773
11
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
11
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
23
    for (size_t i = 0; i < operations.size(); i++) {
2781
12
        auto& operation = operations[i];
2782
2783
12
        auto& module = operation.first;
2784
12
        auto& op = operation.second;
2785
2786
12
        if ( i > 0 ) {
2787
8
            auto& prevModule = operations[i-1].first;
2788
8
            auto& prevOp = operations[i-1].second;
2789
2790
8
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
5
                auto& curModifier = op.modifier.GetVectorPtr();
2792
5
                if ( curModifier.size() == 0 ) {
2793
1.53k
                    for (size_t j = 0; j < 512; j++) {
2794
1.53k
                        curModifier.push_back(1);
2795
1.53k
                    }
2796
3
                } else {
2797
474
                    for (auto& c : curModifier) {
2798
474
                        c++;
2799
474
                    }
2800
2
                }
2801
5
            }
2802
8
        }
2803
2804
12
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
12
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
12
        const auto& result = results.back();
2811
2812
12
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
12
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
12
        if ( options.disableTests == false ) {
2830
12
            tests::test(op, result.second);
2831
12
        }
2832
2833
12
        postprocess(module, op, result);
2834
12
    }
2835
2836
11
    if ( options.noCompare == false ) {
2837
4
        compare(operations, results, data, size);
2838
4
    }
2839
11
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
9
    do {
2725
9
        auto op = getOp(&parentDs, data, size);
2726
9
        auto module = getModule(parentDs);
2727
9
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
9
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
9
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
9
    } while ( parentDs.Get<bool>() == true );
2738
2739
4
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4
#if 1
2745
4
    {
2746
4
        std::set<uint64_t> moduleIDs;
2747
4
        for (const auto& m : modules ) {
2748
3
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3
            moduleIDs.insert(moduleID);
2756
3
        }
2757
2758
4
        std::set<uint64_t> operationModuleIDs;
2759
8
        for (const auto& op : operations) {
2760
8
            operationModuleIDs.insert(op.first->ID);
2761
8
        }
2762
2763
4
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
4
    }
2771
4
#endif
2772
2773
4
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
12
    for (size_t i = 0; i < operations.size(); i++) {
2781
8
        auto& operation = operations[i];
2782
2783
8
        auto& module = operation.first;
2784
8
        auto& op = operation.second;
2785
2786
8
        if ( i > 0 ) {
2787
5
            auto& prevModule = operations[i-1].first;
2788
5
            auto& prevOp = operations[i-1].second;
2789
2790
5
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
3
                auto& curModifier = op.modifier.GetVectorPtr();
2792
3
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
3
                } else {
2797
1.07k
                    for (auto& c : curModifier) {
2798
1.07k
                        c++;
2799
1.07k
                    }
2800
3
                }
2801
3
            }
2802
5
        }
2803
2804
8
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
8
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
8
        const auto& result = results.back();
2811
2812
8
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
8
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
8
        if ( options.disableTests == false ) {
2830
8
            tests::test(op, result.second);
2831
8
        }
2832
2833
8
        postprocess(module, op, result);
2834
8
    }
2835
2836
4
    if ( options.noCompare == false ) {
2837
3
        compare(operations, results, data, size);
2838
3
    }
2839
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
8
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
8
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
8
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
24
    do {
2725
24
        auto op = getOp(&parentDs, data, size);
2726
24
        auto module = getModule(parentDs);
2727
24
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
24
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
24
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
24
    } while ( parentDs.Get<bool>() == true );
2738
2739
8
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
8
#if 1
2745
8
    {
2746
8
        std::set<uint64_t> moduleIDs;
2747
8
        for (const auto& m : modules ) {
2748
3
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3
            moduleIDs.insert(moduleID);
2756
3
        }
2757
2758
8
        std::set<uint64_t> operationModuleIDs;
2759
10
        for (const auto& op : operations) {
2760
10
            operationModuleIDs.insert(op.first->ID);
2761
10
        }
2762
2763
8
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
8
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
8
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
8
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
8
    }
2771
8
#endif
2772
2773
8
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
8
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
18
    for (size_t i = 0; i < operations.size(); i++) {
2781
10
        auto& operation = operations[i];
2782
2783
10
        auto& module = operation.first;
2784
10
        auto& op = operation.second;
2785
2786
10
        if ( i > 0 ) {
2787
7
            auto& prevModule = operations[i-1].first;
2788
7
            auto& prevOp = operations[i-1].second;
2789
2790
7
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
4
                auto& curModifier = op.modifier.GetVectorPtr();
2792
4
                if ( curModifier.size() == 0 ) {
2793
1.53k
                    for (size_t j = 0; j < 512; j++) {
2794
1.53k
                        curModifier.push_back(1);
2795
1.53k
                    }
2796
3
                } else {
2797
616
                    for (auto& c : curModifier) {
2798
616
                        c++;
2799
616
                    }
2800
1
                }
2801
4
            }
2802
7
        }
2803
2804
10
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
10
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
10
        const auto& result = results.back();
2811
2812
10
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
10
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
10
        if ( options.disableTests == false ) {
2830
10
            tests::test(op, result.second);
2831
10
        }
2832
2833
10
        postprocess(module, op, result);
2834
10
    }
2835
2836
8
    if ( options.noCompare == false ) {
2837
3
        compare(operations, results, data, size);
2838
3
    }
2839
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
130
                    for (auto& c : curModifier) {
2798
130
                        c++;
2799
130
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
141
                    for (auto& c : curModifier) {
2798
141
                        c++;
2799
141
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
9
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
9
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
9
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
21
    do {
2725
21
        auto op = getOp(&parentDs, data, size);
2726
21
        auto module = getModule(parentDs);
2727
21
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
21
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
21
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
21
    } while ( parentDs.Get<bool>() == true );
2738
2739
9
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
9
#if 1
2745
9
    {
2746
9
        std::set<uint64_t> moduleIDs;
2747
9
        for (const auto& m : modules ) {
2748
8
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
8
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
8
            moduleIDs.insert(moduleID);
2756
8
        }
2757
2758
9
        std::set<uint64_t> operationModuleIDs;
2759
16
        for (const auto& op : operations) {
2760
16
            operationModuleIDs.insert(op.first->ID);
2761
16
        }
2762
2763
9
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
9
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
9
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
9
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
9
    }
2771
9
#endif
2772
2773
9
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
9
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
25
    for (size_t i = 0; i < operations.size(); i++) {
2781
16
        auto& operation = operations[i];
2782
2783
16
        auto& module = operation.first;
2784
16
        auto& op = operation.second;
2785
2786
16
        if ( i > 0 ) {
2787
8
            auto& prevModule = operations[i-1].first;
2788
8
            auto& prevOp = operations[i-1].second;
2789
2790
8
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
8
                auto& curModifier = op.modifier.GetVectorPtr();
2792
8
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
8
                } else {
2797
555
                    for (auto& c : curModifier) {
2798
555
                        c++;
2799
555
                    }
2800
8
                }
2801
8
            }
2802
8
        }
2803
2804
16
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
16
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
16
        const auto& result = results.back();
2811
2812
16
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
16
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
16
        if ( options.disableTests == false ) {
2830
16
            tests::test(op, result.second);
2831
16
        }
2832
2833
16
        postprocess(module, op, result);
2834
16
    }
2835
2836
9
    if ( options.noCompare == false ) {
2837
8
        compare(operations, results, data, size);
2838
8
    }
2839
9
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
133
                    for (auto& c : curModifier) {
2798
133
                        c++;
2799
133
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
7
    do {
2725
7
        auto op = getOp(&parentDs, data, size);
2726
7
        auto module = getModule(parentDs);
2727
7
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
7
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
7
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
7
    } while ( parentDs.Get<bool>() == true );
2738
2739
2
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2
#if 1
2745
2
    {
2746
2
        std::set<uint64_t> moduleIDs;
2747
2
        for (const auto& m : modules ) {
2748
2
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2
            moduleIDs.insert(moduleID);
2756
2
        }
2757
2758
2
        std::set<uint64_t> operationModuleIDs;
2759
7
        for (const auto& op : operations) {
2760
7
            operationModuleIDs.insert(op.first->ID);
2761
7
        }
2762
2763
2
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2
    }
2771
2
#endif
2772
2773
2
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
9
    for (size_t i = 0; i < operations.size(); i++) {
2781
7
        auto& operation = operations[i];
2782
2783
7
        auto& module = operation.first;
2784
7
        auto& op = operation.second;
2785
2786
7
        if ( i > 0 ) {
2787
5
            auto& prevModule = operations[i-1].first;
2788
5
            auto& prevOp = operations[i-1].second;
2789
2790
5
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
3
                auto& curModifier = op.modifier.GetVectorPtr();
2792
3
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
3
                } else {
2797
164
                    for (auto& c : curModifier) {
2798
164
                        c++;
2799
164
                    }
2800
3
                }
2801
3
            }
2802
5
        }
2803
2804
7
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
7
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
7
        const auto& result = results.back();
2811
2812
7
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
7
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
7
        if ( options.disableTests == false ) {
2830
7
            tests::test(op, result.second);
2831
7
        }
2832
2833
7
        postprocess(module, op, result);
2834
7
    }
2835
2836
2
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
7
    do {
2725
7
        auto op = getOp(&parentDs, data, size);
2726
7
        auto module = getModule(parentDs);
2727
7
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
7
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
7
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
7
    } while ( parentDs.Get<bool>() == true );
2738
2739
2
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2
#if 1
2745
2
    {
2746
2
        std::set<uint64_t> moduleIDs;
2747
2
        for (const auto& m : modules ) {
2748
2
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2
            moduleIDs.insert(moduleID);
2756
2
        }
2757
2758
2
        std::set<uint64_t> operationModuleIDs;
2759
7
        for (const auto& op : operations) {
2760
7
            operationModuleIDs.insert(op.first->ID);
2761
7
        }
2762
2763
2
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2
    }
2771
2
#endif
2772
2773
2
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
9
    for (size_t i = 0; i < operations.size(); i++) {
2781
7
        auto& operation = operations[i];
2782
2783
7
        auto& module = operation.first;
2784
7
        auto& op = operation.second;
2785
2786
7
        if ( i > 0 ) {
2787
5
            auto& prevModule = operations[i-1].first;
2788
5
            auto& prevOp = operations[i-1].second;
2789
2790
5
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
137
                    for (auto& c : curModifier) {
2798
137
                        c++;
2799
137
                    }
2800
1
                }
2801
1
            }
2802
5
        }
2803
2804
7
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
7
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
7
        const auto& result = results.back();
2811
2812
7
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
7
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
7
        if ( options.disableTests == false ) {
2830
7
            tests::test(op, result.second);
2831
7
        }
2832
2833
7
        postprocess(module, op, result);
2834
7
    }
2835
2836
2
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
168
                    for (auto& c : curModifier) {
2798
168
                        c++;
2799
168
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
20
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
20
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
20
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
32
    do {
2725
32
        auto op = getOp(&parentDs, data, size);
2726
32
        auto module = getModule(parentDs);
2727
32
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
32
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
32
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
32
    } while ( parentDs.Get<bool>() == true );
2738
2739
20
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
20
#if 1
2745
20
    {
2746
20
        std::set<uint64_t> moduleIDs;
2747
20
        for (const auto& m : modules ) {
2748
19
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
19
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
19
            moduleIDs.insert(moduleID);
2756
19
        }
2757
2758
20
        std::set<uint64_t> operationModuleIDs;
2759
31
        for (const auto& op : operations) {
2760
31
            operationModuleIDs.insert(op.first->ID);
2761
31
        }
2762
2763
20
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
20
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
20
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
20
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
20
    }
2771
20
#endif
2772
2773
20
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
20
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
51
    for (size_t i = 0; i < operations.size(); i++) {
2781
31
        auto& operation = operations[i];
2782
2783
31
        auto& module = operation.first;
2784
31
        auto& op = operation.second;
2785
2786
31
        if ( i > 0 ) {
2787
12
            auto& prevModule = operations[i-1].first;
2788
12
            auto& prevOp = operations[i-1].second;
2789
2790
12
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
6
                auto& curModifier = op.modifier.GetVectorPtr();
2792
6
                if ( curModifier.size() == 0 ) {
2793
1.53k
                    for (size_t j = 0; j < 512; j++) {
2794
1.53k
                        curModifier.push_back(1);
2795
1.53k
                    }
2796
3
                } else {
2797
562
                    for (auto& c : curModifier) {
2798
562
                        c++;
2799
562
                    }
2800
3
                }
2801
6
            }
2802
12
        }
2803
2804
31
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
31
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
31
        const auto& result = results.back();
2811
2812
31
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
31
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
31
        if ( options.disableTests == false ) {
2830
31
            tests::test(op, result.second);
2831
31
        }
2832
2833
31
        postprocess(module, op, result);
2834
31
    }
2835
2836
20
    if ( options.noCompare == false ) {
2837
19
        compare(operations, results, data, size);
2838
19
    }
2839
20
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
18
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
18
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
18
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
48
    do {
2725
48
        auto op = getOp(&parentDs, data, size);
2726
48
        auto module = getModule(parentDs);
2727
48
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
48
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
48
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
48
    } while ( parentDs.Get<bool>() == true );
2738
2739
18
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
18
#if 1
2745
18
    {
2746
18
        std::set<uint64_t> moduleIDs;
2747
18
        for (const auto& m : modules ) {
2748
18
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
18
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
18
            moduleIDs.insert(moduleID);
2756
18
        }
2757
2758
18
        std::set<uint64_t> operationModuleIDs;
2759
48
        for (const auto& op : operations) {
2760
48
            operationModuleIDs.insert(op.first->ID);
2761
48
        }
2762
2763
18
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
18
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
18
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
18
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
18
    }
2771
18
#endif
2772
2773
18
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
18
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
66
    for (size_t i = 0; i < operations.size(); i++) {
2781
48
        auto& operation = operations[i];
2782
2783
48
        auto& module = operation.first;
2784
48
        auto& op = operation.second;
2785
2786
48
        if ( i > 0 ) {
2787
30
            auto& prevModule = operations[i-1].first;
2788
30
            auto& prevOp = operations[i-1].second;
2789
2790
30
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
14
                auto& curModifier = op.modifier.GetVectorPtr();
2792
14
                if ( curModifier.size() == 0 ) {
2793
5.64k
                    for (size_t j = 0; j < 512; j++) {
2794
5.63k
                        curModifier.push_back(1);
2795
5.63k
                    }
2796
11
                } else {
2797
157
                    for (auto& c : curModifier) {
2798
157
                        c++;
2799
157
                    }
2800
3
                }
2801
14
            }
2802
30
        }
2803
2804
48
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
48
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
48
        const auto& result = results.back();
2811
2812
48
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
48
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
48
        if ( options.disableTests == false ) {
2830
48
            tests::test(op, result.second);
2831
48
        }
2832
2833
48
        postprocess(module, op, result);
2834
48
    }
2835
2836
18
    if ( options.noCompare == false ) {
2837
18
        compare(operations, results, data, size);
2838
18
    }
2839
18
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
1
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1
#if 1
2745
1
    {
2746
1
        std::set<uint64_t> moduleIDs;
2747
1
        for (const auto& m : modules ) {
2748
1
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1
            moduleIDs.insert(moduleID);
2756
1
        }
2757
2758
1
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
2762
2763
1
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1
    }
2771
1
#endif
2772
2773
1
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3
    for (size_t i = 0; i < operations.size(); i++) {
2781
2
        auto& operation = operations[i];
2782
2783
2
        auto& module = operation.first;
2784
2
        auto& op = operation.second;
2785
2786
2
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
137
                    for (auto& c : curModifier) {
2798
137
                        c++;
2799
137
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
2
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2
        const auto& result = results.back();
2811
2812
2
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
2
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2
        if ( options.disableTests == false ) {
2830
2
            tests::test(op, result.second);
2831
2
        }
2832
2833
2
        postprocess(module, op, result);
2834
2
    }
2835
2836
1
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
1
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2
    do {
2725
2
        auto op = getOp(&parentDs, data, size);
2726
2
        auto module = getModule(parentDs);
2727
2
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
2
    } while ( parentDs.Get<bool>() == true );
2738
2739
2
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2
#if 1
2745
2
    {
2746
2
        std::set<uint64_t> moduleIDs;
2747
2
        for (const auto& m : modules ) {
2748
0
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
0
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
0
            moduleIDs.insert(moduleID);
2756
0
        }
2757
2758
2
        std::set<uint64_t> operationModuleIDs;
2759
2
        for (const auto& op : operations) {
2760
0
            operationModuleIDs.insert(op.first->ID);
2761
0
        }
2762
2763
2
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2
    }
2771
2
#endif
2772
2773
2
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2
    for (size_t i = 0; i < operations.size(); i++) {
2781
0
        auto& operation = operations[i];
2782
2783
0
        auto& module = operation.first;
2784
0
        auto& op = operation.second;
2785
2786
0
        if ( i > 0 ) {
2787
0
            auto& prevModule = operations[i-1].first;
2788
0
            auto& prevOp = operations[i-1].second;
2789
2790
0
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
0
                auto& curModifier = op.modifier.GetVectorPtr();
2792
0
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
0
                } else {
2797
0
                    for (auto& c : curModifier) {
2798
0
                        c++;
2799
0
                    }
2800
0
                }
2801
0
            }
2802
0
        }
2803
2804
0
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
0
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
0
        const auto& result = results.back();
2811
2812
0
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
0
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
0
        if ( options.disableTests == false ) {
2830
0
            tests::test(op, result.second);
2831
0
        }
2832
2833
0
        postprocess(module, op, result);
2834
0
    }
2835
2836
2
    if ( options.noCompare == false ) {
2837
0
        compare(operations, results, data, size);
2838
0
    }
2839
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
6
    do {
2725
6
        auto op = getOp(&parentDs, data, size);
2726
6
        auto module = getModule(parentDs);
2727
6
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
6
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
6
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
6
    } while ( parentDs.Get<bool>() == true );
2738
2739
2
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2
#if 1
2745
2
    {
2746
2
        std::set<uint64_t> moduleIDs;
2747
2
        for (const auto& m : modules ) {
2748
2
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2
            moduleIDs.insert(moduleID);
2756
2
        }
2757
2758
2
        std::set<uint64_t> operationModuleIDs;
2759
6
        for (const auto& op : operations) {
2760
6
            operationModuleIDs.insert(op.first->ID);
2761
6
        }
2762
2763
2
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2
    }
2771
2
#endif
2772
2773
2
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
8
    for (size_t i = 0; i < operations.size(); i++) {
2781
6
        auto& operation = operations[i];
2782
2783
6
        auto& module = operation.first;
2784
6
        auto& op = operation.second;
2785
2786
6
        if ( i > 0 ) {
2787
4
            auto& prevModule = operations[i-1].first;
2788
4
            auto& prevOp = operations[i-1].second;
2789
2790
4
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
0
                auto& curModifier = op.modifier.GetVectorPtr();
2792
0
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
0
                } else {
2797
0
                    for (auto& c : curModifier) {
2798
0
                        c++;
2799
0
                    }
2800
0
                }
2801
0
            }
2802
4
        }
2803
2804
6
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
6
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
6
        const auto& result = results.back();
2811
2812
6
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
6
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
6
        if ( options.disableTests == false ) {
2830
6
            tests::test(op, result.second);
2831
6
        }
2832
2833
6
        postprocess(module, op, result);
2834
6
    }
2835
2836
2
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3
    do {
2725
3
        auto op = getOp(&parentDs, data, size);
2726
3
        auto module = getModule(parentDs);
2727
3
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
3
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
3
    } while ( parentDs.Get<bool>() == true );
2738
2739
2
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2
#if 1
2745
2
    {
2746
2
        std::set<uint64_t> moduleIDs;
2747
2
        for (const auto& m : modules ) {
2748
2
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2
            moduleIDs.insert(moduleID);
2756
2
        }
2757
2758
2
        std::set<uint64_t> operationModuleIDs;
2759
3
        for (const auto& op : operations) {
2760
3
            operationModuleIDs.insert(op.first->ID);
2761
3
        }
2762
2763
2
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2
    }
2771
2
#endif
2772
2773
2
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
5
    for (size_t i = 0; i < operations.size(); i++) {
2781
3
        auto& operation = operations[i];
2782
2783
3
        auto& module = operation.first;
2784
3
        auto& op = operation.second;
2785
2786
3
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
183
                    for (auto& c : curModifier) {
2798
183
                        c++;
2799
183
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
3
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3
        const auto& result = results.back();
2811
2812
3
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
3
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
3
        if ( options.disableTests == false ) {
2830
3
            tests::test(op, result.second);
2831
3
        }
2832
2833
3
        postprocess(module, op, result);
2834
3
    }
2835
2836
2
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
42
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
42
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
42
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
74
    do {
2725
74
        auto op = getOp(&parentDs, data, size);
2726
74
        auto module = getModule(parentDs);
2727
74
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
74
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
74
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
74
    } while ( parentDs.Get<bool>() == true );
2738
2739
42
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
42
#if 1
2745
42
    {
2746
42
        std::set<uint64_t> moduleIDs;
2747
42
        for (const auto& m : modules ) {
2748
41
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
41
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
41
            moduleIDs.insert(moduleID);
2756
41
        }
2757
2758
42
        std::set<uint64_t> operationModuleIDs;
2759
73
        for (const auto& op : operations) {
2760
73
            operationModuleIDs.insert(op.first->ID);
2761
73
        }
2762
2763
42
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
42
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
42
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
42
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
42
    }
2771
42
#endif
2772
2773
42
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
42
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
115
    for (size_t i = 0; i < operations.size(); i++) {
2781
73
        auto& operation = operations[i];
2782
2783
73
        auto& module = operation.first;
2784
73
        auto& op = operation.second;
2785
2786
73
        if ( i > 0 ) {
2787
32
            auto& prevModule = operations[i-1].first;
2788
32
            auto& prevOp = operations[i-1].second;
2789
2790
32
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
18
                auto& curModifier = op.modifier.GetVectorPtr();
2792
18
                if ( curModifier.size() == 0 ) {
2793
7.69k
                    for (size_t j = 0; j < 512; j++) {
2794
7.68k
                        curModifier.push_back(1);
2795
7.68k
                    }
2796
15
                } else {
2797
2.51k
                    for (auto& c : curModifier) {
2798
2.51k
                        c++;
2799
2.51k
                    }
2800
3
                }
2801
18
            }
2802
32
        }
2803
2804
73
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
73
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
73
        const auto& result = results.back();
2811
2812
73
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
73
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
73
        if ( options.disableTests == false ) {
2830
73
            tests::test(op, result.second);
2831
73
        }
2832
2833
73
        postprocess(module, op, result);
2834
73
    }
2835
2836
42
    if ( options.noCompare == false ) {
2837
41
        compare(operations, results, data, size);
2838
41
    }
2839
42
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
26
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
26
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
26
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
40
    do {
2725
40
        auto op = getOp(&parentDs, data, size);
2726
40
        auto module = getModule(parentDs);
2727
40
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
40
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
40
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
40
    } while ( parentDs.Get<bool>() == true );
2738
2739
26
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
26
#if 1
2745
26
    {
2746
26
        std::set<uint64_t> moduleIDs;
2747
26
        for (const auto& m : modules ) {
2748
25
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
25
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
25
            moduleIDs.insert(moduleID);
2756
25
        }
2757
2758
26
        std::set<uint64_t> operationModuleIDs;
2759
39
        for (const auto& op : operations) {
2760
39
            operationModuleIDs.insert(op.first->ID);
2761
39
        }
2762
2763
26
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
26
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
26
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
26
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
26
    }
2771
26
#endif
2772
2773
26
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
26
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
65
    for (size_t i = 0; i < operations.size(); i++) {
2781
39
        auto& operation = operations[i];
2782
2783
39
        auto& module = operation.first;
2784
39
        auto& op = operation.second;
2785
2786
39
        if ( i > 0 ) {
2787
14
            auto& prevModule = operations[i-1].first;
2788
14
            auto& prevOp = operations[i-1].second;
2789
2790
14
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
6
                auto& curModifier = op.modifier.GetVectorPtr();
2792
6
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
6
                } else {
2797
0
                    for (auto& c : curModifier) {
2798
0
                        c++;
2799
0
                    }
2800
0
                }
2801
6
            }
2802
14
        }
2803
2804
39
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
39
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
39
        const auto& result = results.back();
2811
2812
39
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
39
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
39
        if ( options.disableTests == false ) {
2830
39
            tests::test(op, result.second);
2831
39
        }
2832
2833
39
        postprocess(module, op, result);
2834
39
    }
2835
2836
26
    if ( options.noCompare == false ) {
2837
25
        compare(operations, results, data, size);
2838
25
    }
2839
26
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
43
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
43
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
43
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
78
    do {
2725
78
        auto op = getOp(&parentDs, data, size);
2726
78
        auto module = getModule(parentDs);
2727
78
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
78
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
78
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
78
    } while ( parentDs.Get<bool>() == true );
2738
2739
43
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
43
#if 1
2745
43
    {
2746
43
        std::set<uint64_t> moduleIDs;
2747
43
        for (const auto& m : modules ) {
2748
43
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
43
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
43
            moduleIDs.insert(moduleID);
2756
43
        }
2757
2758
43
        std::set<uint64_t> operationModuleIDs;
2759
78
        for (const auto& op : operations) {
2760
78
            operationModuleIDs.insert(op.first->ID);
2761
78
        }
2762
2763
43
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
43
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
43
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
43
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
43
    }
2771
43
#endif
2772
2773
43
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
43
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
121
    for (size_t i = 0; i < operations.size(); i++) {
2781
78
        auto& operation = operations[i];
2782
2783
78
        auto& module = operation.first;
2784
78
        auto& op = operation.second;
2785
2786
78
        if ( i > 0 ) {
2787
35
            auto& prevModule = operations[i-1].first;
2788
35
            auto& prevOp = operations[i-1].second;
2789
2790
35
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
17
                auto& curModifier = op.modifier.GetVectorPtr();
2792
17
                if ( curModifier.size() == 0 ) {
2793
7.18k
                    for (size_t j = 0; j < 512; j++) {
2794
7.16k
                        curModifier.push_back(1);
2795
7.16k
                    }
2796
14
                } else {
2797
618
                    for (auto& c : curModifier) {
2798
618
                        c++;
2799
618
                    }
2800
3
                }
2801
17
            }
2802
35
        }
2803
2804
78
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
78
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
78
        const auto& result = results.back();
2811
2812
78
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
78
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
78
        if ( options.disableTests == false ) {
2830
78
            tests::test(op, result.second);
2831
78
        }
2832
2833
78
        postprocess(module, op, result);
2834
78
    }
2835
2836
43
    if ( options.noCompare == false ) {
2837
43
        compare(operations, results, data, size);
2838
43
    }
2839
43
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
20
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
20
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
20
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
31
    do {
2725
31
        auto op = getOp(&parentDs, data, size);
2726
31
        auto module = getModule(parentDs);
2727
31
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
31
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
31
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
31
    } while ( parentDs.Get<bool>() == true );
2738
2739
20
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
20
#if 1
2745
20
    {
2746
20
        std::set<uint64_t> moduleIDs;
2747
20
        for (const auto& m : modules ) {
2748
20
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
20
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
20
            moduleIDs.insert(moduleID);
2756
20
        }
2757
2758
20
        std::set<uint64_t> operationModuleIDs;
2759
31
        for (const auto& op : operations) {
2760
31
            operationModuleIDs.insert(op.first->ID);
2761
31
        }
2762
2763
20
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
20
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
20
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
20
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
20
    }
2771
20
#endif
2772
2773
20
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
20
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
51
    for (size_t i = 0; i < operations.size(); i++) {
2781
31
        auto& operation = operations[i];
2782
2783
31
        auto& module = operation.first;
2784
31
        auto& op = operation.second;
2785
2786
31
        if ( i > 0 ) {
2787
11
            auto& prevModule = operations[i-1].first;
2788
11
            auto& prevOp = operations[i-1].second;
2789
2790
11
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
4
                auto& curModifier = op.modifier.GetVectorPtr();
2792
4
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
4
                } else {
2797
688
                    for (auto& c : curModifier) {
2798
688
                        c++;
2799
688
                    }
2800
4
                }
2801
4
            }
2802
11
        }
2803
2804
31
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
31
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
31
        const auto& result = results.back();
2811
2812
31
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
31
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
31
        if ( options.disableTests == false ) {
2830
31
            tests::test(op, result.second);
2831
31
        }
2832
2833
31
        postprocess(module, op, result);
2834
31
    }
2835
2836
20
    if ( options.noCompare == false ) {
2837
20
        compare(operations, results, data, size);
2838
20
    }
2839
20
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
77
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
77
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
77
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
149
    do {
2725
149
        auto op = getOp(&parentDs, data, size);
2726
149
        auto module = getModule(parentDs);
2727
149
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
149
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
149
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
149
    } while ( parentDs.Get<bool>() == true );
2738
2739
77
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
77
#if 1
2745
77
    {
2746
77
        std::set<uint64_t> moduleIDs;
2747
77
        for (const auto& m : modules ) {
2748
77
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
77
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
77
            moduleIDs.insert(moduleID);
2756
77
        }
2757
2758
77
        std::set<uint64_t> operationModuleIDs;
2759
149
        for (const auto& op : operations) {
2760
149
            operationModuleIDs.insert(op.first->ID);
2761
149
        }
2762
2763
77
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
77
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
77
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
77
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
77
    }
2771
77
#endif
2772
2773
77
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
77
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
226
    for (size_t i = 0; i < operations.size(); i++) {
2781
149
        auto& operation = operations[i];
2782
2783
149
        auto& module = operation.first;
2784
149
        auto& op = operation.second;
2785
2786
149
        if ( i > 0 ) {
2787
72
            auto& prevModule = operations[i-1].first;
2788
72
            auto& prevOp = operations[i-1].second;
2789
2790
72
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
40
                auto& curModifier = op.modifier.GetVectorPtr();
2792
40
                if ( curModifier.size() == 0 ) {
2793
13.3k
                    for (size_t j = 0; j < 512; j++) {
2794
13.3k
                        curModifier.push_back(1);
2795
13.3k
                    }
2796
26
                } else {
2797
3.39k
                    for (auto& c : curModifier) {
2798
3.39k
                        c++;
2799
3.39k
                    }
2800
14
                }
2801
40
            }
2802
72
        }
2803
2804
149
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
149
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
149
        const auto& result = results.back();
2811
2812
149
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
149
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
149
        if ( options.disableTests == false ) {
2830
149
            tests::test(op, result.second);
2831
149
        }
2832
2833
149
        postprocess(module, op, result);
2834
149
    }
2835
2836
77
    if ( options.noCompare == false ) {
2837
77
        compare(operations, results, data, size);
2838
77
    }
2839
77
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
42
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
42
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
42
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
76
    do {
2725
76
        auto op = getOp(&parentDs, data, size);
2726
76
        auto module = getModule(parentDs);
2727
76
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
76
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
76
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
76
    } while ( parentDs.Get<bool>() == true );
2738
2739
42
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
42
#if 1
2745
42
    {
2746
42
        std::set<uint64_t> moduleIDs;
2747
42
        for (const auto& m : modules ) {
2748
42
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
42
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
42
            moduleIDs.insert(moduleID);
2756
42
        }
2757
2758
42
        std::set<uint64_t> operationModuleIDs;
2759
76
        for (const auto& op : operations) {
2760
76
            operationModuleIDs.insert(op.first->ID);
2761
76
        }
2762
2763
42
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
42
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
42
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
42
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
42
    }
2771
42
#endif
2772
2773
42
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
42
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
118
    for (size_t i = 0; i < operations.size(); i++) {
2781
76
        auto& operation = operations[i];
2782
2783
76
        auto& module = operation.first;
2784
76
        auto& op = operation.second;
2785
2786
76
        if ( i > 0 ) {
2787
34
            auto& prevModule = operations[i-1].first;
2788
34
            auto& prevOp = operations[i-1].second;
2789
2790
34
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
15
                auto& curModifier = op.modifier.GetVectorPtr();
2792
15
                if ( curModifier.size() == 0 ) {
2793
5.13k
                    for (size_t j = 0; j < 512; j++) {
2794
5.12k
                        curModifier.push_back(1);
2795
5.12k
                    }
2796
10
                } else {
2797
2.21k
                    for (auto& c : curModifier) {
2798
2.21k
                        c++;
2799
2.21k
                    }
2800
5
                }
2801
15
            }
2802
34
        }
2803
2804
76
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
76
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
76
        const auto& result = results.back();
2811
2812
76
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
76
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
76
        if ( options.disableTests == false ) {
2830
76
            tests::test(op, result.second);
2831
76
        }
2832
2833
76
        postprocess(module, op, result);
2834
76
    }
2835
2836
42
    if ( options.noCompare == false ) {
2837
42
        compare(operations, results, data, size);
2838
42
    }
2839
42
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
85
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
85
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
85
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
162
    do {
2725
162
        auto op = getOp(&parentDs, data, size);
2726
162
        auto module = getModule(parentDs);
2727
162
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
162
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
162
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
162
    } while ( parentDs.Get<bool>() == true );
2738
2739
85
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
85
#if 1
2745
85
    {
2746
85
        std::set<uint64_t> moduleIDs;
2747
85
        for (const auto& m : modules ) {
2748
84
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
84
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
84
            moduleIDs.insert(moduleID);
2756
84
        }
2757
2758
85
        std::set<uint64_t> operationModuleIDs;
2759
158
        for (const auto& op : operations) {
2760
158
            operationModuleIDs.insert(op.first->ID);
2761
158
        }
2762
2763
85
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
85
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
85
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
85
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
85
    }
2771
85
#endif
2772
2773
85
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
85
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
243
    for (size_t i = 0; i < operations.size(); i++) {
2781
158
        auto& operation = operations[i];
2782
2783
158
        auto& module = operation.first;
2784
158
        auto& op = operation.second;
2785
2786
158
        if ( i > 0 ) {
2787
74
            auto& prevModule = operations[i-1].first;
2788
74
            auto& prevOp = operations[i-1].second;
2789
2790
74
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
33
                auto& curModifier = op.modifier.GetVectorPtr();
2792
33
                if ( curModifier.size() == 0 ) {
2793
7.69k
                    for (size_t j = 0; j < 512; j++) {
2794
7.68k
                        curModifier.push_back(1);
2795
7.68k
                    }
2796
18
                } else {
2797
2.15k
                    for (auto& c : curModifier) {
2798
2.15k
                        c++;
2799
2.15k
                    }
2800
18
                }
2801
33
            }
2802
74
        }
2803
2804
158
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
158
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
158
        const auto& result = results.back();
2811
2812
158
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
158
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
158
        if ( options.disableTests == false ) {
2830
158
            tests::test(op, result.second);
2831
158
        }
2832
2833
158
        postprocess(module, op, result);
2834
158
    }
2835
2836
85
    if ( options.noCompare == false ) {
2837
84
        compare(operations, results, data, size);
2838
84
    }
2839
85
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
37
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
37
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
37
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
68
    do {
2725
68
        auto op = getOp(&parentDs, data, size);
2726
68
        auto module = getModule(parentDs);
2727
68
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
68
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
68
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
68
    } while ( parentDs.Get<bool>() == true );
2738
2739
37
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
37
#if 1
2745
37
    {
2746
37
        std::set<uint64_t> moduleIDs;
2747
37
        for (const auto& m : modules ) {
2748
37
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
37
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
37
            moduleIDs.insert(moduleID);
2756
37
        }
2757
2758
37
        std::set<uint64_t> operationModuleIDs;
2759
68
        for (const auto& op : operations) {
2760
68
            operationModuleIDs.insert(op.first->ID);
2761
68
        }
2762
2763
37
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
37
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
37
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
37
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
37
    }
2771
37
#endif
2772
2773
37
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
37
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
105
    for (size_t i = 0; i < operations.size(); i++) {
2781
68
        auto& operation = operations[i];
2782
2783
68
        auto& module = operation.first;
2784
68
        auto& op = operation.second;
2785
2786
68
        if ( i > 0 ) {
2787
31
            auto& prevModule = operations[i-1].first;
2788
31
            auto& prevOp = operations[i-1].second;
2789
2790
31
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
14
                auto& curModifier = op.modifier.GetVectorPtr();
2792
14
                if ( curModifier.size() == 0 ) {
2793
3.59k
                    for (size_t j = 0; j < 512; j++) {
2794
3.58k
                        curModifier.push_back(1);
2795
3.58k
                    }
2796
7
                } else {
2797
436
                    for (auto& c : curModifier) {
2798
436
                        c++;
2799
436
                    }
2800
7
                }
2801
14
            }
2802
31
        }
2803
2804
68
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
68
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
68
        const auto& result = results.back();
2811
2812
68
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
68
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
68
        if ( options.disableTests == false ) {
2830
68
            tests::test(op, result.second);
2831
68
        }
2832
2833
68
        postprocess(module, op, result);
2834
68
    }
2835
2836
37
    if ( options.noCompare == false ) {
2837
37
        compare(operations, results, data, size);
2838
37
    }
2839
37
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
43
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
43
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
43
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
97
    do {
2725
97
        auto op = getOp(&parentDs, data, size);
2726
97
        auto module = getModule(parentDs);
2727
97
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
97
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
97
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
97
    } while ( parentDs.Get<bool>() == true );
2738
2739
43
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
43
#if 1
2745
43
    {
2746
43
        std::set<uint64_t> moduleIDs;
2747
43
        for (const auto& m : modules ) {
2748
32
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
32
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
32
            moduleIDs.insert(moduleID);
2756
32
        }
2757
2758
43
        std::set<uint64_t> operationModuleIDs;
2759
64
        for (const auto& op : operations) {
2760
64
            operationModuleIDs.insert(op.first->ID);
2761
64
        }
2762
2763
43
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
43
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
43
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
43
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
43
    }
2771
43
#endif
2772
2773
43
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
43
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
107
    for (size_t i = 0; i < operations.size(); i++) {
2781
64
        auto& operation = operations[i];
2782
2783
64
        auto& module = operation.first;
2784
64
        auto& op = operation.second;
2785
2786
64
        if ( i > 0 ) {
2787
32
            auto& prevModule = operations[i-1].first;
2788
32
            auto& prevOp = operations[i-1].second;
2789
2790
32
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
14
                auto& curModifier = op.modifier.GetVectorPtr();
2792
14
                if ( curModifier.size() == 0 ) {
2793
3.07k
                    for (size_t j = 0; j < 512; j++) {
2794
3.07k
                        curModifier.push_back(1);
2795
3.07k
                    }
2796
8
                } else {
2797
4.59k
                    for (auto& c : curModifier) {
2798
4.59k
                        c++;
2799
4.59k
                    }
2800
8
                }
2801
14
            }
2802
32
        }
2803
2804
64
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
64
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
64
        const auto& result = results.back();
2811
2812
64
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
64
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
64
        if ( options.disableTests == false ) {
2830
64
            tests::test(op, result.second);
2831
64
        }
2832
2833
64
        postprocess(module, op, result);
2834
64
    }
2835
2836
43
    if ( options.noCompare == false ) {
2837
32
        compare(operations, results, data, size);
2838
32
    }
2839
43
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
6
    do {
2725
6
        auto op = getOp(&parentDs, data, size);
2726
6
        auto module = getModule(parentDs);
2727
6
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
6
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
6
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
6
    } while ( parentDs.Get<bool>() == true );
2738
2739
3
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3
#if 1
2745
3
    {
2746
3
        std::set<uint64_t> moduleIDs;
2747
3
        for (const auto& m : modules ) {
2748
3
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3
            moduleIDs.insert(moduleID);
2756
3
        }
2757
2758
3
        std::set<uint64_t> operationModuleIDs;
2759
6
        for (const auto& op : operations) {
2760
6
            operationModuleIDs.insert(op.first->ID);
2761
6
        }
2762
2763
3
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3
    }
2771
3
#endif
2772
2773
3
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
9
    for (size_t i = 0; i < operations.size(); i++) {
2781
6
        auto& operation = operations[i];
2782
2783
6
        auto& module = operation.first;
2784
6
        auto& op = operation.second;
2785
2786
6
        if ( i > 0 ) {
2787
3
            auto& prevModule = operations[i-1].first;
2788
3
            auto& prevOp = operations[i-1].second;
2789
2790
3
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
3
                auto& curModifier = op.modifier.GetVectorPtr();
2792
3
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
3
                } else {
2797
400
                    for (auto& c : curModifier) {
2798
400
                        c++;
2799
400
                    }
2800
3
                }
2801
3
            }
2802
3
        }
2803
2804
6
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
6
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
6
        const auto& result = results.back();
2811
2812
6
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
6
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
6
        if ( options.disableTests == false ) {
2830
6
            tests::test(op, result.second);
2831
6
        }
2832
2833
6
        postprocess(module, op, result);
2834
6
    }
2835
2836
3
    if ( options.noCompare == false ) {
2837
3
        compare(operations, results, data, size);
2838
3
    }
2839
3
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5
    do {
2725
5
        auto op = getOp(&parentDs, data, size);
2726
5
        auto module = getModule(parentDs);
2727
5
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
5
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
5
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
5
    } while ( parentDs.Get<bool>() == true );
2738
2739
4
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4
#if 1
2745
4
    {
2746
4
        std::set<uint64_t> moduleIDs;
2747
4
        for (const auto& m : modules ) {
2748
3
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3
            moduleIDs.insert(moduleID);
2756
3
        }
2757
2758
4
        std::set<uint64_t> operationModuleIDs;
2759
4
        for (const auto& op : operations) {
2760
4
            operationModuleIDs.insert(op.first->ID);
2761
4
        }
2762
2763
4
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
4
    }
2771
4
#endif
2772
2773
4
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
8
    for (size_t i = 0; i < operations.size(); i++) {
2781
4
        auto& operation = operations[i];
2782
2783
4
        auto& module = operation.first;
2784
4
        auto& op = operation.second;
2785
2786
4
        if ( i > 0 ) {
2787
1
            auto& prevModule = operations[i-1].first;
2788
1
            auto& prevOp = operations[i-1].second;
2789
2790
1
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
1
                } else {
2797
143
                    for (auto& c : curModifier) {
2798
143
                        c++;
2799
143
                    }
2800
1
                }
2801
1
            }
2802
1
        }
2803
2804
4
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4
        const auto& result = results.back();
2811
2812
4
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
4
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
4
        if ( options.disableTests == false ) {
2830
4
            tests::test(op, result.second);
2831
4
        }
2832
2833
4
        postprocess(module, op, result);
2834
4
    }
2835
2836
4
    if ( options.noCompare == false ) {
2837
3
        compare(operations, results, data, size);
2838
3
    }
2839
4
}
2840
2841
/* Explicit template instantiation */
2842
template class ExecutorBase<component::Digest, operation::Digest>;
2843
template class ExecutorBase<component::MAC, operation::HMAC>;
2844
template class ExecutorBase<component::MAC, operation::UMAC>;
2845
template class ExecutorBase<component::MAC, operation::CMAC>;
2846
template class ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>;
2847
template class ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>;
2848
template class ExecutorBase<component::Key, operation::KDF_SCRYPT>;
2849
template class ExecutorBase<component::Key, operation::KDF_HKDF>;
2850
template class ExecutorBase<component::Key, operation::KDF_TLS1_PRF>;
2851
template class ExecutorBase<component::Key, operation::KDF_PBKDF>;
2852
template class ExecutorBase<component::Key, operation::KDF_PBKDF1>;
2853
template class ExecutorBase<component::Key, operation::KDF_PBKDF2>;
2854
template class ExecutorBase<component::Key, operation::KDF_ARGON2>;
2855
template class ExecutorBase<component::Key, operation::KDF_SSH>;
2856
template class ExecutorBase<component::Key, operation::KDF_X963>;
2857
template class ExecutorBase<component::Key, operation::KDF_BCRYPT>;
2858
template class ExecutorBase<component::Key, operation::KDF_SP_800_108>;
2859
template class ExecutorBase<component::Key3, operation::KDF_SRTP>;
2860
template class ExecutorBase<component::Key3, operation::KDF_SRTCP>;
2861
template class ExecutorBase<component::ECC_PublicKey, operation::ECC_PrivateToPublic>;
2862
template class ExecutorBase<bool, operation::ECC_ValidatePubkey>;
2863
template class ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>;
2864
template class ExecutorBase<component::ECCSI_Signature, operation::ECCSI_Sign>;
2865
template class ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>;
2866
template class ExecutorBase<component::ECGDSA_Signature, operation::ECGDSA_Sign>;
2867
template class ExecutorBase<component::ECRDSA_Signature, operation::ECRDSA_Sign>;
2868
template class ExecutorBase<component::Schnorr_Signature, operation::Schnorr_Sign>;
2869
template class ExecutorBase<bool, operation::ECCSI_Verify>;
2870
template class ExecutorBase<bool, operation::ECDSA_Verify>;
2871
template class ExecutorBase<bool, operation::ECGDSA_Verify>;
2872
template class ExecutorBase<bool, operation::ECRDSA_Verify>;
2873
template class ExecutorBase<bool, operation::Schnorr_Verify>;
2874
template class ExecutorBase<component::ECC_PublicKey, operation::ECDSA_Recover>;
2875
template class ExecutorBase<bool, operation::DSA_Verify>;
2876
template class ExecutorBase<component::DSA_Signature, operation::DSA_Sign>;
2877
template class ExecutorBase<component::DSA_Parameters, operation::DSA_GenerateParameters>;
2878
template class ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>;
2879
template class ExecutorBase<component::DSA_KeyPair, operation::DSA_GenerateKeyPair>;
2880
template class ExecutorBase<component::Secret, operation::ECDH_Derive>;
2881
template class ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>;
2882
template class ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>;
2883
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Add>;
2884
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Sub>;
2885
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>;
2886
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Neg>;
2887
template class ExecutorBase<component::ECC_Point, operation::ECC_Point_Dbl>;
2888
template class ExecutorBase<bool, operation::ECC_Point_Cmp>;
2889
template class ExecutorBase<component::DH_KeyPair, operation::DH_GenerateKeyPair>;
2890
template class ExecutorBase<component::Bignum, operation::DH_Derive>;
2891
template class ExecutorBase<component::Bignum, operation::BignumCalc>;
2892
template class ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>;
2893
template class ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>;
2894
template class ExecutorBase<component::BLS_PublicKey, operation::BLS_PrivateToPublic>;
2895
template class ExecutorBase<component::G2, operation::BLS_PrivateToPublic_G2>;
2896
template class ExecutorBase<component::BLS_Signature, operation::BLS_Sign>;
2897
template class ExecutorBase<bool, operation::BLS_Verify>;
2898
template class ExecutorBase<component::BLS_BatchSignature, operation::BLS_BatchSign>;
2899
template class ExecutorBase<bool, operation::BLS_BatchVerify>;
2900
template class ExecutorBase<component::G1, operation::BLS_Aggregate_G1>;
2901
template class ExecutorBase<component::G2, operation::BLS_Aggregate_G2>;
2902
template class ExecutorBase<component::Fp12, operation::BLS_Pairing>;
2903
template class ExecutorBase<component::Fp12, operation::BLS_MillerLoop>;
2904
template class ExecutorBase<component::Fp12, operation::BLS_FinalExp>;
2905
template class ExecutorBase<component::G1, operation::BLS_HashToG1>;
2906
template class ExecutorBase<component::G2, operation::BLS_HashToG2>;
2907
template class ExecutorBase<component::G1, operation::BLS_MapToG1>;
2908
template class ExecutorBase<component::G2, operation::BLS_MapToG2>;
2909
template class ExecutorBase<bool, operation::BLS_IsG1OnCurve>;
2910
template class ExecutorBase<bool, operation::BLS_IsG2OnCurve>;
2911
template class ExecutorBase<component::BLS_KeyPair, operation::BLS_GenerateKeyPair>;
2912
template class ExecutorBase<component::G1, operation::BLS_Decompress_G1>;
2913
template class ExecutorBase<component::Bignum, operation::BLS_Compress_G1>;
2914
template class ExecutorBase<component::G2, operation::BLS_Decompress_G2>;
2915
template class ExecutorBase<component::G1, operation::BLS_Compress_G2>;
2916
template class ExecutorBase<component::G1, operation::BLS_G1_Add>;
2917
template class ExecutorBase<component::G1, operation::BLS_G1_Mul>;
2918
template class ExecutorBase<bool, operation::BLS_G1_IsEq>;
2919
template class ExecutorBase<component::G1, operation::BLS_G1_Neg>;
2920
template class ExecutorBase<component::G2, operation::BLS_G2_Add>;
2921
template class ExecutorBase<component::G2, operation::BLS_G2_Mul>;
2922
template class ExecutorBase<bool, operation::BLS_G2_IsEq>;
2923
template class ExecutorBase<component::G2, operation::BLS_G2_Neg>;
2924
template class ExecutorBase<component::G1, operation::BLS_G1_MultiExp>;
2925
template class ExecutorBase<Buffer, operation::Misc>;
2926
template class ExecutorBase<bool, operation::SR25519_Verify>;
2927
2928
} /* namespace cryptofuzz */