Coverage Report

Created: 2026-11-12 06:59

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/cryptofuzz-sp-math/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
132k
#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
387
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
387
    (void)module;
53
387
    (void)op;
54
55
387
    if ( result.second != std::nullopt ) {
56
335
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
57
335
    }
58
387
}
59
60
387
template<> std::optional<component::Digest> ExecutorBase<component::Digest, operation::Digest>::callModule(std::shared_ptr<Module> module, operation::Digest& op) const {
61
387
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
62
63
387
    return module->OpDigest(op);
64
387
}
65
66
/* Specialization for operation::HMAC */
67
455
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
455
    (void)module;
69
455
    (void)op;
70
71
455
    if ( result.second != std::nullopt ) {
72
236
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
73
236
    }
74
455
}
75
76
455
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::HMAC>::callModule(std::shared_ptr<Module> module, operation::HMAC& op) const {
77
455
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
78
79
455
    return module->OpHMAC(op);
80
455
}
81
82
/* Specialization for operation::UMAC */
83
75
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
75
    (void)module;
85
75
    (void)op;
86
87
75
    if ( result.second != std::nullopt ) {
88
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
89
0
    }
90
75
}
91
92
75
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::UMAC>::callModule(std::shared_ptr<Module> module, operation::UMAC& op) const {
93
75
    return module->OpUMAC(op);
94
75
}
95
96
/* Specialization for operation::CMAC */
97
317
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
317
    (void)module;
99
317
    (void)op;
100
101
317
    if ( result.second != std::nullopt ) {
102
129
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
103
129
    }
104
317
}
105
106
317
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::CMAC>::callModule(std::shared_ptr<Module> module, operation::CMAC& op) const {
107
317
    RETURN_IF_DISABLED(options.ciphers, op.cipher.cipherType.Get());
108
109
317
    return module->OpCMAC(op);
110
317
}
111
112
/* Specialization for operation::SymmetricEncrypt */
113
1.93k
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.93k
    if ( options.noDecrypt == true ) {
115
0
        return;
116
0
    }
117
118
1.93k
    if ( result.second != std::nullopt ) {
119
837
        fuzzing::memory::memory_test_msan(result.second->ciphertext.GetPtr(), result.second->ciphertext.GetSize());
120
837
        if ( result.second->tag != std::nullopt ) {
121
26
            fuzzing::memory::memory_test_msan(result.second->tag->GetPtr(), result.second->tag->GetSize());
122
26
        }
123
837
    }
124
125
1.93k
    if ( op.cleartext.GetSize() > 0 && result.second != std::nullopt && result.second->ciphertext.GetSize() > 0 ) {
126
810
        using fuzzing::datasource::ID;
127
128
810
        bool tryDecrypt = true;
129
130
810
        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
810
        if ( tryDecrypt == true ) {
159
            /* Try to decrypt the encrypted data */
160
161
            /* Construct a SymmetricDecrypt instance with the SymmetricEncrypt instance */
162
810
            auto opDecrypt = operation::SymmetricDecrypt(
163
                    /* The SymmetricEncrypt instance */
164
810
                    op,
165
166
                    /* The ciphertext generated by OpSymmetricEncrypt */
167
810
                    *(result.second),
168
169
                    /* The size of the output buffer that OpSymmetricDecrypt() must use. */
170
810
                    op.cleartext.GetSize() + 32,
171
172
810
                    op.aad,
173
174
                    /* Empty modifier */
175
810
                    {});
176
177
810
            const auto cleartext = module->OpSymmetricDecrypt(opDecrypt);
178
179
810
            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
810
            } 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
810
        }
208
810
    }
209
1.93k
}
210
211
1.93k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricEncrypt& op) const {
212
1.93k
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
213
214
1.93k
    return module->OpSymmetricEncrypt(op);
215
1.93k
}
216
217
/* Specialization for operation::SymmetricDecrypt */
218
743
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
743
    (void)module;
220
743
    (void)op;
221
222
743
    if ( result.second != std::nullopt ) {
223
193
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
224
193
    }
225
743
}
226
227
743
template<> std::optional<component::MAC> ExecutorBase<component::MAC, operation::SymmetricDecrypt>::callModule(std::shared_ptr<Module> module, operation::SymmetricDecrypt& op) const {
228
743
    RETURN_IF_DISABLED(options.ciphers , op.cipher.cipherType.Get());
229
230
743
    return module->OpSymmetricDecrypt(op);
231
743
}
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
108
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
254
108
    }
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
77
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
77
    (void)module;
266
77
    (void)op;
267
268
77
    if ( result.second != std::nullopt ) {
269
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
270
0
    }
271
77
}
272
273
77
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF& op) const {
274
77
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
275
276
77
    return module->OpKDF_PBKDF(op);
277
77
}
278
279
/* Specialization for operation::KDF_PBKDF1 */
280
81
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
81
    (void)module;
282
81
    (void)op;
283
284
81
    if ( result.second != std::nullopt ) {
285
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
286
0
    }
287
81
}
288
289
81
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF1>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF1& op) const {
290
81
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
291
292
81
    return module->OpKDF_PBKDF1(op);
293
81
}
294
295
/* Specialization for operation::KDF_PBKDF2 */
296
305
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
305
    (void)module;
298
305
    (void)op;
299
300
305
    if ( result.second != std::nullopt ) {
301
185
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
302
185
    }
303
305
}
304
305
305
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_PBKDF2>::callModule(std::shared_ptr<Module> module, operation::KDF_PBKDF2& op) const {
306
305
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
307
308
305
    return module->OpKDF_PBKDF2(op);
309
305
}
310
311
/* Specialization for operation::KDF_ARGON2 */
312
5
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
5
    (void)module;
314
5
    (void)op;
315
316
5
    if ( result.second != std::nullopt ) {
317
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
318
0
    }
319
5
}
320
321
5
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_ARGON2>::callModule(std::shared_ptr<Module> module, operation::KDF_ARGON2& op) const {
322
5
    return module->OpKDF_ARGON2(op);
323
5
}
324
325
/* Specialization for operation::KDF_SSH */
326
91
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
91
    (void)module;
328
91
    (void)op;
329
330
91
    if ( result.second != std::nullopt ) {
331
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
332
0
    }
333
91
}
334
335
91
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_SSH>::callModule(std::shared_ptr<Module> module, operation::KDF_SSH& op) const {
336
91
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
337
338
91
    return module->OpKDF_SSH(op);
339
91
}
340
341
/* Specialization for operation::KDF_TLS1_PRF */
342
77
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
77
    (void)module;
344
77
    (void)op;
345
346
77
    if ( result.second != std::nullopt ) {
347
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
348
0
    }
349
77
}
350
351
77
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
77
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
353
354
77
    return module->OpKDF_TLS1_PRF(op);
355
77
}
356
357
/* Specialization for operation::KDF_X963 */
358
95
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
95
    (void)module;
360
95
    (void)op;
361
362
95
    if ( result.second != std::nullopt ) {
363
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
364
0
    }
365
95
}
366
367
95
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_X963>::callModule(std::shared_ptr<Module> module, operation::KDF_X963& op) const {
368
95
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
369
370
95
    return module->OpKDF_X963(op);
371
95
}
372
373
/* Specialization for operation::KDF_BCRYPT */
374
8
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
8
    (void)module;
376
8
    (void)op;
377
378
8
    if ( result.second != std::nullopt ) {
379
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
380
0
    }
381
8
}
382
383
8
template<> std::optional<component::Key> ExecutorBase<component::Key, operation::KDF_BCRYPT>::callModule(std::shared_ptr<Module> module, operation::KDF_BCRYPT& op) const {
384
8
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
385
386
8
    return module->OpKDF_BCRYPT(op);
387
8
}
388
389
/* Specialization for operation::KDF_SP_800_108 */
390
117
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
117
    (void)module;
392
117
    (void)op;
393
394
117
    if ( result.second != std::nullopt ) {
395
0
        fuzzing::memory::memory_test_msan(result.second->GetPtr(), result.second->GetSize());
396
0
    }
397
117
}
398
399
117
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
117
    if ( op.mech.mode == true ) {
401
99
        RETURN_IF_DISABLED(options.digests, op.mech.type.Get());
402
99
    }
403
404
117
    return module->OpKDF_SP_800_108(op);
405
117
}
406
407
/* Specialization for operation::KDF_SRTP */
408
88
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
88
    (void)module;
410
88
    (void)op;
411
88
    (void)result;
412
88
}
413
414
88
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTP& op) const {
415
88
    return module->OpKDF_SRTP(op);
416
88
}
417
418
/* Specialization for operation::KDF_SRTCP */
419
61
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
61
    (void)module;
421
61
    (void)op;
422
61
    (void)result;
423
61
}
424
425
61
template<> std::optional<component::Key3> ExecutorBase<component::Key3, operation::KDF_SRTCP>::callModule(std::shared_ptr<Module> module, operation::KDF_SRTCP& op) const {
426
61
    return module->OpKDF_SRTCP(op);
427
61
}
428
429
/* Specialization for operation::ECC_PrivateToPublic */
430
8.28k
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
8.28k
    (void)module;
432
433
8.28k
    if ( result.second != std::nullopt  ) {
434
3.59k
        const auto curveID = op.curveType.Get();
435
3.59k
        const auto privkey = op.priv.ToTrimmedString();
436
3.59k
        const auto pub_x = result.second->first.ToTrimmedString();
437
3.59k
        const auto pub_y = result.second->second.ToTrimmedString();
438
439
3.59k
        Pool_CurvePrivkey.Set({ curveID, privkey });
440
3.59k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
441
3.59k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
442
443
3.59k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
444
3.59k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
445
3.59k
    }
446
8.28k
}
447
448
8.28k
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
8.28k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
450
451
8.28k
    const size_t size = op.priv.ToTrimmedString().size();
452
453
8.28k
    if ( size == 0 || size > 4096 ) {
454
103
        return std::nullopt;
455
103
    }
456
457
8.18k
    return module->OpECC_PrivateToPublic(op);
458
8.28k
}
459
460
/* Specialization for operation::ECC_ValidatePubkey */
461
5.21k
template<> void ExecutorBase<bool, operation::ECC_ValidatePubkey>::postprocess(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op, const ExecutorBase<bool, operation::ECC_ValidatePubkey>::ResultPair& result) const {
462
5.21k
    (void)module;
463
5.21k
    (void)op;
464
5.21k
    (void)result;
465
5.21k
}
466
467
5.21k
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_ValidatePubkey>::callModule(std::shared_ptr<Module> module, operation::ECC_ValidatePubkey& op) const {
468
5.21k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
469
470
5.21k
    return module->OpECC_ValidatePubkey(op);
471
5.21k
}
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.64k
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.64k
    (void)operations;
479
1.64k
    (void)results;
480
1.64k
    (void)data;
481
1.64k
    (void)size;
482
1.64k
}
483
484
9.75k
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
9.75k
    (void)module;
486
487
9.75k
    if ( result.second != std::nullopt  ) {
488
3.21k
        const auto curveID = op.curveType.Get();
489
3.21k
        const auto privkey = result.second->priv.ToTrimmedString();
490
3.21k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
491
3.21k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
492
493
3.21k
        Pool_CurvePrivkey.Set({ curveID, privkey });
494
3.21k
        Pool_CurveKeypair.Set({ curveID, privkey, pub_x, pub_y });
495
3.21k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
496
497
3.21k
        {
498
3.21k
            auto opValidate = operation::ECC_ValidatePubkey(
499
3.21k
                    op.curveType,
500
3.21k
                    result.second->pub,
501
3.21k
                    op.modifier);
502
503
3.21k
            const auto validateResult = module->OpECC_ValidatePubkey(opValidate);
504
3.21k
            CF_ASSERT(
505
3.21k
                    validateResult == std::nullopt ||
506
3.21k
                    *validateResult == true,
507
3.21k
                    "Cannot validate generated public key");
508
3.21k
        }
509
3.21k
    }
510
9.75k
}
511
512
9.75k
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
9.75k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
514
515
9.75k
    return module->OpECC_GenerateKeyPair(op);
516
9.75k
}
517
518
/* Specialization for operation::ECCSI_Sign */
519
811
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
811
    (void)module;
521
522
811
    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
811
}
565
566
811
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
811
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
568
811
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
569
570
578
    const size_t size = op.priv.ToTrimmedString().size();
571
572
578
    if ( size == 0 || size > 4096 ) {
573
3
        return std::nullopt;
574
3
    }
575
576
575
    return module->OpECCSI_Sign(op);
577
578
}
578
579
/* Specialization for operation::ECDSA_Sign */
580
9.98k
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
9.98k
    (void)module;
582
583
9.98k
    if ( result.second != std::nullopt  ) {
584
6.35k
        const auto curveID = op.curveType.Get();
585
6.35k
        const auto cleartext = op.cleartext.ToHex();
586
6.35k
        const auto pub_x = result.second->pub.first.ToTrimmedString();
587
6.35k
        const auto pub_y = result.second->pub.second.ToTrimmedString();
588
6.35k
        const auto sig_r = result.second->signature.first.ToTrimmedString();
589
6.35k
        const auto sig_s = result.second->signature.second.ToTrimmedString();
590
591
6.35k
        Pool_CurveECDSASignature.Set({ curveID, cleartext, pub_x, pub_y, sig_r, sig_s});
592
6.35k
        Pool_CurveECC_Point.Set({ curveID, pub_x, pub_y });
593
6.35k
        Pool_CurveECC_Point.Set({ curveID, sig_r, sig_s });
594
595
6.35k
        if ( pub_x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_x); }
596
6.35k
        if ( pub_y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(pub_y); }
597
6.35k
        if ( sig_r.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_r); }
598
6.35k
        if ( sig_s.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(sig_s); }
599
600
6.35k
        {
601
6.35k
            auto opVerify = operation::ECDSA_Verify(
602
6.35k
                    op,
603
6.35k
                    *(result.second),
604
6.35k
                    op.modifier);
605
606
6.35k
            const auto verifyResult = module->OpECDSA_Verify(opVerify);
607
6.35k
            CF_ASSERT(
608
6.35k
                    verifyResult == std::nullopt ||
609
6.35k
                    *verifyResult == true,
610
6.35k
                    "Cannot verify generated signature");
611
6.35k
        }
612
6.35k
    }
613
9.98k
}
614
615
9.98k
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
9.98k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
617
9.98k
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
618
619
9.67k
    const size_t size = op.priv.ToTrimmedString().size();
620
621
9.67k
    if ( size == 0 || size > 4096 ) {
622
3
        return std::nullopt;
623
3
    }
624
625
9.66k
    return module->OpECDSA_Sign(op);
626
9.67k
}
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
9
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
9
    (void)module;
667
668
9
    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
9
}
686
687
9
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
9
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
689
9
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
690
691
9
    const size_t size = op.priv.ToTrimmedString().size();
692
693
9
    if ( size == 0 || size > 4096 ) {
694
0
        return std::nullopt;
695
0
    }
696
697
9
    return module->OpECRDSA_Sign(op);
698
9
}
699
700
/* Specialization for operation::Schnorr_Sign */
701
8
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
8
    (void)module;
703
704
8
    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
8
}
722
723
8
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
8
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
725
8
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
726
727
8
    const size_t size = op.priv.ToTrimmedString().size();
728
729
8
    if ( size == 0 || size > 4096 ) {
730
0
        return std::nullopt;
731
0
    }
732
733
8
    return module->OpSchnorr_Sign(op);
734
8
}
735
736
/* Specialization for operation::ECCSI_Verify */
737
445
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
445
    (void)module;
739
445
    (void)op;
740
445
    (void)result;
741
445
}
742
743
445
template<> std::optional<bool> ExecutorBase<bool, operation::ECCSI_Verify>::callModule(std::shared_ptr<Module> module, operation::ECCSI_Verify& op) const {
744
445
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
745
445
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
746
747
180
    return module->OpECCSI_Verify(op);
748
445
}
749
750
/* Specialization for operation::ECDSA_Verify */
751
5.19k
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
5.19k
    (void)module;
753
5.19k
    (void)op;
754
5.19k
    (void)result;
755
5.19k
}
756
757
5.19k
template<> std::optional<bool> ExecutorBase<bool, operation::ECDSA_Verify>::callModule(std::shared_ptr<Module> module, operation::ECDSA_Verify& op) const {
758
5.19k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
759
5.19k
    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
4.87k
    return module->OpECDSA_Verify(op);
772
5.19k
}
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
8
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
8
    (void)module;
848
8
    (void)op;
849
8
    (void)result;
850
8
}
851
852
8
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
8
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
854
8
    RETURN_IF_DISABLED(options.digests, op.digestType.Get());
855
856
8
    return module->OpECDSA_Recover(op);
857
8
}
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
22
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
22
    (void)module;
869
22
    (void)op;
870
22
    (void)result;
871
22
}
872
873
22
template<> std::optional<bool> ExecutorBase<bool, operation::DSA_Verify>::callModule(std::shared_ptr<Module> module, operation::DSA_Verify& op) const {
874
22
    const std::vector<size_t> sizes = {
875
22
        op.parameters.p.ToTrimmedString().size(),
876
22
        op.parameters.q.ToTrimmedString().size(),
877
22
        op.parameters.g.ToTrimmedString().size(),
878
22
        op.pub.ToTrimmedString().size(),
879
22
        op.signature.first.ToTrimmedString().size(),
880
22
        op.signature.second.ToTrimmedString().size(),
881
22
    };
882
883
124
    for (const auto& size : sizes) {
884
124
        if ( size == 0 || size > 4096 ) {
885
3
            return std::nullopt;
886
3
        }
887
124
    }
888
889
19
    return module->OpDSA_Verify(op);
890
22
}
891
892
/* Specialization for operation::DSA_Sign */
893
/* Do not compare DSA_Sign results, because the result can be produced indeterministically */
894
template <>
895
13
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
13
    (void)operations;
897
13
    (void)results;
898
13
    (void)data;
899
13
    (void)size;
900
13
}
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
26
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
26
    (void)module;
910
26
    (void)op;
911
26
    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
26
}
934
935
26
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
26
    const std::vector<size_t> sizes = {
937
26
        op.parameters.p.ToTrimmedString().size(),
938
26
        op.parameters.q.ToTrimmedString().size(),
939
26
        op.parameters.g.ToTrimmedString().size(),
940
26
        op.priv.ToTrimmedString().size(),
941
26
    };
942
943
101
    for (const auto& size : sizes) {
944
101
        if ( size == 0 || size > 4096 ) {
945
11
            return std::nullopt;
946
11
        }
947
101
    }
948
949
15
    return module->OpDSA_Sign(op);
950
26
}
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
7
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
7
    (void)result;
963
7
    (void)module;
964
7
    (void)op;
965
7
    if ( result.second != std::nullopt ) {
966
        //Pool_DSA_PubPriv.Set({pub, priv});
967
0
    }
968
7
}
969
970
7
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DSA_PrivateToPublic>::callModule(std::shared_ptr<Module> module, operation::DSA_PrivateToPublic& op) const {
971
7
    return module->OpDSA_PrivateToPublic(op);
972
7
}
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
10
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
10
    (void)operations;
980
10
    (void)results;
981
10
    (void)data;
982
10
    (void)size;
983
10
}
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
20
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
20
    (void)result;
994
20
    (void)module;
995
20
    (void)op;
996
20
    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
20
}
1003
1004
20
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
20
    const std::vector<size_t> sizes = {
1006
20
        op.p.ToTrimmedString().size(),
1007
20
        op.q.ToTrimmedString().size(),
1008
20
        op.g.ToTrimmedString().size(),
1009
20
    };
1010
1011
60
    for (const auto& size : sizes) {
1012
60
        if ( size == 0 || size > 4096 ) {
1013
10
            return std::nullopt;
1014
10
        }
1015
60
    }
1016
1017
10
    return module->OpDSA_GenerateKeyPair(op);
1018
20
}
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
2
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
2
    (void)operations;
1026
2
    (void)results;
1027
2
    (void)data;
1028
2
    (void)size;
1029
2
}
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
4
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
4
    (void)result;
1040
4
    (void)module;
1041
4
    (void)op;
1042
4
    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
4
}
1054
1055
4
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
4
    return module->OpDSA_GenerateParameters(op);
1057
4
}
1058
1059
/* Specialization for operation::ECDH_Derive */
1060
1.07k
template<> void ExecutorBase<component::Secret, operation::ECDH_Derive>::postprocess(std::shared_ptr<Module> module, operation::ECDH_Derive& op, const ExecutorBase<component::Secret, operation::ECDH_Derive>::ResultPair& result) const {
1061
1.07k
    (void)module;
1062
1.07k
    (void)op;
1063
1.07k
    (void)result;
1064
1.07k
}
1065
1066
1.07k
template<> std::optional<component::Secret> ExecutorBase<component::Secret, operation::ECDH_Derive>::callModule(std::shared_ptr<Module> module, operation::ECDH_Derive& op) const {
1067
1.07k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1068
1069
1.07k
    return module->OpECDH_Derive(op);
1070
1.07k
}
1071
1072
/* Specialization for operation::ECIES_Encrypt */
1073
template <>
1074
594
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
594
    (void)operations;
1076
594
    (void)results;
1077
594
    (void)data;
1078
594
    (void)size;
1079
594
}
1080
1.29k
template<> void ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::postprocess(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op, const ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::ResultPair& result) const {
1081
1.29k
    (void)module;
1082
1.29k
    (void)op;
1083
1.29k
    (void)result;
1084
1.29k
}
1085
1086
1.29k
template<> std::optional<component::Ciphertext> ExecutorBase<component::Ciphertext, operation::ECIES_Encrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Encrypt& op) const {
1087
1.29k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1088
1089
1.29k
    return module->OpECIES_Encrypt(op);
1090
1.29k
}
1091
1092
/* Specialization for operation::ECIES_Decrypt */
1093
1.33k
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.33k
    (void)module;
1095
1.33k
    (void)op;
1096
1.33k
    (void)result;
1097
1.33k
}
1098
1099
1.33k
template<> std::optional<component::Cleartext> ExecutorBase<component::Cleartext, operation::ECIES_Decrypt>::callModule(std::shared_ptr<Module> module, operation::ECIES_Decrypt& op) const {
1100
1.33k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1101
1102
1.33k
    return module->OpECIES_Decrypt(op);
1103
1.33k
}
1104
1105
/* Specialization for operation::ECC_Point_Add */
1106
3.87k
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.87k
    (void)module;
1108
1109
3.87k
    if ( result.second != std::nullopt  ) {
1110
209
        const auto curveID = op.curveType.Get();
1111
209
        const auto x = result.second->first.ToTrimmedString();
1112
209
        const auto y = result.second->second.ToTrimmedString();
1113
1114
209
        Pool_CurveECC_Point.Set({ curveID, x, y });
1115
1116
209
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1117
209
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1118
209
    }
1119
3.87k
}
1120
1121
3.87k
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.87k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1123
1124
3.87k
    return module->OpECC_Point_Add(op);
1125
3.87k
}
1126
1127
/* Specialization for operation::ECC_Point_Sub */
1128
2
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
2
    (void)module;
1130
1131
2
    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
2
}
1142
1143
2
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
2
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1145
1146
2
    return module->OpECC_Point_Sub(op);
1147
2
}
1148
1149
/* Specialization for operation::ECC_Point_Mul */
1150
4.10k
template<> void ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::postprocess(std::shared_ptr<Module> module, operation::ECC_Point_Mul& op, const ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::ResultPair& result) const {
1151
4.10k
    (void)module;
1152
1153
4.10k
    if ( result.second != std::nullopt  ) {
1154
262
        const auto curveID = op.curveType.Get();
1155
262
        const auto x = result.second->first.ToTrimmedString();
1156
262
        const auto y = result.second->second.ToTrimmedString();
1157
1158
262
        Pool_CurveECC_Point.Set({ curveID, x, y });
1159
1160
262
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1161
262
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1162
262
    }
1163
4.10k
}
1164
1165
4.10k
template<> std::optional<component::ECC_Point> ExecutorBase<component::ECC_Point, operation::ECC_Point_Mul>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Mul& op) const {
1166
4.10k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1167
1168
4.10k
    return module->OpECC_Point_Mul(op);
1169
4.10k
}
1170
1171
/* Specialization for operation::ECC_Point_Neg */
1172
43
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
43
    (void)module;
1174
1175
43
    if ( result.second != std::nullopt  ) {
1176
11
        const auto curveID = op.curveType.Get();
1177
11
        const auto x = result.second->first.ToTrimmedString();
1178
11
        const auto y = result.second->second.ToTrimmedString();
1179
1180
11
        Pool_CurveECC_Point.Set({ curveID, x, y });
1181
1182
11
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1183
11
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1184
11
    }
1185
43
}
1186
1187
43
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
43
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1189
1190
43
    return module->OpECC_Point_Neg(op);
1191
43
}
1192
1193
/* Specialization for operation::ECC_Point_Dbl */
1194
6.87k
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
6.87k
    (void)module;
1196
1197
6.87k
    if ( result.second != std::nullopt  ) {
1198
160
        const auto curveID = op.curveType.Get();
1199
160
        const auto x = result.second->first.ToTrimmedString();
1200
160
        const auto y = result.second->second.ToTrimmedString();
1201
1202
160
        Pool_CurveECC_Point.Set({ curveID, x, y });
1203
1204
160
        if ( x.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(x); }
1205
160
        if ( y.size() <= config::kMaxBignumSize ) { Pool_Bignum.Set(y); }
1206
160
    }
1207
6.87k
}
1208
1209
6.87k
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
6.87k
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1211
1212
6.87k
    return module->OpECC_Point_Dbl(op);
1213
6.87k
}
1214
1215
/* Specialization for operation::ECC_Point_Cmp */
1216
36
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
36
    (void)module;
1218
36
    (void)result;
1219
36
    (void)op;
1220
36
}
1221
1222
36
template<> std::optional<bool> ExecutorBase<bool, operation::ECC_Point_Cmp>::callModule(std::shared_ptr<Module> module, operation::ECC_Point_Cmp& op) const {
1223
36
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1224
1225
36
    return module->OpECC_Point_Cmp(op);
1226
36
}
1227
1228
/* Specialization for operation::DH_Derive */
1229
1.97k
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.97k
    (void)module;
1231
1.97k
    (void)op;
1232
1.97k
    (void)result;
1233
1.97k
}
1234
1235
1.97k
template<> std::optional<component::Bignum> ExecutorBase<component::Bignum, operation::DH_Derive>::callModule(std::shared_ptr<Module> module, operation::DH_Derive& op) const {
1236
1.97k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1237
1.90k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1238
1.87k
    if ( op.pub.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1239
1.82k
    if ( op.priv.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1240
1241
1.75k
    return module->OpDH_Derive(op);
1242
1.82k
}
1243
1244
/* Specialization for operation::DH_GenerateKeyPair */
1245
2.72k
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
2.72k
    (void)result;
1247
2.72k
    (void)op;
1248
2.72k
    (void)module;
1249
1250
2.72k
    if ( result.second != std::nullopt && (PRNG() % 4) == 0 ) {
1251
33
        const auto priv = result.second->first.ToTrimmedString();
1252
33
        const auto pub = result.second->second.ToTrimmedString();
1253
1254
33
        Pool_DH_PrivateKey.Set(priv);
1255
33
        Pool_DH_PublicKey.Set(pub);
1256
33
    }
1257
2.72k
}
1258
1259
2.72k
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
2.72k
    if ( op.prime.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1261
2.69k
    if ( op.base.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1262
1263
2.64k
    return module->OpDH_GenerateKeyPair(op);
1264
2.69k
}
1265
1266
/* Specialization for operation::BignumCalc */
1267
51.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
51.3k
    (void)module;
1269
51.3k
    (void)op;
1270
1271
51.3k
    if ( result.second != std::nullopt  ) {
1272
21.9k
        const auto bignum = result.second->ToTrimmedString();
1273
1274
21.9k
        if ( bignum.size() <= config::kMaxBignumSize ) {
1275
21.8k
            Pool_Bignum.Set(bignum);
1276
21.8k
            if ( op.calcOp.Is(CF_CALCOP("Prime()")) ) {
1277
584
                Pool_Bignum_Primes.Set(bignum);
1278
584
            }
1279
21.8k
        }
1280
21.9k
        if ( op.calcOp.Is(CF_CALCOP("IsPrime(A)")) ) {
1281
1.73k
            if ( bignum == "1" ) {
1282
847
                Pool_Bignum_Primes.Set(op.bn0.ToTrimmedString());
1283
847
            }
1284
1.73k
        }
1285
21.9k
    }
1286
51.3k
}
1287
1288
51.3k
std::optional<component::Bignum> ExecutorBignumCalc::callModule(std::shared_ptr<Module> module, operation::BignumCalc& op) const {
1289
51.3k
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1290
1291
    /* Prevent timeouts */
1292
51.3k
    if ( op.bn0.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1293
51.3k
    if ( op.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1294
51.3k
    if ( op.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1295
51.2k
    if ( op.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1296
1297
51.2k
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1298
22
        return std::nullopt;
1299
22
    }
1300
1301
51.2k
    switch ( op.calcOp.Get() ) {
1302
667
        case    CF_CALCOP("SetBit(A,B)"):
1303
            /* Don't allow setting very high bit positions (risk of memory exhaustion) */
1304
667
            if ( op.bn1.GetSize() > 4 ) {
1305
67
                return std::nullopt;
1306
67
            }
1307
600
            break;
1308
600
        case    CF_CALCOP("Exp(A,B)"):
1309
200
            if ( op.bn0.GetSize() > 5 || op.bn1.GetSize() > 2 ) {
1310
139
                return std::nullopt;
1311
139
            }
1312
61
            break;
1313
162
        case    CF_CALCOP("ModLShift(A,B,C)"):
1314
162
            if ( op.bn1.GetSize() > 4 ) {
1315
89
                return std::nullopt;
1316
89
            }
1317
73
            break;
1318
359
        case    CF_CALCOP("Exp2(A)"):
1319
359
            if ( op.bn0.GetSize() > 4 ) {
1320
72
                return std::nullopt;
1321
72
            }
1322
287
            break;
1323
51.2k
    }
1324
1325
50.8k
    return module->OpBignumCalc(op);
1326
51.2k
}
1327
1328
/* Specialization for operation::BignumCalc_Fp2 */
1329
113
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
113
    (void)module;
1331
113
    (void)op;
1332
1333
113
    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
113
}
1345
1346
113
std::optional<component::Fp2> ExecutorBignumCalc_Fp2::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp2& op) const {
1347
113
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1348
1349
    /* Prevent timeouts */
1350
113
    if ( op.bn0.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1351
110
    if ( op.bn0.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1352
100
    if ( op.bn1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1353
89
    if ( op.bn1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1354
80
    if ( op.bn2.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1355
72
    if ( op.bn2.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1356
62
    if ( op.bn3.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1357
52
    if ( op.bn3.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1358
1359
46
    if ( op.modulo != std::nullopt && !module->SupportsModularBignumCalc() ) {
1360
0
        return std::nullopt;
1361
0
    }
1362
1363
46
    return module->OpBignumCalc_Fp2(op);
1364
46
}
1365
1366
/* Specialization for operation::BignumCalc_Fp12 */
1367
586
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
586
    (void)module;
1369
586
    (void)op;
1370
1371
586
    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
586
}
1400
1401
586
std::optional<component::Fp12> ExecutorBignumCalc_Fp12::callModule(std::shared_ptr<Module> module, operation::BignumCalc_Fp12& op) const {
1402
586
    RETURN_IF_DISABLED(options.calcOps, op.calcOp.Get());
1403
1404
    /* Prevent timeouts */
1405
586
    if ( op.bn0.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1406
576
    if ( op.bn0.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1407
565
    if ( op.bn0.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1408
554
    if ( op.bn0.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1409
546
    if ( op.bn0.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1410
536
    if ( op.bn0.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1411
526
    if ( op.bn0.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1412
516
    if ( op.bn0.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1413
506
    if ( op.bn0.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1414
495
    if ( op.bn0.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1415
485
    if ( op.bn0.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1416
475
    if ( op.bn0.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1417
1418
468
    if ( op.bn1.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1419
458
    if ( op.bn1.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1420
452
    if ( op.bn1.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1421
444
    if ( op.bn1.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1422
437
    if ( op.bn1.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1423
431
    if ( op.bn1.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1424
421
    if ( op.bn1.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1425
411
    if ( op.bn1.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1426
403
    if ( op.bn1.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1427
392
    if ( op.bn1.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1428
382
    if ( op.bn1.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1429
372
    if ( op.bn1.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1430
1431
364
    if ( op.bn2.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1432
356
    if ( op.bn2.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1433
349
    if ( op.bn2.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1434
339
    if ( op.bn2.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1435
331
    if ( op.bn2.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1436
324
    if ( op.bn2.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1437
314
    if ( op.bn2.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1438
307
    if ( op.bn2.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1439
297
    if ( op.bn2.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1440
289
    if ( op.bn2.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1441
279
    if ( op.bn2.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1442
269
    if ( op.bn2.bn12.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1443
1444
259
    if ( op.bn3.bn1.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1445
249
    if ( op.bn3.bn2.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1446
241
    if ( op.bn3.bn3.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1447
233
    if ( op.bn3.bn4.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1448
223
    if ( op.bn3.bn5.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1449
213
    if ( op.bn3.bn6.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1450
203
    if ( op.bn3.bn7.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1451
192
    if ( op.bn3.bn8.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1452
185
    if ( op.bn3.bn9.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1453
175
    if ( op.bn3.bn10.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1454
170
    if ( op.bn3.bn11.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1455
162
    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
8
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
8
    (void)module;
1467
1468
8
    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
8
}
1479
1480
8
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
8
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1482
1483
8
    const size_t size = op.priv.ToTrimmedString().size();
1484
1485
8
    if ( size == 0 || size > 4096 ) {
1486
8
        return std::nullopt;
1487
8
    }
1488
1489
0
    return module->OpBLS_PrivateToPublic(op);
1490
8
}
1491
1492
/* Specialization for operation::BLS_PrivateToPublic_G2 */
1493
16
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
16
    (void)module;
1495
16
    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
16
}
1510
1511
16
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
16
    const size_t size = op.priv.ToTrimmedString().size();
1513
1514
16
    if ( size == 0 || size > 4096 ) {
1515
3
        return std::nullopt;
1516
3
    }
1517
1518
13
    return module->OpBLS_PrivateToPublic_G2(op);
1519
16
}
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
2
        return std::nullopt;
1559
2
    }
1560
1561
7
    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
12
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
12
    (void)module;
1593
12
    (void)op;
1594
1595
12
    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
12
}
1624
1625
12
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
12
    return module->OpBLS_BatchSign(op);
1627
12
}
1628
1629
/* Specialization for operation::BLS_BatchVerify */
1630
9
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
9
    (void)module;
1632
9
    (void)op;
1633
9
    (void)result;
1634
9
}
1635
1636
9
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_BatchVerify>::callModule(std::shared_ptr<Module> module, operation::BLS_BatchVerify& op) const {
1637
9
    return module->OpBLS_BatchVerify(op);
1638
9
}
1639
1640
/* Specialization for operation::BLS_Aggregate_G1 */
1641
10
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
10
    (void)module;
1643
10
    (void)op;
1644
10
    (void)result;
1645
10
}
1646
1647
10
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
10
    return module->OpBLS_Aggregate_G1(op);
1649
10
}
1650
1651
/* Specialization for operation::BLS_Aggregate_G2 */
1652
7
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
7
    (void)module;
1654
7
    (void)op;
1655
7
    (void)result;
1656
7
}
1657
1658
7
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
7
    return module->OpBLS_Aggregate_G2(op);
1660
7
}
1661
1662
/* Specialization for operation::BLS_Pairing */
1663
4
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
4
    (void)module;
1665
4
    (void)op;
1666
1667
4
    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
4
}
1684
1685
4
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_Pairing>::callModule(std::shared_ptr<Module> module, operation::BLS_Pairing& op) const {
1686
4
    return module->OpBLS_Pairing(op);
1687
4
}
1688
1689
/* Specialization for operation::BLS_MillerLoop */
1690
4
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
4
    (void)module;
1692
4
    (void)op;
1693
1694
4
    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
4
}
1711
1712
4
template<> std::optional<component::Fp12> ExecutorBase<component::Fp12, operation::BLS_MillerLoop>::callModule(std::shared_ptr<Module> module, operation::BLS_MillerLoop& op) const {
1713
4
    return module->OpBLS_MillerLoop(op);
1714
4
}
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
4
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
4
    (void)module;
1747
1748
4
    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
4
}
1759
1760
4
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_HashToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG1& op) const {
1761
4
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1762
4
    return module->OpBLS_HashToG1(op);
1763
4
}
1764
1765
/* Specialization for operation::BLS_MapToG1 */
1766
6
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
6
    (void)module;
1768
1769
6
    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
6
}
1780
1781
6
template<> std::optional<component::G1> ExecutorBase<component::G1, operation::BLS_MapToG1>::callModule(std::shared_ptr<Module> module, operation::BLS_MapToG1& op) const {
1782
6
    return module->OpBLS_MapToG1(op);
1783
6
}
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
43
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
43
    (void)module;
1812
43
    (void)op;
1813
43
    (void)result;
1814
43
}
1815
1816
43
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_IsG1OnCurve>::callModule(std::shared_ptr<Module> module, operation::BLS_IsG1OnCurve& op) const {
1817
43
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1818
43
    if ( op.g1.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1819
35
    if ( op.g1.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1820
1821
32
    return module->OpBLS_IsG1OnCurve(op);
1822
35
}
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
2
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
2
    (void)module;
1901
1902
2
    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
2
}
1917
1918
2
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
2
    return module->OpBLS_Decompress_G2(op);
1920
2
}
1921
1922
/* Specialization for operation::BLS_Compress_G2 */
1923
4
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
4
    (void)module;
1925
1926
4
    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
4
}
1937
1938
4
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
4
    return module->OpBLS_Compress_G2(op);
1940
4
}
1941
1942
/* Specialization for operation::BLS_G1_Add */
1943
67
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
67
    (void)module;
1945
1946
67
    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
67
}
1957
1958
67
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
67
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1960
67
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1961
59
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1962
52
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1963
42
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1964
1965
32
    return module->OpBLS_G1_Add(op);
1966
42
}
1967
1968
/* Specialization for operation::BLS_G1_Mul */
1969
45
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
45
    (void)module;
1971
1972
45
    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
45
}
1983
1984
45
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
45
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
1986
45
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1987
41
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1988
31
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
1989
1990
21
    return module->OpBLS_G1_Mul(op);
1991
31
}
1992
1993
/* Specialization for operation::BLS_G1_IsEq */
1994
86
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
86
    (void)module;
1996
86
    (void)op;
1997
86
    (void)result;
1998
86
}
1999
2000
86
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G1_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G1_IsEq& op) const {
2001
86
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2002
86
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2003
76
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2004
68
    if ( op.b.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2005
57
    if ( op.b.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2006
2007
47
    return module->OpBLS_G1_IsEq(op);
2008
57
}
2009
2010
/* Specialization for operation::BLS_G1_Neg */
2011
43
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
43
    (void)module;
2013
2014
43
    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
43
}
2025
2026
43
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
43
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2028
43
    if ( op.a.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2029
33
    if ( op.a.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2030
2031
23
    return module->OpBLS_G1_Neg(op);
2032
33
}
2033
2034
/* Specialization for operation::BLS_G2_Add */
2035
132
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
132
    (void)module;
2037
2038
132
    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
132
}
2053
2054
132
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
132
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2056
132
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2057
122
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2058
112
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2059
107
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2060
97
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2061
91
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2062
81
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2063
71
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2064
2065
63
    return module->OpBLS_G2_Add(op);
2066
71
}
2067
2068
/* Specialization for operation::BLS_G2_Mul */
2069
68
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
68
    (void)module;
2071
2072
68
    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
68
}
2087
2088
68
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
68
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2090
68
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2091
62
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2092
57
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2093
53
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2094
42
    if ( op.b.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2095
2096
39
    return module->OpBLS_G2_Mul(op);
2097
42
}
2098
2099
/* Specialization for operation::BLS_G2_IsEq */
2100
147
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
147
    (void)module;
2102
147
    (void)op;
2103
147
    (void)result;
2104
147
}
2105
2106
147
template<> std::optional<bool> ExecutorBase<bool, operation::BLS_G2_IsEq>::callModule(std::shared_ptr<Module> module, operation::BLS_G2_IsEq& op) const {
2107
147
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2108
147
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2109
144
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2110
136
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2111
126
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2112
116
    if ( op.b.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2113
106
    if ( op.b.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2114
99
    if ( op.b.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2115
89
    if ( op.b.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2116
2117
79
    return module->OpBLS_G2_IsEq(op);
2118
89
}
2119
2120
/* Specialization for operation::BLS_G2_Neg */
2121
70
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
70
    (void)module;
2123
2124
70
    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
70
}
2139
2140
70
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
70
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2142
70
    if ( op.a.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2143
60
    if ( op.a.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2144
54
    if ( op.a.second.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2145
51
    if ( op.a.second.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2146
2147
41
    return module->OpBLS_G2_Neg(op);
2148
51
}
2149
2150
/* Specialization for operation::BLS_G1_MultiExp */
2151
70
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
70
    (void)module;
2153
2154
70
    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
70
}
2165
2166
70
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
70
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2168
2169
1.47k
    for (const auto& point_scalar : op.points_scalars.points_scalars) {
2170
1.47k
        if ( point_scalar.first.first.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2171
1.46k
        if ( point_scalar.first.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2172
1.46k
        if ( point_scalar.second.GetSize() > config::kMaxBignumSize ) return std::nullopt;
2173
1.46k
    }
2174
2175
57
    return module->OpBLS_G1_MultiExp(op);
2176
70
}
2177
2178
/* Specialization for operation::Misc */
2179
8
template<> void ExecutorBase<Buffer, operation::Misc>::postprocess(std::shared_ptr<Module> module, operation::Misc& op, const ExecutorBase<Buffer, operation::Misc>::ResultPair& result) const {
2180
8
    (void)module;
2181
8
    (void)op;
2182
8
    (void)result;
2183
8
}
2184
2185
8
template<> std::optional<Buffer> ExecutorBase<Buffer, operation::Misc>::callModule(std::shared_ptr<Module> module, operation::Misc& op) const {
2186
8
    return module->OpMisc(op);
2187
8
}
2188
2189
/* Specialization for operation::BLS_HashToG2 */
2190
6
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
6
    (void)module;
2192
2193
6
    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
6
}
2208
2209
6
template<> std::optional<component::G2> ExecutorBase<component::G2, operation::BLS_HashToG2>::callModule(std::shared_ptr<Module> module, operation::BLS_HashToG2& op) const {
2210
6
    RETURN_IF_DISABLED(options.curves, op.curveType.Get());
2211
6
    return module->OpBLS_HashToG2(op);
2212
6
}
2213
2214
ExecutorBignumCalc::ExecutorBignumCalc(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2215
161
    ExecutorBase<component::Bignum, operation::BignumCalc>::ExecutorBase(operationID, modules, options)
2216
161
{ }
2217
154
void ExecutorBignumCalc::SetModulo(const std::string& modulo) {
2218
154
    this->modulo = component::Bignum(modulo);
2219
154
}
2220
2221
ExecutorBignumCalc_Mod_BLS12_381_R::ExecutorBignumCalc_Mod_BLS12_381_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2222
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2223
7
    CF_NORET(SetModulo("52435875175126190479447740508185965837690552500527637822603658699938581184513"));
2224
7
}
2225
2226
ExecutorBignumCalc_Mod_BLS12_381_P::ExecutorBignumCalc_Mod_BLS12_381_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2227
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2228
7
    CF_NORET(SetModulo("4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787"));
2229
7
}
2230
2231
ExecutorBignumCalc_Mod_BLS12_377_R::ExecutorBignumCalc_Mod_BLS12_377_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2232
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2233
7
    CF_NORET(SetModulo("8444461749428370424248824938781546531375899335154063827935233455917409239041"));
2234
7
}
2235
2236
ExecutorBignumCalc_Mod_BLS12_377_P::ExecutorBignumCalc_Mod_BLS12_377_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2237
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2238
7
    CF_NORET(SetModulo("258664426012969094010652733694893533536393512754914660539884262666720468348340822774968888139573360124440321458177"));
2239
7
}
2240
2241
ExecutorBignumCalc_Mod_BN128_R::ExecutorBignumCalc_Mod_BN128_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2242
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2243
7
    CF_NORET(SetModulo("21888242871839275222246405745257275088548364400416034343698204186575808495617"));
2244
7
}
2245
2246
ExecutorBignumCalc_Mod_BN128_P::ExecutorBignumCalc_Mod_BN128_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2247
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2248
7
    CF_NORET(SetModulo("21888242871839275222246405745257275088696311157297823662689037894645226208583"));
2249
7
}
2250
2251
ExecutorBignumCalc_Mod_Vesta_R::ExecutorBignumCalc_Mod_Vesta_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2252
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2253
7
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941560715954676764349967630337"));
2254
7
}
2255
2256
ExecutorBignumCalc_Mod_Vesta_P::ExecutorBignumCalc_Mod_Vesta_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2257
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2258
7
    CF_NORET(SetModulo("28948022309329048855892746252171976963363056481941647379679742748393362948097"));
2259
7
}
2260
2261
ExecutorBignumCalc_Mod_ED25519::ExecutorBignumCalc_Mod_ED25519(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2262
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2263
7
    CF_NORET(SetModulo("57896044618658097711785492504343953926634992332820282019728792003956564819949"));
2264
7
}
2265
2266
ExecutorBignumCalc_Mod_Edwards_R::ExecutorBignumCalc_Mod_Edwards_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2267
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2268
7
    CF_NORET(SetModulo("1552511030102430251236801561344621993261920897571225601"));
2269
7
}
2270
2271
ExecutorBignumCalc_Mod_Edwards_P::ExecutorBignumCalc_Mod_Edwards_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2272
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2273
7
    CF_NORET(SetModulo("6210044120409721004947206240885978274523751269793792001"));
2274
7
}
2275
2276
ExecutorBignumCalc_Mod_Goldilocks::ExecutorBignumCalc_Mod_Goldilocks(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2277
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2278
7
    CF_NORET(SetModulo("18446744069414584321"));
2279
7
}
2280
2281
ExecutorBignumCalc_Mod_MNT4_R::ExecutorBignumCalc_Mod_MNT4_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2282
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2283
7
    CF_NORET(SetModulo("475922286169261325753349249653048451545124878552823515553267735739164647307408490559963137"));
2284
7
}
2285
2286
ExecutorBignumCalc_Mod_MNT4_P::ExecutorBignumCalc_Mod_MNT4_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2287
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2288
7
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2289
7
}
2290
2291
ExecutorBignumCalc_Mod_MNT6_R::ExecutorBignumCalc_Mod_MNT6_R(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2292
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2293
7
    CF_NORET(SetModulo("475922286169261325753349249653048451545124879242694725395555128576210262817955800483758081"));
2294
7
}
2295
2296
ExecutorBignumCalc_Mod_MNT6_P::ExecutorBignumCalc_Mod_MNT6_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2297
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2298
7
    CF_NORET(SetModulo("237961143084630662876674624826524225772562439621347362697777564288105131408977900241879040"));
2299
7
}
2300
2301
ExecutorBignumCalc_Mod_2Exp64::ExecutorBignumCalc_Mod_2Exp64(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2302
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2303
7
    CF_NORET(SetModulo("18446744073709551616"));
2304
7
}
2305
2306
ExecutorBignumCalc_Mod_2Exp128::ExecutorBignumCalc_Mod_2Exp128(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2307
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2308
7
    CF_NORET(SetModulo("340282366920938463463374607431768211456"));
2309
7
}
2310
2311
ExecutorBignumCalc_Mod_2Exp256::ExecutorBignumCalc_Mod_2Exp256(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2312
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2313
7
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007913129639936"));
2314
7
}
2315
2316
ExecutorBignumCalc_Mod_2Exp512::ExecutorBignumCalc_Mod_2Exp512(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2317
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2318
7
    CF_NORET(SetModulo("13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096"));
2319
7
}
2320
2321
ExecutorBignumCalc_Mod_SECP256K1::ExecutorBignumCalc_Mod_SECP256K1(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2322
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2323
7
    CF_NORET(SetModulo("115792089237316195423570985008687907852837564279074904382605163141518161494337"));
2324
7
}
2325
2326
ExecutorBignumCalc_Mod_SECP256K1_P::ExecutorBignumCalc_Mod_SECP256K1_P(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2327
7
    ExecutorBignumCalc::ExecutorBignumCalc(operationID, modules, options) {
2328
7
    CF_NORET(SetModulo("115792089237316195423570985008687907853269984665640564039457584007908834671663"));
2329
7
}
2330
2331
ExecutorBignumCalc_Fp2::ExecutorBignumCalc_Fp2(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2332
7
    ExecutorBase<component::Fp2, operation::BignumCalc_Fp2>::ExecutorBase(operationID, modules, options)
2333
7
{ }
2334
0
void ExecutorBignumCalc_Fp2::SetModulo(const std::string& modulo) {
2335
0
    this->modulo = component::Bignum(modulo);
2336
0
}
2337
2338
ExecutorBignumCalc_Fp12::ExecutorBignumCalc_Fp12(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2339
7
    ExecutorBase<component::Fp12, operation::BignumCalc_Fp12>::ExecutorBase(operationID, modules, options)
2340
7
{ }
2341
0
void ExecutorBignumCalc_Fp12::SetModulo(const std::string& modulo) {
2342
0
    this->modulo = component::Bignum(modulo);
2343
0
}
2344
2345
template <class ResultType, class OperationType>
2346
ExecutorBase<ResultType, OperationType>::ExecutorBase(const uint64_t operationID, const std::map<uint64_t, std::shared_ptr<Module> >& modules, const Options& options) :
2347
749
    operationID(operationID),
2348
749
    modules(modules),
2349
749
    options(options)
2350
749
{
2351
749
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
161
    operationID(operationID),
2348
161
    modules(modules),
2349
161
    options(options)
2350
161
{
2351
161
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::ExecutorBase(unsigned long, std::__1::map<unsigned long, std::__1::shared_ptr<cryptofuzz::Module>, std::__1::less<unsigned long>, std::__1::allocator<std::__1::pair<unsigned long const, std::__1::shared_ptr<cryptofuzz::Module> > > > const&, cryptofuzz::Options const&)
Line
Count
Source
2347
7
    operationID(operationID),
2348
7
    modules(modules),
2349
7
    options(options)
2350
7
{
2351
7
}
2352
2353
/* Specialization for operation::SR25519_Verify */
2354
11
template<> void ExecutorBase<bool, operation::SR25519_Verify>::postprocess(std::shared_ptr<Module> module, operation::SR25519_Verify& op, const ExecutorBase<bool, operation::SR25519_Verify>::ResultPair& result) const {
2355
11
    (void)module;
2356
11
    (void)op;
2357
11
    (void)result;
2358
11
}
2359
2360
11
template<> std::optional<bool> ExecutorBase<bool, operation::SR25519_Verify>::callModule(std::shared_ptr<Module> module, operation::SR25519_Verify& op) const {
2361
11
    return module->OpSR25519_Verify(op);
2362
11
}
2363
2364
template <class ResultType, class OperationType>
2365
749
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
749
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_HKDF>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SP_800_108>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECGDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECRDSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECRDSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::Schnorr_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECDSA_Recover>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::~ExecutorBase()
Line
Count
Source
2365
161
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
161
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::~ExecutorBase()
Line
Count
Source
2365
7
ExecutorBase<ResultType, OperationType>::~ExecutorBase() {
2366
7
}
2367
2368
/* Filter away the values in the set that are std::nullopt */
2369
template <class ResultType, class OperationType>
2370
20.3k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
20.3k
    ResultSet ret;
2372
2373
60.5k
    for (const auto& result : results) {
2374
60.5k
        if ( result.second == std::nullopt ) {
2375
37.6k
            continue;
2376
37.6k
        }
2377
2378
22.9k
        ret.push_back(result);
2379
22.9k
    }
2380
2381
20.3k
    return ret;
2382
20.3k
}
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
62
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
62
    ResultSet ret;
2372
2373
367
    for (const auto& result : results) {
2374
367
        if ( result.second == std::nullopt ) {
2375
50
            continue;
2376
50
        }
2377
2378
317
        ret.push_back(result);
2379
317
    }
2380
2381
62
    return ret;
2382
62
}
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
60
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
60
    ResultSet ret;
2372
2373
444
    for (const auto& result : results) {
2374
444
        if ( result.second == std::nullopt ) {
2375
218
            continue;
2376
218
        }
2377
2378
226
        ret.push_back(result);
2379
226
    }
2380
2381
60
    return ret;
2382
60
}
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
75
    for (const auto& result : results) {
2374
75
        if ( result.second == std::nullopt ) {
2375
75
            continue;
2376
75
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
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
31
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
31
    ResultSet ret;
2372
2373
284
    for (const auto& result : results) {
2374
284
        if ( result.second == std::nullopt ) {
2375
158
            continue;
2376
158
        }
2377
2378
126
        ret.push_back(result);
2379
126
    }
2380
2381
31
    return ret;
2382
31
}
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
220
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
220
    ResultSet ret;
2372
2373
1.81k
    for (const auto& result : results) {
2374
1.81k
        if ( result.second == std::nullopt ) {
2375
1.00k
            continue;
2376
1.00k
        }
2377
2378
812
        ret.push_back(result);
2379
812
    }
2380
2381
220
    return ret;
2382
220
}
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
86
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
86
    ResultSet ret;
2372
2373
679
    for (const auto& result : results) {
2374
679
        if ( result.second == std::nullopt ) {
2375
488
            continue;
2376
488
        }
2377
2378
191
        ret.push_back(result);
2379
191
    }
2380
2381
86
    return ret;
2382
86
}
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
40
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
40
    ResultSet ret;
2372
2373
301
    for (const auto& result : results) {
2374
301
        if ( result.second == std::nullopt ) {
2375
222
            continue;
2376
222
        }
2377
2378
79
        ret.push_back(result);
2379
79
    }
2380
2381
40
    return ret;
2382
40
}
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
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
7
    ResultSet ret;
2372
2373
76
    for (const auto& result : results) {
2374
76
        if ( result.second == std::nullopt ) {
2375
76
            continue;
2376
76
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
7
    return ret;
2382
7
}
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
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
7
    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
7
    return ret;
2382
7
}
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
6
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
6
    ResultSet ret;
2372
2373
81
    for (const auto& result : results) {
2374
81
        if ( result.second == std::nullopt ) {
2375
81
            continue;
2376
81
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
6
    return ret;
2382
6
}
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
33
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
33
    ResultSet ret;
2372
2373
283
    for (const auto& result : results) {
2374
283
        if ( result.second == std::nullopt ) {
2375
119
            continue;
2376
119
        }
2377
2378
164
        ret.push_back(result);
2379
164
    }
2380
2381
33
    return ret;
2382
33
}
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
2
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2
    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
2
    return ret;
2382
2
}
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
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
7
    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
7
    return ret;
2382
7
}
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
95
    for (const auto& result : results) {
2374
95
        if ( result.second == std::nullopt ) {
2375
95
            continue;
2376
95
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
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
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
}
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
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
11
    ResultSet ret;
2372
2373
117
    for (const auto& result : results) {
2374
117
        if ( result.second == std::nullopt ) {
2375
117
            continue;
2376
117
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
11
    return ret;
2382
11
}
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
7
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
7
    ResultSet ret;
2372
2373
88
    for (const auto& result : results) {
2374
88
        if ( result.second == std::nullopt ) {
2375
88
            continue;
2376
88
        }
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_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
61
    for (const auto& result : results) {
2374
61
        if ( result.second == std::nullopt ) {
2375
61
            continue;
2376
61
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
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
1.39k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.39k
    ResultSet ret;
2372
2373
3.85k
    for (const auto& result : results) {
2374
3.85k
        if ( result.second == std::nullopt ) {
2375
2.23k
            continue;
2376
2.23k
        }
2377
2378
1.62k
        ret.push_back(result);
2379
1.62k
    }
2380
2381
1.39k
    return ret;
2382
1.39k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<bool> > > > const&) const
Line
Count
Source
2370
1.04k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.04k
    ResultSet ret;
2372
2373
2.80k
    for (const auto& result : results) {
2374
2.80k
        if ( result.second == std::nullopt ) {
2375
2.08k
            continue;
2376
2.08k
        }
2377
2378
717
        ret.push_back(result);
2379
717
    }
2380
2381
1.04k
    return ret;
2382
1.04k
}
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
260
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
260
    ResultSet ret;
2372
2373
745
    for (const auto& result : results) {
2374
745
        if ( result.second == std::nullopt ) {
2375
745
            continue;
2376
745
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
260
    return ret;
2382
260
}
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.67k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
2.67k
    ResultSet ret;
2372
2373
7.76k
    for (const auto& result : results) {
2374
7.76k
        if ( result.second == std::nullopt ) {
2375
2.72k
            continue;
2376
2.72k
        }
2377
2378
5.03k
        ret.push_back(result);
2379
5.03k
    }
2380
2381
2.67k
    return ret;
2382
2.67k
}
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
3
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3
    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
3
    return ret;
2382
3
}
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
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<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
142
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
142
    ResultSet ret;
2372
2373
427
    for (const auto& result : results) {
2374
427
        if ( result.second == std::nullopt ) {
2375
427
            continue;
2376
427
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
142
    return ret;
2382
142
}
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.44k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.44k
    ResultSet ret;
2372
2373
4.04k
    for (const auto& result : results) {
2374
4.04k
        if ( result.second == std::nullopt ) {
2375
2.15k
            continue;
2376
2.15k
        }
2377
2378
1.89k
        ret.push_back(result);
2379
1.89k
    }
2380
2381
1.44k
    return ret;
2382
1.44k
}
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
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
}
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
6
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
6
    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
6
    return ret;
2382
6
}
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
3
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3
    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
3
    return ret;
2382
3
}
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
310
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
310
    ResultSet ret;
2372
2373
915
    for (const auto& result : results) {
2374
915
        if ( result.second == std::nullopt ) {
2375
786
            continue;
2376
786
        }
2377
2378
129
        ret.push_back(result);
2379
129
    }
2380
2381
310
    return ret;
2382
310
}
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
403
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
403
    ResultSet ret;
2372
2373
1.16k
    for (const auto& result : results) {
2374
1.16k
        if ( result.second == std::nullopt ) {
2375
1.14k
            continue;
2376
1.14k
        }
2377
2378
24
        ret.push_back(result);
2379
24
    }
2380
2381
403
    return ret;
2382
403
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
1.02k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.02k
    ResultSet ret;
2372
2373
2.86k
    for (const auto& result : results) {
2374
2.86k
        if ( result.second == std::nullopt ) {
2375
2.69k
            continue;
2376
2.69k
        }
2377
2378
171
        ret.push_back(result);
2379
171
    }
2380
2381
1.02k
    return ret;
2382
1.02k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
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::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
825
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
825
    ResultSet ret;
2372
2373
2.32k
    for (const auto& result : results) {
2374
2.32k
        if ( result.second == std::nullopt ) {
2375
2.12k
            continue;
2376
2.12k
        }
2377
2378
191
        ret.push_back(result);
2379
191
    }
2380
2381
825
    return ret;
2382
825
}
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
10
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
10
    ResultSet ret;
2372
2373
27
    for (const auto& result : results) {
2374
27
        if ( result.second == std::nullopt ) {
2375
17
            continue;
2376
17
        }
2377
2378
10
        ret.push_back(result);
2379
10
    }
2380
2381
10
    return ret;
2382
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
1.31k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
1.31k
    ResultSet ret;
2372
2373
3.46k
    for (const auto& result : results) {
2374
3.46k
        if ( result.second == std::nullopt ) {
2375
3.34k
            continue;
2376
3.34k
        }
2377
2378
117
        ret.push_back(result);
2379
117
    }
2380
2381
1.31k
    return ret;
2382
1.31k
}
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
9
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
9
    ResultSet ret;
2372
2373
23
    for (const auto& result : results) {
2374
23
        if ( result.second == std::nullopt ) {
2375
16
            continue;
2376
16
        }
2377
2378
7
        ret.push_back(result);
2379
7
    }
2380
2381
9
    return ret;
2382
9
}
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
581
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
581
    ResultSet ret;
2372
2373
1.63k
    for (const auto& result : results) {
2374
1.63k
        if ( result.second == std::nullopt ) {
2375
1.52k
            continue;
2376
1.52k
        }
2377
2378
104
        ret.push_back(result);
2379
104
    }
2380
2381
581
    return ret;
2382
581
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::Bignum> > > > const&) const
Line
Count
Source
2370
7.80k
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
7.80k
    ResultSet ret;
2372
2373
22.1k
    for (const auto& result : results) {
2374
22.1k
        if ( result.second == std::nullopt ) {
2375
11.1k
            continue;
2376
11.1k
        }
2377
2378
10.9k
        ret.push_back(result);
2379
10.9k
    }
2380
2381
7.80k
    return ret;
2382
7.80k
}
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
35
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
35
    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
35
    return ret;
2382
35
}
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
165
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
165
    ResultSet ret;
2372
2373
472
    for (const auto& result : results) {
2374
472
        if ( result.second == std::nullopt ) {
2375
472
            continue;
2376
472
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
165
    return ret;
2382
165
}
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
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_PrivateToPublic_G2>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::G2> > > > const&) const
Line
Count
Source
2370
5
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
5
    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
5
    return ret;
2382
5
}
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
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::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
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<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
3
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
3
    ResultSet ret;
2372
2373
9
    for (const auto& result : results) {
2374
9
        if ( result.second == std::nullopt ) {
2375
9
            continue;
2376
9
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
3
    return ret;
2382
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::filter(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&) const
Line
Count
Source
2370
4
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
4
    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
4
    return ret;
2382
4
}
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
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::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
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
}
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
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
}
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
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
}
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
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
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
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<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
15
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
15
    ResultSet ret;
2372
2373
33
    for (const auto& result : results) {
2374
33
        if ( result.second == std::nullopt ) {
2375
33
            continue;
2376
33
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
15
    return ret;
2382
15
}
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
41
    for (const auto& result : results) {
2374
41
        if ( result.second == std::nullopt ) {
2375
41
            continue;
2376
41
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
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
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_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
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
}
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
17
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
17
    ResultSet ret;
2372
2373
45
    for (const auto& result : results) {
2374
45
        if ( result.second == std::nullopt ) {
2375
45
            continue;
2376
45
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
17
    return ret;
2382
17
}
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
12
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
12
    ResultSet ret;
2372
2373
30
    for (const auto& result : results) {
2374
30
        if ( result.second == std::nullopt ) {
2375
30
            continue;
2376
30
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
12
    return ret;
2382
12
}
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
26
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
26
    ResultSet ret;
2372
2373
66
    for (const auto& result : results) {
2374
66
        if ( result.second == std::nullopt ) {
2375
66
            continue;
2376
66
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
26
    return ret;
2382
26
}
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
11
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
11
    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
11
    return ret;
2382
11
}
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
109
    for (const auto& result : results) {
2374
109
        if ( result.second == std::nullopt ) {
2375
109
            continue;
2376
109
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
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
21
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
21
    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
21
    return ret;
2382
21
}
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
46
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
46
    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
46
    return ret;
2382
46
}
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
45
    for (const auto& result : results) {
2374
45
        if ( result.second == std::nullopt ) {
2375
45
            continue;
2376
45
        }
2377
2378
0
        ret.push_back(result);
2379
0
    }
2380
2381
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
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<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
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
}
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
5
typename ExecutorBase<ResultType, OperationType>::ResultSet ExecutorBase<ResultType, OperationType>::filter(const ResultSet& results) const {
2371
5
    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
5
    return ret;
2382
5
}
2383
2384
/* Do not compare ECC_GenerateKeyPair results, because the result can be produced indeterministically */
2385
template <>
2386
6.40k
void ExecutorBase<component::ECC_KeyPair, operation::ECC_GenerateKeyPair>::compare(const std::vector< std::pair<std::shared_ptr<Module>, operation::ECC_GenerateKeyPair> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2387
6.40k
    (void)operations;
2388
6.40k
    (void)results;
2389
6.40k
    (void)data;
2390
6.40k
    (void)size;
2391
6.40k
}
2392
2393
template <class ResultType, class OperationType>
2394
1.78k
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
1.78k
    (void)operation;
2396
2397
1.78k
    return false;
2398
1.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::dontCompare(cryptofuzz::operation::Digest const&) const
Line
Count
Source
2394
59
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
59
    (void)operation;
2396
2397
59
    return false;
2398
59
}
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
21
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
21
    (void)operation;
2396
2397
21
    return false;
2398
21
}
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
22
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
22
    (void)operation;
2396
2397
22
    return false;
2398
22
}
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
574
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
574
    (void)operation;
2396
2397
574
    return false;
2398
574
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::dontCompare(cryptofuzz::operation::ECC_ValidatePubkey const&) const
Line
Count
Source
2394
243
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
243
    (void)operation;
2396
2397
243
    return false;
2398
243
}
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
628
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
628
    (void)operation;
2396
2397
628
    return false;
2398
628
}
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
39
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
39
    (void)operation;
2396
2397
39
    return false;
2398
39
}
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
8
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
8
    (void)operation;
2396
2397
8
    return false;
2398
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::dontCompare(cryptofuzz::operation::ECC_Point_Add const&) const
Line
Count
Source
2394
53
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
53
    (void)operation;
2396
2397
53
    return false;
2398
53
}
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
61
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
61
    (void)operation;
2396
2397
61
    return false;
2398
61
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::dontCompare(cryptofuzz::operation::ECC_Point_Neg const&) const
Line
Count
Source
2394
4
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
4
    (void)operation;
2396
2397
4
    return false;
2398
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::dontCompare(cryptofuzz::operation::ECC_Point_Dbl 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<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
34
bool ExecutorBase<ResultType, OperationType>::dontCompare(const OperationType& operation) const {
2395
34
    (void)operation;
2396
2397
34
    return false;
2398
34
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::dontCompare(cryptofuzz::operation::BignumCalc_Fp2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::dontCompare(cryptofuzz::operation::BignumCalc_Fp12 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::dontCompare(cryptofuzz::operation::BLS_PrivateToPublic_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::dontCompare(cryptofuzz::operation::BLS_Sign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_Verify>::dontCompare(cryptofuzz::operation::BLS_Verify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_BatchSignature, cryptofuzz::operation::BLS_BatchSign>::dontCompare(cryptofuzz::operation::BLS_BatchSign const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::dontCompare(cryptofuzz::operation::BLS_BatchVerify const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::dontCompare(cryptofuzz::operation::BLS_Aggregate_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::dontCompare(cryptofuzz::operation::BLS_Pairing const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::dontCompare(cryptofuzz::operation::BLS_MillerLoop const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_FinalExp>::dontCompare(cryptofuzz::operation::BLS_FinalExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_HashToG1>::dontCompare(cryptofuzz::operation::BLS_HashToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::dontCompare(cryptofuzz::operation::BLS_HashToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_MapToG1>::dontCompare(cryptofuzz::operation::BLS_MapToG1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_MapToG2>::dontCompare(cryptofuzz::operation::BLS_MapToG2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG1OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG1OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::dontCompare(cryptofuzz::operation::BLS_IsG2OnCurve const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_KeyPair, cryptofuzz::operation::BLS_GenerateKeyPair>::dontCompare(cryptofuzz::operation::BLS_GenerateKeyPair const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::dontCompare(cryptofuzz::operation::BLS_Decompress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::dontCompare(cryptofuzz::operation::BLS_Compress_G1 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::dontCompare(cryptofuzz::operation::BLS_Decompress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::dontCompare(cryptofuzz::operation::BLS_Compress_G2 const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::dontCompare(cryptofuzz::operation::BLS_G1_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::dontCompare(cryptofuzz::operation::BLS_G1_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::dontCompare(cryptofuzz::operation::BLS_G1_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::dontCompare(cryptofuzz::operation::BLS_G1_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::dontCompare(cryptofuzz::operation::BLS_G2_Add const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::dontCompare(cryptofuzz::operation::BLS_G2_Mul const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::dontCompare(cryptofuzz::operation::BLS_G2_IsEq const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::dontCompare(cryptofuzz::operation::BLS_G2_Neg const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::dontCompare(cryptofuzz::operation::BLS_G1_MultiExp const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::dontCompare(cryptofuzz::operation::Misc const&) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::SR25519_Verify>::dontCompare(cryptofuzz::operation::SR25519_Verify const&) const
2399
2400
template <>
2401
3.70k
bool ExecutorBase<component::Bignum, operation::BignumCalc>::dontCompare(const operation::BignumCalc& operation) const {
2402
3.70k
    if ( operation.calcOp.Get() == CF_CALCOP("Rand()") ) { return true; }
2403
3.67k
    if ( operation.calcOp.Get() == CF_CALCOP("RandMod(A)") ) { return true; }
2404
3.67k
    if ( operation.calcOp.Get() == CF_CALCOP("Prime()") ) { return true; }
2405
3.56k
    if ( operation.calcOp.Get() == CF_CALCOP("RandRange(A,B)") ) { return true; }
2406
2407
3.56k
    return false;
2408
3.56k
}
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.69k
bool ExecutorBase<component::ECDSA_Signature, operation::ECDSA_Sign>::dontCompare(const operation::ECDSA_Sign& operation) const {
2418
1.69k
    if (
2419
1.69k
            operation.curveType.Get() != CF_ECC_CURVE("ed25519") &&
2420
1.31k
            operation.curveType.Get() != CF_ECC_CURVE("ed448") ) {
2421
735
        if ( operation.UseRandomNonce() ) {
2422
            /* Don't compare ECDSA signatures comptued from a randomly generated nonce */
2423
488
            return true;
2424
488
        }
2425
735
    }
2426
2427
1.20k
    return false;
2428
1.69k
}
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
100
bool ExecutorBase<component::Ciphertext, operation::SymmetricEncrypt>::dontCompare(const operation::SymmetricEncrypt& operation) const {
2461
100
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) { return true; }
2462
2463
100
    return false;
2464
100
}
2465
2466
template <>
2467
20
bool ExecutorBase<component::Cleartext, operation::SymmetricDecrypt>::dontCompare(const operation::SymmetricDecrypt& operation) const {
2468
20
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2469
2470
20
    return false;
2471
20
}
2472
2473
template <>
2474
13
bool ExecutorBase<component::MAC, operation::CMAC>::dontCompare(const operation::CMAC& operation) const {
2475
13
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2476
2477
13
    return false;
2478
13
}
2479
2480
template <>
2481
43
bool ExecutorBase<component::MAC, operation::HMAC>::dontCompare(const operation::HMAC& operation) const {
2482
43
    if ( operation.cipher.cipherType.Get() == CF_CIPHER("DES_EDE3_WRAP") ) return true;
2483
2484
43
    return false;
2485
43
}
2486
2487
template <class ResultType, class OperationType>
2488
67.4k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
67.4k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
47.1k
        return;
2492
47.1k
    }
2493
2494
20.3k
    const auto filtered = filter(results);
2495
2496
20.3k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
13.0k
        return;
2499
13.0k
    }
2500
2501
7.36k
    if ( dontCompare(operations[0].second) == true ) {
2502
625
        return;
2503
625
    }
2504
2505
20.1k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
13.4k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
13.4k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
13.4k
        const bool equal = *prev == *cur;
2510
2511
13.4k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
13.4k
    }
2528
6.73k
}
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
82
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
82
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
20
        return;
2492
20
    }
2493
2494
62
    const auto filtered = filter(results);
2495
2496
62
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
3
        return;
2499
3
    }
2500
2501
59
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
317
    for (size_t i = 1; i < filtered.size(); i++) {
2506
258
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
258
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
258
        const bool equal = *prev == *cur;
2510
2511
258
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
258
    }
2528
59
}
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
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
11
        return;
2492
11
    }
2493
2494
60
    const auto filtered = filter(results);
2495
2496
60
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
17
        return;
2499
17
    }
2500
2501
43
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
226
    for (size_t i = 1; i < filtered.size(); i++) {
2506
183
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
183
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
183
        const bool equal = *prev == *cur;
2510
2511
183
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
183
    }
2528
43
}
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
64
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
64
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
33
        return;
2492
33
    }
2493
2494
31
    const auto filtered = filter(results);
2495
2496
31
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
18
        return;
2499
18
    }
2500
2501
13
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
126
    for (size_t i = 1; i < filtered.size(); i++) {
2506
113
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
113
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
113
        const bool equal = *prev == *cur;
2510
2511
113
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
113
    }
2528
13
}
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
336
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
336
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
116
        return;
2492
116
    }
2493
2494
220
    const auto filtered = filter(results);
2495
2496
220
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
120
        return;
2499
120
    }
2500
2501
100
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
812
    for (size_t i = 1; i < filtered.size(); i++) {
2506
712
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
712
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
712
        const bool equal = *prev == *cur;
2510
2511
712
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
712
    }
2528
100
}
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
150
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
150
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
64
        return;
2492
64
    }
2493
2494
86
    const auto filtered = filter(results);
2495
2496
86
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
66
        return;
2499
66
    }
2500
2501
20
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
191
    for (size_t i = 1; i < filtered.size(); i++) {
2506
171
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
171
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
171
        const bool equal = *prev == *cur;
2510
2511
171
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
171
    }
2528
20
}
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
72
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
72
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
32
        return;
2492
32
    }
2493
2494
40
    const auto filtered = filter(results);
2495
2496
40
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
19
        return;
2499
19
    }
2500
2501
21
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
79
    for (size_t i = 1; i < filtered.size(); i++) {
2506
58
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
58
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
58
        const bool equal = *prev == *cur;
2510
2511
58
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
58
    }
2528
21
}
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
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
1
        return;
2492
1
    }
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_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
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_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
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_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
55
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
55
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
22
        return;
2492
22
    }
2493
2494
33
    const auto filtered = filter(results);
2495
2496
33
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
11
        return;
2499
11
    }
2500
2501
22
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
164
    for (size_t i = 1; i < filtered.size(); i++) {
2506
142
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
142
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
142
        const bool equal = *prev == *cur;
2510
2511
142
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
142
    }
2528
22
}
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
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::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
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_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
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::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
11
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
11
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
0
        return;
2492
0
    }
2493
2494
11
    const auto filtered = filter(results);
2495
2496
11
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
11
        return;
2499
11
    }
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
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_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
5.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
5.82k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
4.43k
        return;
2492
4.43k
    }
2493
2494
1.39k
    const auto filtered = filter(results);
2495
2496
1.39k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
822
        return;
2499
822
    }
2500
2501
574
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.54k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
973
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
973
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
973
        const bool equal = *prev == *cur;
2510
2511
973
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
973
    }
2528
574
}
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
3.45k
void ExecutorBase<ResultType, OperationType>::compare(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.45k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2.41k
        return;
2492
2.41k
    }
2493
2494
1.04k
    const auto filtered = filter(results);
2495
2496
1.04k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
797
        return;
2499
797
    }
2500
2501
243
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
676
    for (size_t i = 1; i < filtered.size(); i++) {
2506
433
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
433
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
433
        const bool equal = *prev == *cur;
2510
2511
433
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
433
    }
2528
243
}
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
326
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
326
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
66
        return;
2492
66
    }
2493
2494
260
    const auto filtered = filter(results);
2495
2496
260
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
260
        return;
2499
260
    }
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
4.90k
void ExecutorBase<ResultType, OperationType>::compare(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.90k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
2.22k
        return;
2492
2.22k
    }
2493
2494
2.67k
    const auto filtered = filter(results);
2495
2496
2.67k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
981
        return;
2499
981
    }
2500
2501
1.69k
    if ( dontCompare(operations[0].second) == true ) {
2502
488
        return;
2503
488
    }
2504
2505
3.58k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
2.37k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
2.37k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
2.37k
        const bool equal = *prev == *cur;
2510
2511
2.37k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
2.37k
    }
2528
1.20k
}
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
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
2
        return;
2492
2
    }
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::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
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::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
160
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
160
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
18
        return;
2492
18
    }
2493
2494
142
    const auto filtered = filter(results);
2495
2496
142
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
142
        return;
2499
142
    }
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.58k
void ExecutorBase<ResultType, OperationType>::compare(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.58k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.14k
        return;
2492
1.14k
    }
2493
2494
1.44k
    const auto filtered = filter(results);
2495
2496
1.44k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
818
        return;
2499
818
    }
2500
2501
628
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
1.73k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
1.10k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
1.10k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
1.10k
        const bool equal = *prev == *cur;
2510
2511
1.10k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
1.10k
    }
2528
628
}
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
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<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
12
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
12
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
6
        return;
2492
6
    }
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::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
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::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
472
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
472
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
162
        return;
2492
162
    }
2493
2494
310
    const auto filtered = filter(results);
2495
2496
310
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
271
        return;
2499
271
    }
2500
2501
39
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
117
    for (size_t i = 1; i < filtered.size(); i++) {
2506
78
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
78
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
78
        const bool equal = *prev == *cur;
2510
2511
78
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
78
    }
2528
39
}
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
573
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
573
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
170
        return;
2492
170
    }
2493
2494
403
    const auto filtered = filter(results);
2495
2496
403
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
395
        return;
2499
395
    }
2500
2501
8
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
18
    for (size_t i = 1; i < filtered.size(); i++) {
2506
10
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
10
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
10
        const bool equal = *prev == *cur;
2510
2511
10
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
10
    }
2528
8
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Add> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
2.03k
void ExecutorBase<ResultType, OperationType>::compare(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.03k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.01k
        return;
2492
1.01k
    }
2493
2494
1.02k
    const auto filtered = filter(results);
2495
2496
1.02k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
967
        return;
2499
967
    }
2500
2501
53
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
162
    for (size_t i = 1; i < filtered.size(); i++) {
2506
109
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
109
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
109
        const bool equal = *prev == *cur;
2510
2511
109
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
109
    }
2528
53
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::compare(std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, cryptofuzz::operation::ECC_Point_Sub> > > const&, std::__1::vector<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> >, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<cryptofuzz::Module>, std::__1::optional<cryptofuzz::component::BignumPair> > > > const&, unsigned char const*, unsigned long) const
Line
Count
Source
2488
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::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
2.60k
void ExecutorBase<ResultType, OperationType>::compare(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.60k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
1.78k
        return;
2492
1.78k
    }
2493
2494
825
    const auto filtered = filter(results);
2495
2496
825
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
764
        return;
2499
764
    }
2500
2501
61
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
183
    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
61
}
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
26
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
26
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
16
        return;
2492
16
    }
2493
2494
10
    const auto filtered = filter(results);
2495
2496
10
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
6
        return;
2499
6
    }
2500
2501
4
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
10
    for (size_t i = 1; i < filtered.size(); i++) {
2506
6
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
6
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
6
        const bool equal = *prev == *cur;
2510
2511
6
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
6
    }
2528
4
}
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
4.72k
void ExecutorBase<ResultType, OperationType>::compare(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.72k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
3.41k
        return;
2492
3.41k
    }
2493
2494
1.31k
    const auto filtered = filter(results);
2495
2496
1.31k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
1.27k
        return;
2499
1.27k
    }
2500
2501
36
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
105
    for (size_t i = 1; i < filtered.size(); i++) {
2506
69
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
69
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
69
        const bool equal = *prev == *cur;
2510
2511
69
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
69
    }
2528
36
}
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
22
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
22
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
13
        return;
2492
13
    }
2493
2494
9
    const auto filtered = filter(results);
2495
2496
9
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
7
        return;
2499
7
    }
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
923
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
923
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
342
        return;
2492
342
    }
2493
2494
581
    const auto filtered = filter(results);
2495
2496
581
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
547
        return;
2499
547
    }
2500
2501
34
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
100
    for (size_t i = 1; i < filtered.size(); i++) {
2506
66
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
66
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
66
        const bool equal = *prev == *cur;
2510
2511
66
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
66
    }
2528
34
}
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
37.0k
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
37.0k
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
29.2k
        return;
2492
29.2k
    }
2493
2494
7.80k
    const auto filtered = filter(results);
2495
2496
7.80k
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
4.09k
        return;
2499
4.09k
    }
2500
2501
3.70k
    if ( dontCompare(operations[0].second) == true ) {
2502
137
        return;
2503
137
    }
2504
2505
10.0k
    for (size_t i = 1; i < filtered.size(); i++) {
2506
6.47k
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
6.47k
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
6.47k
        const bool equal = *prev == *cur;
2510
2511
6.47k
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
6.47k
    }
2528
3.56k
}
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
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
35
        return;
2499
35
    }
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
279
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
279
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
114
        return;
2492
114
    }
2493
2494
165
    const auto filtered = filter(results);
2495
2496
165
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
165
        return;
2499
165
    }
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
11
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
11
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
6
        return;
2492
6
    }
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::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
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
3
        return;
2492
3
    }
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::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
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<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
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::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
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::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
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::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
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::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
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::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
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_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
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_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
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
10
        return;
2492
10
    }
2493
2494
15
    const auto filtered = filter(results);
2495
2496
15
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
15
        return;
2499
15
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
21
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
21
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
7
        return;
2492
7
    }
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
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::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
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_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
39
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
39
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
22
        return;
2492
22
    }
2493
2494
17
    const auto filtered = filter(results);
2495
2496
17
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
17
        return;
2499
17
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_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
27
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
27
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
15
        return;
2492
15
    }
2493
2494
12
    const auto filtered = filter(results);
2495
2496
12
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
12
        return;
2499
12
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<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
46
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
46
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
20
        return;
2492
20
    }
2493
2494
26
    const auto filtered = filter(results);
2495
2496
26
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
26
        return;
2499
26
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::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
26
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
26
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
15
        return;
2492
15
    }
2493
2494
11
    const auto filtered = filter(results);
2495
2496
11
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
11
        return;
2499
11
    }
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
66
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
66
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
23
        return;
2492
23
    }
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
39
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
39
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
18
        return;
2492
18
    }
2493
2494
21
    const auto filtered = filter(results);
2495
2496
21
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
21
        return;
2499
21
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_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
78
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
78
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
32
        return;
2492
32
    }
2493
2494
46
    const auto filtered = filter(results);
2495
2496
46
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
46
        return;
2499
46
    }
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
44
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
44
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
25
        return;
2492
25
    }
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
36
void ExecutorBase<ResultType, OperationType>::compare(const std::vector< std::pair<std::shared_ptr<Module>, OperationType> >& operations, const ResultSet& results, const uint8_t* data, const size_t size) const {
2489
36
    if ( results.size() < 2 ) {
2490
        /* Nothing to compare. Don't even bother filtering. */
2491
13
        return;
2492
13
    }
2493
2494
23
    const auto filtered = filter(results);
2495
2496
23
    if ( filtered.size() < 2 ) {
2497
        /* Nothing to compare */
2498
23
        return;
2499
23
    }
2500
2501
0
    if ( dontCompare(operations[0].second) == true ) {
2502
0
        return;
2503
0
    }
2504
2505
0
    for (size_t i = 1; i < filtered.size(); i++) {
2506
0
        const std::optional<ResultType>& prev = filtered[i-1].second;
2507
0
        const std::optional<ResultType>& cur = filtered[i].second;
2508
2509
0
        const bool equal = *prev == *cur;
2510
2511
0
        if ( !equal ) {
2512
            /* Reconstruct operation */
2513
0
            const auto op = getOp(nullptr, data, size);
2514
2515
0
            printf("Difference detected\n\n");
2516
0
            printf("Operation:\n%s\n", op.ToString().c_str());
2517
0
            printf("Module %s result:\n\n%s\n\n", filtered[i-1].first->name.c_str(), util::ToString(*prev).c_str());
2518
0
            printf("Module %s result:\n\n%s\n\n", filtered[i].first->name.c_str(), util::ToString(*cur).c_str());
2519
2520
0
            abort(
2521
0
                    {filtered[i-1].first->name.c_str(), filtered[i].first->name.c_str()},
2522
0
                    op.Name(),
2523
0
                    op.GetAlgorithmString(),
2524
0
                    "difference"
2525
0
            );
2526
0
        }
2527
0
    }
2528
0
}
cryptofuzz::ExecutorBase<cryptofuzz::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
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<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
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
1
        return;
2492
1
    }
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
}
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
125k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
125k
    (void)parentDs;
2551
125k
    return op;
2552
125k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Digest) const
Line
Count
Source
2549
387
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
387
    (void)parentDs;
2551
387
    return op;
2552
387
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::HMAC) const
Line
Count
Source
2549
504
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
504
    (void)parentDs;
2551
504
    return op;
2552
504
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::UMAC) 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::CMAC>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::CMAC) const
Line
Count
Source
2549
333
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
333
    (void)parentDs;
2551
333
    return op;
2552
333
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricEncrypt) const
Line
Count
Source
2549
1.99k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.99k
    (void)parentDs;
2551
1.99k
    return op;
2552
1.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SymmetricDecrypt) const
Line
Count
Source
2549
791
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
791
    (void)parentDs;
2551
791
    return op;
2552
791
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SCRYPT) 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_HKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_HKDF) const
Line
Count
Source
2549
364
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
364
    (void)parentDs;
2551
364
    return op;
2552
364
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_TLS1_PRF) const
Line
Count
Source
2549
110
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
110
    (void)parentDs;
2551
110
    return op;
2552
110
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF) const
Line
Count
Source
2549
94
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
94
    (void)parentDs;
2551
94
    return op;
2552
94
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF1) const
Line
Count
Source
2549
145
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
145
    (void)parentDs;
2551
145
    return op;
2552
145
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_PBKDF2) const
Line
Count
Source
2549
353
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
353
    (void)parentDs;
2551
353
    return op;
2552
353
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_ARGON2) 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::Buffer, cryptofuzz::operation::KDF_SSH>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SSH) const
Line
Count
Source
2549
108
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
108
    (void)parentDs;
2551
108
    return op;
2552
108
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_X963) const
Line
Count
Source
2549
128
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
128
    (void)parentDs;
2551
128
    return op;
2552
128
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_BCRYPT) 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::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SP_800_108) const
Line
Count
Source
2549
150
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
150
    (void)parentDs;
2551
150
    return op;
2552
150
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::KDF_SRTP) const
Line
Count
Source
2549
122
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
122
    (void)parentDs;
2551
122
    return op;
2552
122
}
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
61
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
61
    (void)parentDs;
2551
61
    return op;
2552
61
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_PrivateToPublic) const
Line
Count
Source
2549
8.50k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
8.50k
    (void)parentDs;
2551
8.50k
    return op;
2552
8.50k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_ValidatePubkey) const
Line
Count
Source
2549
5.53k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.53k
    (void)parentDs;
2551
5.53k
    return op;
2552
5.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_GenerateKeyPair) const
Line
Count
Source
2549
10.0k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
10.0k
    (void)parentDs;
2551
10.0k
    return op;
2552
10.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Sign) const
Line
Count
Source
2549
955
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
955
    (void)parentDs;
2551
955
    return op;
2552
955
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Sign) const
Line
Count
Source
2549
10.1k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
10.1k
    (void)parentDs;
2551
10.1k
    return op;
2552
10.1k
}
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
9
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
9
    (void)parentDs;
2551
9
    return op;
2552
9
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Schnorr_Sign) 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<bool, cryptofuzz::operation::ECCSI_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECCSI_Verify) const
Line
Count
Source
2549
588
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
588
    (void)parentDs;
2551
588
    return op;
2552
588
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDSA_Verify) const
Line
Count
Source
2549
5.41k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
5.41k
    (void)parentDs;
2551
5.41k
    return op;
2552
5.41k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECGDSA_Verify) 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<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
8
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
8
    (void)parentDs;
2551
8
    return op;
2552
8
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::DSA_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Verify) 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::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_Sign) const
Line
Count
Source
2549
26
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
26
    (void)parentDs;
2551
26
    return op;
2552
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateParameters) const
Line
Count
Source
2549
4
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4
    (void)parentDs;
2551
4
    return op;
2552
4
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_PrivateToPublic) 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::DSA_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DSA_GenerateKeyPair) 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::Buffer, cryptofuzz::operation::ECDH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECDH_Derive) const
Line
Count
Source
2549
1.22k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.22k
    (void)parentDs;
2551
1.22k
    return op;
2552
1.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Encrypt) const
Line
Count
Source
2549
1.52k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.52k
    (void)parentDs;
2551
1.52k
    return op;
2552
1.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECIES_Decrypt) const
Line
Count
Source
2549
1.58k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
1.58k
    (void)parentDs;
2551
1.58k
    return op;
2552
1.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Add) const
Line
Count
Source
2549
4.14k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.14k
    (void)parentDs;
2551
4.14k
    return op;
2552
4.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Sub) 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::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Mul) const
Line
Count
Source
2549
4.31k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4.31k
    (void)parentDs;
2551
4.31k
    return op;
2552
4.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Neg) const
Line
Count
Source
2549
43
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
43
    (void)parentDs;
2551
43
    return op;
2552
43
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Dbl) const
Line
Count
Source
2549
7.17k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
7.17k
    (void)parentDs;
2551
7.17k
    return op;
2552
7.17k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::ECC_Point_Cmp) const
Line
Count
Source
2549
36
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
36
    (void)parentDs;
2551
36
    return op;
2552
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_GenerateKeyPair) const
Line
Count
Source
2549
2.98k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.98k
    (void)parentDs;
2551
2.98k
    return op;
2552
2.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::DH_Derive) const
Line
Count
Source
2549
2.19k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
2.19k
    (void)parentDs;
2551
2.19k
    return op;
2552
2.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc) const
Line
Count
Source
2549
51.5k
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
51.5k
    (void)parentDs;
2551
51.5k
    return op;
2552
51.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp2) const
Line
Count
Source
2549
113
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
113
    (void)parentDs;
2551
113
    return op;
2552
113
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BignumCalc_Fp12) const
Line
Count
Source
2549
589
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
589
    (void)parentDs;
2551
589
    return op;
2552
589
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_PrivateToPublic>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_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::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_PrivateToPublic_G2) 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
}
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
19
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
19
    (void)parentDs;
2551
19
    return op;
2552
19
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_BatchVerify) const
Line
Count
Source
2549
21
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
21
    (void)parentDs;
2551
21
    return op;
2552
21
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G1) 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::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Aggregate_G2) const
Line
Count
Source
2549
26
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
26
    (void)parentDs;
2551
26
    return op;
2552
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Pairing) const
Line
Count
Source
2549
4
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4
    (void)parentDs;
2551
4
    return op;
2552
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MillerLoop) const
Line
Count
Source
2549
4
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4
    (void)parentDs;
2551
4
    return op;
2552
4
}
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
4
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4
    (void)parentDs;
2551
4
    return op;
2552
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_HashToG2) 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_MapToG1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_MapToG1) 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::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
43
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
43
    (void)parentDs;
2551
43
    return op;
2552
43
}
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
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G1) const
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Decompress_G2) 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::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_Compress_G2) const
Line
Count
Source
2549
4
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
4
    (void)parentDs;
2551
4
    return op;
2552
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Add) const
Line
Count
Source
2549
67
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
67
    (void)parentDs;
2551
67
    return op;
2552
67
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Mul) const
Line
Count
Source
2549
46
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
46
    (void)parentDs;
2551
46
    return op;
2552
46
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_IsEq) const
Line
Count
Source
2549
86
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
86
    (void)parentDs;
2551
86
    return op;
2552
86
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_Neg) const
Line
Count
Source
2549
44
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
44
    (void)parentDs;
2551
44
    return op;
2552
44
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Add) const
Line
Count
Source
2549
132
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
132
    (void)parentDs;
2551
132
    return op;
2552
132
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Mul) 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<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_IsEq) const
Line
Count
Source
2549
151
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
151
    (void)parentDs;
2551
151
    return op;
2552
151
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G2_Neg) const
Line
Count
Source
2549
71
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
71
    (void)parentDs;
2551
71
    return op;
2552
71
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::BLS_G1_MultiExp) const
Line
Count
Source
2549
97
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
97
    (void)parentDs;
2551
97
    return op;
2552
97
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::Misc) 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<bool, cryptofuzz::operation::SR25519_Verify>::getOpPostprocess(fuzzing::datasource::Datasource*, cryptofuzz::operation::SR25519_Verify) const
Line
Count
Source
2549
14
OperationType ExecutorBase<ResultType, OperationType>::getOpPostprocess(Datasource* parentDs, OperationType op) const {
2550
14
    (void)parentDs;
2551
14
    return op;
2552
14
}
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
3
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2567
3
    (void)parentDs;
2568
3
    op.modulo = modulo;
2569
3
    return op;
2570
3
}
2571
2572
0
operation::BignumCalc ExecutorBignumCalc_Mod_BLS12_377_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2573
0
    (void)parentDs;
2574
0
    op.modulo = modulo;
2575
0
    return op;
2576
0
}
2577
2578
1
operation::BignumCalc ExecutorBignumCalc_Mod_BN128_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2579
1
    (void)parentDs;
2580
1
    op.modulo = modulo;
2581
1
    return op;
2582
1
}
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
1
operation::BignumCalc ExecutorBignumCalc_Mod_Vesta_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2591
1
    (void)parentDs;
2592
1
    op.modulo = modulo;
2593
1
    return op;
2594
1
}
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
1
operation::BignumCalc ExecutorBignumCalc_Mod_ED25519::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2603
1
    (void)parentDs;
2604
1
    op.modulo = modulo;
2605
1
    return op;
2606
1
}
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
0
operation::BignumCalc ExecutorBignumCalc_Mod_Edwards_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2615
0
    (void)parentDs;
2616
0
    op.modulo = modulo;
2617
0
    return op;
2618
0
}
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
5
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2627
5
    (void)parentDs;
2628
5
    op.modulo = modulo;
2629
5
    return op;
2630
5
}
2631
2632
0
operation::BignumCalc ExecutorBignumCalc_Mod_MNT4_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2633
0
    (void)parentDs;
2634
0
    op.modulo = modulo;
2635
0
    return op;
2636
0
}
2637
2638
4
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_R::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2639
4
    (void)parentDs;
2640
4
    op.modulo = modulo;
2641
4
    return op;
2642
4
}
2643
2644
4
operation::BignumCalc ExecutorBignumCalc_Mod_MNT6_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2645
4
    (void)parentDs;
2646
4
    op.modulo = modulo;
2647
4
    return op;
2648
4
}
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
0
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp256::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2663
0
    (void)parentDs;
2664
0
    op.modulo = modulo;
2665
0
    return op;
2666
0
}
2667
2668
4
operation::BignumCalc ExecutorBignumCalc_Mod_2Exp512::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2669
4
    (void)parentDs;
2670
4
    op.modulo = modulo;
2671
4
    return op;
2672
4
}
2673
2674
1
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2675
1
    (void)parentDs;
2676
1
    op.modulo = modulo;
2677
1
    return op;
2678
1
}
2679
2680
0
operation::BignumCalc ExecutorBignumCalc_Mod_SECP256K1_P::getOpPostprocess(Datasource* parentDs, operation::BignumCalc op) const {
2681
0
    (void)parentDs;
2682
0
    op.modulo = modulo;
2683
0
    return op;
2684
0
}
2685
2686
template <class ResultType, class OperationType>
2687
127k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
127k
    Datasource ds(data, size);
2689
127k
    if ( parentDs != nullptr ) {
2690
127k
        auto modifier = parentDs->GetData(0);
2691
127k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
127k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
127k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
387
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
387
    Datasource ds(data, size);
2689
387
    if ( parentDs != nullptr ) {
2690
387
        auto modifier = parentDs->GetData(0);
2691
387
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
387
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
387
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
505
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
505
    Datasource ds(data, size);
2689
505
    if ( parentDs != nullptr ) {
2690
505
        auto modifier = parentDs->GetData(0);
2691
505
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
505
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
505
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
140
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
140
    Datasource ds(data, size);
2689
140
    if ( parentDs != nullptr ) {
2690
140
        auto modifier = parentDs->GetData(0);
2691
140
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
140
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
140
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
333
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
333
    Datasource ds(data, size);
2689
333
    if ( parentDs != nullptr ) {
2690
333
        auto modifier = parentDs->GetData(0);
2691
333
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
333
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
333
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.99k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.99k
    Datasource ds(data, size);
2689
1.99k
    if ( parentDs != nullptr ) {
2690
1.99k
        auto modifier = parentDs->GetData(0);
2691
1.99k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.99k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
792
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
792
    Datasource ds(data, size);
2689
792
    if ( parentDs != nullptr ) {
2690
792
        auto modifier = parentDs->GetData(0);
2691
792
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
792
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
792
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::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_HKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
366
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
366
    Datasource ds(data, size);
2689
366
    if ( parentDs != nullptr ) {
2690
366
        auto modifier = parentDs->GetData(0);
2691
366
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
366
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
366
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
111
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
111
    Datasource ds(data, size);
2689
111
    if ( parentDs != nullptr ) {
2690
111
        auto modifier = parentDs->GetData(0);
2691
111
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
111
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
111
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
94
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
94
    Datasource ds(data, size);
2689
94
    if ( parentDs != nullptr ) {
2690
94
        auto modifier = parentDs->GetData(0);
2691
94
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
94
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
94
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
147
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
147
    Datasource ds(data, size);
2689
147
    if ( parentDs != nullptr ) {
2690
147
        auto modifier = parentDs->GetData(0);
2691
147
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
147
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
147
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
354
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
354
    Datasource ds(data, size);
2689
354
    if ( parentDs != nullptr ) {
2690
354
        auto modifier = parentDs->GetData(0);
2691
354
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
354
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
354
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::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::Buffer, cryptofuzz::operation::KDF_SSH>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
108
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
108
    Datasource ds(data, size);
2689
108
    if ( parentDs != nullptr ) {
2690
108
        auto modifier = parentDs->GetData(0);
2691
108
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
108
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
108
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
128
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
128
    Datasource ds(data, size);
2689
128
    if ( parentDs != nullptr ) {
2690
128
        auto modifier = parentDs->GetData(0);
2691
128
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
128
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
128
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::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::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
151
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
151
    Datasource ds(data, size);
2689
151
    if ( parentDs != nullptr ) {
2690
151
        auto modifier = parentDs->GetData(0);
2691
151
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
151
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
151
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
122
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
122
    Datasource ds(data, size);
2689
122
    if ( parentDs != nullptr ) {
2690
122
        auto modifier = parentDs->GetData(0);
2691
122
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
122
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
122
}
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
61
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
61
    Datasource ds(data, size);
2689
61
    if ( parentDs != nullptr ) {
2690
61
        auto modifier = parentDs->GetData(0);
2691
61
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
61
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
61
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
8.61k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
8.61k
    Datasource ds(data, size);
2689
8.61k
    if ( parentDs != nullptr ) {
2690
8.61k
        auto modifier = parentDs->GetData(0);
2691
8.61k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
8.61k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
8.61k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.62k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.62k
    Datasource ds(data, size);
2689
5.62k
    if ( parentDs != nullptr ) {
2690
5.62k
        auto modifier = parentDs->GetData(0);
2691
5.62k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.62k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.62k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
10.0k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
10.0k
    Datasource ds(data, size);
2689
10.0k
    if ( parentDs != nullptr ) {
2690
10.0k
        auto modifier = parentDs->GetData(0);
2691
10.0k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
10.0k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
10.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.00k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.00k
    Datasource ds(data, size);
2689
1.00k
    if ( parentDs != nullptr ) {
2690
1.00k
        auto modifier = parentDs->GetData(0);
2691
1.00k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.00k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.00k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
10.2k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
10.2k
    Datasource ds(data, size);
2689
10.2k
    if ( parentDs != nullptr ) {
2690
10.2k
        auto modifier = parentDs->GetData(0);
2691
10.2k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
10.2k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
10.2k
}
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
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::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::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<bool, cryptofuzz::operation::ECCSI_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
655
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
655
    Datasource ds(data, size);
2689
655
    if ( parentDs != nullptr ) {
2690
655
        auto modifier = parentDs->GetData(0);
2691
655
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
655
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
655
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
5.51k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
5.51k
    Datasource ds(data, size);
2689
5.51k
    if ( parentDs != nullptr ) {
2690
5.51k
        auto modifier = parentDs->GetData(0);
2691
5.51k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
5.51k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
5.51k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4
    Datasource ds(data, size);
2689
4
    if ( parentDs != nullptr ) {
2690
4
        auto modifier = parentDs->GetData(0);
2691
4
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4
}
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
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<bool, cryptofuzz::operation::DSA_Verify>::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<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
26
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
26
    Datasource ds(data, size);
2689
26
    if ( parentDs != nullptr ) {
2690
26
        auto modifier = parentDs->GetData(0);
2691
26
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
26
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4
    Datasource ds(data, size);
2689
4
    if ( parentDs != nullptr ) {
2690
4
        auto modifier = parentDs->GetData(0);
2691
4
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::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::DSA_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
20
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
20
    Datasource ds(data, size);
2689
20
    if ( parentDs != nullptr ) {
2690
20
        auto modifier = parentDs->GetData(0);
2691
20
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
20
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
20
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.27k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.27k
    Datasource ds(data, size);
2689
1.27k
    if ( parentDs != nullptr ) {
2690
1.27k
        auto modifier = parentDs->GetData(0);
2691
1.27k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.27k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.27k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.58k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.58k
    Datasource ds(data, size);
2689
1.58k
    if ( parentDs != nullptr ) {
2690
1.58k
        auto modifier = parentDs->GetData(0);
2691
1.58k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.58k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
1.64k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
1.64k
    Datasource ds(data, size);
2689
1.64k
    if ( parentDs != nullptr ) {
2690
1.64k
        auto modifier = parentDs->GetData(0);
2691
1.64k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
1.64k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
1.64k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.25k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.25k
    Datasource ds(data, size);
2689
4.25k
    if ( parentDs != nullptr ) {
2690
4.25k
        auto modifier = parentDs->GetData(0);
2691
4.25k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.25k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.25k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::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::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4.42k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4.42k
    Datasource ds(data, size);
2689
4.42k
    if ( parentDs != nullptr ) {
2690
4.42k
        auto modifier = parentDs->GetData(0);
2691
4.42k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4.42k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4.42k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
43
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
43
    Datasource ds(data, size);
2689
43
    if ( parentDs != nullptr ) {
2690
43
        auto modifier = parentDs->GetData(0);
2691
43
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
43
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
43
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
7.28k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
7.28k
    Datasource ds(data, size);
2689
7.28k
    if ( parentDs != nullptr ) {
2690
7.28k
        auto modifier = parentDs->GetData(0);
2691
7.28k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
7.28k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
7.28k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
36
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
36
    Datasource ds(data, size);
2689
36
    if ( parentDs != nullptr ) {
2690
36
        auto modifier = parentDs->GetData(0);
2691
36
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
36
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
3.13k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
3.13k
    Datasource ds(data, size);
2689
3.13k
    if ( parentDs != nullptr ) {
2690
3.13k
        auto modifier = parentDs->GetData(0);
2691
3.13k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
3.13k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
3.13k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
2.30k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
2.30k
    Datasource ds(data, size);
2689
2.30k
    if ( parentDs != nullptr ) {
2690
2.30k
        auto modifier = parentDs->GetData(0);
2691
2.30k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
2.30k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
2.30k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
51.6k
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
51.6k
    Datasource ds(data, size);
2689
51.6k
    if ( parentDs != nullptr ) {
2690
51.6k
        auto modifier = parentDs->GetData(0);
2691
51.6k
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
51.6k
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
51.6k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
114
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
114
    Datasource ds(data, size);
2689
114
    if ( parentDs != nullptr ) {
2690
114
        auto modifier = parentDs->GetData(0);
2691
114
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
114
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
114
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
589
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
589
    Datasource ds(data, size);
2689
589
    if ( parentDs != nullptr ) {
2690
589
        auto modifier = parentDs->GetData(0);
2691
589
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
589
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
589
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_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::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::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
}
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
25
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
25
    Datasource ds(data, size);
2689
25
    if ( parentDs != nullptr ) {
2690
25
        auto modifier = parentDs->GetData(0);
2691
25
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
25
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
25
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
23
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
23
    Datasource ds(data, size);
2689
23
    if ( parentDs != nullptr ) {
2690
23
        auto modifier = parentDs->GetData(0);
2691
23
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
23
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
23
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
11
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
11
    Datasource ds(data, size);
2689
11
    if ( parentDs != nullptr ) {
2690
11
        auto modifier = parentDs->GetData(0);
2691
11
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
11
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
11
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
28
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
28
    Datasource ds(data, size);
2689
28
    if ( parentDs != nullptr ) {
2690
28
        auto modifier = parentDs->GetData(0);
2691
28
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
28
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
28
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4
    Datasource ds(data, size);
2689
4
    if ( parentDs != nullptr ) {
2690
4
        auto modifier = parentDs->GetData(0);
2691
4
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4
    Datasource ds(data, size);
2689
4
    if ( parentDs != nullptr ) {
2690
4
        auto modifier = parentDs->GetData(0);
2691
4
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4
}
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
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_HashToG2>::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_MapToG1>::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::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
44
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
44
    Datasource ds(data, size);
2689
44
    if ( parentDs != nullptr ) {
2690
44
        auto modifier = parentDs->GetData(0);
2691
44
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
44
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
44
}
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
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::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::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
4
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
4
    Datasource ds(data, size);
2689
4
    if ( parentDs != nullptr ) {
2690
4
        auto modifier = parentDs->GetData(0);
2691
4
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
4
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
67
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
67
    Datasource ds(data, size);
2689
67
    if ( parentDs != nullptr ) {
2690
67
        auto modifier = parentDs->GetData(0);
2691
67
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
67
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
67
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
46
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
46
    Datasource ds(data, size);
2689
46
    if ( parentDs != nullptr ) {
2690
46
        auto modifier = parentDs->GetData(0);
2691
46
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
46
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
46
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
87
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
87
    Datasource ds(data, size);
2689
87
    if ( parentDs != nullptr ) {
2690
87
        auto modifier = parentDs->GetData(0);
2691
87
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
87
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
87
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
44
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
44
    Datasource ds(data, size);
2689
44
    if ( parentDs != nullptr ) {
2690
44
        auto modifier = parentDs->GetData(0);
2691
44
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
44
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
44
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
132
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
132
    Datasource ds(data, size);
2689
132
    if ( parentDs != nullptr ) {
2690
132
        auto modifier = parentDs->GetData(0);
2691
132
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
132
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
132
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::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<bool, cryptofuzz::operation::BLS_G2_IsEq>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
151
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
151
    Datasource ds(data, size);
2689
151
    if ( parentDs != nullptr ) {
2690
151
        auto modifier = parentDs->GetData(0);
2691
151
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
151
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
151
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
71
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
71
    Datasource ds(data, size);
2689
71
    if ( parentDs != nullptr ) {
2690
71
        auto modifier = parentDs->GetData(0);
2691
71
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
71
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
71
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
101
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
101
    Datasource ds(data, size);
2689
101
    if ( parentDs != nullptr ) {
2690
101
        auto modifier = parentDs->GetData(0);
2691
101
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
101
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
101
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::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<bool, cryptofuzz::operation::SR25519_Verify>::getOp(fuzzing::datasource::Datasource*, unsigned char const*, unsigned long) const
Line
Count
Source
2687
14
OperationType ExecutorBase<ResultType, OperationType>::getOp(Datasource* parentDs, const uint8_t* data, const size_t size) const {
2688
14
    Datasource ds(data, size);
2689
14
    if ( parentDs != nullptr ) {
2690
14
        auto modifier = parentDs->GetData(0);
2691
14
        return getOpPostprocess(parentDs, std::move( OperationType(ds, component::Modifier(modifier.data(), modifier.size())) ) );
2692
14
    } else {
2693
0
        return std::move( OperationType(ds, component::Modifier(nullptr, 0)) );
2694
0
    }
2695
14
}
2696
2697
template <class ResultType, class OperationType>
2698
125k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
125k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
125k
    if ( options.forceModule != std::nullopt ) {
2703
124k
        moduleID = *options.forceModule;
2704
124k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
125k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
125k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
125k
    return modules.at(moduleID);
2716
125k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
387
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
387
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
387
    if ( options.forceModule != std::nullopt ) {
2703
387
        moduleID = *options.forceModule;
2704
387
    }
2705
2706
    /* Skip if this is a disabled module */
2707
387
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
387
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
387
    return modules.at(moduleID);
2716
387
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
504
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
504
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
504
    if ( options.forceModule != std::nullopt ) {
2703
503
        moduleID = *options.forceModule;
2704
503
    }
2705
2706
    /* Skip if this is a disabled module */
2707
504
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
504
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
504
    return modules.at(moduleID);
2716
504
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::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
137
        moduleID = *options.forceModule;
2704
137
    }
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::CMAC>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
333
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
333
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
333
    if ( options.forceModule != std::nullopt ) {
2703
332
        moduleID = *options.forceModule;
2704
332
    }
2705
2706
    /* Skip if this is a disabled module */
2707
333
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
333
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
333
    return modules.at(moduleID);
2716
333
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.99k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.99k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.99k
    if ( options.forceModule != std::nullopt ) {
2703
1.99k
        moduleID = *options.forceModule;
2704
1.99k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.99k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.99k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.99k
    return modules.at(moduleID);
2716
1.99k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
791
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
791
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
791
    if ( options.forceModule != std::nullopt ) {
2703
790
        moduleID = *options.forceModule;
2704
790
    }
2705
2706
    /* Skip if this is a disabled module */
2707
791
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
791
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
791
    return modules.at(moduleID);
2716
791
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::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_HKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
364
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
364
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
364
    if ( options.forceModule != std::nullopt ) {
2703
364
        moduleID = *options.forceModule;
2704
364
    }
2705
2706
    /* Skip if this is a disabled module */
2707
364
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
364
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
364
    return modules.at(moduleID);
2716
364
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_TLS1_PRF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
110
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
110
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
110
    if ( options.forceModule != std::nullopt ) {
2703
110
        moduleID = *options.forceModule;
2704
110
    }
2705
2706
    /* Skip if this is a disabled module */
2707
110
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
110
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
110
    return modules.at(moduleID);
2716
110
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
94
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
94
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
94
    if ( options.forceModule != std::nullopt ) {
2703
94
        moduleID = *options.forceModule;
2704
94
    }
2705
2706
    /* Skip if this is a disabled module */
2707
94
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
94
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
94
    return modules.at(moduleID);
2716
94
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF1>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
145
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
145
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
145
    if ( options.forceModule != std::nullopt ) {
2703
145
        moduleID = *options.forceModule;
2704
145
    }
2705
2706
    /* Skip if this is a disabled module */
2707
145
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
145
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
145
    return modules.at(moduleID);
2716
145
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
353
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
353
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
353
    if ( options.forceModule != std::nullopt ) {
2703
352
        moduleID = *options.forceModule;
2704
352
    }
2705
2706
    /* Skip if this is a disabled module */
2707
353
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
353
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
353
    return modules.at(moduleID);
2716
353
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::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::Buffer, cryptofuzz::operation::KDF_SSH>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
108
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
108
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
108
    if ( options.forceModule != std::nullopt ) {
2703
108
        moduleID = *options.forceModule;
2704
108
    }
2705
2706
    /* Skip if this is a disabled module */
2707
108
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
108
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
108
    return modules.at(moduleID);
2716
108
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
128
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
128
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
128
    if ( options.forceModule != std::nullopt ) {
2703
128
        moduleID = *options.forceModule;
2704
128
    }
2705
2706
    /* Skip if this is a disabled module */
2707
128
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
128
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
128
    return modules.at(moduleID);
2716
128
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::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::Buffer, cryptofuzz::operation::KDF_SP_800_108>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
150
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
150
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
150
    if ( options.forceModule != std::nullopt ) {
2703
149
        moduleID = *options.forceModule;
2704
149
    }
2705
2706
    /* Skip if this is a disabled module */
2707
150
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
150
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
150
    return modules.at(moduleID);
2716
150
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
122
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
122
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
122
    if ( options.forceModule != std::nullopt ) {
2703
121
        moduleID = *options.forceModule;
2704
121
    }
2705
2706
    /* Skip if this is a disabled module */
2707
122
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
122
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
122
    return modules.at(moduleID);
2716
122
}
cryptofuzz::ExecutorBase<std::__1::array<cryptofuzz::Buffer, 3ul>, cryptofuzz::operation::KDF_SRTCP>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
61
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
61
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
61
    if ( options.forceModule != std::nullopt ) {
2703
61
        moduleID = *options.forceModule;
2704
61
    }
2705
2706
    /* Skip if this is a disabled module */
2707
61
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
61
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
61
    return modules.at(moduleID);
2716
61
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
8.50k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
8.50k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
8.50k
    if ( options.forceModule != std::nullopt ) {
2703
8.44k
        moduleID = *options.forceModule;
2704
8.44k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
8.50k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
8.50k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
8.50k
    return modules.at(moduleID);
2716
8.50k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.53k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.53k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.53k
    if ( options.forceModule != std::nullopt ) {
2703
5.41k
        moduleID = *options.forceModule;
2704
5.41k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.53k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.53k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
5.53k
    return modules.at(moduleID);
2716
5.53k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
10.0k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
10.0k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
10.0k
    if ( options.forceModule != std::nullopt ) {
2703
9.93k
        moduleID = *options.forceModule;
2704
9.93k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
10.0k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
10.0k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
10.0k
    return modules.at(moduleID);
2716
10.0k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
955
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
955
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
955
    if ( options.forceModule != std::nullopt ) {
2703
929
        moduleID = *options.forceModule;
2704
929
    }
2705
2706
    /* Skip if this is a disabled module */
2707
955
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
955
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
955
    return modules.at(moduleID);
2716
955
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
10.1k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
10.1k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
10.1k
    if ( options.forceModule != std::nullopt ) {
2703
10.1k
        moduleID = *options.forceModule;
2704
10.1k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
10.1k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
10.1k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
10.1k
    return modules.at(moduleID);
2716
10.1k
}
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
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<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::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<bool, cryptofuzz::operation::ECCSI_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
588
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
588
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
588
    if ( options.forceModule != std::nullopt ) {
2703
566
        moduleID = *options.forceModule;
2704
566
    }
2705
2706
    /* Skip if this is a disabled module */
2707
588
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
588
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
588
    return modules.at(moduleID);
2716
588
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
5.41k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
5.41k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
5.41k
    if ( options.forceModule != std::nullopt ) {
2703
5.37k
        moduleID = *options.forceModule;
2704
5.37k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
5.41k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
5.41k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
5.41k
    return modules.at(moduleID);
2716
5.41k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::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
2
        moduleID = *options.forceModule;
2704
2
    }
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<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
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<bool, cryptofuzz::operation::DSA_Verify>::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
22
        moduleID = *options.forceModule;
2704
22
    }
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::DSA_Signature, cryptofuzz::operation::DSA_Sign>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
26
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
26
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
26
    if ( options.forceModule != std::nullopt ) {
2703
26
        moduleID = *options.forceModule;
2704
26
    }
2705
2706
    /* Skip if this is a disabled module */
2707
26
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
26
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
26
    return modules.at(moduleID);
2716
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4
    if ( options.forceModule != std::nullopt ) {
2703
4
        moduleID = *options.forceModule;
2704
4
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4
    return modules.at(moduleID);
2716
4
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_PrivateToPublic>::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::DSA_GenerateKeyPair>::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::Buffer, cryptofuzz::operation::ECDH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.22k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.22k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.22k
    if ( options.forceModule != std::nullopt ) {
2703
1.20k
        moduleID = *options.forceModule;
2704
1.20k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.22k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.22k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.22k
    return modules.at(moduleID);
2716
1.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.52k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.52k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.52k
    if ( options.forceModule != std::nullopt ) {
2703
1.48k
        moduleID = *options.forceModule;
2704
1.48k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.52k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.52k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.52k
    return modules.at(moduleID);
2716
1.52k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
1.58k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
1.58k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
1.58k
    if ( options.forceModule != std::nullopt ) {
2703
1.54k
        moduleID = *options.forceModule;
2704
1.54k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
1.58k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
1.58k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
1.58k
    return modules.at(moduleID);
2716
1.58k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.14k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.14k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.14k
    if ( options.forceModule != std::nullopt ) {
2703
4.09k
        moduleID = *options.forceModule;
2704
4.09k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.14k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.14k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4.14k
    return modules.at(moduleID);
2716
4.14k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::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::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4.31k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4.31k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4.31k
    if ( options.forceModule != std::nullopt ) {
2703
4.27k
        moduleID = *options.forceModule;
2704
4.27k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4.31k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4.31k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4.31k
    return modules.at(moduleID);
2716
4.31k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
43
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
43
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
43
    if ( options.forceModule != std::nullopt ) {
2703
43
        moduleID = *options.forceModule;
2704
43
    }
2705
2706
    /* Skip if this is a disabled module */
2707
43
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
43
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
43
    return modules.at(moduleID);
2716
43
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
7.17k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
7.17k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
7.17k
    if ( options.forceModule != std::nullopt ) {
2703
7.06k
        moduleID = *options.forceModule;
2704
7.06k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
7.17k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
7.17k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
7.17k
    return modules.at(moduleID);
2716
7.17k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
36
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
36
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
36
    if ( options.forceModule != std::nullopt ) {
2703
36
        moduleID = *options.forceModule;
2704
36
    }
2705
2706
    /* Skip if this is a disabled module */
2707
36
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
36
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
36
    return modules.at(moduleID);
2716
36
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.98k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.98k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.98k
    if ( options.forceModule != std::nullopt ) {
2703
2.90k
        moduleID = *options.forceModule;
2704
2.90k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.98k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.98k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2.98k
    return modules.at(moduleID);
2716
2.98k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
2.19k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
2.19k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
2.19k
    if ( options.forceModule != std::nullopt ) {
2703
2.13k
        moduleID = *options.forceModule;
2704
2.13k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
2.19k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
2.19k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
2.19k
    return modules.at(moduleID);
2716
2.19k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
51.5k
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
51.5k
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
51.5k
    if ( options.forceModule != std::nullopt ) {
2703
51.5k
        moduleID = *options.forceModule;
2704
51.5k
    }
2705
2706
    /* Skip if this is a disabled module */
2707
51.5k
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
51.5k
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
51.5k
    return modules.at(moduleID);
2716
51.5k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
113
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
113
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
113
    if ( options.forceModule != std::nullopt ) {
2703
113
        moduleID = *options.forceModule;
2704
113
    }
2705
2706
    /* Skip if this is a disabled module */
2707
113
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
113
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
113
    return modules.at(moduleID);
2716
113
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
589
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
589
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
589
    if ( options.forceModule != std::nullopt ) {
2703
589
        moduleID = *options.forceModule;
2704
589
    }
2705
2706
    /* Skip if this is a disabled module */
2707
589
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
589
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
589
    return modules.at(moduleID);
2716
589
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_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::G2, cryptofuzz::operation::BLS_PrivateToPublic_G2>::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
}
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
19
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
19
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
19
    if ( options.forceModule != std::nullopt ) {
2703
17
        moduleID = *options.forceModule;
2704
17
    }
2705
2706
    /* Skip if this is a disabled module */
2707
19
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
19
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
19
    return modules.at(moduleID);
2716
19
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
21
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
21
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
21
    if ( options.forceModule != std::nullopt ) {
2703
18
        moduleID = *options.forceModule;
2704
18
    }
2705
2706
    /* Skip if this is a disabled module */
2707
21
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
21
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
21
    return modules.at(moduleID);
2716
21
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::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::G2, cryptofuzz::operation::BLS_Aggregate_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
26
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
26
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
26
    if ( options.forceModule != std::nullopt ) {
2703
21
        moduleID = *options.forceModule;
2704
21
    }
2705
2706
    /* Skip if this is a disabled module */
2707
26
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
26
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
26
    return modules.at(moduleID);
2716
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4
    if ( options.forceModule != std::nullopt ) {
2703
4
        moduleID = *options.forceModule;
2704
4
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4
    return modules.at(moduleID);
2716
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4
    if ( options.forceModule != std::nullopt ) {
2703
4
        moduleID = *options.forceModule;
2704
4
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4
    return modules.at(moduleID);
2716
4
}
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
4
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4
    if ( options.forceModule != std::nullopt ) {
2703
4
        moduleID = *options.forceModule;
2704
4
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4
    return modules.at(moduleID);
2716
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_HashToG2>::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_MapToG1>::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::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
43
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
43
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
43
    if ( options.forceModule != std::nullopt ) {
2703
43
        moduleID = *options.forceModule;
2704
43
    }
2705
2706
    /* Skip if this is a disabled module */
2707
43
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
43
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
43
    return modules.at(moduleID);
2716
43
}
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
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::getModule(fuzzing::datasource::Datasource&) const
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::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::BignumPair, cryptofuzz::operation::BLS_Compress_G2>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
4
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
4
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
4
    if ( options.forceModule != std::nullopt ) {
2703
4
        moduleID = *options.forceModule;
2704
4
    }
2705
2706
    /* Skip if this is a disabled module */
2707
4
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
4
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
4
    return modules.at(moduleID);
2716
4
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
67
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
67
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
67
    if ( options.forceModule != std::nullopt ) {
2703
67
        moduleID = *options.forceModule;
2704
67
    }
2705
2706
    /* Skip if this is a disabled module */
2707
67
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
67
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
67
    return modules.at(moduleID);
2716
67
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
46
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
46
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
46
    if ( options.forceModule != std::nullopt ) {
2703
45
        moduleID = *options.forceModule;
2704
45
    }
2705
2706
    /* Skip if this is a disabled module */
2707
46
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
46
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
46
    return modules.at(moduleID);
2716
46
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
86
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
86
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
86
    if ( options.forceModule != std::nullopt ) {
2703
86
        moduleID = *options.forceModule;
2704
86
    }
2705
2706
    /* Skip if this is a disabled module */
2707
86
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
86
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
86
    return modules.at(moduleID);
2716
86
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
44
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
44
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
44
    if ( options.forceModule != std::nullopt ) {
2703
43
        moduleID = *options.forceModule;
2704
43
    }
2705
2706
    /* Skip if this is a disabled module */
2707
44
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
44
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
44
    return modules.at(moduleID);
2716
44
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
132
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
132
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
132
    if ( options.forceModule != std::nullopt ) {
2703
132
        moduleID = *options.forceModule;
2704
132
    }
2705
2706
    /* Skip if this is a disabled module */
2707
132
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
132
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
132
    return modules.at(moduleID);
2716
132
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::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<bool, cryptofuzz::operation::BLS_G2_IsEq>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
151
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
151
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
151
    if ( options.forceModule != std::nullopt ) {
2703
151
        moduleID = *options.forceModule;
2704
151
    }
2705
2706
    /* Skip if this is a disabled module */
2707
151
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
151
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
151
    return modules.at(moduleID);
2716
151
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
71
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
71
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
71
    if ( options.forceModule != std::nullopt ) {
2703
70
        moduleID = *options.forceModule;
2704
70
    }
2705
2706
    /* Skip if this is a disabled module */
2707
71
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
71
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
71
    return modules.at(moduleID);
2716
71
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
97
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
97
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
97
    if ( options.forceModule != std::nullopt ) {
2703
89
        moduleID = *options.forceModule;
2704
89
    }
2705
2706
    /* Skip if this is a disabled module */
2707
97
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
97
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
97
    return modules.at(moduleID);
2716
97
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::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<bool, cryptofuzz::operation::SR25519_Verify>::getModule(fuzzing::datasource::Datasource&) const
Line
Count
Source
2698
14
std::shared_ptr<Module> ExecutorBase<ResultType, OperationType>::getModule(Datasource& ds) const {
2699
14
    auto moduleID = ds.Get<uint64_t>();
2700
2701
    /* Override the extracted module ID with the preferred one, if specified */
2702
14
    if ( options.forceModule != std::nullopt ) {
2703
13
        moduleID = *options.forceModule;
2704
13
    }
2705
2706
    /* Skip if this is a disabled module */
2707
14
    if ( options.disableModules.HaveExplicit(moduleID) ) {
2708
0
        return nullptr;
2709
0
    }
2710
2711
14
    if ( modules.find(moduleID) == modules.end() ) {
2712
0
        return nullptr;
2713
0
    }
2714
2715
14
    return modules.at(moduleID);
2716
14
}
2717
2718
template <class ResultType, class OperationType>
2719
78.8k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
78.8k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
78.8k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
127k
    do {
2725
127k
        auto op = getOp(&parentDs, data, size);
2726
127k
        auto module = getModule(parentDs);
2727
127k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
127k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
127k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1.96k
            break;
2736
1.96k
        }
2737
127k
    } while ( parentDs.Get<bool>() == true );
2738
2739
78.8k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
78.8k
#if 1
2745
78.8k
    {
2746
78.8k
        std::set<uint64_t> moduleIDs;
2747
78.8k
        for (const auto& m : modules ) {
2748
76.1k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
76.1k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
76.1k
            moduleIDs.insert(moduleID);
2756
76.1k
        }
2757
2758
78.8k
        std::set<uint64_t> operationModuleIDs;
2759
121k
        for (const auto& op : operations) {
2760
121k
            operationModuleIDs.insert(op.first->ID);
2761
121k
        }
2762
2763
78.8k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
78.8k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
78.8k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
78.8k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
78.8k
    }
2771
78.8k
#endif
2772
2773
78.8k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
78.8k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
200k
    for (size_t i = 0; i < operations.size(); i++) {
2781
121k
        auto& operation = operations[i];
2782
2783
121k
        auto& module = operation.first;
2784
121k
        auto& op = operation.second;
2785
2786
121k
        if ( i > 0 ) {
2787
45.3k
            auto& prevModule = operations[i-1].first;
2788
45.3k
            auto& prevOp = operations[i-1].second;
2789
2790
45.3k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
13.4k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
13.4k
                if ( curModifier.size() == 0 ) {
2793
3.16M
                    for (size_t j = 0; j < 512; j++) {
2794
3.15M
                        curModifier.push_back(1);
2795
3.15M
                    }
2796
7.30k
                } else {
2797
1.09M
                    for (auto& c : curModifier) {
2798
1.09M
                        c++;
2799
1.09M
                    }
2800
7.30k
                }
2801
13.4k
            }
2802
45.3k
        }
2803
2804
121k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
121k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
121k
        const auto& result = results.back();
2811
2812
121k
        if ( result.second != std::nullopt ) {
2813
42.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
42.6k
        }
2820
2821
121k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
121k
        if ( options.disableTests == false ) {
2830
121k
            tests::test(op, result.second);
2831
121k
        }
2832
2833
121k
        postprocess(module, op, result);
2834
121k
    }
2835
2836
78.8k
    if ( options.noCompare == false ) {
2837
76.1k
        compare(operations, results, data, size);
2838
76.1k
    }
2839
78.8k
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Digest>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
82
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
82
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
82
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
387
    do {
2725
387
        auto op = getOp(&parentDs, data, size);
2726
387
        auto module = getModule(parentDs);
2727
387
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
387
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
387
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
387
    } while ( parentDs.Get<bool>() == true );
2738
2739
82
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
82
#if 1
2745
82
    {
2746
82
        std::set<uint64_t> moduleIDs;
2747
82
        for (const auto& m : modules ) {
2748
82
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
82
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
82
            moduleIDs.insert(moduleID);
2756
82
        }
2757
2758
82
        std::set<uint64_t> operationModuleIDs;
2759
387
        for (const auto& op : operations) {
2760
387
            operationModuleIDs.insert(op.first->ID);
2761
387
        }
2762
2763
82
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
82
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
82
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
82
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
82
    }
2771
82
#endif
2772
2773
82
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
82
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
469
    for (size_t i = 0; i < operations.size(); i++) {
2781
387
        auto& operation = operations[i];
2782
2783
387
        auto& module = operation.first;
2784
387
        auto& op = operation.second;
2785
2786
387
        if ( i > 0 ) {
2787
305
            auto& prevModule = operations[i-1].first;
2788
305
            auto& prevOp = operations[i-1].second;
2789
2790
305
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
131
                auto& curModifier = op.modifier.GetVectorPtr();
2792
131
                if ( curModifier.size() == 0 ) {
2793
45.6k
                    for (size_t j = 0; j < 512; j++) {
2794
45.5k
                        curModifier.push_back(1);
2795
45.5k
                    }
2796
89
                } else {
2797
30.9k
                    for (auto& c : curModifier) {
2798
30.9k
                        c++;
2799
30.9k
                    }
2800
42
                }
2801
131
            }
2802
305
        }
2803
2804
387
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
387
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
387
        const auto& result = results.back();
2811
2812
387
        if ( result.second != std::nullopt ) {
2813
335
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
335
        }
2820
2821
387
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
387
        if ( options.disableTests == false ) {
2830
387
            tests::test(op, result.second);
2831
387
        }
2832
2833
387
        postprocess(module, op, result);
2834
387
    }
2835
2836
82
    if ( options.noCompare == false ) {
2837
82
        compare(operations, results, data, size);
2838
82
    }
2839
82
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::HMAC>::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
505
    do {
2725
505
        auto op = getOp(&parentDs, data, size);
2726
505
        auto module = getModule(parentDs);
2727
505
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
505
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
505
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
505
    } 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
455
        for (const auto& op : operations) {
2760
455
            operationModuleIDs.insert(op.first->ID);
2761
455
        }
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
529
    for (size_t i = 0; i < operations.size(); i++) {
2781
455
        auto& operation = operations[i];
2782
2783
455
        auto& module = operation.first;
2784
455
        auto& op = operation.second;
2785
2786
455
        if ( i > 0 ) {
2787
384
            auto& prevModule = operations[i-1].first;
2788
384
            auto& prevOp = operations[i-1].second;
2789
2790
384
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
135
                auto& curModifier = op.modifier.GetVectorPtr();
2792
135
                if ( curModifier.size() == 0 ) {
2793
52.3k
                    for (size_t j = 0; j < 512; j++) {
2794
52.2k
                        curModifier.push_back(1);
2795
52.2k
                    }
2796
102
                } else {
2797
632
                    for (auto& c : curModifier) {
2798
632
                        c++;
2799
632
                    }
2800
33
                }
2801
135
            }
2802
384
        }
2803
2804
455
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
455
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
455
        const auto& result = results.back();
2811
2812
455
        if ( result.second != std::nullopt ) {
2813
236
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
236
        }
2820
2821
455
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
455
        if ( options.disableTests == false ) {
2830
455
            tests::test(op, result.second);
2831
455
        }
2832
2833
455
        postprocess(module, op, result);
2834
455
    }
2835
2836
74
    if ( options.noCompare == false ) {
2837
71
        compare(operations, results, data, size);
2838
71
    }
2839
74
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::UMAC>::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
140
    do {
2725
140
        auto op = getOp(&parentDs, data, size);
2726
140
        auto module = getModule(parentDs);
2727
140
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
140
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
140
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
140
    } 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
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
11
        std::set<uint64_t> operationModuleIDs;
2759
75
        for (const auto& op : operations) {
2760
75
            operationModuleIDs.insert(op.first->ID);
2761
75
        }
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
86
    for (size_t i = 0; i < operations.size(); i++) {
2781
75
        auto& operation = operations[i];
2782
2783
75
        auto& module = operation.first;
2784
75
        auto& op = operation.second;
2785
2786
75
        if ( i > 0 ) {
2787
68
            auto& prevModule = operations[i-1].first;
2788
68
            auto& prevOp = operations[i-1].second;
2789
2790
68
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
34
                auto& curModifier = op.modifier.GetVectorPtr();
2792
34
                if ( curModifier.size() == 0 ) {
2793
10.2k
                    for (size_t j = 0; j < 512; j++) {
2794
10.2k
                        curModifier.push_back(1);
2795
10.2k
                    }
2796
20
                } else {
2797
174
                    for (auto& c : curModifier) {
2798
174
                        c++;
2799
174
                    }
2800
14
                }
2801
34
            }
2802
68
        }
2803
2804
75
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
75
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
75
        const auto& result = results.back();
2811
2812
75
        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
75
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
75
        if ( options.disableTests == false ) {
2830
75
            tests::test(op, result.second);
2831
75
        }
2832
2833
75
        postprocess(module, op, result);
2834
75
    }
2835
2836
11
    if ( options.noCompare == false ) {
2837
7
        compare(operations, results, data, size);
2838
7
    }
2839
11
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::CMAC>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
65
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
65
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
65
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
333
    do {
2725
333
        auto op = getOp(&parentDs, data, size);
2726
333
        auto module = getModule(parentDs);
2727
333
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
333
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
333
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
333
    } while ( parentDs.Get<bool>() == true );
2738
2739
65
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
65
#if 1
2745
65
    {
2746
65
        std::set<uint64_t> moduleIDs;
2747
65
        for (const auto& m : modules ) {
2748
64
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
64
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
64
            moduleIDs.insert(moduleID);
2756
64
        }
2757
2758
65
        std::set<uint64_t> operationModuleIDs;
2759
317
        for (const auto& op : operations) {
2760
317
            operationModuleIDs.insert(op.first->ID);
2761
317
        }
2762
2763
65
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
65
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
65
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
65
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
65
    }
2771
65
#endif
2772
2773
65
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
65
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
382
    for (size_t i = 0; i < operations.size(); i++) {
2781
317
        auto& operation = operations[i];
2782
2783
317
        auto& module = operation.first;
2784
317
        auto& op = operation.second;
2785
2786
317
        if ( i > 0 ) {
2787
253
            auto& prevModule = operations[i-1].first;
2788
253
            auto& prevOp = operations[i-1].second;
2789
2790
253
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
111
                auto& curModifier = op.modifier.GetVectorPtr();
2792
111
                if ( curModifier.size() == 0 ) {
2793
45.1k
                    for (size_t j = 0; j < 512; j++) {
2794
45.0k
                        curModifier.push_back(1);
2795
45.0k
                    }
2796
88
                } else {
2797
1.17k
                    for (auto& c : curModifier) {
2798
1.17k
                        c++;
2799
1.17k
                    }
2800
23
                }
2801
111
            }
2802
253
        }
2803
2804
317
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
317
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
317
        const auto& result = results.back();
2811
2812
317
        if ( result.second != std::nullopt ) {
2813
129
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
129
        }
2820
2821
317
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
317
        if ( options.disableTests == false ) {
2830
317
            tests::test(op, result.second);
2831
317
        }
2832
2833
317
        postprocess(module, op, result);
2834
317
    }
2835
2836
65
    if ( options.noCompare == false ) {
2837
64
        compare(operations, results, data, size);
2838
64
    }
2839
65
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::SymmetricEncrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
340
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
340
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
340
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.99k
    do {
2725
1.99k
        auto op = getOp(&parentDs, data, size);
2726
1.99k
        auto module = getModule(parentDs);
2727
1.99k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.99k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.99k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
9
            break;
2736
9
        }
2737
1.99k
    } while ( parentDs.Get<bool>() == true );
2738
2739
340
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
340
#if 1
2745
340
    {
2746
340
        std::set<uint64_t> moduleIDs;
2747
340
        for (const auto& m : modules ) {
2748
336
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
336
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
336
            moduleIDs.insert(moduleID);
2756
336
        }
2757
2758
340
        std::set<uint64_t> operationModuleIDs;
2759
1.93k
        for (const auto& op : operations) {
2760
1.93k
            operationModuleIDs.insert(op.first->ID);
2761
1.93k
        }
2762
2763
340
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
340
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
340
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
340
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
340
    }
2771
340
#endif
2772
2773
340
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
340
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.27k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.93k
        auto& operation = operations[i];
2782
2783
1.93k
        auto& module = operation.first;
2784
1.93k
        auto& op = operation.second;
2785
2786
1.93k
        if ( i > 0 ) {
2787
1.59k
            auto& prevModule = operations[i-1].first;
2788
1.59k
            auto& prevOp = operations[i-1].second;
2789
2790
1.59k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
564
                auto& curModifier = op.modifier.GetVectorPtr();
2792
564
                if ( curModifier.size() == 0 ) {
2793
229k
                    for (size_t j = 0; j < 512; j++) {
2794
228k
                        curModifier.push_back(1);
2795
228k
                    }
2796
447
                } else {
2797
14.7k
                    for (auto& c : curModifier) {
2798
14.7k
                        c++;
2799
14.7k
                    }
2800
117
                }
2801
564
            }
2802
1.59k
        }
2803
2804
1.93k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.93k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.93k
        const auto& result = results.back();
2811
2812
1.93k
        if ( result.second != std::nullopt ) {
2813
837
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
837
        }
2820
2821
1.93k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.93k
        if ( options.disableTests == false ) {
2830
1.93k
            tests::test(op, result.second);
2831
1.93k
        }
2832
2833
1.93k
        postprocess(module, op, result);
2834
1.93k
    }
2835
2836
340
    if ( options.noCompare == false ) {
2837
336
        compare(operations, results, data, size);
2838
336
    }
2839
340
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::SymmetricDecrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
153
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
153
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
153
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
792
    do {
2725
792
        auto op = getOp(&parentDs, data, size);
2726
792
        auto module = getModule(parentDs);
2727
792
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
792
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
792
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
4
            break;
2736
4
        }
2737
792
    } while ( parentDs.Get<bool>() == true );
2738
2739
153
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
153
#if 1
2745
153
    {
2746
153
        std::set<uint64_t> moduleIDs;
2747
153
        for (const auto& m : modules ) {
2748
150
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
150
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
150
            moduleIDs.insert(moduleID);
2756
150
        }
2757
2758
153
        std::set<uint64_t> operationModuleIDs;
2759
743
        for (const auto& op : operations) {
2760
743
            operationModuleIDs.insert(op.first->ID);
2761
743
        }
2762
2763
153
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
153
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
153
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
153
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
153
    }
2771
153
#endif
2772
2773
153
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
153
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
896
    for (size_t i = 0; i < operations.size(); i++) {
2781
743
        auto& operation = operations[i];
2782
2783
743
        auto& module = operation.first;
2784
743
        auto& op = operation.second;
2785
2786
743
        if ( i > 0 ) {
2787
593
            auto& prevModule = operations[i-1].first;
2788
593
            auto& prevOp = operations[i-1].second;
2789
2790
593
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
248
                auto& curModifier = op.modifier.GetVectorPtr();
2792
248
                if ( curModifier.size() == 0 ) {
2793
114k
                    for (size_t j = 0; j < 512; j++) {
2794
114k
                        curModifier.push_back(1);
2795
114k
                    }
2796
224
                } else {
2797
2.12k
                    for (auto& c : curModifier) {
2798
2.12k
                        c++;
2799
2.12k
                    }
2800
24
                }
2801
248
            }
2802
593
        }
2803
2804
743
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
743
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
743
        const auto& result = results.back();
2811
2812
743
        if ( result.second != std::nullopt ) {
2813
193
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
193
        }
2820
2821
743
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
743
        if ( options.disableTests == false ) {
2830
743
            tests::test(op, result.second);
2831
743
        }
2832
2833
743
        postprocess(module, op, result);
2834
743
    }
2835
2836
153
    if ( options.noCompare == false ) {
2837
150
        compare(operations, results, data, size);
2838
150
    }
2839
153
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SCRYPT>::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
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
6
    if ( options.noCompare == false ) {
2837
5
        compare(operations, results, data, size);
2838
5
    }
2839
6
}
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
366
    do {
2725
366
        auto op = getOp(&parentDs, data, size);
2726
366
        auto module = getModule(parentDs);
2727
366
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
366
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
366
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
366
    } 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
72
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
72
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
72
            moduleIDs.insert(moduleID);
2756
72
        }
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
261
            auto& prevModule = operations[i-1].first;
2788
261
            auto& prevOp = operations[i-1].second;
2789
2790
261
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
121
                auto& curModifier = op.modifier.GetVectorPtr();
2792
121
                if ( curModifier.size() == 0 ) {
2793
52.3k
                    for (size_t j = 0; j < 512; j++) {
2794
52.2k
                        curModifier.push_back(1);
2795
52.2k
                    }
2796
102
                } else {
2797
4.95k
                    for (auto& c : curModifier) {
2798
4.95k
                        c++;
2799
4.95k
                    }
2800
19
                }
2801
121
            }
2802
261
        }
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
108
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
108
        }
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
72
        compare(operations, results, data, size);
2838
72
    }
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
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
111
    do {
2725
111
        auto op = getOp(&parentDs, data, size);
2726
111
        auto module = getModule(parentDs);
2727
111
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
111
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
111
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
111
    } 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
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
10
        std::set<uint64_t> operationModuleIDs;
2759
77
        for (const auto& op : operations) {
2760
77
            operationModuleIDs.insert(op.first->ID);
2761
77
        }
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
87
    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
69
            auto& prevModule = operations[i-1].first;
2788
69
            auto& prevOp = operations[i-1].second;
2789
2790
69
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
37
                auto& curModifier = op.modifier.GetVectorPtr();
2792
37
                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
261
                    for (auto& c : curModifier) {
2798
261
                        c++;
2799
261
                    }
2800
11
                }
2801
37
            }
2802
69
        }
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
10
    if ( options.noCompare == false ) {
2837
8
        compare(operations, results, data, size);
2838
8
    }
2839
10
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF>::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
94
    do {
2725
94
        auto op = getOp(&parentDs, data, size);
2726
94
        auto module = getModule(parentDs);
2727
94
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
94
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
94
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
94
    } 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
77
        for (const auto& op : operations) {
2760
77
            operationModuleIDs.insert(op.first->ID);
2761
77
        }
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
85
    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
70
            auto& prevModule = operations[i-1].first;
2788
70
            auto& prevOp = operations[i-1].second;
2789
2790
70
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
32
                auto& curModifier = op.modifier.GetVectorPtr();
2792
32
                if ( curModifier.size() == 0 ) {
2793
9.74k
                    for (size_t j = 0; j < 512; j++) {
2794
9.72k
                        curModifier.push_back(1);
2795
9.72k
                    }
2796
19
                } else {
2797
427
                    for (auto& c : curModifier) {
2798
427
                        c++;
2799
427
                    }
2800
13
                }
2801
32
            }
2802
70
        }
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
8
    if ( options.noCompare == false ) {
2837
7
        compare(operations, results, data, size);
2838
7
    }
2839
8
}
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
147
    do {
2725
147
        auto op = getOp(&parentDs, data, size);
2726
147
        auto module = getModule(parentDs);
2727
147
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
147
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
147
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
147
    } 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
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
10
        std::set<uint64_t> operationModuleIDs;
2759
81
        for (const auto& op : operations) {
2760
81
            operationModuleIDs.insert(op.first->ID);
2761
81
        }
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
91
    for (size_t i = 0; i < operations.size(); i++) {
2781
81
        auto& operation = operations[i];
2782
2783
81
        auto& module = operation.first;
2784
81
        auto& op = operation.second;
2785
2786
81
        if ( i > 0 ) {
2787
75
            auto& prevModule = operations[i-1].first;
2788
75
            auto& prevOp = operations[i-1].second;
2789
2790
75
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
34
                auto& curModifier = op.modifier.GetVectorPtr();
2792
34
                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
136
                    for (auto& c : curModifier) {
2798
136
                        c++;
2799
136
                    }
2800
8
                }
2801
34
            }
2802
75
        }
2803
2804
81
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
81
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
81
        const auto& result = results.back();
2811
2812
81
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
81
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
81
        if ( options.disableTests == false ) {
2830
81
            tests::test(op, result.second);
2831
81
        }
2832
2833
81
        postprocess(module, op, result);
2834
81
    }
2835
2836
10
    if ( options.noCompare == false ) {
2837
6
        compare(operations, results, data, size);
2838
6
    }
2839
10
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_PBKDF2>::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
354
    do {
2725
354
        auto op = getOp(&parentDs, data, size);
2726
354
        auto module = getModule(parentDs);
2727
354
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
354
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
354
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
354
    } 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
55
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
55
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
55
            moduleIDs.insert(moduleID);
2756
55
        }
2757
2758
58
        std::set<uint64_t> operationModuleIDs;
2759
305
        for (const auto& op : operations) {
2760
305
            operationModuleIDs.insert(op.first->ID);
2761
305
        }
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
363
    for (size_t i = 0; i < operations.size(); i++) {
2781
305
        auto& operation = operations[i];
2782
2783
305
        auto& module = operation.first;
2784
305
        auto& op = operation.second;
2785
2786
305
        if ( i > 0 ) {
2787
250
            auto& prevModule = operations[i-1].first;
2788
250
            auto& prevOp = operations[i-1].second;
2789
2790
250
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
111
                auto& curModifier = op.modifier.GetVectorPtr();
2792
111
                if ( curModifier.size() == 0 ) {
2793
47.1k
                    for (size_t j = 0; j < 512; j++) {
2794
47.1k
                        curModifier.push_back(1);
2795
47.1k
                    }
2796
92
                } else {
2797
6.84k
                    for (auto& c : curModifier) {
2798
6.84k
                        c++;
2799
6.84k
                    }
2800
19
                }
2801
111
            }
2802
250
        }
2803
2804
305
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
305
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
305
        const auto& result = results.back();
2811
2812
305
        if ( result.second != std::nullopt ) {
2813
185
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
185
        }
2820
2821
305
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
305
        if ( options.disableTests == false ) {
2830
305
            tests::test(op, result.second);
2831
305
        }
2832
2833
305
        postprocess(module, op, result);
2834
305
    }
2835
2836
58
    if ( options.noCompare == false ) {
2837
55
        compare(operations, results, data, size);
2838
55
    }
2839
58
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_ARGON2>::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
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
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
5
        for (const auto& op : operations) {
2760
5
            operationModuleIDs.insert(op.first->ID);
2761
5
        }
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
7
    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
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
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
3
        }
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
2
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_SSH>::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
108
    do {
2725
108
        auto op = getOp(&parentDs, data, size);
2726
108
        auto module = getModule(parentDs);
2727
108
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
108
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
108
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
108
    } 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
91
        for (const auto& op : operations) {
2760
91
            operationModuleIDs.insert(op.first->ID);
2761
91
        }
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
99
    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
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
14.3k
                    for (size_t j = 0; j < 512; j++) {
2794
14.3k
                        curModifier.push_back(1);
2795
14.3k
                    }
2796
28
                } else {
2797
171
                    for (auto& c : curModifier) {
2798
171
                        c++;
2799
171
                    }
2800
13
                }
2801
41
            }
2802
84
        }
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
8
    if ( options.noCompare == false ) {
2837
7
        compare(operations, results, data, size);
2838
7
    }
2839
8
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_X963>::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
128
    do {
2725
128
        auto op = getOp(&parentDs, data, size);
2726
128
        auto module = getModule(parentDs);
2727
128
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
128
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
128
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
3
            break;
2736
3
        }
2737
128
    } 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
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
8
        std::set<uint64_t> operationModuleIDs;
2759
95
        for (const auto& op : operations) {
2760
95
            operationModuleIDs.insert(op.first->ID);
2761
95
        }
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
103
    for (size_t i = 0; i < operations.size(); i++) {
2781
95
        auto& operation = operations[i];
2782
2783
95
        auto& module = operation.first;
2784
95
        auto& op = operation.second;
2785
2786
95
        if ( i > 0 ) {
2787
89
            auto& prevModule = operations[i-1].first;
2788
89
            auto& prevOp = operations[i-1].second;
2789
2790
89
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
34
                auto& curModifier = op.modifier.GetVectorPtr();
2792
34
                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
144
                    for (auto& c : curModifier) {
2798
144
                        c++;
2799
144
                    }
2800
8
                }
2801
34
            }
2802
89
        }
2803
2804
95
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
95
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
95
        const auto& result = results.back();
2811
2812
95
        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
95
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
95
        if ( options.disableTests == false ) {
2830
95
            tests::test(op, result.second);
2831
95
        }
2832
2833
95
        postprocess(module, op, result);
2834
95
    }
2835
2836
8
    if ( options.noCompare == false ) {
2837
6
        compare(operations, results, data, size);
2838
6
    }
2839
8
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::KDF_BCRYPT>::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
4
            break;
2736
4
        }
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
310
                    for (auto& c : curModifier) {
2798
310
                        c++;
2799
310
                    }
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::Buffer, cryptofuzz::operation::KDF_SP_800_108>::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
151
    do {
2725
151
        auto op = getOp(&parentDs, data, size);
2726
151
        auto module = getModule(parentDs);
2727
151
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
151
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
151
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
151
    } 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
11
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
11
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
11
            moduleIDs.insert(moduleID);
2756
11
        }
2757
2758
14
        std::set<uint64_t> operationModuleIDs;
2759
117
        for (const auto& op : operations) {
2760
117
            operationModuleIDs.insert(op.first->ID);
2761
117
        }
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
131
    for (size_t i = 0; i < operations.size(); i++) {
2781
117
        auto& operation = operations[i];
2782
2783
117
        auto& module = operation.first;
2784
117
        auto& op = operation.second;
2785
2786
117
        if ( i > 0 ) {
2787
106
            auto& prevModule = operations[i-1].first;
2788
106
            auto& prevOp = operations[i-1].second;
2789
2790
106
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
44
                auto& curModifier = op.modifier.GetVectorPtr();
2792
44
                if ( curModifier.size() == 0 ) {
2793
18.4k
                    for (size_t j = 0; j < 512; j++) {
2794
18.4k
                        curModifier.push_back(1);
2795
18.4k
                    }
2796
36
                } else {
2797
716
                    for (auto& c : curModifier) {
2798
716
                        c++;
2799
716
                    }
2800
8
                }
2801
44
            }
2802
106
        }
2803
2804
117
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
117
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
117
        const auto& result = results.back();
2811
2812
117
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
117
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
117
        if ( options.disableTests == false ) {
2830
117
            tests::test(op, result.second);
2831
117
        }
2832
2833
117
        postprocess(module, op, result);
2834
117
    }
2835
2836
14
    if ( options.noCompare == false ) {
2837
11
        compare(operations, results, data, size);
2838
11
    }
2839
14
}
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
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
122
    do {
2725
122
        auto op = getOp(&parentDs, data, size);
2726
122
        auto module = getModule(parentDs);
2727
122
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
122
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
122
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
122
    } 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
88
        for (const auto& op : operations) {
2760
88
            operationModuleIDs.insert(op.first->ID);
2761
88
        }
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
97
    for (size_t i = 0; i < operations.size(); i++) {
2781
88
        auto& operation = operations[i];
2782
2783
88
        auto& module = operation.first;
2784
88
        auto& op = operation.second;
2785
2786
88
        if ( i > 0 ) {
2787
81
            auto& prevModule = operations[i-1].first;
2788
81
            auto& prevOp = operations[i-1].second;
2789
2790
81
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
31
                auto& curModifier = op.modifier.GetVectorPtr();
2792
31
                if ( curModifier.size() == 0 ) {
2793
8.72k
                    for (size_t j = 0; j < 512; j++) {
2794
8.70k
                        curModifier.push_back(1);
2795
8.70k
                    }
2796
17
                } else {
2797
162
                    for (auto& c : curModifier) {
2798
162
                        c++;
2799
162
                    }
2800
14
                }
2801
31
            }
2802
81
        }
2803
2804
88
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
88
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
88
        const auto& result = results.back();
2811
2812
88
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
88
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
88
        if ( options.disableTests == false ) {
2830
88
            tests::test(op, result.second);
2831
88
        }
2832
2833
88
        postprocess(module, op, result);
2834
88
    }
2835
2836
9
    if ( options.noCompare == false ) {
2837
7
        compare(operations, results, data, size);
2838
7
    }
2839
9
}
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
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
61
    do {
2725
61
        auto op = getOp(&parentDs, data, size);
2726
61
        auto module = getModule(parentDs);
2727
61
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
61
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
61
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
61
    } 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
61
        for (const auto& op : operations) {
2760
61
            operationModuleIDs.insert(op.first->ID);
2761
61
        }
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
67
    for (size_t i = 0; i < operations.size(); i++) {
2781
61
        auto& operation = operations[i];
2782
2783
61
        auto& module = operation.first;
2784
61
        auto& op = operation.second;
2785
2786
61
        if ( i > 0 ) {
2787
55
            auto& prevModule = operations[i-1].first;
2788
55
            auto& prevOp = operations[i-1].second;
2789
2790
55
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
23
                auto& curModifier = op.modifier.GetVectorPtr();
2792
23
                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
13
                } else {
2797
683
                    for (auto& c : curModifier) {
2798
683
                        c++;
2799
683
                    }
2800
13
                }
2801
23
            }
2802
55
        }
2803
2804
61
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
61
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
61
        const auto& result = results.back();
2811
2812
61
        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
61
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
61
        if ( options.disableTests == false ) {
2830
61
            tests::test(op, result.second);
2831
61
        }
2832
2833
61
        postprocess(module, op, result);
2834
61
    }
2835
2836
6
    if ( options.noCompare == false ) {
2837
6
        compare(operations, results, data, size);
2838
6
    }
2839
6
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_PrivateToPublic>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
6.01k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
6.01k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
6.01k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
8.61k
    do {
2725
8.61k
        auto op = getOp(&parentDs, data, size);
2726
8.61k
        auto module = getModule(parentDs);
2727
8.61k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
8.61k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
8.61k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
93
            break;
2736
93
        }
2737
8.61k
    } while ( parentDs.Get<bool>() == true );
2738
2739
6.01k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
6.01k
#if 1
2745
6.01k
    {
2746
6.01k
        std::set<uint64_t> moduleIDs;
2747
6.01k
        for (const auto& m : modules ) {
2748
5.82k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
5.82k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
5.82k
            moduleIDs.insert(moduleID);
2756
5.82k
        }
2757
2758
6.01k
        std::set<uint64_t> operationModuleIDs;
2759
8.28k
        for (const auto& op : operations) {
2760
8.28k
            operationModuleIDs.insert(op.first->ID);
2761
8.28k
        }
2762
2763
6.01k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
6.01k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
6.01k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
6.01k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
6.01k
    }
2771
6.01k
#endif
2772
2773
6.01k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
6.01k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
14.2k
    for (size_t i = 0; i < operations.size(); i++) {
2781
8.28k
        auto& operation = operations[i];
2782
2783
8.28k
        auto& module = operation.first;
2784
8.28k
        auto& op = operation.second;
2785
2786
8.28k
        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
821
                auto& curModifier = op.modifier.GetVectorPtr();
2792
821
                if ( curModifier.size() == 0 ) {
2793
184k
                    for (size_t j = 0; j < 512; j++) {
2794
184k
                        curModifier.push_back(1);
2795
184k
                    }
2796
461
                } else {
2797
8.91k
                    for (auto& c : curModifier) {
2798
8.91k
                        c++;
2799
8.91k
                    }
2800
461
                }
2801
821
            }
2802
2.45k
        }
2803
2804
8.28k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
8.28k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
8.28k
        const auto& result = results.back();
2811
2812
8.28k
        if ( result.second != std::nullopt ) {
2813
3.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
3.59k
        }
2820
2821
8.28k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.28k
        if ( options.disableTests == false ) {
2830
8.28k
            tests::test(op, result.second);
2831
8.28k
        }
2832
2833
8.28k
        postprocess(module, op, result);
2834
8.28k
    }
2835
2836
6.01k
    if ( options.noCompare == false ) {
2837
5.82k
        compare(operations, results, data, size);
2838
5.82k
    }
2839
6.01k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_ValidatePubkey>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
3.67k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
3.67k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
3.67k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.62k
    do {
2725
5.62k
        auto op = getOp(&parentDs, data, size);
2726
5.62k
        auto module = getModule(parentDs);
2727
5.62k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
5.62k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
5.62k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
79
            break;
2736
79
        }
2737
5.62k
    } while ( parentDs.Get<bool>() == true );
2738
2739
3.67k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
3.67k
#if 1
2745
3.67k
    {
2746
3.67k
        std::set<uint64_t> moduleIDs;
2747
3.67k
        for (const auto& m : modules ) {
2748
3.45k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
3.45k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
3.45k
            moduleIDs.insert(moduleID);
2756
3.45k
        }
2757
2758
3.67k
        std::set<uint64_t> operationModuleIDs;
2759
5.21k
        for (const auto& op : operations) {
2760
5.21k
            operationModuleIDs.insert(op.first->ID);
2761
5.21k
        }
2762
2763
3.67k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
3.67k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
3.67k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
3.67k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
3.67k
    }
2771
3.67k
#endif
2772
2773
3.67k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
3.67k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
8.88k
    for (size_t i = 0; i < operations.size(); i++) {
2781
5.21k
        auto& operation = operations[i];
2782
2783
5.21k
        auto& module = operation.first;
2784
5.21k
        auto& op = operation.second;
2785
2786
5.21k
        if ( i > 0 ) {
2787
1.76k
            auto& prevModule = operations[i-1].first;
2788
1.76k
            auto& prevOp = operations[i-1].second;
2789
2790
1.76k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
495
                auto& curModifier = op.modifier.GetVectorPtr();
2792
495
                if ( curModifier.size() == 0 ) {
2793
57.4k
                    for (size_t j = 0; j < 512; j++) {
2794
57.3k
                        curModifier.push_back(1);
2795
57.3k
                    }
2796
383
                } else {
2797
20.8k
                    for (auto& c : curModifier) {
2798
20.8k
                        c++;
2799
20.8k
                    }
2800
383
                }
2801
495
            }
2802
1.76k
        }
2803
2804
5.21k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5.21k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5.21k
        const auto& result = results.back();
2811
2812
5.21k
        if ( result.second != std::nullopt ) {
2813
1.64k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = 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.64k
        }
2820
2821
5.21k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
5.21k
        if ( options.disableTests == false ) {
2830
5.21k
            tests::test(op, result.second);
2831
5.21k
        }
2832
2833
5.21k
        postprocess(module, op, result);
2834
5.21k
    }
2835
2836
3.67k
    if ( options.noCompare == false ) {
2837
3.45k
        compare(operations, results, data, size);
2838
3.45k
    }
2839
3.67k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECC_KeyPair, cryptofuzz::operation::ECC_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
6.56k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
6.56k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
6.56k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
10.0k
    do {
2725
10.0k
        auto op = getOp(&parentDs, data, size);
2726
10.0k
        auto module = getModule(parentDs);
2727
10.0k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
10.0k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
10.0k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
170
            break;
2736
170
        }
2737
10.0k
    } while ( parentDs.Get<bool>() == true );
2738
2739
6.56k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
6.56k
#if 1
2745
6.56k
    {
2746
6.56k
        std::set<uint64_t> moduleIDs;
2747
6.56k
        for (const auto& m : modules ) {
2748
6.40k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
6.40k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
6.40k
            moduleIDs.insert(moduleID);
2756
6.40k
        }
2757
2758
6.56k
        std::set<uint64_t> operationModuleIDs;
2759
9.75k
        for (const auto& op : operations) {
2760
9.75k
            operationModuleIDs.insert(op.first->ID);
2761
9.75k
        }
2762
2763
6.56k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
6.56k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
6.56k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
6.56k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
6.56k
    }
2771
6.56k
#endif
2772
2773
6.56k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
6.56k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
16.3k
    for (size_t i = 0; i < operations.size(); i++) {
2781
9.75k
        auto& operation = operations[i];
2782
2783
9.75k
        auto& module = operation.first;
2784
9.75k
        auto& op = operation.second;
2785
2786
9.75k
        if ( i > 0 ) {
2787
3.35k
            auto& prevModule = operations[i-1].first;
2788
3.35k
            auto& prevOp = operations[i-1].second;
2789
2790
3.35k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
463
                auto& curModifier = op.modifier.GetVectorPtr();
2792
463
                if ( curModifier.size() == 0 ) {
2793
111k
                    for (size_t j = 0; j < 512; j++) {
2794
111k
                        curModifier.push_back(1);
2795
111k
                    }
2796
246
                } else {
2797
17.3k
                    for (auto& c : curModifier) {
2798
17.3k
                        c++;
2799
17.3k
                    }
2800
246
                }
2801
463
            }
2802
3.35k
        }
2803
2804
9.75k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
9.75k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
9.75k
        const auto& result = results.back();
2811
2812
9.75k
        if ( result.second != std::nullopt ) {
2813
3.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
3.21k
        }
2820
2821
9.75k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.75k
        if ( options.disableTests == false ) {
2830
9.75k
            tests::test(op, result.second);
2831
9.75k
        }
2832
2833
9.75k
        postprocess(module, op, result);
2834
9.75k
    }
2835
2836
6.56k
    if ( options.noCompare == false ) {
2837
6.40k
        compare(operations, results, data, size);
2838
6.40k
    }
2839
6.56k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECCSI_Signature, cryptofuzz::operation::ECCSI_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
418
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
418
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
418
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.00k
    do {
2725
1.00k
        auto op = getOp(&parentDs, data, size);
2726
1.00k
        auto module = getModule(parentDs);
2727
1.00k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.00k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.00k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
33
            break;
2736
33
        }
2737
1.00k
    } while ( parentDs.Get<bool>() == true );
2738
2739
418
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
418
#if 1
2745
418
    {
2746
418
        std::set<uint64_t> moduleIDs;
2747
418
        for (const auto& m : modules ) {
2748
326
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
326
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
326
            moduleIDs.insert(moduleID);
2756
326
        }
2757
2758
418
        std::set<uint64_t> operationModuleIDs;
2759
811
        for (const auto& op : operations) {
2760
811
            operationModuleIDs.insert(op.first->ID);
2761
811
        }
2762
2763
418
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
418
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
418
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
418
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
418
    }
2771
418
#endif
2772
2773
418
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
418
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.22k
    for (size_t i = 0; i < operations.size(); i++) {
2781
811
        auto& operation = operations[i];
2782
2783
811
        auto& module = operation.first;
2784
811
        auto& op = operation.second;
2785
2786
811
        if ( i > 0 ) {
2787
485
            auto& prevModule = operations[i-1].first;
2788
485
            auto& prevOp = operations[i-1].second;
2789
2790
485
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
174
                auto& curModifier = op.modifier.GetVectorPtr();
2792
174
                if ( curModifier.size() == 0 ) {
2793
24.1k
                    for (size_t j = 0; j < 512; j++) {
2794
24.0k
                        curModifier.push_back(1);
2795
24.0k
                    }
2796
127
                } else {
2797
2.18k
                    for (auto& c : curModifier) {
2798
2.18k
                        c++;
2799
2.18k
                    }
2800
127
                }
2801
174
            }
2802
485
        }
2803
2804
811
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
811
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
811
        const auto& result = results.back();
2811
2812
811
        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
811
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
811
        if ( options.disableTests == false ) {
2830
811
            tests::test(op, result.second);
2831
811
        }
2832
2833
811
        postprocess(module, op, result);
2834
811
    }
2835
2836
418
    if ( options.noCompare == false ) {
2837
326
        compare(operations, results, data, size);
2838
326
    }
2839
418
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::ECDSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
5.04k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
5.04k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
5.04k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
10.2k
    do {
2725
10.2k
        auto op = getOp(&parentDs, data, size);
2726
10.2k
        auto module = getModule(parentDs);
2727
10.2k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
10.2k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
10.2k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
328
            break;
2736
328
        }
2737
10.2k
    } while ( parentDs.Get<bool>() == true );
2738
2739
5.04k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
5.04k
#if 1
2745
5.04k
    {
2746
5.04k
        std::set<uint64_t> moduleIDs;
2747
5.04k
        for (const auto& m : modules ) {
2748
4.90k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4.90k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4.90k
            moduleIDs.insert(moduleID);
2756
4.90k
        }
2757
2758
5.04k
        std::set<uint64_t> operationModuleIDs;
2759
9.98k
        for (const auto& op : operations) {
2760
9.98k
            operationModuleIDs.insert(op.first->ID);
2761
9.98k
        }
2762
2763
5.04k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
5.04k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
5.04k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
5.04k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
5.04k
    }
2771
5.04k
#endif
2772
2773
5.04k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
5.04k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
15.0k
    for (size_t i = 0; i < operations.size(); i++) {
2781
9.98k
        auto& operation = operations[i];
2782
2783
9.98k
        auto& module = operation.first;
2784
9.98k
        auto& op = operation.second;
2785
2786
9.98k
        if ( i > 0 ) {
2787
5.08k
            auto& prevModule = operations[i-1].first;
2788
5.08k
            auto& prevOp = operations[i-1].second;
2789
2790
5.08k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
1.26k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
1.26k
                if ( curModifier.size() == 0 ) {
2793
103k
                    for (size_t j = 0; j < 512; j++) {
2794
103k
                        curModifier.push_back(1);
2795
103k
                    }
2796
1.06k
                } else {
2797
130k
                    for (auto& c : curModifier) {
2798
130k
                        c++;
2799
130k
                    }
2800
1.06k
                }
2801
1.26k
            }
2802
5.08k
        }
2803
2804
9.98k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
9.98k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
9.98k
        const auto& result = results.back();
2811
2812
9.98k
        if ( result.second != std::nullopt ) {
2813
6.35k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
6.35k
        }
2820
2821
9.98k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.98k
        if ( options.disableTests == false ) {
2830
9.98k
            tests::test(op, result.second);
2831
9.98k
        }
2832
2833
9.98k
        postprocess(module, op, result);
2834
9.98k
    }
2835
2836
5.04k
    if ( options.noCompare == false ) {
2837
4.90k
        compare(operations, results, data, size);
2838
4.90k
    }
2839
5.04k
}
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
5
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
5
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
5
    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
5
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
5
#if 1
2745
5
    {
2746
5
        std::set<uint64_t> moduleIDs;
2747
5
        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
5
        std::set<uint64_t> operationModuleIDs;
2759
9
        for (const auto& op : operations) {
2760
9
            operationModuleIDs.insert(op.first->ID);
2761
9
        }
2762
2763
5
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
5
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
5
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
5
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
5
    }
2771
5
#endif
2772
2773
5
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
5
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
14
    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
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
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
1.29k
                    for (auto& c : curModifier) {
2798
1.29k
                        c++;
2799
1.29k
                    }
2800
2
                }
2801
2
            }
2802
4
        }
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
5
    if ( options.noCompare == false ) {
2837
5
        compare(operations, results, data, size);
2838
5
    }
2839
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::ECDSA_Signature, cryptofuzz::operation::Schnorr_Sign>::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
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
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
8
        for (const auto& op : operations) {
2760
8
            operationModuleIDs.insert(op.first->ID);
2761
8
        }
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
11
    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
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
134
                    for (auto& c : curModifier) {
2798
134
                        c++;
2799
134
                    }
2800
2
                }
2801
2
            }
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
3
    if ( options.noCompare == false ) {
2837
3
        compare(operations, results, data, size);
2838
3
    }
2839
3
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECCSI_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
267
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
267
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
267
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
655
    do {
2725
655
        auto op = getOp(&parentDs, data, size);
2726
655
        auto module = getModule(parentDs);
2727
655
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
655
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
655
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
19
            break;
2736
19
        }
2737
655
    } while ( parentDs.Get<bool>() == true );
2738
2739
267
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
267
#if 1
2745
267
    {
2746
267
        std::set<uint64_t> moduleIDs;
2747
267
        for (const auto& m : modules ) {
2748
160
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
160
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
160
            moduleIDs.insert(moduleID);
2756
160
        }
2757
2758
267
        std::set<uint64_t> operationModuleIDs;
2759
445
        for (const auto& op : operations) {
2760
445
            operationModuleIDs.insert(op.first->ID);
2761
445
        }
2762
2763
267
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
267
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
267
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
267
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
267
    }
2771
267
#endif
2772
2773
267
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
267
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
712
    for (size_t i = 0; i < operations.size(); i++) {
2781
445
        auto& operation = operations[i];
2782
2783
445
        auto& module = operation.first;
2784
445
        auto& op = operation.second;
2785
2786
445
        if ( i > 0 ) {
2787
285
            auto& prevModule = operations[i-1].first;
2788
285
            auto& prevOp = operations[i-1].second;
2789
2790
285
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
132
                auto& curModifier = op.modifier.GetVectorPtr();
2792
132
                if ( curModifier.size() == 0 ) {
2793
27.7k
                    for (size_t j = 0; j < 512; j++) {
2794
27.6k
                        curModifier.push_back(1);
2795
27.6k
                    }
2796
78
                } else {
2797
2.61k
                    for (auto& c : curModifier) {
2798
2.61k
                        c++;
2799
2.61k
                    }
2800
78
                }
2801
132
            }
2802
285
        }
2803
2804
445
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
445
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
445
        const auto& result = results.back();
2811
2812
445
        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
445
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
445
        if ( options.disableTests == false ) {
2830
445
            tests::test(op, result.second);
2831
445
        }
2832
2833
445
        postprocess(module, op, result);
2834
445
    }
2835
2836
267
    if ( options.noCompare == false ) {
2837
160
        compare(operations, results, data, size);
2838
160
    }
2839
267
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECDSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.74k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.74k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.74k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
5.51k
    do {
2725
5.51k
        auto op = getOp(&parentDs, data, size);
2726
5.51k
        auto module = getModule(parentDs);
2727
5.51k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
5.51k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
5.51k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
120
            break;
2736
120
        }
2737
5.51k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.74k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.74k
#if 1
2745
2.74k
    {
2746
2.74k
        std::set<uint64_t> moduleIDs;
2747
2.74k
        for (const auto& m : modules ) {
2748
2.58k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.58k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.58k
            moduleIDs.insert(moduleID);
2756
2.58k
        }
2757
2758
2.74k
        std::set<uint64_t> operationModuleIDs;
2759
5.19k
        for (const auto& op : operations) {
2760
5.19k
            operationModuleIDs.insert(op.first->ID);
2761
5.19k
        }
2762
2763
2.74k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.74k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.74k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.74k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2.74k
    }
2771
2.74k
#endif
2772
2773
2.74k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.74k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
7.94k
    for (size_t i = 0; i < operations.size(); i++) {
2781
5.19k
        auto& operation = operations[i];
2782
2783
5.19k
        auto& module = operation.first;
2784
5.19k
        auto& op = operation.second;
2785
2786
5.19k
        if ( i > 0 ) {
2787
2.60k
            auto& prevModule = operations[i-1].first;
2788
2.60k
            auto& prevOp = operations[i-1].second;
2789
2790
2.60k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
778
                auto& curModifier = op.modifier.GetVectorPtr();
2792
778
                if ( curModifier.size() == 0 ) {
2793
126k
                    for (size_t j = 0; j < 512; j++) {
2794
125k
                        curModifier.push_back(1);
2795
125k
                    }
2796
532
                } else {
2797
68.0k
                    for (auto& c : curModifier) {
2798
68.0k
                        c++;
2799
68.0k
                    }
2800
532
                }
2801
778
            }
2802
2.60k
        }
2803
2804
5.19k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
5.19k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
5.19k
        const auto& result = results.back();
2811
2812
5.19k
        if ( result.second != std::nullopt ) {
2813
2.46k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
2.46k
        }
2820
2821
5.19k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.19k
        if ( options.disableTests == false ) {
2830
5.19k
            tests::test(op, result.second);
2831
5.19k
        }
2832
2833
5.19k
        postprocess(module, op, result);
2834
5.19k
    }
2835
2836
2.74k
    if ( options.noCompare == false ) {
2837
2.58k
        compare(operations, results, data, size);
2838
2.58k
    }
2839
2.74k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECGDSA_Verify>::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
4
    do {
2725
4
        auto op = getOp(&parentDs, data, size);
2726
4
        auto module = getModule(parentDs);
2727
4
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
4
    } 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
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
3
        std::set<uint64_t> operationModuleIDs;
2759
3
        for (const auto& op : operations) {
2760
2
            operationModuleIDs.insert(op.first->ID);
2761
2
        }
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
5
    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
4
                    for (auto& c : curModifier) {
2798
4
                        c++;
2799
4
                    }
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
3
    if ( options.noCompare == false ) {
2837
1
        compare(operations, results, data, size);
2838
1
    }
2839
3
}
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
4
                    for (auto& c : curModifier) {
2798
4
                        c++;
2799
4
                    }
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
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
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
664
                    for (auto& c : curModifier) {
2798
664
                        c++;
2799
664
                    }
2800
3
                }
2801
3
            }
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<bool, cryptofuzz::operation::DSA_Verify>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
12
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
12
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
12
    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
0
            break;
2736
0
        }
2737
22
    } while ( parentDs.Get<bool>() == true );
2738
2739
12
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
12
#if 1
2745
12
    {
2746
12
        std::set<uint64_t> moduleIDs;
2747
12
        for (const auto& m : modules ) {
2748
12
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
12
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
12
            moduleIDs.insert(moduleID);
2756
12
        }
2757
2758
12
        std::set<uint64_t> operationModuleIDs;
2759
22
        for (const auto& op : operations) {
2760
22
            operationModuleIDs.insert(op.first->ID);
2761
22
        }
2762
2763
12
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
12
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
12
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
12
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
12
    }
2771
12
#endif
2772
2773
12
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
12
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
34
    for (size_t i = 0; i < operations.size(); i++) {
2781
22
        auto& operation = operations[i];
2782
2783
22
        auto& module = operation.first;
2784
22
        auto& op = operation.second;
2785
2786
22
        if ( i > 0 ) {
2787
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
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
197
                    for (auto& c : curModifier) {
2798
197
                        c++;
2799
197
                    }
2800
1
                }
2801
5
            }
2802
10
        }
2803
2804
22
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
22
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
22
        const auto& result = results.back();
2811
2812
22
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
22
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
22
        if ( options.disableTests == false ) {
2830
22
            tests::test(op, result.second);
2831
22
        }
2832
2833
22
        postprocess(module, op, result);
2834
22
    }
2835
2836
12
    if ( options.noCompare == false ) {
2837
12
        compare(operations, results, data, size);
2838
12
    }
2839
12
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Signature, cryptofuzz::operation::DSA_Sign>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
13
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
13
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
13
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
26
    do {
2725
26
        auto op = getOp(&parentDs, data, size);
2726
26
        auto module = getModule(parentDs);
2727
26
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
26
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
26
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
26
    } while ( parentDs.Get<bool>() == true );
2738
2739
13
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
13
#if 1
2745
13
    {
2746
13
        std::set<uint64_t> moduleIDs;
2747
13
        for (const auto& m : modules ) {
2748
13
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
13
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
13
            moduleIDs.insert(moduleID);
2756
13
        }
2757
2758
13
        std::set<uint64_t> operationModuleIDs;
2759
26
        for (const auto& op : operations) {
2760
26
            operationModuleIDs.insert(op.first->ID);
2761
26
        }
2762
2763
13
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
13
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
13
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
13
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
13
    }
2771
13
#endif
2772
2773
13
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
13
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
39
    for (size_t i = 0; i < operations.size(); i++) {
2781
26
        auto& operation = operations[i];
2782
2783
26
        auto& module = operation.first;
2784
26
        auto& op = operation.second;
2785
2786
26
        if ( i > 0 ) {
2787
13
            auto& prevModule = operations[i-1].first;
2788
13
            auto& prevOp = operations[i-1].second;
2789
2790
13
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
9
                auto& curModifier = op.modifier.GetVectorPtr();
2792
9
                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
6
                } else {
2797
445
                    for (auto& c : curModifier) {
2798
445
                        c++;
2799
445
                    }
2800
6
                }
2801
9
            }
2802
13
        }
2803
2804
26
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
26
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
26
        const auto& result = results.back();
2811
2812
26
        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
26
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
26
        if ( options.disableTests == false ) {
2830
26
            tests::test(op, result.second);
2831
26
        }
2832
2833
26
        postprocess(module, op, result);
2834
26
    }
2835
2836
13
    if ( options.noCompare == false ) {
2837
13
        compare(operations, results, data, size);
2838
13
    }
2839
13
}
cryptofuzz::ExecutorBase<cryptofuzz::component::DSA_Parameters, cryptofuzz::operation::DSA_GenerateParameters>::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
4
    do {
2725
4
        auto op = getOp(&parentDs, data, size);
2726
4
        auto module = getModule(parentDs);
2727
4
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
4
    } 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
4
        for (const auto& op : operations) {
2760
4
            operationModuleIDs.insert(op.first->ID);
2761
4
        }
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
6
    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
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
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
22
                    for (auto& c : curModifier) {
2798
22
                        c++;
2799
22
                    }
2800
2
                }
2801
2
            }
2802
2
        }
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
2
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
2
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DSA_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
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
0
            break;
2736
0
        }
2737
7
    } 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
7
        for (const auto& op : operations) {
2760
7
            operationModuleIDs.insert(op.first->ID);
2761
7
        }
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
10
    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
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
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
673
                    for (auto& c : curModifier) {
2798
673
                        c++;
2799
673
                    }
2800
3
                }
2801
3
            }
2802
4
        }
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
3
    if ( options.noCompare == false ) {
2837
3
        compare(operations, results, data, size);
2838
3
    }
2839
3
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DSA_GenerateKeyPair>::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
20
    do {
2725
20
        auto op = getOp(&parentDs, data, size);
2726
20
        auto module = getModule(parentDs);
2727
20
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
20
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
20
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
20
    } 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
20
        for (const auto& op : operations) {
2760
20
            operationModuleIDs.insert(op.first->ID);
2761
20
        }
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
30
    for (size_t i = 0; i < operations.size(); i++) {
2781
20
        auto& operation = operations[i];
2782
2783
20
        auto& module = operation.first;
2784
20
        auto& op = operation.second;
2785
2786
20
        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
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
894
                    for (auto& c : curModifier) {
2798
894
                        c++;
2799
894
                    }
2800
3
                }
2801
3
            }
2802
10
        }
2803
2804
20
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
20
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
20
        const auto& result = results.back();
2811
2812
20
        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
20
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
20
        if ( options.disableTests == false ) {
2830
20
            tests::test(op, result.second);
2831
20
        }
2832
2833
20
        postprocess(module, op, result);
2834
20
    }
2835
2836
10
    if ( options.noCompare == false ) {
2837
10
        compare(operations, results, data, size);
2838
10
    }
2839
10
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECDH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
559
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
559
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
559
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.27k
    do {
2725
1.27k
        auto op = getOp(&parentDs, data, size);
2726
1.27k
        auto module = getModule(parentDs);
2727
1.27k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.27k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.27k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
35
            break;
2736
35
        }
2737
1.27k
    } while ( parentDs.Get<bool>() == true );
2738
2739
559
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
559
#if 1
2745
559
    {
2746
559
        std::set<uint64_t> moduleIDs;
2747
559
        for (const auto& m : modules ) {
2748
472
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
472
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
472
            moduleIDs.insert(moduleID);
2756
472
        }
2757
2758
559
        std::set<uint64_t> operationModuleIDs;
2759
1.07k
        for (const auto& op : operations) {
2760
1.07k
            operationModuleIDs.insert(op.first->ID);
2761
1.07k
        }
2762
2763
559
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
559
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
559
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
559
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
559
    }
2771
559
#endif
2772
2773
559
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
559
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
1.63k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.07k
        auto& operation = operations[i];
2782
2783
1.07k
        auto& module = operation.first;
2784
1.07k
        auto& op = operation.second;
2785
2786
1.07k
        if ( i > 0 ) {
2787
605
            auto& prevModule = operations[i-1].first;
2788
605
            auto& prevOp = operations[i-1].second;
2789
2790
605
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
212
                auto& curModifier = op.modifier.GetVectorPtr();
2792
212
                if ( curModifier.size() == 0 ) {
2793
24.1k
                    for (size_t j = 0; j < 512; j++) {
2794
24.0k
                        curModifier.push_back(1);
2795
24.0k
                    }
2796
165
                } else {
2797
2.18k
                    for (auto& c : curModifier) {
2798
2.18k
                        c++;
2799
2.18k
                    }
2800
165
                }
2801
212
            }
2802
605
        }
2803
2804
1.07k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.07k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.07k
        const auto& result = results.back();
2811
2812
1.07k
        if ( result.second != std::nullopt ) {
2813
175
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
175
        }
2820
2821
1.07k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.07k
        if ( options.disableTests == false ) {
2830
1.07k
            tests::test(op, result.second);
2831
1.07k
        }
2832
2833
1.07k
        postprocess(module, op, result);
2834
1.07k
    }
2835
2836
559
    if ( options.noCompare == false ) {
2837
472
        compare(operations, results, data, size);
2838
472
    }
2839
559
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Ciphertext, cryptofuzz::operation::ECIES_Encrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
727
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
727
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
727
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.58k
    do {
2725
1.58k
        auto op = getOp(&parentDs, data, size);
2726
1.58k
        auto module = getModule(parentDs);
2727
1.58k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.58k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.58k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
54
            break;
2736
54
        }
2737
1.58k
    } while ( parentDs.Get<bool>() == true );
2738
2739
727
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
727
#if 1
2745
727
    {
2746
727
        std::set<uint64_t> moduleIDs;
2747
727
        for (const auto& m : modules ) {
2748
594
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
594
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
594
            moduleIDs.insert(moduleID);
2756
594
        }
2757
2758
727
        std::set<uint64_t> operationModuleIDs;
2759
1.29k
        for (const auto& op : operations) {
2760
1.29k
            operationModuleIDs.insert(op.first->ID);
2761
1.29k
        }
2762
2763
727
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
727
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
727
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
727
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
727
    }
2771
727
#endif
2772
2773
727
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
727
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.02k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.29k
        auto& operation = operations[i];
2782
2783
1.29k
        auto& module = operation.first;
2784
1.29k
        auto& op = operation.second;
2785
2786
1.29k
        if ( i > 0 ) {
2787
700
            auto& prevModule = operations[i-1].first;
2788
700
            auto& prevOp = operations[i-1].second;
2789
2790
700
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
181
                auto& curModifier = op.modifier.GetVectorPtr();
2792
181
                if ( curModifier.size() == 0 ) {
2793
32.3k
                    for (size_t j = 0; j < 512; j++) {
2794
32.2k
                        curModifier.push_back(1);
2795
32.2k
                    }
2796
118
                } else {
2797
4.33k
                    for (auto& c : curModifier) {
2798
4.33k
                        c++;
2799
4.33k
                    }
2800
118
                }
2801
181
            }
2802
700
        }
2803
2804
1.29k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.29k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.29k
        const auto& result = results.back();
2811
2812
1.29k
        if ( result.second != std::nullopt ) {
2813
240
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
240
        }
2820
2821
1.29k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.29k
        if ( options.disableTests == false ) {
2830
1.29k
            tests::test(op, result.second);
2831
1.29k
        }
2832
2833
1.29k
        postprocess(module, op, result);
2834
1.29k
    }
2835
2836
727
    if ( options.noCompare == false ) {
2837
594
        compare(operations, results, data, size);
2838
594
    }
2839
727
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::ECIES_Decrypt>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
716
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
716
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
716
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
1.64k
    do {
2725
1.64k
        auto op = getOp(&parentDs, data, size);
2726
1.64k
        auto module = getModule(parentDs);
2727
1.64k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
1.64k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
1.64k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
51
            break;
2736
51
        }
2737
1.64k
    } while ( parentDs.Get<bool>() == true );
2738
2739
716
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
716
#if 1
2745
716
    {
2746
716
        std::set<uint64_t> moduleIDs;
2747
716
        for (const auto& m : modules ) {
2748
573
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
573
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
573
            moduleIDs.insert(moduleID);
2756
573
        }
2757
2758
716
        std::set<uint64_t> operationModuleIDs;
2759
1.33k
        for (const auto& op : operations) {
2760
1.33k
            operationModuleIDs.insert(op.first->ID);
2761
1.33k
        }
2762
2763
716
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
716
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
716
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
716
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
716
    }
2771
716
#endif
2772
2773
716
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
716
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
2.05k
    for (size_t i = 0; i < operations.size(); i++) {
2781
1.33k
        auto& operation = operations[i];
2782
2783
1.33k
        auto& module = operation.first;
2784
1.33k
        auto& op = operation.second;
2785
2786
1.33k
        if ( i > 0 ) {
2787
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
189
                auto& curModifier = op.modifier.GetVectorPtr();
2792
189
                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
124
                } else {
2797
3.62k
                    for (auto& c : curModifier) {
2798
3.62k
                        c++;
2799
3.62k
                    }
2800
124
                }
2801
189
            }
2802
765
        }
2803
2804
1.33k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
1.33k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
1.33k
        const auto& result = results.back();
2811
2812
1.33k
        if ( result.second != std::nullopt ) {
2813
28
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
28
        }
2820
2821
1.33k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
1.33k
        if ( options.disableTests == false ) {
2830
1.33k
            tests::test(op, result.second);
2831
1.33k
        }
2832
2833
1.33k
        postprocess(module, op, result);
2834
1.33k
    }
2835
2836
716
    if ( options.noCompare == false ) {
2837
573
        compare(operations, results, data, size);
2838
573
    }
2839
716
}
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.22k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.22k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.22k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.25k
    do {
2725
4.25k
        auto op = getOp(&parentDs, data, size);
2726
4.25k
        auto module = getModule(parentDs);
2727
4.25k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4.25k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.25k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
106
            break;
2736
106
        }
2737
4.25k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.22k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.22k
#if 1
2745
2.22k
    {
2746
2.22k
        std::set<uint64_t> moduleIDs;
2747
2.22k
        for (const auto& m : modules ) {
2748
2.03k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.03k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.03k
            moduleIDs.insert(moduleID);
2756
2.03k
        }
2757
2758
2.22k
        std::set<uint64_t> operationModuleIDs;
2759
3.87k
        for (const auto& op : operations) {
2760
3.87k
            operationModuleIDs.insert(op.first->ID);
2761
3.87k
        }
2762
2763
2.22k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.22k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.22k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.22k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2.22k
    }
2771
2.22k
#endif
2772
2773
2.22k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.22k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
6.10k
    for (size_t i = 0; i < operations.size(); i++) {
2781
3.87k
        auto& operation = operations[i];
2782
2783
3.87k
        auto& module = operation.first;
2784
3.87k
        auto& op = operation.second;
2785
2786
3.87k
        if ( i > 0 ) {
2787
1.84k
            auto& prevModule = operations[i-1].first;
2788
1.84k
            auto& prevOp = operations[i-1].second;
2789
2790
1.84k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
475
                auto& curModifier = op.modifier.GetVectorPtr();
2792
475
                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
388
                } else {
2797
30.1k
                    for (auto& c : curModifier) {
2798
30.1k
                        c++;
2799
30.1k
                    }
2800
388
                }
2801
475
            }
2802
1.84k
        }
2803
2804
3.87k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
3.87k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
3.87k
        const auto& result = results.back();
2811
2812
3.87k
        if ( result.second != std::nullopt ) {
2813
209
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
209
        }
2820
2821
3.87k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.87k
        if ( options.disableTests == false ) {
2830
3.87k
            tests::test(op, result.second);
2831
3.87k
        }
2832
2833
3.87k
        postprocess(module, op, result);
2834
3.87k
    }
2835
2836
2.22k
    if ( options.noCompare == false ) {
2837
2.03k
        compare(operations, results, data, size);
2838
2.03k
    }
2839
2.22k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Sub>::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
11
                    for (auto& c : curModifier) {
2798
11
                        c++;
2799
11
                    }
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::BignumPair, cryptofuzz::operation::ECC_Point_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
2.78k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
2.78k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
2.78k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
4.42k
    do {
2725
4.42k
        auto op = getOp(&parentDs, data, size);
2726
4.42k
        auto module = getModule(parentDs);
2727
4.42k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4.42k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4.42k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
73
            break;
2736
73
        }
2737
4.42k
    } while ( parentDs.Get<bool>() == true );
2738
2739
2.78k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
2.78k
#if 1
2745
2.78k
    {
2746
2.78k
        std::set<uint64_t> moduleIDs;
2747
2.78k
        for (const auto& m : modules ) {
2748
2.60k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
2.60k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
2.60k
            moduleIDs.insert(moduleID);
2756
2.60k
        }
2757
2758
2.78k
        std::set<uint64_t> operationModuleIDs;
2759
4.10k
        for (const auto& op : operations) {
2760
4.10k
            operationModuleIDs.insert(op.first->ID);
2761
4.10k
        }
2762
2763
2.78k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
2.78k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
2.78k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
2.78k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
2.78k
    }
2771
2.78k
#endif
2772
2773
2.78k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
2.78k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
6.88k
    for (size_t i = 0; i < operations.size(); i++) {
2781
4.10k
        auto& operation = operations[i];
2782
2783
4.10k
        auto& module = operation.first;
2784
4.10k
        auto& op = operation.second;
2785
2786
4.10k
        if ( i > 0 ) {
2787
1.49k
            auto& prevModule = operations[i-1].first;
2788
1.49k
            auto& prevOp = operations[i-1].second;
2789
2790
1.49k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
377
                auto& curModifier = op.modifier.GetVectorPtr();
2792
377
                if ( curModifier.size() == 0 ) {
2793
41.5k
                    for (size_t j = 0; j < 512; j++) {
2794
41.4k
                        curModifier.push_back(1);
2795
41.4k
                    }
2796
296
                } else {
2797
32.9k
                    for (auto& c : curModifier) {
2798
32.9k
                        c++;
2799
32.9k
                    }
2800
296
                }
2801
377
            }
2802
1.49k
        }
2803
2804
4.10k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
4.10k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
4.10k
        const auto& result = results.back();
2811
2812
4.10k
        if ( result.second != std::nullopt ) {
2813
262
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
262
        }
2820
2821
4.10k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.10k
        if ( options.disableTests == false ) {
2830
4.10k
            tests::test(op, result.second);
2831
4.10k
        }
2832
2833
4.10k
        postprocess(module, op, result);
2834
4.10k
    }
2835
2836
2.78k
    if ( options.noCompare == false ) {
2837
2.60k
        compare(operations, results, data, size);
2838
2.60k
    }
2839
2.78k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Neg>::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
43
    do {
2725
43
        auto op = getOp(&parentDs, data, size);
2726
43
        auto module = getModule(parentDs);
2727
43
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
43
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
43
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
43
    } 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
26
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
26
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
26
            moduleIDs.insert(moduleID);
2756
26
        }
2757
2758
26
        std::set<uint64_t> operationModuleIDs;
2759
43
        for (const auto& op : operations) {
2760
43
            operationModuleIDs.insert(op.first->ID);
2761
43
        }
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
69
    for (size_t i = 0; i < operations.size(); i++) {
2781
43
        auto& operation = operations[i];
2782
2783
43
        auto& module = operation.first;
2784
43
        auto& op = operation.second;
2785
2786
43
        if ( i > 0 ) {
2787
17
            auto& prevModule = operations[i-1].first;
2788
17
            auto& prevOp = operations[i-1].second;
2789
2790
17
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
5
                auto& curModifier = op.modifier.GetVectorPtr();
2792
5
                if ( curModifier.size() == 0 ) {
2793
0
                    for (size_t j = 0; j < 512; j++) {
2794
0
                        curModifier.push_back(1);
2795
0
                    }
2796
5
                } else {
2797
254
                    for (auto& c : curModifier) {
2798
254
                        c++;
2799
254
                    }
2800
5
                }
2801
5
            }
2802
17
        }
2803
2804
43
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
43
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
43
        const auto& result = results.back();
2811
2812
43
        if ( result.second != std::nullopt ) {
2813
11
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
11
        }
2820
2821
43
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
43
        if ( options.disableTests == false ) {
2830
43
            tests::test(op, result.second);
2831
43
        }
2832
2833
43
        postprocess(module, op, result);
2834
43
    }
2835
2836
26
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
26
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::ECC_Point_Dbl>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
4.96k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
4.96k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
4.96k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
7.28k
    do {
2725
7.28k
        auto op = getOp(&parentDs, data, size);
2726
7.28k
        auto module = getModule(parentDs);
2727
7.28k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
7.28k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
7.28k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
92
            break;
2736
92
        }
2737
7.28k
    } while ( parentDs.Get<bool>() == true );
2738
2739
4.96k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
4.96k
#if 1
2745
4.96k
    {
2746
4.96k
        std::set<uint64_t> moduleIDs;
2747
4.96k
        for (const auto& m : modules ) {
2748
4.72k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
4.72k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
4.72k
            moduleIDs.insert(moduleID);
2756
4.72k
        }
2757
2758
4.96k
        std::set<uint64_t> operationModuleIDs;
2759
6.87k
        for (const auto& op : operations) {
2760
6.87k
            operationModuleIDs.insert(op.first->ID);
2761
6.87k
        }
2762
2763
4.96k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
4.96k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
4.96k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
4.96k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
4.96k
    }
2771
4.96k
#endif
2772
2773
4.96k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
4.96k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
11.8k
    for (size_t i = 0; i < operations.size(); i++) {
2781
6.87k
        auto& operation = operations[i];
2782
2783
6.87k
        auto& module = operation.first;
2784
6.87k
        auto& op = operation.second;
2785
2786
6.87k
        if ( i > 0 ) {
2787
2.14k
            auto& prevModule = operations[i-1].first;
2788
2.14k
            auto& prevOp = operations[i-1].second;
2789
2790
2.14k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
456
                auto& curModifier = op.modifier.GetVectorPtr();
2792
456
                if ( curModifier.size() == 0 ) {
2793
38.9k
                    for (size_t j = 0; j < 512; j++) {
2794
38.9k
                        curModifier.push_back(1);
2795
38.9k
                    }
2796
380
                } else {
2797
33.7k
                    for (auto& c : curModifier) {
2798
33.7k
                        c++;
2799
33.7k
                    }
2800
380
                }
2801
456
            }
2802
2.14k
        }
2803
2804
6.87k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
6.87k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
6.87k
        const auto& result = results.back();
2811
2812
6.87k
        if ( result.second != std::nullopt ) {
2813
160
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
160
        }
2820
2821
6.87k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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.87k
        if ( options.disableTests == false ) {
2830
6.87k
            tests::test(op, result.second);
2831
6.87k
        }
2832
2833
6.87k
        postprocess(module, op, result);
2834
6.87k
    }
2835
2836
4.96k
    if ( options.noCompare == false ) {
2837
4.72k
        compare(operations, results, data, size);
2838
4.72k
    }
2839
4.96k
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::ECC_Point_Cmp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
22
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
22
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
22
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
36
    do {
2725
36
        auto op = getOp(&parentDs, data, size);
2726
36
        auto module = getModule(parentDs);
2727
36
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
36
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
36
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
36
    } while ( parentDs.Get<bool>() == true );
2738
2739
22
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
22
#if 1
2745
22
    {
2746
22
        std::set<uint64_t> moduleIDs;
2747
22
        for (const auto& m : modules ) {
2748
22
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
22
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
22
            moduleIDs.insert(moduleID);
2756
22
        }
2757
2758
22
        std::set<uint64_t> operationModuleIDs;
2759
36
        for (const auto& op : operations) {
2760
36
            operationModuleIDs.insert(op.first->ID);
2761
36
        }
2762
2763
22
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
22
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
22
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
22
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
22
    }
2771
22
#endif
2772
2773
22
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
22
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
58
    for (size_t i = 0; i < operations.size(); i++) {
2781
36
        auto& operation = operations[i];
2782
2783
36
        auto& module = operation.first;
2784
36
        auto& op = operation.second;
2785
2786
36
        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
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
546
                    for (auto& c : curModifier) {
2798
546
                        c++;
2799
546
                    }
2800
4
                }
2801
4
            }
2802
14
        }
2803
2804
36
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
36
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
36
        const auto& result = results.back();
2811
2812
36
        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
36
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->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
        if ( options.disableTests == false ) {
2830
36
            tests::test(op, result.second);
2831
36
        }
2832
2833
36
        postprocess(module, op, result);
2834
36
    }
2835
2836
22
    if ( options.noCompare == false ) {
2837
22
        compare(operations, results, data, size);
2838
22
    }
2839
22
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::DH_GenerateKeyPair>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.90k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.90k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.90k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
3.13k
    do {
2725
3.13k
        auto op = getOp(&parentDs, data, size);
2726
3.13k
        auto module = getModule(parentDs);
2727
3.13k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
3.13k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
3.13k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
41
            break;
2736
41
        }
2737
3.13k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.90k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.90k
#if 1
2745
1.90k
    {
2746
1.90k
        std::set<uint64_t> moduleIDs;
2747
1.90k
        for (const auto& m : modules ) {
2748
1.64k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
1.64k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
1.64k
            moduleIDs.insert(moduleID);
2756
1.64k
        }
2757
2758
1.90k
        std::set<uint64_t> operationModuleIDs;
2759
2.72k
        for (const auto& op : operations) {
2760
2.72k
            operationModuleIDs.insert(op.first->ID);
2761
2.72k
        }
2762
2763
1.90k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.90k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.90k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.90k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1.90k
    }
2771
1.90k
#endif
2772
2773
1.90k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.90k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
4.62k
    for (size_t i = 0; i < operations.size(); i++) {
2781
2.72k
        auto& operation = operations[i];
2782
2783
2.72k
        auto& module = operation.first;
2784
2.72k
        auto& op = operation.second;
2785
2786
2.72k
        if ( i > 0 ) {
2787
1.08k
            auto& prevModule = operations[i-1].first;
2788
1.08k
            auto& prevOp = operations[i-1].second;
2789
2790
1.08k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
413
                auto& curModifier = op.modifier.GetVectorPtr();
2792
413
                if ( curModifier.size() == 0 ) {
2793
71.3k
                    for (size_t j = 0; j < 512; j++) {
2794
71.1k
                        curModifier.push_back(1);
2795
71.1k
                    }
2796
274
                } else {
2797
21.9k
                    for (auto& c : curModifier) {
2798
21.9k
                        c++;
2799
21.9k
                    }
2800
274
                }
2801
413
            }
2802
1.08k
        }
2803
2804
2.72k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
2.72k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
2.72k
        const auto& result = results.back();
2811
2812
2.72k
        if ( result.second != std::nullopt ) {
2813
150
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
150
        }
2820
2821
2.72k
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
2.72k
        if ( options.disableTests == false ) {
2830
2.72k
            tests::test(op, result.second);
2831
2.72k
        }
2832
2833
2.72k
        postprocess(module, op, result);
2834
2.72k
    }
2835
2836
1.90k
    if ( options.noCompare == false ) {
2837
1.64k
        compare(operations, results, data, size);
2838
1.64k
    }
2839
1.90k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::DH_Derive>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
1.11k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
1.11k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
1.11k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
2.30k
    do {
2725
2.30k
        auto op = getOp(&parentDs, data, size);
2726
2.30k
        auto module = getModule(parentDs);
2727
2.30k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
2.30k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
2.30k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
53
            break;
2736
53
        }
2737
2.30k
    } while ( parentDs.Get<bool>() == true );
2738
2739
1.11k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
1.11k
#if 1
2745
1.11k
    {
2746
1.11k
        std::set<uint64_t> moduleIDs;
2747
1.11k
        for (const auto& m : modules ) {
2748
923
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
923
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
923
            moduleIDs.insert(moduleID);
2756
923
        }
2757
2758
1.11k
        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.11k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
1.11k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
1.11k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
1.11k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
1.11k
    }
2771
1.11k
#endif
2772
2773
1.11k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
1.11k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
3.08k
    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
1.04k
            auto& prevModule = operations[i-1].first;
2788
1.04k
            auto& prevOp = operations[i-1].second;
2789
2790
1.04k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
424
                auto& curModifier = op.modifier.GetVectorPtr();
2792
424
                if ( curModifier.size() == 0 ) {
2793
111k
                    for (size_t j = 0; j < 512; j++) {
2794
111k
                        curModifier.push_back(1);
2795
111k
                    }
2796
218
                } else {
2797
11.6k
                    for (auto& c : curModifier) {
2798
11.6k
                        c++;
2799
11.6k
                    }
2800
206
                }
2801
424
            }
2802
1.04k
        }
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
134
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
134
        }
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.11k
    if ( options.noCompare == false ) {
2837
923
        compare(operations, results, data, size);
2838
923
    }
2839
1.11k
}
cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BignumCalc>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
37.2k
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
37.2k
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
37.2k
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
51.6k
    do {
2725
51.6k
        auto op = getOp(&parentDs, data, size);
2726
51.6k
        auto module = getModule(parentDs);
2727
51.6k
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
51.6k
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
51.6k
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
550
            break;
2736
550
        }
2737
51.6k
    } while ( parentDs.Get<bool>() == true );
2738
2739
37.2k
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
37.2k
#if 1
2745
37.2k
    {
2746
37.2k
        std::set<uint64_t> moduleIDs;
2747
37.2k
        for (const auto& m : modules ) {
2748
37.0k
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
37.0k
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
37.0k
            moduleIDs.insert(moduleID);
2756
37.0k
        }
2757
2758
37.2k
        std::set<uint64_t> operationModuleIDs;
2759
51.3k
        for (const auto& op : operations) {
2760
51.3k
            operationModuleIDs.insert(op.first->ID);
2761
51.3k
        }
2762
2763
37.2k
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
37.2k
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
37.2k
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
37.2k
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
37.2k
    }
2771
37.2k
#endif
2772
2773
37.2k
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
37.2k
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
88.5k
    for (size_t i = 0; i < operations.size(); i++) {
2781
51.3k
        auto& operation = operations[i];
2782
2783
51.3k
        auto& module = operation.first;
2784
51.3k
        auto& op = operation.second;
2785
2786
51.3k
        if ( i > 0 ) {
2787
14.3k
            auto& prevModule = operations[i-1].first;
2788
14.3k
            auto& prevOp = operations[i-1].second;
2789
2790
14.3k
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
4.34k
                auto& curModifier = op.modifier.GetVectorPtr();
2792
4.34k
                if ( curModifier.size() == 0 ) {
2793
1.28M
                    for (size_t j = 0; j < 512; j++) {
2794
1.28M
                        curModifier.push_back(1);
2795
1.28M
                    }
2796
2.50k
                } else {
2797
566k
                    for (auto& c : curModifier) {
2798
566k
                        c++;
2799
566k
                    }
2800
1.84k
                }
2801
4.34k
            }
2802
14.3k
        }
2803
2804
51.3k
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
51.3k
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
51.3k
        const auto& result = results.back();
2811
2812
51.3k
        if ( result.second != std::nullopt ) {
2813
21.9k
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
21.9k
        }
2820
2821
51.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
51.3k
        if ( options.disableTests == false ) {
2830
51.3k
            tests::test(op, result.second);
2831
51.3k
        }
2832
2833
51.3k
        postprocess(module, op, result);
2834
51.3k
    }
2835
2836
37.2k
    if ( options.noCompare == false ) {
2837
37.0k
        compare(operations, results, data, size);
2838
37.0k
    }
2839
37.2k
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BignumCalc_Fp2>::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
114
    do {
2725
114
        auto op = getOp(&parentDs, data, size);
2726
114
        auto module = getModule(parentDs);
2727
114
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
114
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
114
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
114
    } 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
113
        for (const auto& op : operations) {
2760
113
            operationModuleIDs.insert(op.first->ID);
2761
113
        }
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
171
    for (size_t i = 0; i < operations.size(); i++) {
2781
113
        auto& operation = operations[i];
2782
2783
113
        auto& module = operation.first;
2784
113
        auto& op = operation.second;
2785
2786
113
        if ( i > 0 ) {
2787
56
            auto& prevModule = operations[i-1].first;
2788
56
            auto& prevOp = operations[i-1].second;
2789
2790
56
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
30
                auto& curModifier = op.modifier.GetVectorPtr();
2792
30
                if ( curModifier.size() == 0 ) {
2793
10.2k
                    for (size_t j = 0; j < 512; j++) {
2794
10.2k
                        curModifier.push_back(1);
2795
10.2k
                    }
2796
20
                } else {
2797
786
                    for (auto& c : curModifier) {
2798
786
                        c++;
2799
786
                    }
2800
10
                }
2801
30
            }
2802
56
        }
2803
2804
113
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
113
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
113
        const auto& result = results.back();
2811
2812
113
        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
113
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
113
        if ( options.disableTests == false ) {
2830
113
            tests::test(op, result.second);
2831
113
        }
2832
2833
113
        postprocess(module, op, result);
2834
113
    }
2835
2836
58
    if ( options.noCompare == false ) {
2837
57
        compare(operations, results, data, size);
2838
57
    }
2839
58
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BignumCalc_Fp12>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
280
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
280
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
280
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
589
    do {
2725
589
        auto op = getOp(&parentDs, data, size);
2726
589
        auto module = getModule(parentDs);
2727
589
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
589
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
589
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
6
            break;
2736
6
        }
2737
589
    } while ( parentDs.Get<bool>() == true );
2738
2739
280
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
280
#if 1
2745
280
    {
2746
280
        std::set<uint64_t> moduleIDs;
2747
280
        for (const auto& m : modules ) {
2748
279
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
279
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
279
            moduleIDs.insert(moduleID);
2756
279
        }
2757
2758
280
        std::set<uint64_t> operationModuleIDs;
2759
586
        for (const auto& op : operations) {
2760
586
            operationModuleIDs.insert(op.first->ID);
2761
586
        }
2762
2763
280
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
280
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
280
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
280
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
280
    }
2771
280
#endif
2772
2773
280
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
280
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
866
    for (size_t i = 0; i < operations.size(); i++) {
2781
586
        auto& operation = operations[i];
2782
2783
586
        auto& module = operation.first;
2784
586
        auto& op = operation.second;
2785
2786
586
        if ( i > 0 ) {
2787
307
            auto& prevModule = operations[i-1].first;
2788
307
            auto& prevOp = operations[i-1].second;
2789
2790
307
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
164
                auto& curModifier = op.modifier.GetVectorPtr();
2792
164
                if ( curModifier.size() == 0 ) {
2793
70.2k
                    for (size_t j = 0; j < 512; j++) {
2794
70.1k
                        curModifier.push_back(1);
2795
70.1k
                    }
2796
137
                } else {
2797
12.9k
                    for (auto& c : curModifier) {
2798
12.9k
                        c++;
2799
12.9k
                    }
2800
27
                }
2801
164
            }
2802
307
        }
2803
2804
586
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
586
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
586
        const auto& result = results.back();
2811
2812
586
        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
586
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
586
        if ( options.disableTests == false ) {
2830
586
            tests::test(op, result.second);
2831
586
        }
2832
2833
586
        postprocess(module, op, result);
2834
586
    }
2835
2836
280
    if ( options.noCompare == false ) {
2837
279
        compare(operations, results, data, size);
2838
279
    }
2839
280
}
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
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
1
            break;
2736
1
        }
2737
8
    } 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
8
        for (const auto& op : operations) {
2760
8
            operationModuleIDs.insert(op.first->ID);
2761
8
        }
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
11
    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
2
                auto& curModifier = op.modifier.GetVectorPtr();
2792
2
                if ( curModifier.size() == 0 ) {
2793
513
                    for (size_t j = 0; j < 512; j++) {
2794
512
                        curModifier.push_back(1);
2795
512
                    }
2796
1
                } else {
2797
1.00k
                    for (auto& c : curModifier) {
2798
1.00k
                        c++;
2799
1.00k
                    }
2800
1
                }
2801
2
            }
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
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
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
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
0
            break;
2736
0
        }
2737
16
    } 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
11
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
11
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
11
            moduleIDs.insert(moduleID);
2756
11
        }
2757
2758
11
        std::set<uint64_t> operationModuleIDs;
2759
16
        for (const auto& op : operations) {
2760
16
            operationModuleIDs.insert(op.first->ID);
2761
16
        }
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
27
    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
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
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
167
                    for (auto& c : curModifier) {
2798
167
                        c++;
2799
167
                    }
2800
4
                }
2801
4
            }
2802
5
        }
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
11
    if ( options.noCompare == false ) {
2837
11
        compare(operations, results, data, size);
2838
11
    }
2839
11
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BLS_Signature, cryptofuzz::operation::BLS_Sign>::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
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
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
9
        for (const auto& op : operations) {
2760
9
            operationModuleIDs.insert(op.first->ID);
2761
9
        }
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
15
    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
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
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
327
                    for (auto& c : curModifier) {
2798
327
                        c++;
2799
327
                    }
2800
2
                }
2801
2
            }
2802
3
        }
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
6
    if ( options.noCompare == false ) {
2837
6
        compare(operations, results, data, size);
2838
6
    }
2839
6
}
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
690
                    for (auto& c : curModifier) {
2798
690
                        c++;
2799
690
                    }
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
12
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
12
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
12
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
25
    do {
2725
25
        auto op = getOp(&parentDs, data, size);
2726
25
        auto module = getModule(parentDs);
2727
25
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
25
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
25
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
25
    } while ( parentDs.Get<bool>() == true );
2738
2739
12
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
12
#if 1
2745
12
    {
2746
12
        std::set<uint64_t> moduleIDs;
2747
12
        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
12
        std::set<uint64_t> operationModuleIDs;
2759
12
        for (const auto& op : operations) {
2760
12
            operationModuleIDs.insert(op.first->ID);
2761
12
        }
2762
2763
12
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
12
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
12
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
12
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
12
    }
2771
12
#endif
2772
2773
12
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
12
    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
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
4
                auto& curModifier = op.modifier.GetVectorPtr();
2792
4
                if ( curModifier.size() == 0 ) {
2793
513
                    for (size_t j = 0; j < 512; j++) {
2794
512
                        curModifier.push_back(1);
2795
512
                    }
2796
3
                } else {
2797
32
                    for (auto& c : curModifier) {
2798
32
                        c++;
2799
32
                    }
2800
3
                }
2801
4
            }
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
12
    if ( options.noCompare == false ) {
2837
4
        compare(operations, results, data, size);
2838
4
    }
2839
12
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_BatchVerify>::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
23
    do {
2725
23
        auto op = getOp(&parentDs, data, size);
2726
23
        auto module = getModule(parentDs);
2727
23
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
23
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
23
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
23
    } 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
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
10
        std::set<uint64_t> operationModuleIDs;
2759
10
        for (const auto& op : operations) {
2760
9
            operationModuleIDs.insert(op.first->ID);
2761
9
        }
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
19
    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
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
4
                auto& curModifier = op.modifier.GetVectorPtr();
2792
4
                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
474
                    for (auto& c : curModifier) {
2798
474
                        c++;
2799
474
                    }
2800
2
                }
2801
4
            }
2802
6
        }
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
10
    if ( options.noCompare == false ) {
2837
3
        compare(operations, results, data, size);
2838
3
    }
2839
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Aggregate_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
5
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
5
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
5
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
11
    do {
2725
11
        auto op = getOp(&parentDs, data, size);
2726
11
        auto module = getModule(parentDs);
2727
11
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
11
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
11
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
11
    } while ( parentDs.Get<bool>() == true );
2738
2739
5
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
5
#if 1
2745
5
    {
2746
5
        std::set<uint64_t> moduleIDs;
2747
5
        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
5
        std::set<uint64_t> operationModuleIDs;
2759
10
        for (const auto& op : operations) {
2760
10
            operationModuleIDs.insert(op.first->ID);
2761
10
        }
2762
2763
5
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
5
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
5
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
5
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
5
    }
2771
5
#endif
2772
2773
5
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
5
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
15
    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
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
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
4.52k
                    for (auto& c : curModifier) {
2798
4.52k
                        c++;
2799
4.52k
                    }
2800
4
                }
2801
4
            }
2802
6
        }
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
5
    if ( options.noCompare == false ) {
2837
4
        compare(operations, results, data, size);
2838
4
    }
2839
5
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Aggregate_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
28
    do {
2725
28
        auto op = getOp(&parentDs, data, size);
2726
28
        auto module = getModule(parentDs);
2727
28
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
28
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
28
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
28
    } 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
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
10
        std::set<uint64_t> operationModuleIDs;
2759
10
        for (const auto& op : operations) {
2760
7
            operationModuleIDs.insert(op.first->ID);
2761
7
        }
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
17
    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
1.02k
                    for (size_t j = 0; j < 512; j++) {
2794
1.02k
                        curModifier.push_back(1);
2795
1.02k
                    }
2796
2
                } else {
2797
616
                    for (auto& c : curModifier) {
2798
616
                        c++;
2799
616
                    }
2800
1
                }
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
10
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
10
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_Pairing>::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
4
    do {
2725
4
        auto op = getOp(&parentDs, data, size);
2726
4
        auto module = getModule(parentDs);
2727
4
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
4
    } 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
4
        for (const auto& op : operations) {
2760
4
            operationModuleIDs.insert(op.first->ID);
2761
4
        }
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
6
    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
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
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
339
                    for (auto& c : curModifier) {
2798
339
                        c++;
2799
339
                    }
2800
2
                }
2801
2
            }
2802
2
        }
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
2
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
2
}
cryptofuzz::ExecutorBase<cryptofuzz::component::Fp12, cryptofuzz::operation::BLS_MillerLoop>::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
4
    do {
2725
4
        auto op = getOp(&parentDs, data, size);
2726
4
        auto module = getModule(parentDs);
2727
4
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
4
    } 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
4
        for (const auto& op : operations) {
2760
4
            operationModuleIDs.insert(op.first->ID);
2761
4
        }
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
6
    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
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
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
143
                    for (auto& c : curModifier) {
2798
143
                        c++;
2799
143
                    }
2800
2
                }
2801
2
            }
2802
2
        }
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
2
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
2
}
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
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
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
3
        std::set<uint64_t> operationModuleIDs;
2759
4
        for (const auto& op : operations) {
2760
4
            operationModuleIDs.insert(op.first->ID);
2761
4
        }
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
7
    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
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
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
149
                    for (auto& c : curModifier) {
2798
149
                        c++;
2799
149
                    }
2800
2
                }
2801
2
            }
2802
2
        }
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
3
    if ( options.noCompare == false ) {
2837
2
        compare(operations, results, data, size);
2838
2
    }
2839
3
}
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
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
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
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
486
                    for (auto& c : curModifier) {
2798
486
                        c++;
2799
486
                    }
2800
3
                }
2801
3
            }
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_MapToG1>::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
405
                    for (auto& c : curModifier) {
2798
405
                        c++;
2799
405
                    }
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<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
162
                    for (auto& c : curModifier) {
2798
162
                        c++;
2799
162
                    }
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
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
44
    do {
2725
44
        auto op = getOp(&parentDs, data, size);
2726
44
        auto module = getModule(parentDs);
2727
44
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
44
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
44
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
44
    } 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
43
        for (const auto& op : operations) {
2760
43
            operationModuleIDs.insert(op.first->ID);
2761
43
        }
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
69
    for (size_t i = 0; i < operations.size(); i++) {
2781
43
        auto& operation = operations[i];
2782
2783
43
        auto& module = operation.first;
2784
43
        auto& op = operation.second;
2785
2786
43
        if ( i > 0 ) {
2787
18
            auto& prevModule = operations[i-1].first;
2788
18
            auto& prevOp = operations[i-1].second;
2789
2790
18
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
10
                auto& curModifier = op.modifier.GetVectorPtr();
2792
10
                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
8
                } else {
2797
3.26k
                    for (auto& c : curModifier) {
2798
3.26k
                        c++;
2799
3.26k
                    }
2800
8
                }
2801
10
            }
2802
18
        }
2803
2804
43
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
43
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
43
        const auto& result = results.back();
2811
2812
43
        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
43
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
43
        if ( options.disableTests == false ) {
2830
43
            tests::test(op, result.second);
2831
43
        }
2832
2833
43
        postprocess(module, op, result);
2834
43
    }
2835
2836
26
    if ( options.noCompare == false ) {
2837
25
        compare(operations, results, data, size);
2838
25
    }
2839
26
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_IsG2OnCurve>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
21
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
21
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
21
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
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
2
            break;
2736
2
        }
2737
48
    } while ( parentDs.Get<bool>() == true );
2738
2739
21
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
21
#if 1
2745
21
    {
2746
21
        std::set<uint64_t> moduleIDs;
2747
21
        for (const auto& m : modules ) {
2748
21
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
21
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
21
            moduleIDs.insert(moduleID);
2756
21
        }
2757
2758
21
        std::set<uint64_t> operationModuleIDs;
2759
48
        for (const auto& op : operations) {
2760
48
            operationModuleIDs.insert(op.first->ID);
2761
48
        }
2762
2763
21
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
21
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
21
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
21
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
21
    }
2771
21
#endif
2772
2773
21
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
21
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
69
    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
27
            auto& prevModule = operations[i-1].first;
2788
27
            auto& prevOp = operations[i-1].second;
2789
2790
27
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
15
                auto& curModifier = op.modifier.GetVectorPtr();
2792
15
                if ( curModifier.size() == 0 ) {
2793
6.15k
                    for (size_t j = 0; j < 512; j++) {
2794
6.14k
                        curModifier.push_back(1);
2795
6.14k
                    }
2796
12
                } else {
2797
740
                    for (auto& c : curModifier) {
2798
740
                        c++;
2799
740
                    }
2800
3
                }
2801
15
            }
2802
27
        }
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
21
    if ( options.noCompare == false ) {
2837
21
        compare(operations, results, data, size);
2838
21
    }
2839
21
}
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
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
}
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_Decompress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Unexecuted instantiation: cryptofuzz::ExecutorBase<cryptofuzz::Bignum, cryptofuzz::operation::BLS_Compress_G1>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_Decompress_G2>::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
310
                    for (auto& c : curModifier) {
2798
310
                        c++;
2799
310
                    }
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::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
4
    do {
2725
4
        auto op = getOp(&parentDs, data, size);
2726
4
        auto module = getModule(parentDs);
2727
4
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
4
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
4
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
4
    } 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
4
        for (const auto& op : operations) {
2760
4
            operationModuleIDs.insert(op.first->ID);
2761
4
        }
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
6
    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
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
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
471
                    for (auto& c : curModifier) {
2798
471
                        c++;
2799
471
                    }
2800
2
                }
2801
2
            }
2802
2
        }
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
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
39
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
39
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
39
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
67
    do {
2725
67
        auto op = getOp(&parentDs, data, size);
2726
67
        auto module = getModule(parentDs);
2727
67
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
67
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
67
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
67
    } while ( parentDs.Get<bool>() == true );
2738
2739
39
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
39
#if 1
2745
39
    {
2746
39
        std::set<uint64_t> moduleIDs;
2747
39
        for (const auto& m : modules ) {
2748
39
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
39
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
39
            moduleIDs.insert(moduleID);
2756
39
        }
2757
2758
39
        std::set<uint64_t> operationModuleIDs;
2759
67
        for (const auto& op : operations) {
2760
67
            operationModuleIDs.insert(op.first->ID);
2761
67
        }
2762
2763
39
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
39
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
39
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
39
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
39
    }
2771
39
#endif
2772
2773
39
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
39
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
106
    for (size_t i = 0; i < operations.size(); i++) {
2781
67
        auto& operation = operations[i];
2782
2783
67
        auto& module = operation.first;
2784
67
        auto& op = operation.second;
2785
2786
67
        if ( i > 0 ) {
2787
28
            auto& prevModule = operations[i-1].first;
2788
28
            auto& prevOp = operations[i-1].second;
2789
2790
28
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
16
                auto& curModifier = op.modifier.GetVectorPtr();
2792
16
                if ( curModifier.size() == 0 ) {
2793
6.66k
                    for (size_t j = 0; j < 512; j++) {
2794
6.65k
                        curModifier.push_back(1);
2795
6.65k
                    }
2796
13
                } else {
2797
367
                    for (auto& c : curModifier) {
2798
367
                        c++;
2799
367
                    }
2800
3
                }
2801
16
            }
2802
28
        }
2803
2804
67
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
67
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
67
        const auto& result = results.back();
2811
2812
67
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
67
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
67
        if ( options.disableTests == false ) {
2830
67
            tests::test(op, result.second);
2831
67
        }
2832
2833
67
        postprocess(module, op, result);
2834
67
    }
2835
2836
39
    if ( options.noCompare == false ) {
2837
39
        compare(operations, results, data, size);
2838
39
    }
2839
39
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
28
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
28
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
28
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
46
    do {
2725
46
        auto op = getOp(&parentDs, data, size);
2726
46
        auto module = getModule(parentDs);
2727
46
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
46
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
46
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
46
    } while ( parentDs.Get<bool>() == true );
2738
2739
28
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
28
#if 1
2745
28
    {
2746
28
        std::set<uint64_t> moduleIDs;
2747
28
        for (const auto& m : modules ) {
2748
27
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
27
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
27
            moduleIDs.insert(moduleID);
2756
27
        }
2757
2758
28
        std::set<uint64_t> operationModuleIDs;
2759
45
        for (const auto& op : operations) {
2760
45
            operationModuleIDs.insert(op.first->ID);
2761
45
        }
2762
2763
28
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
28
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
28
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
28
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
28
    }
2771
28
#endif
2772
2773
28
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
28
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
73
    for (size_t i = 0; i < operations.size(); i++) {
2781
45
        auto& operation = operations[i];
2782
2783
45
        auto& module = operation.first;
2784
45
        auto& op = operation.second;
2785
2786
45
        if ( i > 0 ) {
2787
18
            auto& prevModule = operations[i-1].first;
2788
18
            auto& prevOp = operations[i-1].second;
2789
2790
18
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
9
                auto& curModifier = op.modifier.GetVectorPtr();
2792
9
                if ( curModifier.size() == 0 ) {
2793
2.56k
                    for (size_t j = 0; j < 512; j++) {
2794
2.56k
                        curModifier.push_back(1);
2795
2.56k
                    }
2796
5
                } else {
2797
4.94k
                    for (auto& c : curModifier) {
2798
4.94k
                        c++;
2799
4.94k
                    }
2800
4
                }
2801
9
            }
2802
18
        }
2803
2804
45
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
45
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
45
        const auto& result = results.back();
2811
2812
45
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
45
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
45
        if ( options.disableTests == false ) {
2830
45
            tests::test(op, result.second);
2831
45
        }
2832
2833
45
        postprocess(module, op, result);
2834
45
    }
2835
2836
28
    if ( options.noCompare == false ) {
2837
27
        compare(operations, results, data, size);
2838
27
    }
2839
28
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G1_IsEq>::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
87
    do {
2725
87
        auto op = getOp(&parentDs, data, size);
2726
87
        auto module = getModule(parentDs);
2727
87
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
87
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
87
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
87
    } 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
46
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
46
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
46
            moduleIDs.insert(moduleID);
2756
46
        }
2757
2758
47
        std::set<uint64_t> operationModuleIDs;
2759
86
        for (const auto& op : operations) {
2760
86
            operationModuleIDs.insert(op.first->ID);
2761
86
        }
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
133
    for (size_t i = 0; i < operations.size(); i++) {
2781
86
        auto& operation = operations[i];
2782
2783
86
        auto& module = operation.first;
2784
86
        auto& op = operation.second;
2785
2786
86
        if ( i > 0 ) {
2787
40
            auto& prevModule = operations[i-1].first;
2788
40
            auto& prevOp = operations[i-1].second;
2789
2790
40
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
23
                auto& curModifier = op.modifier.GetVectorPtr();
2792
23
                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
5.93k
                    for (auto& c : curModifier) {
2798
5.93k
                        c++;
2799
5.93k
                    }
2800
8
                }
2801
23
            }
2802
40
        }
2803
2804
86
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
86
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
86
        const auto& result = results.back();
2811
2812
86
        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
86
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
86
        if ( options.disableTests == false ) {
2830
86
            tests::test(op, result.second);
2831
86
        }
2832
2833
86
        postprocess(module, op, result);
2834
86
    }
2835
2836
47
    if ( options.noCompare == false ) {
2837
46
        compare(operations, results, data, size);
2838
46
    }
2839
47
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
27
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
27
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
27
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
44
    do {
2725
44
        auto op = getOp(&parentDs, data, size);
2726
44
        auto module = getModule(parentDs);
2727
44
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
44
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
44
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
44
    } while ( parentDs.Get<bool>() == true );
2738
2739
27
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
27
#if 1
2745
27
    {
2746
27
        std::set<uint64_t> moduleIDs;
2747
27
        for (const auto& m : modules ) {
2748
26
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
26
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
26
            moduleIDs.insert(moduleID);
2756
26
        }
2757
2758
27
        std::set<uint64_t> operationModuleIDs;
2759
43
        for (const auto& op : operations) {
2760
43
            operationModuleIDs.insert(op.first->ID);
2761
43
        }
2762
2763
27
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
27
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
27
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
27
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
27
    }
2771
27
#endif
2772
2773
27
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
27
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
70
    for (size_t i = 0; i < operations.size(); i++) {
2781
43
        auto& operation = operations[i];
2782
2783
43
        auto& module = operation.first;
2784
43
        auto& op = operation.second;
2785
2786
43
        if ( i > 0 ) {
2787
17
            auto& prevModule = operations[i-1].first;
2788
17
            auto& prevOp = operations[i-1].second;
2789
2790
17
            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
4.23k
                    for (auto& c : curModifier) {
2798
4.23k
                        c++;
2799
4.23k
                    }
2800
4
                }
2801
4
            }
2802
17
        }
2803
2804
43
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
43
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
43
        const auto& result = results.back();
2811
2812
43
        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
43
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
43
        if ( options.disableTests == false ) {
2830
43
            tests::test(op, result.second);
2831
43
        }
2832
2833
43
        postprocess(module, op, result);
2834
43
    }
2835
2836
27
    if ( options.noCompare == false ) {
2837
26
        compare(operations, results, data, size);
2838
26
    }
2839
27
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Add>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
66
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
66
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
66
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
132
    do {
2725
132
        auto op = getOp(&parentDs, data, size);
2726
132
        auto module = getModule(parentDs);
2727
132
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
132
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
132
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
132
    } while ( parentDs.Get<bool>() == true );
2738
2739
66
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
66
#if 1
2745
66
    {
2746
66
        std::set<uint64_t> moduleIDs;
2747
66
        for (const auto& m : modules ) {
2748
66
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
66
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
66
            moduleIDs.insert(moduleID);
2756
66
        }
2757
2758
66
        std::set<uint64_t> operationModuleIDs;
2759
132
        for (const auto& op : operations) {
2760
132
            operationModuleIDs.insert(op.first->ID);
2761
132
        }
2762
2763
66
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
66
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
66
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
66
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
66
    }
2771
66
#endif
2772
2773
66
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
66
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
198
    for (size_t i = 0; i < operations.size(); i++) {
2781
132
        auto& operation = operations[i];
2782
2783
132
        auto& module = operation.first;
2784
132
        auto& op = operation.second;
2785
2786
132
        if ( i > 0 ) {
2787
66
            auto& prevModule = operations[i-1].first;
2788
66
            auto& prevOp = operations[i-1].second;
2789
2790
66
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
38
                auto& curModifier = op.modifier.GetVectorPtr();
2792
38
                if ( curModifier.size() == 0 ) {
2793
12.3k
                    for (size_t j = 0; j < 512; j++) {
2794
12.2k
                        curModifier.push_back(1);
2795
12.2k
                    }
2796
24
                } else {
2797
3.76k
                    for (auto& c : curModifier) {
2798
3.76k
                        c++;
2799
3.76k
                    }
2800
14
                }
2801
38
            }
2802
66
        }
2803
2804
132
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
132
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
132
        const auto& result = results.back();
2811
2812
132
        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
132
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
132
        if ( options.disableTests == false ) {
2830
132
            tests::test(op, result.second);
2831
132
        }
2832
2833
132
        postprocess(module, op, result);
2834
132
    }
2835
2836
66
    if ( options.noCompare == false ) {
2837
66
        compare(operations, results, data, size);
2838
66
    }
2839
66
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Mul>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
39
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
39
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
39
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
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
39
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
39
#if 1
2745
39
    {
2746
39
        std::set<uint64_t> moduleIDs;
2747
39
        for (const auto& m : modules ) {
2748
39
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
39
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
39
            moduleIDs.insert(moduleID);
2756
39
        }
2757
2758
39
        std::set<uint64_t> operationModuleIDs;
2759
68
        for (const auto& op : operations) {
2760
68
            operationModuleIDs.insert(op.first->ID);
2761
68
        }
2762
2763
39
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
39
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
39
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
39
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
39
    }
2771
39
#endif
2772
2773
39
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
39
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
107
    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
29
            auto& prevModule = operations[i-1].first;
2788
29
            auto& prevOp = operations[i-1].second;
2789
2790
29
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
13
                auto& curModifier = op.modifier.GetVectorPtr();
2792
13
                if ( curModifier.size() == 0 ) {
2793
4.61k
                    for (size_t j = 0; j < 512; j++) {
2794
4.60k
                        curModifier.push_back(1);
2795
4.60k
                    }
2796
9
                } else {
2797
407
                    for (auto& c : curModifier) {
2798
407
                        c++;
2799
407
                    }
2800
4
                }
2801
13
            }
2802
29
        }
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
39
    if ( options.noCompare == false ) {
2837
39
        compare(operations, results, data, size);
2838
39
    }
2839
39
}
cryptofuzz::ExecutorBase<bool, cryptofuzz::operation::BLS_G2_IsEq>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
79
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
79
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
79
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
151
    do {
2725
151
        auto op = getOp(&parentDs, data, size);
2726
151
        auto module = getModule(parentDs);
2727
151
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
151
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
151
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
2
            break;
2736
2
        }
2737
151
    } while ( parentDs.Get<bool>() == true );
2738
2739
79
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
79
#if 1
2745
79
    {
2746
79
        std::set<uint64_t> moduleIDs;
2747
79
        for (const auto& m : modules ) {
2748
78
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
78
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
78
            moduleIDs.insert(moduleID);
2756
78
        }
2757
2758
79
        std::set<uint64_t> operationModuleIDs;
2759
147
        for (const auto& op : operations) {
2760
147
            operationModuleIDs.insert(op.first->ID);
2761
147
        }
2762
2763
79
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
79
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
79
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
79
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
79
    }
2771
79
#endif
2772
2773
79
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
79
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
226
    for (size_t i = 0; i < operations.size(); i++) {
2781
147
        auto& operation = operations[i];
2782
2783
147
        auto& module = operation.first;
2784
147
        auto& op = operation.second;
2785
2786
147
        if ( i > 0 ) {
2787
69
            auto& prevModule = operations[i-1].first;
2788
69
            auto& prevOp = operations[i-1].second;
2789
2790
69
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
36
                auto& curModifier = op.modifier.GetVectorPtr();
2792
36
                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
21
                } else {
2797
3.06k
                    for (auto& c : curModifier) {
2798
3.06k
                        c++;
2799
3.06k
                    }
2800
21
                }
2801
36
            }
2802
69
        }
2803
2804
147
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
147
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
147
        const auto& result = results.back();
2811
2812
147
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
147
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
147
        if ( options.disableTests == false ) {
2830
147
            tests::test(op, result.second);
2831
147
        }
2832
2833
147
        postprocess(module, op, result);
2834
147
    }
2835
2836
79
    if ( options.noCompare == false ) {
2837
78
        compare(operations, results, data, size);
2838
78
    }
2839
79
}
cryptofuzz::ExecutorBase<cryptofuzz::component::G2, cryptofuzz::operation::BLS_G2_Neg>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
45
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
45
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
45
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
71
    do {
2725
71
        auto op = getOp(&parentDs, data, size);
2726
71
        auto module = getModule(parentDs);
2727
71
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
71
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
71
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
71
    } while ( parentDs.Get<bool>() == true );
2738
2739
45
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
45
#if 1
2745
45
    {
2746
45
        std::set<uint64_t> moduleIDs;
2747
45
        for (const auto& m : modules ) {
2748
44
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
44
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
44
            moduleIDs.insert(moduleID);
2756
44
        }
2757
2758
45
        std::set<uint64_t> operationModuleIDs;
2759
70
        for (const auto& op : operations) {
2760
70
            operationModuleIDs.insert(op.first->ID);
2761
70
        }
2762
2763
45
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
45
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
45
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
45
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
45
    }
2771
45
#endif
2772
2773
45
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
45
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
115
    for (size_t i = 0; i < operations.size(); i++) {
2781
70
        auto& operation = operations[i];
2782
2783
70
        auto& module = operation.first;
2784
70
        auto& op = operation.second;
2785
2786
70
        if ( i > 0 ) {
2787
26
            auto& prevModule = operations[i-1].first;
2788
26
            auto& prevOp = operations[i-1].second;
2789
2790
26
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
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
1.03k
                    for (auto& c : curModifier) {
2798
1.03k
                        c++;
2799
1.03k
                    }
2800
8
                }
2801
14
            }
2802
26
        }
2803
2804
70
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
70
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
70
        const auto& result = results.back();
2811
2812
70
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
70
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
70
        if ( options.disableTests == false ) {
2830
70
            tests::test(op, result.second);
2831
70
        }
2832
2833
70
        postprocess(module, op, result);
2834
70
    }
2835
2836
45
    if ( options.noCompare == false ) {
2837
44
        compare(operations, results, data, size);
2838
44
    }
2839
45
}
cryptofuzz::ExecutorBase<cryptofuzz::component::BignumPair, cryptofuzz::operation::BLS_G1_MultiExp>::Run(fuzzing::datasource::Datasource&, unsigned char const*, unsigned long) const
Line
Count
Source
2719
49
void ExecutorBase<ResultType, OperationType>::Run(Datasource& parentDs, const uint8_t* data, const size_t size) const {
2720
49
    typename ExecutorBase<ResultType, OperationType>::ResultSet results;
2721
2722
49
    std::vector< std::pair<std::shared_ptr<Module>, OperationType> > operations;
2723
2724
101
    do {
2725
101
        auto op = getOp(&parentDs, data, size);
2726
101
        auto module = getModule(parentDs);
2727
101
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
101
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
101
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
1
            break;
2736
1
        }
2737
101
    } while ( parentDs.Get<bool>() == true );
2738
2739
49
    if ( operations.empty() == true ) {
2740
0
        return;
2741
0
    }
2742
2743
    /* Enable this to run every operation on every loaded module */
2744
49
#if 1
2745
49
    {
2746
49
        std::set<uint64_t> moduleIDs;
2747
49
        for (const auto& m : modules ) {
2748
36
            const auto moduleID = m.first;
2749
2750
            /* Skip if this is a disabled module */
2751
36
            if ( options.disableModules.HaveExplicit(moduleID) ) {
2752
0
                continue;
2753
0
            }
2754
2755
36
            moduleIDs.insert(moduleID);
2756
36
        }
2757
2758
49
        std::set<uint64_t> operationModuleIDs;
2759
70
        for (const auto& op : operations) {
2760
70
            operationModuleIDs.insert(op.first->ID);
2761
70
        }
2762
2763
49
        std::vector<uint64_t> addModuleIDs(moduleIDs.size());
2764
49
        auto it = std::set_difference(moduleIDs.begin(), moduleIDs.end(), operationModuleIDs.begin(), operationModuleIDs.end(), addModuleIDs.begin());
2765
49
        addModuleIDs.resize(it - addModuleIDs.begin());
2766
2767
49
        for (const auto& id : addModuleIDs) {
2768
0
            operations.push_back({ modules.at(id), operations[0].second});
2769
0
        }
2770
49
    }
2771
49
#endif
2772
2773
49
    if ( operations.size() < options.minModules ) {
2774
0
        return;
2775
0
    }
2776
2777
49
    if ( options.debug == true && !operations.empty() ) {
2778
0
        printf("Running:\n%s\n", operations[0].second.ToString().c_str());
2779
0
    }
2780
119
    for (size_t i = 0; i < operations.size(); i++) {
2781
70
        auto& operation = operations[i];
2782
2783
70
        auto& module = operation.first;
2784
70
        auto& op = operation.second;
2785
2786
70
        if ( i > 0 ) {
2787
34
            auto& prevModule = operations[i-1].first;
2788
34
            auto& prevOp = operations[i-1].second;
2789
2790
34
            if ( prevModule == module && prevOp.modifier == op.modifier ) {
2791
20
                auto& curModifier = op.modifier.GetVectorPtr();
2792
20
                if ( curModifier.size() == 0 ) {
2793
2.56k
                    for (size_t j = 0; j < 512; j++) {
2794
2.56k
                        curModifier.push_back(1);
2795
2.56k
                    }
2796
15
                } else {
2797
15.9k
                    for (auto& c : curModifier) {
2798
15.9k
                        c++;
2799
15.9k
                    }
2800
15
                }
2801
20
            }
2802
34
        }
2803
2804
70
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
70
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
70
        const auto& result = results.back();
2811
2812
70
        if ( result.second != std::nullopt ) {
2813
0
            if ( options.jsonDumpFP != std::nullopt ) {
2814
0
                nlohmann::json j;
2815
0
                j["operation"] = op.ToJSON();
2816
0
                j["result"] = util::ToJSON(*result.second);
2817
0
                fprintf(*options.jsonDumpFP, "%s\n", j.dump().c_str());
2818
0
            }
2819
0
        }
2820
2821
70
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
70
        if ( options.disableTests == false ) {
2830
70
            tests::test(op, result.second);
2831
70
        }
2832
2833
70
        postprocess(module, op, result);
2834
70
    }
2835
2836
49
    if ( options.noCompare == false ) {
2837
36
        compare(operations, results, data, size);
2838
36
    }
2839
49
}
cryptofuzz::ExecutorBase<cryptofuzz::Buffer, cryptofuzz::operation::Misc>::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
2.51k
                    for (auto& c : curModifier) {
2798
2.51k
                        c++;
2799
2.51k
                    }
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<bool, cryptofuzz::operation::SR25519_Verify>::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
14
    do {
2725
14
        auto op = getOp(&parentDs, data, size);
2726
14
        auto module = getModule(parentDs);
2727
14
        if ( module == nullptr ) {
2728
0
            continue;
2729
0
        }
2730
2731
14
        operations.push_back( {module, op} );
2732
2733
        /* Limit number of operations per run to prevent time-outs */
2734
14
        if ( operations.size() == OperationType::MaxOperations() ) {
2735
0
            break;
2736
0
        }
2737
14
    } 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
11
        for (const auto& op : operations) {
2760
11
            operationModuleIDs.insert(op.first->ID);
2761
11
        }
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
18
    for (size_t i = 0; i < operations.size(); i++) {
2781
11
        auto& operation = operations[i];
2782
2783
11
        auto& module = operation.first;
2784
11
        auto& op = operation.second;
2785
2786
11
        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
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
665
                    for (auto& c : curModifier) {
2798
665
                        c++;
2799
665
                    }
2800
4
                }
2801
4
            }
2802
5
        }
2803
2804
11
        if ( options.debug == true ) {
2805
0
            printf("modifier: %s\n", util::HexDump(op.modifier.Get()).c_str());
2806
0
        }
2807
2808
11
        results.push_back( {module, std::move(callModule(module, op))} );
2809
2810
11
        const auto& result = results.back();
2811
2812
11
        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
11
        if ( options.debug == true ) {
2822
0
            printf("Module %s result:\n\n%s\n\n",
2823
0
                    result.first->name.c_str(),
2824
0
                    result.second == std::nullopt ?
2825
0
                        "(empty)" :
2826
0
                        util::ToString(*result.second).c_str());
2827
0
        }
2828
2829
11
        if ( options.disableTests == false ) {
2830
11
            tests::test(op, result.second);
2831
11
        }
2832
2833
11
        postprocess(module, op, result);
2834
11
    }
2835
2836
7
    if ( options.noCompare == false ) {
2837
6
        compare(operations, results, data, size);
2838
6
    }
2839
7
}
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 */